RAG from Ingestion to Grounded Citations
RAG quality is determined by the whole evidence path, not by adding a vector database.
RAG quality is determined by the whole evidence path, not by adding a vector database.
Govern the source before embedding
Record origin, owner, version, access policy, and deletion behavior. Parse structure carefully and keep heading paths, tables, and identifiers. An embedding index without provenance is difficult to trust or update.
Choose search granularity deliberately
Chunks should be small enough to match a query and large enough to preserve meaning. Parent-child retrieval can search precise units and return broader context. Evaluate chunking against real queries.
Retrieve broadly, rank carefully
Dense retrieval captures semantic similarity, lexical retrieval preserves exact terms, and metadata filters enforce scope. Fuse ranked lists, rerank a sufficiently broad shortlist, remove duplicates, and respect token budgets.
Generate only from sufficient evidence
Pass stable source IDs and require abstention when evidence is absent or conflicting. Bind important claims to source spans and verify citation support, not merely citation presence.
Debug by stage
When an answer fails, first ask whether the needed source existed, was parsed, indexed, retrieved, selected, and supplied. Only then isolate synthesis and citation failures. Stage-level metrics prevent random prompt changes.
Decision checklist
- Name the user outcome and unacceptable failures.
- Identify the layer where the observed problem originates.
- Choose the smallest mechanism that directly addresses that problem.
- Define representative evaluation cases and operational budgets.
- Preserve source, model, prompt, data, and release versions.
- Require explicit approval before changing public behavior.