Know these cold.
12 skills that AI interviews lean on. Read each one once, memorise its cards, then keep it sharp with a short drill whenever you have a few minutes.
1Break down a vague problem
Canva lists this among the skills it scores, and AI can't do it for you until you know what you want.
Before writing anything, find out: what goes in, what comes out, how big it gets, and what counts as correct.
Then split the work into pieces small enough to test alone. Each piece should have a clear input and output.
Write down what must be true when you finish. That list becomes your tests, and your prompts.
The 4 things to remember
- What four things do you pin down first in any problem?
- The input, the output, the scale, and what counts as correct.
- What's a good size for one piece of work?
- Small enough to test alone, with a clear input and output: usually one or two functions.
- What are the first questions for an ambiguous product problem?
- Who uses it, how often, what a failure costs, and what's explicitly out of scope.
- What should you write before coding?
- A short list of must-pass behaviours, including edge cases. It becomes your tests.
2Write a prompt that works first time
Vague requests get filled in with plausible guesses. In a live round, a bad prompt costs you minutes.
A strong coding prompt has five parts: context, the exact interface, constraints, what to leave out, and how you'll check it.
Ask for one small piece at a time. You can't review a big answer quickly, and reviewing is your job.
When the output is wrong, say what's wrong and why. 'Try again' tends to get the same mistake reworded.
The 5 things to remember
- What are the five parts of a spec prompt?
- Context, exact interface, constraints, what to leave out, and how it'll be checked.
- How much code should you ask for at once in a live round?
- One or two functions. Anything larger can't be reviewed properly under time pressure.
- What's the best way to fix a wrong answer from a model?
- State what's wrong, with the failing input, and ask for that one change. Don't just say 'try again'.
- Why start a fresh chat for each problem?
- Long chats drift from earlier instructions and carry old mistakes, while a fresh start has clean context.
- What's the strongest way to stop a model revealing something?
- Don't send it. Absent data can't leak, whereas rules can be argued with.
3Review code fast
When AI writes the code, reading it is your main job. It's scored directly in AI-allowed rounds.
Read for what the author assumed. Most bugs live at boundaries: empty input, one item, duplicates, huge input, and bad data.
AI drafts have recurring faults. They handle the happy path well, invent APIs now and then, and may make a test pass by special-casing it.
Keep a fixed order so you don't skip things under pressure: purpose, boundaries, state, errors, cost.
The 5 things to remember
- What's the five-step review order?
- Purpose, boundaries, state, errors, cost.
- Which inputs do you always check?
- Empty, one item, duplicates, very large, and malformed.
- Name three common faults in AI-written code.
- It handles only the happy path, invents an API or option, and may pass a test by special-casing it.
- Why is a plain object a risky map in JavaScript?
- It inherits keys like 'constructor'. A Map starts empty.
- What should you read when a fix turns a test green?
- The fix itself. A green test doesn't show the fix is real, since it may have special-cased that input.
4Prove it works
Verification is reported as a scored skill, and skipping it is a common way to fail.
Write the test that could fail, rather than the one you know will pass. Good tests come from your must-pass list, not from the code.
Run after every small change, and run everything, since a fix can break something else.
When correct answers are hard to work out, test properties instead: the output is sorted, a round trip returns the original, or two methods agree.
The 4 things to remember
- What makes a test valuable?
- It could actually fail. It targets an assumption, not just the example you already know works.
- What do you run after a fix?
- The full suite, because fixing one case often breaks another.
- What's a property test?
- Checking something that must always hold, such as sorted output or that two methods agree, across many inputs.
- Why shouldn't the AI be the only one writing your tests?
- It tends to test what the code does rather than what it should do, so shared wrong assumptions go unseen.
5Debug in a straight line
Debugging AI-generated code is reported as a scored skill, and it's where calm people stand out.
The order is: reproduce, shrink, form one hypothesis, test it, fix the cause, and add a test.
Change one thing at a time. If you change three things and it works, you've learned nothing.
Say your hypothesis out loud before you test it. In an interview, that's the signal, even when the guess turns out wrong.
The 4 things to remember
- What are the six steps of debugging?
- Reproduce, shrink, hypothesise, test, fix the cause, add a test.
- Why shrink the failing input?
- A small failing case shows the cause far faster, and it becomes your regression test.
- A model suggests a fix. What do you ask before accepting?
- Why it fixes the cause, and which input proves it.
- When an assistant goes in circles, what do you do?
- Stop it. Reproduce the bug yourself and give it the smallest failing case, or fix it by hand.
6Think out loud
Interviewers can only score what they can hear. Silence and constant chatter are both reported as weak signs.
Speak at useful moments: the plan, each decision, each surprise, and the end. You don't need to narrate each keystroke.
A good decision has a shape: what I'll do, why, and what I'm giving up.
When you need to think, say so: 'Give me a minute to check the edge cases.' Announced silence is fine.
The 5 things to remember
- What are the four moments to speak?
- When you plan, when you decide, when something surprises you, and at the end.
- What's the shape of a good decision statement?
- What I'll do, why, and what I'm giving up.
- What's the difference between narrating and reasoning?
- Narrating says what you're doing. Reasoning says why.
- How do you think quietly without losing the interviewer?
- Say what you're checking and roughly how long you need, then go quiet and report back.
- What do you say while the assistant is generating?
- Say what you'll check in its answer, or review the previous piece.
7Know your complexity numbers
AI can write the code, but you still get asked what it costs. These should come instantly.
Know the common costs by heart. Hash lookups are O(1) on average, sorting is O(n log n), a heap push is O(log n), and binary search is O(log n).
For scale, a modern machine handles very roughly 10^8 simple operations a second. So n = 10^6 is fine at O(n log n), and hopeless at O(n²).
Top k from m items costs O(m log k) with a heap, and O(m log m) with a full sort.
The 6 things to remember
- What does sorting cost, in time?
- O(n log n).
- What's the cost of a hash map lookup?
- O(1) on average, and O(n) in the worst case.
- What's the cost of a heap push or pop?
- O(log n). Peeking at the top is O(1).
- Top k of m items with a heap?
- O(m log k) time and O(k) extra space.
- Roughly how many simple operations per second?
- About 10^8, as a rule of thumb for quick estimates.
- Largest n that's reasonable for O(n²)?
- Around 10^4, since that's about 10^8 operations.
8LLM fundamentals
Every AI interview assumes these, and a first screen often tests them directly.
A model predicts the next token. It has no memory between calls, so your app sends the conversation again each time.
A token is about 4 characters of English. Input plus output must fit in the context window, so reserve room for the reply.
It produces plausible text, so it can be confidently wrong. You design around that with grounding, citations and checks in code.
The 7 things to remember
- About how many characters is one token in English?
- About 4, or about three quarters of a word.
- What must fit in the context window?
- Input and output together, per request.
- Why does a chatbot seem to remember?
- The application resends the conversation each time. The model itself keeps no memory between calls.
- What does lower temperature do, where a model offers it?
- It reduces randomness. It doesn't make answers more true.
- What is an embedding?
- A list of numbers representing meaning, where similar text gets similar numbers.
- What breaks prompt caching?
- Any change early in the prompt. Keep fixed text first, and what varies last.
- What is prompt injection?
- Input that tries to act as instructions. Treat outside text as data, and enforce limits in code.
9Cost and latency sums
Working out a feature's cost on the spot is a quick way to show you've shipped something real.
The formula: fresh input × input price, plus cached input × cached price, plus output × output price, all divided by one million.
Output usually costs several times more than input. So long answers matter more than you might expect.
For latency, watch time to first token and the slow requests (p95), rather than the average. Streaming improves how fast it feels, though the total time stays the same.
The 5 things to remember
- What's the request cost formula?
- (fresh input × input price + cached × cached price + output × output price) ÷ 1,000,000.
- How do you get a monthly cost from a request cost?
- Cost per request × requests per day × 30.
- Why report p95 latency rather than the average?
- An average hides the slow requests that users notice. p95 is what the slowest 1 in 20 at least experience.
- What does streaming change?
- Time to first token, and so how fast it feels. Total generation time stays about the same.
- Name three ways to cut cost.
- Cache fixed prompt text, send less irrelevant context, and shorten outputs. Consider a cheaper model where evals show quality holds.
10RAG basics
Reported as one of the most common AI design prompts.
Two paths. Indexing: parse, chunk, embed, store. Querying: search, rerank, build the prompt, generate with citations.
Measure retrieval and answers separately. If the right passage never arrives, no prompt can fix the result.
Filter by permission at search time, and plan for documents that change.
The 8 things to remember
- What are the steps of indexing?
- Parse, chunk, embed, store with metadata such as permissions and dates.
- What are the steps of a query?
- Search, rerank, build the prompt, generate with citations.
- What's recall@k?
- Of the passages that matter, the share that reached the top k.
- What's MRR?
- Mean reciprocal rank: how high the first useful result sits. First place scores 1, second 0.5.
- What's faithfulness?
- Whether the answer is supported by the retrieved text.
- Why use hybrid search?
- Keyword search catches exact terms like error codes, and vector search catches meaning.
- Why combine rankings by rank?
- Keyword and vector scores use different scales, so rank fusion avoids comparing them.
- Where do permission checks go?
- In the search, before generation. Otherwise a restricted document can shape the answer.
11Agent basics
Agent questions test whether you'd trust a model with real actions, and how you'd limit it.
An agent is a loop: the model picks an action, your code runs it, and the result goes back. It repeats until it answers or you stop it.
If you can write the steps down in advance, use a plain workflow. It's cheaper and easier to test.
Safety lives in code: allow lists, step and cost limits, approval for writes, idempotency keys, and traces.
The 6 things to remember
- What is an agent, in one sentence?
- A loop in which a model chooses actions, your code runs them, and the results go back to the model.
- When should you use a workflow instead?
- When you can write the steps down in advance.
- Name four stop conditions.
- A step limit, a repeat limit, a time limit and a cost limit.
- Why give write tools an idempotency key?
- A retry after a network failure shouldn't perform the action twice.
- What should a tool failure do?
- Return an error the model can read, so it can try another way or tell the user.
- Where does 'never refund over $100' belong?
- In the tool's code. A rule in the prompt can be talked around.
12Eval basics
Reported as a major difference between candidates who've shipped AI and those who've only demoed it.
An eval is a set of examples, a way to grade them, and a score you compare between versions.
Build the set from real traffic, tag cases by slice, and add every production failure.
Small sets have wide uncertainty, averages hide slices, and an LLM judge needs checking against human labels.
The 7 things to remember
- What are the three parts of an eval?
- Examples, a way to grade them, and a score you can compare.
- Why check slices as well as the average?
- An average can rise while one group gets much worse.
- What does 18 of 20 really tell you?
- 90% observed, with a 95% interval from about 70% to about 97%.
- What does Cohen's kappa measure?
- Agreement beyond what chance would produce. 0 is luck, and 1 is perfect.
- What's a sign your rubric isn't ready?
- Two people grade the same output differently.
- 95% pass, users are unhappy. What's your first question?
- Where did the eval cases come from, and do they still match real traffic?
- What happens to a production failure?
- It becomes a labelled case in the set, so it can't quietly return.