← AI Agents & RAG learning path
AI Agents & RAG · Module 5 of 10

Improving RAG quality

Tune retrieval and generation for better answers.

📖 Key ideas

  1. Chunk by structure (headings) with some overlap.
  2. Add metadata (source, date, section) for filtering.
  3. Rerankers reorder results by relevance.
  4. Query rewriting improves vague questions.
  5. 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