Opens this plan in Hirezen, where one click makes it a position.
AI Engineer interview questionsSystem design — caching and reuse round
A 60 min interview plan with a time-boxed script, what each question is for, and the signals to score against. Key skills: Whether the candidate designs reuse around the cost of a wrong answer rather than around a similarity score: pricing the false positive before drawing anything, judging real prompt pairs an embedding cannot separate, deriving a threshold from labels instead of naming one, reaching for reuse of computation over reuse of answers, and leaving a cache hit that can be explained after the fact..
What a wrong answer costs
What this section is for
Purpose
The round opens underspecified on purpose. Everything later in the hour depends on whether the candidate establishes the cost of a false positive in the first few minutes, because that number is what a threshold is derived from, and a candidate who never establishes it has nothing to derive one from in section three. Have the economics below to hand and give them only when asked: 40,000 questions a day, $0.011 an answer, p95 4.2 seconds. Volunteering them re-frames the round as a cost-reduction exercise and throws the section away.
I'm [YOUR_NAME] and I own the assistant that answers customer questions inside [COMPANY_NAME]'s product. This hour is about reuse — not about retrieval, not about which model. I am going to ask you to make the same feature cheaper and watch what you are willing to trade for it.
What this section is for
Purpose
Names the subject narrowly so a candidate who prepared a RAG-architecture answer redirects inside thirty seconds, and so retrieval quality does not become a place to hide.
The feature has been live a quarter. It works. Support likes it. Finance has noticed it, which is why we are talking, and the PM has noticed that people wait for it.
What this section is for
Purpose
Establishes two motivations — money and latency — without ranking them. Which one the candidate optimises for, and whether they ask, is an early read.
Our users ask the same question a hundred different ways, and we pay for every one of them. Design me a cache.
What this question is for, and what to listen for
Purpose
The whole signal is what happens before the first box. A candidate who starts at embeddings has skipped the only step that determines the design; a candidate who asks what a wrong cached answer costs has already done the hard part.
Signals to score
- Asks what a wrong cached answer costs before proposing any mechanism
- Asks whether answers are specific to the asking account, and gives an example of one that would be
- Asks how stale an answer may be, and ties it to something that actually changes — pricing, a release, a policy
- Asks whether the prompt carries anything that is not the question: account state, retrieved documents, tool results, the time, the conversation so far
- Separates the question from the rendered prompt when talking about what would be keyed on
- Asks whether this is a first turn or a message inside a conversation
- Names latency and cost as separate goals and asks which one is being bought
- Proposes a first cut that is narrower than the whole feature — one topic, one surface, read-only questions
- Gives a rough order of magnitude for the saving unprompted, or asks for the numbers needed to compute one
Follow-up questions
- If I told you a wrong answer here misquotes our refund policy, what changes about your design?
- What in that prompt is not the user's question, and which parts of it move between two users asking the same thing?
- Suppose the answer is right but nine days old. Is that a cache problem, and whose problem is it?
- Give me a number for what this saves, and tell me what you had to assume to produce it.
- Where would you turn it on first, and what would make you turn it off?
What counts as the same question
What this section is for
Purpose
Runs over a real artifact. Build the pack to the composition below and write the answers down before the round, because several pairs are ones an interviewer will get wrong live. Eight pairs, each two questions a real support assistant would see, presented without which is which: one genuine paraphrase, one entity swap, one where a single word changes the referent, one where a single word changes the temporal scope, one where the two questions want differently shaped answers, one identical string asked at two times of day, one identical string from two accounts, and one genuine paraphrase with almost no words in common. Seven of the eight are traps in the same direction, which is deliberate and is also the setup for the next section — a candidate who refuses all eight has designed a cache that never hits, and the eighth pair is there to make that visible. Do not show similarity scores. If asked for them, say they are all above whatever line the candidate just proposed, which is true of most embedding models for most of these pairs and is the point.
Switching from the design to the traffic. Here are eight pairs of questions, all real shapes from this feature. For each one: the second question arrives and the first is already in your cache. Serve it or not, and tell me why.
What this section is for
Purpose
Converts a talkable design question into one with answers, so the section can be scored rather than impressioned.
There is no pattern to find and the answers are not evenly split. Take a minute to read all eight before you start, and it is fine to change an earlier answer once you have seen a later one.
What this section is for
Purpose
Removes puzzle-hunting and explicitly licenses revision, which is what the last two pairs are meant to provoke.
Go through them and tell me which ones you would serve from cache.
What this question is for, and what to listen for
Purpose
The two identical-string pairs are the discriminator. Almost every candidate defends exact match as the free, safe layer in the section above; these two require them to revise that in the room, and how they revise is worth more than whether they got the pairs right.
Signals to score
- Works pair by pair with a stated reason rather than sorting them by feel
- Catches the entity swap and says why an embedding does not separate the two plan names
- Catches that trial and subscription are different flows with different refunds, not two words for one thing
- Catches the temporal scope change and notes it is one word and one that no lexical distance would weight
- Notices that two questions can be about one topic and still want differently shaped answers — a number against a procedure
- Refuses the identical string asked at two times of day, and locates the reason in the answer being a function of something the question does not contain
- Treats the identical string from two accounts as a different class of problem from the others, not as a harder version of the same one
- Serves the low-overlap paraphrase, or says plainly that their design would miss it and that this is a cost
- Generalises before the end into a rule about which questions are cacheable at all, rather than leaving eight verdicts
- Revises an earlier answer out loud after a later pair contradicts it
Follow-up questions
- Which of these does raising or lowering a similarity threshold fix?
- Two of these are the identical string. Is exact match still your safe layer?
- The quota pair — is that a wrong answer, or is it something else?
- You have refused seven of eight. What is the hit rate of the thing you have just designed?
- Give me the rule. Before you match anything, how do you decide whether this question is a candidate at all?
The number you cannot defend
What this section is for
Purpose
The trap is baited by saying nothing. Do not offer a number, do not mention cosine similarity, and let the silence run — a candidate who volunteers a specific threshold with no account of where it came from has told you what you needed to know, and one who refuses to name it cold has told you something better. Read the arithmetic in the model answer before running this; you will be asked to defend the sample size.
Say we have the classification rule from the last section, so only questions whose answers depend on nothing but the question are ever looked up, and we have embeddings for those.
What this section is for
Purpose
Grants the candidate the gate they just built, so the section is about the instrument and not about re-litigating the previous one.
You look up the nearest neighbour and you get a score back. What do you set the cutoff to?
What this question is for, and what to listen for
Purpose
Asked flatly, as if the number were an implementation detail. The strong response treats it as the output of a measurement rather than as an input to the design.
Signals to score
- Declines to name a number without data, or names one and immediately says how they would find out whether it is right
- Proposes labelling real pairs from real traffic rather than reasoning about the score's distribution
- Runs the cache in shadow first — logging what would have hit and serving nothing — before any traffic is served from it
- Derives the cutoff from the false-positive cost established in the first section rather than from a target hit rate
- Holds precision and recall separately and knows which one the cost asymmetry is buying
- Proposes different cutoffs for different topics, with a reason for the split
- Prices the verification step itself, and notices a verifier can consume the saving it protects
- Asks who labels the pairs, and would not hand it to someone without the domain knowledge to judge the trial-against-subscription case
- Puts an interval on a rate estimated from a sample, or asks how many labels they get
- Says what would make them move the cutoff again after launch
Follow-up questions
- Where does that number come from? Talk me through how you would find out whether it is right.
- You are serving 12,000 hits a day at a 2% false-positive rate. What does that look like from the support queue?
- How many pairs do you need to label before you would trust the number, and who labels them?
- You verify every candidate with a second model call. What has that done to the saving?
- Same cutoff for billing questions and for how-do-I questions?
A false positive that cannot happen
What this section is for
Purpose
This question finds the top of the band and nothing else in the round does. Most candidates have exactly one mental model — look up an answer, serve the answer — and the question asks whether they have any others. Do not accept a restatement of the verification step: verifying harder reduces the rate of false positives, it does not remove the possibility, and the distinction is the entire point. Give the candidate room; the first thirty seconds of silence here is usually thinking rather than a blank.
Everything we have designed so far can serve a wrong answer. We have made it rarer and we have priced it, but the failure is still available.
What this section is for
Purpose
States the property plainly so the question that follows is about a category and not about a tuning parameter.
Is there a version of this where a false positive is not possible at all? Not unlikely — impossible.
What this question is for, and what to listen for
Purpose
Separates candidates who have reused answers from candidates who have reused computation. The three mechanisms that qualify are all the second kind, and a candidate who names one has almost certainly run an LLM feature in production.
Signals to score
- Distinguishes reusing the answer from reusing the work that produced it, in those terms or their own
- Names prefix or key-value caching and knows it is a different mechanism from the one discussed all hour
- Proposes feeding the nearest neighbour to the model as a draft it must still agree with, rather than as the response
- Or proposes serving the cached answer as retrieved context the model writes from, and says what that changes about the risk
- Explains why each named mechanism cannot produce a false positive, rather than asserting that it cannot
- Prices what each one actually saves, and does not claim the same saving as answer substitution
- Says which of the three caches a "hit rate" number would be about, once three exist
- Notes that a small model trained on past answers is a cascade and not a cache, if they raise it
- Ends with a recommendation rather than a menu, and says what it costs relative to the risky version
Follow-up questions
- What fraction of the prompt is identical across two users asking different questions, and what is that worth?
- If the model still generates every token, where did the saving come from?
- What is the risk profile of putting the old answer in the context window instead of in the response?
- Three caches now. When someone reports a hit rate, which one are they talking about?
- Given all of that, what do you actually ship first?
What you could prove afterwards
What this section is for
Purpose
The closing question is about reversibility and attribution, not about the cause. Do not let the candidate debug the leak; the round has already established how it happens. What is being read is whether the system they spent an hour designing can be turned off and explained by someone who was not in this room.
Last thing. The cache has been on for six weeks. Hit rate is 31%, finance is happy, p95 on hits is under 200 milliseconds.
What this section is for
Purpose
Establishes that the project succeeded, so the incident is not a referendum on the idea and the candidate has something to protect rather than something to abandon.
A customer emails support to say the assistant told them how much quota was left on an account that is not theirs. It is 10am. What do you do in the next hour, and what do you change permanently?
What this question is for, and what to listen for
Purpose
The first hour reads reversibility; the permanent change reads whether they learned the rule from the pair pack. A candidate who cannot say how they would find out which entry served it has built something nobody can operate.
Signals to score
- Turns it off before diagnosing, and can say whether that is a flag or a deploy
- Knows whether the switch is global or can be scoped to a topic or a namespace
- Treats it as a data incident rather than a quality bug, and says who else needs telling
- Names what a hit log would have to contain to attribute it: the matched entry, the score, the layer, both questions, and which account the entry was generated for
- Computes or asks for the blast radius — how many responses that entry served since it was written
- Distinguishes "one bad entry" from "the classifier is passing a whole class of questions" and says how the log tells them apart
- Fixes it permanently at the classification gate, not by raising the threshold
- States the rule that account-scoped answers never enter a shared namespace, and ideally that they are generated without another account's context in scope
- Proposes what goes on the dashboard so this is visible before a customer reports it
- Says that hit rate on its own is a vanity metric, or otherwise notices that a cache which serves everything scores 100%
Follow-up questions
- Is that switch a deploy or a flag? How long from decision to off?
- Which entry served it, and how do you find out?
- How many other people got that answer?
- Is raising the threshold the fix here?
- Six weeks in, what is on the dashboard, and what would have caught this in week one?
AI Engineer interviews — common questions
- Who is this AI Engineer interview plan for?
- It is written for the interviewer, not the candidate: the hiring manager, engineer or panel member running the System design — caching and reuse round for a AI Engineer role. It gives you a 60 min script to follow in the conversation — 5 questions with what each one is for and the signals to score against — so you are not writing the round from scratch the night before.
- What does the System design — caching and reuse round assess?
- This round is focused on: Whether the candidate designs reuse around the cost of a wrong answer rather than around a similarity score: pricing the false positive before drawing anything, judging real prompt pairs an embedding cannot separate, deriving a threshold from labels instead of naming one, reaching for reuse of computation over reuse of answers, and leaving a cache hit that can be explained after the fact.. It works through What a wrong answer costs, What counts as the same question, The number you cannot defend, A false positive that cannot happen and What you could prove afterwards, scoring against 48 observable signals, with follow-up prompts on all 5 questions for going deeper where an answer is thin.
- How is the 60 min split up?
- What a wrong answer costs (11 min), What counts as the same question (17 min), The number you cannot defend (11 min), A false positive that cannot happen (12 min), What you could prove afterwards (9 min). The timings are there so the round stays on schedule and every candidate gets the same shape of interview — which is what makes two candidates comparable afterwards.
- What other rounds should I run for a AI Engineer?
A single round does not cover a whole role. The other rounds in this library for a AI Engineer: