The model answered from memory and ignored the passage you gave it
In short
Prove it before rewriting the prompt. Put a passage in the context that contradicts something the model plainly knows — a renamed policy, an invented internal term — and ask a question only that passage answers. If the answer follows training, the override is real. In most systems the probe instead shows the passage never reached the model: a plumbing bug in a grounding bug's clothes.
Key takeaways
- A contradiction probe settles in 10 minutes what a week of prompt edits will not: override, or absent passage.
- Assert the probe sentence is a literal substring of the outbound request before blaming the model for anything.
- Silent truncation is the single most common cause. Frameworks trim to fit and report success either way.
- An instruction placed only above a long block of passages competes with everything that follows it.
- A passage the model cannot recognise as an answer is not being ignored. It is being read and found unhelpful.
- If the passage was present, direct and near the top, you have a synthesis defect rather than a grounding one.
Build the probe first. Write a short passage that states something the model could not know and would not guess — an internal term you invented, a policy renamed to something implausible, a threshold set to an odd number — and place it in the context alongside a question only that passage answers. Run it. If the answer contradicts the passage and matches what a well-read stranger would say, you have a genuine override. If the answer is vague or generic instead, the passage almost certainly never arrived, and you have been debugging the wrong layer.
This matters because "the model ignored the context" is the conclusion teams reach fastest and confirm least. It is satisfying, it points at someone else's component, and it sends the next two weeks into prompt wording. The probe costs 10 minutes and rules it in or out.
Building the probe so its result means something
- Write the probe passage in the register of your real documents. 2 or 3 sentences, the same tone and structure a real chunk has, so you are not accidentally testing whether the model notices an oddly formatted insert.
- Make the claim unguessable but unambiguous. Not a fact the model might reasonably hold, and not nonsense — something like an internal escalation tier with an invented name and a stated deadline of 9 working days.
- Ask a question whose only possible source is that passage, phrased the way a real user would phrase it, not as an instruction to quote.
- Run it as a bare prompt first, with only that passage and the question. If the model gets it right here, the reader and the instruction are both capable, and the fault is further back in the pipeline.
- Run it again inside the real request, with the probe passage substituted for one of the retrieved chunks so the payload length and structure are unchanged.
- Record which answer the model gave in each condition, not whether the answer was good. The comparison is the finding; a single run tells you nothing.
Keep the probe passage in a test fixture, never in the live index. A deliberately false document sitting in a production corpus will eventually be retrieved for a real question by a real user, and the note explaining why it exists will not be attached to it when that happens.
Read the outbound request before you read the answer
Log the fully rendered request body — the exact string of messages sent, after every template, trim and formatting step — and assert programmatically that a distinctive sentence from the passage you believe you supplied appears in it as a literal substring. Not the chunk id. Not the retrieval log. The UTF-8 text, in the payload, as sent.
This one assertion catches the most common cause of the entire symptom, and it fails silently in every system that does not check it. Retrieval succeeded. The chunk was selected. Then a length-fitting step dropped it, and nothing raised an error, because trimming to fit is that step's job.
- Middle-out truncation. Several client libraries trim from the centre of a message list to preserve the beginning and the end, which is exactly where a mid-ranked passage lives.
- A per-message character cap. A chunk longer than a configured maximum — 2,000 characters is a common default — is cut mid-sentence, and the half carrying the qualifier is the half that went.
- Budget arithmetic that assumed a chunk size the corpus outgrew. If k is 12 and the budget was sized when chunks averaged 400 tokens, chunks now averaging 700 tokens mean the last 4 never fit. That trade is set out in what chunk overlap duplicates.
- A conversation history that grew until it crowded out the evidence. Nothing about the retrieval changed; the space available to it shrank turn by turn.
- A serialisation bug that renders an empty string for a chunk whose text field is null, producing JSON of the right shape and the wrong content.
The arithmetic here is worth doing explicitly rather than discovering by accident, and it is the same arithmetic that produces your bill: passages are tokens, tokens are the billing unit, and a context budget is a spend decision as much as a quality one. That equivalence is the point of the unit that makes AI spend legible.
A model cannot ignore a passage it was never sent. Most reported grounding failures are truncation failures that nobody asserted against.
The five causes, ranked by how often they turn out to be it
| Cause | What you observe | Confirming check | Repair |
|---|---|---|---|
| The passage was trimmed out of the payload | Answers are generic and confident; the probe fails inside the real request but passes bare | Assert the probe sentence is a substring of the sent request body | Cap k by the actual budget, and fail loudly instead of trimming silently |
| The instruction sits only above a long block of passages | The probe passes on a short input and fails on a full-length one | Rerun with the identical passage and a tenth of the surrounding context | Restate the instruction after the evidence as well as before it |
| The passage is present but oblique | The model treats it as background and answers around it | Replace the chunk with a single sentence stating the fact directly; if that works, the text was the problem | Fix the chunk unit or extract the fact into a field |
| The question is phrased as general knowledge | "What is the standard notice period" answers from training; "what is our notice period" does not | Run both phrasings against the same passage set | Scope the query at rewrite time, or in the interface wording |
| The evidence is present but buried in the ordering | The probe passes at position 1 and fails at position 9 | A position sweep holding the passage set constant | Reorder by usefulness, and cut the passages that earned no slot |
The last row has its own procedure, because the sweep is more informative than a single pass-or-fail: hold the set constant and walk the answer-bearing chunk through every position, as described in facts in the middle of a long context. Do that before concluding anything about attention or instruction wording.
Repairs in the order they are worth trying
- Make the payload assertion permanent. Fail the request, loudly, when a selected chunk did not survive rendering. That is roughly 5 lines of code, and it retires an entire category of mystery.
- Move the instruction. Put the task after the evidence, or in both positions. It costs almost nothing and it is the cheapest structural change available.
- Cut k rather than raise it. Every passage that could not plausibly answer the question is competing for attention with the one that can, and near-identical chunks are the worst offenders because they look equally relevant.
- Make the evidence direct. If the retrieved text only implies the answer, no amount of instruction will make the model assert it — nor should it.
- Require a quotation. Ask for the supporting sentence before the answer, and check the quotation against the supplied text programmatically. A claim whose quotation is not in the payload is an unsupported claim, and you can detect that without a judge model.
- Only now consider the reader. Changing the model is the most expensive move on this list and the least likely to be the fix, and it invalidates every threshold you calibrated against the old one.
Note what is absent from that list. A reranking stage changes which passages you send, not whether the model reads them, so it is the wrong instrument here — see what a reranking stage does to a candidate list for the boundary. Reranking earns its place when the right passage is in the candidate pool and ranked too low to be sent at all.
Two neighbouring failures this page is not about
If the probe passes — the passage was present, the model followed it, the override does not reproduce — then the context was used and used badly, which is a different family with different repairs. Conflation across sources, a dropped qualifier and an unsupported bridging inference all produce wrong answers from correct evidence, and they belong to the right passages and a wrong answer.
The other neighbour is what the system should do when it has no adequate passage at all. Designing a refusal that users accept, choosing the threshold that triggers it, and deciding who sees the fallback are questions about handling failure rather than about diagnosing it, and they sit outside this cluster.
The probe, the payload assertion and the quotation check together are perhaps 2 days of work, and they turn the most common argument in this whole area — is it the retrieval, the prompt or the model — into something a build log can answer. That kind of narrow, load-bearing instrumentation is what we push for early in MVP and product builds. The adjacent failure modes are collected in retrieval and grounding, within the engineering library.
Frequently asked questions
Short answers to the follow-ups this page tends to raise.
How do I prove an LLM ignored the context I gave it?
Give it a passage that contradicts something it plainly knows, then ask a question only that passage answers. If the answer follows training rather than the passage, the override is real and reproducible. Run the same probe twice — once with the passage alone, once inside the full production request — because a probe that passes bare and fails in production is telling you about your payload, not about the model.
Can a prompt force a model to use only the provided context?
It moves the odds, and it is not a guarantee, so do not design around it as one. Instructions placed after the evidence do better than instructions placed only before it, and a demand for a verbatim supporting quotation does better than a demand for obedience, because the quotation is mechanically checkable. Build the check rather than relying on the wording: compare each cited span against the supplied text and treat a mismatch as an unsupported claim.
Why would a retrieved passage not reach the model at all?
Because something between selection and the network call trimmed it to fit. Middle-out truncation in a client library, a per-message character cap, a token budget calculated against a chunk size the corpus has since outgrown, or a conversation history that crowded out the evidence will all drop a passage without raising an error. Assert that a distinctive sentence from the passage is a literal substring of the outbound request body, and this class of bug stops being invisible.
Is a wrong answer from correct passages the same problem?
No, and treating them as one is why these investigations stall. If the passage was in the payload and the model followed it, retrieval and delivery both worked, and what remains is a synthesis defect — a qualifier dropped, two sources conflated, an inference bridged without support. Different symptoms, different checks, different repairs, and prompt changes aimed at grounding will not touch them.
- grounding
- debugging
- prompting
- context
The work behind this page
Builds from our portfolio that this page draws on.
AskVault
An AI internal knowledge-search platform that answers employee questions from your own docs — grounded in citations, with knowledge gaps surfaced and deflection tracked.
Productivity AIBrief Forge
Contract review AI for solo lawyers and small firms — extract, score, and redline contracts in minutes.
Legal TechRead next
- Facts in the middle of a long context get missedHold the passage set constant, walk the answer-bearing chunk from first position to last, and measure. The shape of the resulting curve is the diagnosis, and it takes about an hour to produce.diagnostic
- The right passages were retrieved and the answer is still wrongIf the answer-bearing passage was in the context and the answer is still wrong, retrieval tuning cannot help. Four synthesis defects produce this, and each leaves its own mark in the output.diagnostic
- The same question returns different passages every runSome of the variation is approximate search doing exactly what it was built to do. The rest is a rewrite step, a moving index or a session-dependent filter — and only that half is worth fixing.diagnostic
- Chunk overlap: what it protects against and what it duplicatesOverlap is insurance against a chunk boundary landing in the middle of one idea. The premium is paid in duplicated candidates crowding a fixed number of prompt slots.definition
- What a reranking stage does to a candidate listA reranker rescores a list that already exists. It reads the query and each passage together, which a stored vector cannot — and it can only ever reorder what the first stage found.definition
- Adding one new source made unrelated answers worseNothing about the old passages changed. A new source ranks moderately well on a great many queries, and a fixed top-k has to give it those slots by taking them from something else.diagnostic
Working on something in this space?
Tell us where you are in a sentence or two. We'll tell you honestly whether we're the right team, and what a sensible first slice of the work looks like.
Start the conversation