RAG · 2026-08-06

Your agent confidently invents facts about your internal docs.

How do you fix it?

  1. AAdd a line to the system prompt telling the model to state only facts it is completely sure of from its training
  2. BRetrieve relevant doc chunks and ground the answer in them (RAG) with citations
  3. CRaise the temperature
  4. DWrite a longer system prompt

Answer: B

Retrieve relevant doc chunks and ground the answer in them (RAG) with citations

Why

Hallucination on private data = missing grounding. Retrieve the real chunks, put them in context, and cite - don’t rely on the model’s memory.

More on this topic

More on Way of the Agent

Real situations from building agents - with the answer and why.

Solve a new one every day on the Path