Somebody wrote a loader in a notebook, ran it once, and the index has been sitting there ever since. Ask which documents failed to parse and you get a shrug. Ask how many of the 12,000 indexed files still exist in the source system and you get a longer one.
That index is a snapshot of the day the loader ran, with a good launch story attached.
Parsing decides your ceiling
Whatever structure you destroy at parse time cannot be recovered downstream by a better embedding model or a cleverer reranker.
PDFs are the usual offender. A financial table flattened into one line of drifting numbers is worse than useless, because it retrieves confidently and answers wrong. Headings collapsed into body text remove the section boundaries chunking depends on. Page references vanish, and with them any hope of a citation a user can verify.
So normalisation gets its own stage and its own tests. Convert to a structured intermediate form, keep the heading hierarchy, keep table cells as cells, keep page and section anchors attached to the text. Chunking then reads structure instead of guessing at it from whitespace. Layout-aware parsing costs more per page than plain text extraction, so spend it where structure is at risk: PDFs and scans need it, while HTML and Markdown already carry their headings and tables.
Metadata extraction belongs here too, while the document still has context around it. Title, author, effective date, document type, section path. Pulled later from a bare chunk, most of it is unrecoverable.
Failures need a destination
Every ingestion run produces documents that fail, whether or not anyone finds out.
A production pipeline separates transient failures, which retry with backoff, from poison documents, which go to a dead-letter queue with the error attached and stop being retried forever. Both get counted. If three percent of a corpus silently fails to ingest, the assistant will confidently report that no policy exists on a topic documented inside that three percent. A dead-letter queue nobody drains is the same silent failure with better bookkeeping, so give it an owner and alert on the age of its oldest item.
Treat the run like any ETL job: documents in, documents indexed, documents quarantined, duration, and an alert when the delta moves.
Updates and deletes are the hard half
First ingestion is the easy case, and it is the only case a run-once loader ever exercises.
Re-ingestion needs idempotency, usually a stable document ID plus a content hash, so an unchanged file does not churn the index and a changed one replaces its old chunks instead of joining them. Without that you accumulate two versions of the same policy, and retrieval picks whichever one happens to embed better.
Deletes need to propagate on a clock you can state out loud. That means tombstones, a reconciliation sweep comparing indexed IDs against the source of truth, and a metric for how long removal actually takes end to end.
Check the delete path
Take a sample of documents removed from the source system recently and ask the assistant about each one. Every one that still answers is a deletion that never propagated. Then diff indexed document IDs against the source. The count that no longer resolves is the honest answer to the 12,000-file question.
Terms in this piece
About this explainer
- Format
- Explainer
- Level
- Practitioner
- Read
- 2 min read
- Published
- Aug 11, 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