When a company-document assistant gives a confident answer built on the wrong policy version, the model usually gets the blame. The more useful habit is to assume the retrieval layer is at fault until you have proven otherwise, because it is the part that decides what the model gets to read. This guide shows where retrieval over internal wikis, tickets and policy libraries breaks, and gives you a test you can run on your own documents without special tooling.
The pipeline, and where each stage can lie to you
Microsoft’s RAG design guide describes the data pipeline as chunking, enriching chunks, embedding chunks and persisting them in an index. At question time an orchestrator searches, packages the top results with the question into a prompt, and sends it to the language model. It advises evaluating each step independently, while remembering that the final answer is what users experience.
Failure 1: chunks that lose their context
Microsoft’s chunking guidance says chunks that are too small and lack context can give poor results, and that context spread across multiple chunks might be missed. A fixed-size split can cut a table from its header row or a numbered procedure from its exception. Anthropic gives a related example: a chunk reporting 3 percent revenue growth that never names the company or the quarter, so it cannot be matched to the question. Their Contextual Retrieval approach prepends a short, chunk-specific explanation of roughly 50 to 100 tokens before indexing.
The Azure guide also stresses that your chunking approach is a semipermanent choice, so compare options on your own documents before production. Experiment rather than copy someone’s defaults.
Failure 2: messy inputs
The same guide recommends preprocessing such as removing watermarks, headers and footers, reformatting tables so they are easier to process, and using headings to define document structure. Add one more rule that no vendor can set for you: decide what to do with old versions. If three revisions of a procedure sit in the index, the search has no way to know which is current unless you add a field that says so.
Failure 3: exact terms that embeddings miss
Anthropic notes that embeddings capture meaning but can miss exact matches, while BM25, a lexical ranking method, helps with unique identifiers such as error codes. Combining both with rank fusion is the hybrid approach. Their post reports failure rates, defined as one minus recall@20, falling from 5.7 percent to 3.7 percent with contextual embeddings, 2.9 percent with contextual embeddings plus contextual BM25, and 1.9 percent when reranking is added. Those figures come from their own test sets, so treat them as a reason to test, not a promise for your data.
Failure 4: no metadata to tell chunks apart
Microsoft’s guide describes an enrichment step that adds metadata fields such as title, summary and keywords to each chunk. For company documents, your own fields do more work than generic ones: department, document owner, effective date, version and status. Two departments may both have a “refund approval” page. Without a department field the search cannot separate them, and the model may blend the two into one instruction. To check, take a question whose answer differs between two teams and see whether the returned chunks say which team they belong to. If they do not, the model has no way to tell either.
A retrieval test you can run this week
- Choose 20 real questions from your helpdesk or team chat. Microsoft’s guide also suggests including queries your documents do not cover, so add five that have no answer.
- For each question, record the exact document and section that holds the right answer. This is your answer key.
- Run the search alone, without the language model, and write down the top five chunks returned.
- Score each question: is the answer-key chunk in the top five, yes or no? Note whether the chunk is complete, with its table header or step numbers.
- For the misses, categorize the cause: bad split, missing metadata, outdated duplicate, or exact term not matched.
- Fix the most common cause, rebuild the index, and run the same 20 again. Keep the sheet so you can compare runs.
For the five no-answer questions, the right behavior is a refusal or a request for clarification. If the assistant answers anyway, that is a prompt and grounding problem to log separately.
Common mistakes
- Judging the model before the search. If the right chunk is not retrieved, no prompt can recover it.
- Changing several things at once. You will not know which change helped. Change one stage per test run.
- Skipping the answer key. Without known answers, “looks good” is the only metric.
- Indexing everything. More documents means more near-duplicates to confuse retrieval.
- Treating the first chunk size as final. Microsoft calls the choice semipermanent, so test before committing.
Takeaway
Create a 20-question answer key from real questions and score retrieval before you tune prompts. That one sheet will tell you whether your next hour belongs in chunking, metadata, hybrid search or the prompt.
Sources
- Design and Develop a RAG Solution, Microsoft Learn
- RAG chunking phase, Microsoft Learn
- Introducing Contextual Retrieval, Anthropic
Drafted with AI assistance and reviewed by Ash Ahmad, editor of AI Bloggers Hub. Last checked November 2026. Spot an error? Write to [email protected].


