A retrieval-augmented generation pipeline is a chain, not a single model call. A query gets rewritten, embedded, searched, filtered, reranked, assembled into a prompt, and only then answered. Every stage can fail, and a poor answer at the end can originate anywhere along that chain. Evaluation frameworks split retrieval from generation for this reason: when the retriever never surfaced the right passage, no prompt tweak or model swap will fix the answer Braintrust.
The practical consequence is that you must be able to pick up one retrieved passage and answer three questions about it. Where did it come from? Did a version rule or an access rule explain its absence? Was it even in the index when the query ran? Without metadata attached to the passage, every one of those questions turns into guesswork, and "retrieval is bad" becomes the most precise diagnosis you can offer.
A four-layer evaluation framework makes the gap concrete. Data, retrieval, generation and system layers each answer a different question, and the data layer asks whether the right, current content sits in the index at all. Its freshness and cleanliness checks need no labels, while coverage measurement does Olostep. Metadata is what makes those data-layer checks possible after an incident. When a passage is missing from a result set, freshness and coverage tell you whether to tune the retriever or fix ingestion.
Metadata is also useful beyond auditing. A systematic study of metadata-aware retrieval on repetitive corpora such as regulatory filings found that including structural cues like section headings and document identifiers improves retrieval, because it raises cohesion inside a document and cuts confusion between near-identical documents arXiv. The same fields you store for audits help the retriever tell one company's boilerplate from another's.



