RAG and Retrieval-Augmented Generation
Build retrieval pipelines with indexing, permission filtering, reranking, and evaluation.
Key takeaways
- RAG is a data product: retrieval quality comes from source selection, chunking, indexing, ranking, and evaluation, not just the model.
- The pipeline runs source inventory, chunk and normalize, index, query rewrite, permission filter, retrieve and rerank, then generate with citations.
- Filter retrieval by user and tenant permissions so the system never surfaces documents the user could not open directly.
- Evaluate recall, precision, groundedness, and usefulness, and add a low-confidence fallback rather than checking model output alone.
RAG is a data product. Retrieval quality depends on source selection, chunking, indexing, permission filtering, ranking, and evaluation, not only on the model.
Pipeline
Quality Controls
- Track source freshness and ownership.
- Filter retrieval by user and tenant permissions.
- Prefer citations or source links for factual answers.
- Evaluate recall, precision, groundedness, and usefulness.
- Add a fallback when confidence is low.
Red Flags
- The system retrieves documents the user could not open directly.
- Old content outranks current policy.
- Evaluation only checks model output, not retrieval quality.