Your production assistant has started quoting wrong prices to customers. Is it an attack or a bug, and how do you find out?
Type it the way you would explain it to an interviewer. A few sentences is enough; you can't break anything.
Model answer: the part to lead with
Assume a bug first, because base rates say so, but investigate without destroying attack evidence. Contain now, attribute later.
Full worked answer with diagram
Assume a bug first, because base rates say so, but investigate without destroying attack evidence. Contain now, attribute later.
First, bound it. How many sessions, since when, which customers. Then find the change boundary, because "the AI went wrong" is almost always a change: a deploy, a prompt-template edit, a RAG index rebuild, an upstream pricing API change, a config flag, or a model version that moved under you. That last one is the sleeper: if anyone pinned a floating alias instead of an exact version, the model changed without a deploy and your change log shows nothing.
Then a triage tree.
- All users, sharp onset? Deploy, index rebuild or model change. Specific users only? Input-dependent, so either an attack or a data slice, and diff those inputs.
- Reproduce at temperature 0 with the recorded context. If the retrieved context contains the wrong price, it is a data problem: stale index, a currency or locale field, a re-ingested old price list, a test fixture in the corpus. This is the most common answer.
- Context correct but output wrong? Prompt regression or model change. Diff the version pin and the rendered prompt hash.
- Context contains instruction-like text? Now it is indirect injection. Ask who can write to that corpus: user-generated content, supplier catalogue, a scraped page.
- Cluster the bad sessions and diff their inputs against good ones. An attack usually has a signature, a shared substring or a shared source document.
What makes this a 20-minute investigation instead of a week: retrieved doc IDs, rendered-prompt hash and exact model version logged per request. If they are missing, that is the postmortem finding regardless of the root cause.
The real fix, and the answer that separates seniors. Do not contain this by prompting harder. Wrong prices can be commercially binding, and there is precedent for companies being held to statements their chatbot made. A price is owned by a system of record, so the model should never generate that number: look it up deterministically and render it outside the model, with the model handling the language around it. Any figure with legal or financial weight should come from code, not from tokens. That is a design principle, not an incident response.
Worth sketching. Drawing the branch conditions shows you triage on evidence rather than guessing at attack or bug from the symptom.
flowchart TD
A["Wrong prices reported"] --> B["All users, sharp onset?"]
B -->|"yes"| C["Deploy, index rebuild<br/>or a floating model alias moved"]
B -->|"specific users only"| D["Replay at temperature 0<br/>with the recorded context"]
D -->|"context holds the wrong price"| E["Data: stale index, locale field, test fixture"]
D -->|"context correct, output wrong"| F["Prompt regression or model change"]
D -->|"context holds instruction-like text"| G["Indirect injection: who can write to the corpus?"]
What a good answer covers
- Assume a bug first, because base rates say so, but investigate without destroying attack evidence
- How many sessions, since when, which customers
- Then find the change boundary, because "the AI went wrong" is almost always a change
- That last one is the sleeper
- All users, sharp onset? Deploy, index rebuild or model change
Key terms: First, bound it · Then a triage tree
In the glossary: RAG · Temperature
Interviewer follow-ups to expect
Where else in this product would you apply the never let the model generate the number rule?
If it turns out to be injection via a supplier catalogue feed, what changes structurally?
Worked answer from AI-Engineer-Interview-Questions by Om (MIT), reformatted for LLM Prep · answer text last updated 6 November 2026 · scoring and review schedule by LLM Prep