Retrieval-Augmented Generation
Grounding answers in your own documents instead of the model's memory.
AI EngineeringIntermediate8 hrs4 key ideas · 6 topics
0%
your progressOverview
Grounding answers in your own documents instead of the model's memory.
Key ideas
- Pipeline: ingest → chunk → embed → index → retrieve → re-rank → generate with citations.
- Chunk on semantic boundaries with overlap; attach metadata for filtering and access control.
- Hybrid retrieval (BM25 + vectors) beats either alone on enterprise text; a cross-encoder re-ranker sharpens the top-k.
- Measure retrieval (recall@k) separately from generation (faithfulness, answer relevance).
Trade-offs
- Smaller chunks retrieve precisely but lose context; larger ones dilute relevance.
- More retrieved passages raise recall but increase cost and distraction.
Topics
ChunkingEmbeddingsVector databasesHybrid searchRe-rankingCitations