← AI Agents & RAG learning pathAI Agents & RAG · Module 5 of 10
Improving RAG quality
Tune retrieval and generation for better answers.
📖 Key ideas
- Chunk by structure (headings) with some overlap.
- Add metadata (source, date, section) for filtering.
- Rerankers reorder results by relevance.
- Query rewriting improves vague questions.
- Evaluate retrieval (recall) and answer quality separately.
💡 Real-life example: Improving RAG is training the librarian to fetch the best pages, not just any pages.
RerankerModel re-scoring retrieved results
Metadata filterRestricting search by attributes
Query rewritingReformulating a question
Retrieval recallShare of relevant chunks found