Generative AI · Intermediate level

Intermediate level · Module 6: Retrieval-Augmented Generation Pipelines · Lesson 3 of 3

Reducing Hallucinations in RAG

Learners identify why RAG systems still hallucinate (bad retrieval, conflicting passages, the model's own knowledge) and apply design fixes.

In this lesson you will

  • Diagnose hallucination causes in RAG
  • Apply design fixes and measure them

Key concepts

retrieval missconflicting sourcesparametric knowledgelow temperatureanswer-level checks

The lesson

RAG answers can still be wrong when retrieval misses the right passage, passages conflict (an old and a new fee list), or the model fills gaps with its own knowledge.

Fixes include better chunking and retrieval, preferring the newest document version, low temperature, strict instructions to use only the passages, and answer-level checks that flag unsupported statements.

Measure each fix on the evaluation questions rather than assuming it helps.

Step by step

  1. Collect ten wrong answers from the test set.
  2. Classify each by cause.
  3. Apply two fixes.
  4. Re-run and compare.

Practice activity

Write a hallucination analysis and fix report for the project.

Expected result: Classified errors and measured improvements from two fixes.

Check your understanding

  1. Name two causes of hallucination in RAG.

    Show answer

    For example retrieval misses, conflicting passages or the model's own knowledge.

  2. Why prefer the newest document version?

    Show answer

    Older versions can contain outdated facts.

Further learning

Taught live by an instructor — online or in person. Free course lessons are for self-study and do not lead to a certificate — see registration options.