Preserve the trace of one failure

Your application retrieved documents but answered incorrectly. To choose a fix, identify where information was lost. In RAG systems, retrieval finds material in a collection, and the model uses it to prepare an answer. Between those steps, the application also selects, combines, and sometimes shortens the retrieved text.

Microsoft’s RAG evaluation documentation assesses retrieval and the final answer separately. It also distinguishes grounding in the supplied context from completeness: consistency with available passages does not establish that all necessary information was covered.

For the investigation, preserve the question, collection version, model, instructions, and settings. Separately record retrieved passages in order, the context actually sent to the model, the raw model answer, and the displayed text. Document links cannot replace the supplied text: the necessary paragraph might fall outside the selected passage.

Establish a reference for the specific question

Consider a fictional photo archive example. A user asks which format and dimensions to use when submitting panoramas from series AR-17. The application answers: JPEG, with a 2400-pixel long edge. This is an illustrative scenario, not an observed model test.

The invented policy does require JPEG and 2400 pixels as a general rule. However, a separate appendix requires TIFF at original dimensions for series AR-17. The reference evidence must include that exception, its scope, and the dimensions requirement. Identifying a relevant document alone is insufficient.

Ask the policy owner to confirm this evidence set. Microsoft’s engineering case study describes separate annotations for documents, passages, and reference answers, alongside versioning of evaluation data. In your record, identify the precise evidence locations and the document revision available to the user.

Trace each piece of evidence

First check whether the appendix containing the exception is indexed and accessible to this user. Then look for it in the retrieval results. If it is absent from the index, investigate ingestion and updates. If it is indexed but the necessary passage was not retrieved, investigate retrieval and its filters.

The next boundary is context assembly. A passage may appear in retrieval results yet disappear after reranking, deduplication, or shortening. Compare retrieval results with the exact content sent to the model. For each required piece of evidence, record the last stage where it was still present.

Anthropic describes how splitting documents can remove information needed to understand an individual passage. Therefore, checking for the word TIFF is insufficient. Its connection to series AR-17 must survive alongside it; otherwise, the retrieved line does not establish that the exception applies.

Replace the context in a controlled comparison

Prepare two inputs for the next check. The first uses the failed case’s actual context. In the second, replace it with a minimal, complete set of source passages: the general rule, exception, and scope. Keep the question, instructions, model, and settings unchanged. Do not insert the prepared reference answer.

A correct answer with the control passages warrants investigating how material was selected and presented in the original request. If the model applies the general rule even with complete control context, investigate instructions and evidence use during generation. Preserve every attempt: one success does not establish reliable behavior.

Replacement narrows the investigation but cannot establish a single cause: passage length, order, and surrounding material change together. Follow it with a narrower check by restoring only the missing evidence to the original context. If that evidence was already present, separately test its position or proximity to the general rule.

Express the fix as a testable hypothesis

Example incident record: question about AR-17; required information—TIFF and original dimensions; exception appendix retrieved; appendix removed during context assembly; model received only the general rule. Proposed fix: preserve the exception passage together with its series identifier. Expected observation: both pieces appear in the supplied context.

Change one selected mechanism at a time. For this incident, first fix context assembly and check the evidence path again. Changing the model, retrieval, and instructions together makes the outcome harder to interpret. Link each attempt to a specific revision and preserve unsuccessful answers alongside successful ones.

Also inspect the boundary after generation. If the raw model answer specifies TIFF and original dimensions while the interface displays JPEG, investigate application processing or display. This record helps route the issue to the appropriate developer: the defect should include an observable discrepancy between two adjacent stages.

Verify the fix and limit the conclusion

After the fix, add questions about an ordinary photograph, another series, and an unknown identifier. In this example, ordinary photographs follow the general rule; an answer about an unknown series should acknowledge the lack of a confirmed special requirement. Also prepare two fresh phrasings of the original question, unused during adjustment.

For each question, separately record whether all required evidence reached the model and whether the answer was complete and correct. Have a colleague check those judgments against the preserved material. If evidence now arrives but the answer remains wrong, fixing one stage has exposed another problem rather than completed the investigation.

This method requires intermediate data. With only the final text, you can describe the error but cannot confidently assign responsibility to a stage. A small question set cannot characterize the whole system either. Retain the case for checks after document, retrieval, or model updates; resolve disputed references with the material’s owner first.

Sources