New here? Start this series at Day 7: Confidence is not evidence
- Day 7: Confidence is not evidence
- Day 8: Structured output turns model text into something software can trust
- Day 9: A capable model is not a product yet
- Day 10: Chatbot, workflow or agent: choose by how much autonomy the task can bear
- Day 11: RAG is an evidence design problem
- Day 12: Retrieval quality is decided before anyone searches
Everyone wants to tune the retriever. Nobody wants to clean the documents.
The order of operations is unforgiving, though, because retrieval quality cannot exceed ingestion quality. If broken content enters the index, no embedding model, reranker, or prompt rewrite un-breaks it downstream. You can only rank what you stored, and you stored whatever the pipeline let through.
Why this stays invisible
Ingestion problems do not fail at ingestion time. The job runs, the count goes up, the dashboard is green.
They surface weeks later, at query time, wearing someone else's uniform, as a retrieval miss, a hallucination complaint, an unauthorised disclosure. The team debugs the retriever, swaps the embedding model, rewrites prompts. The actual defect is that page 4 of a PDF became a column of single characters back in March.
This misattribution is the expensive part. Teams without checks on extracted text spend weeks on the visible layer because the broken layer produced no error.
What actually has to happen at the gate
Treat ingestion the way an airport treats arrivals, with an inspection at the gate rather than a turnstile:
- Extraction that survives real formats: PDFs with multi-column layouts, tables that mean nothing once flattened, scanned documents that need OCR. Validate the extracted text as well as the exit code, and flag any page that comes out empty or as a column of single characters.
- Boilerplate removal: navigation menus, cookie banners, and repeated footers embed just as happily as your actual content, and they poison similarity scores across the whole corpus.
- Metadata at entry: owner, effective date, document type, audience, permissions. You cannot filter at query time on a field you never captured, and backfilling it across a live index is miserable.
- An exclusion policy: drafts, duplicates, superseded versions, someone's personal notes from 2019. Deciding what stays out is half the job and gets almost none of the attention.
The pre-index checklist I actually use
- Does every document have an owner and an effective date?
- Did tables survive extraction as tables?
- Are permissions captured as queryable fields, not assumed?
- Are there duplicates or superseded versions competing with the current one?
- Is boilerplate stripped, or is it now part of your semantic space?
- Can each chunk be traced back to a source and version for citation?
A strict gate fails in its own way, since documents it rejects drop out of answers and nobody notices. Send rejects to a quarantine, in effect a dead-letter queue for documents, with an owner and a count someone watches, so a gate that suddenly rejects a whole batch gets looked at the same day.
The cheapest diagnostic in RAG
Open your index. Read twenty random entries.
Read the actual stored text, rather than the ingestion config or the strategy doc. An hour of scrolling will tell you more than a week of benchmark tuning, and it is the single highest-yield hour available to a team that has never read its own index.
If a human winces at what is in there, the model is already answering from it, and the model does not wince.
Before buying a better vector database, spend an afternoon reading what is inside your current one.
Terms in this piece
About this explainer
- Format
- Explainer
- Level
- Practitioner
- Read
- 2 min read
- Published
- Jun 2, 2026
- Disciplines
Short mental models: one idea, why it matters, what to do about it.
More on these topics
Decision note · · 2 min read
We chose Azure AI Search for retrieval because ingestion and filtering stay simple
Why our retrieval runs on Azure AI Search: our Databricks ingestion pipelines feed it directly, filtering is simple, and several semantic configurations share one index.
Decision note · · 1 min read
Sensitive data is cleaned at ingestion, with Presidio, before anything is indexed
Why our ingestion pipelines run Presidio over sensitive documents before chunking and embedding, and what that choice commits a team to: tuned detection, masking that is final for the index, and one more step for every document.
Checklist · · 12 checks
RAG production-readiness checklist
Twelve checks to pass before a retrieval system answers a real user. Tick them locally; progress stays in your browser.
Discussion