Almost no RAG project fails because the model was too weak. They fail on data quality and chunking — the corpus that worked at 200 curated PDFs collapses at 200,000 real ones.
A demo corpus is clean, small, and topically separated, so naive fixed-size chunking and cosine similarity look excellent. Production corpora are not that. They are scanned contracts where the table structure is lost in extraction, policy documents where the meaning lives in a heading three pages up that the chunk no longer carries, twelve near-identical versions of the same SOP with no recency signal, and acronyms the embedding model has never seen used the way your business uses them.
Retrieval then returns passages that are semantically adjacent and factually wrong — plausible enough that the model writes a confident answer over them, and no reviewer catches it because the citation looks legitimate. Add embedding drift when you upgrade models without re-indexing, and stale indexes where a rate changed in January but the vector store still serves December, and you have a system that is quietly wrong in ways no error log records. We fix this at ingestion: parse structure properly, chunk on semantic and document boundaries, attach metadata that filters before the vector search ever runs, and version the index so a re-embed is a deployment, not an accident.
- Structure-aware parsing — tables, headers, footnotes and layout preserved instead of flattened to a text blob
- Chunking on document semantics with parent-child retrieval, so the model sees the surrounding context the chunk depends on
- Metadata filters (entity, effective date, jurisdiction, access level) applied before vector search narrows the candidate set
- Versioned, re-buildable indexes with scheduled refresh — no silent drift between the corpus and what retrieval serves
- Deduplication and recency ranking so twelve versions of one document do not crowd out the current one