Design for reliability

Ground the agent to reduce hallucination

Anchor the agent in real data and require it to cite sources, so it reports what is true instead of inventing what sounds plausible.

Give it the facts, do not rely on memory

A model asked to recall details from training will sometimes confabulate. An agent given the relevant documents and asked to answer only from them is far more reliable. Retrieval-based grounding is the standard tool here: fetch the source, then answer from it.

Require citations and verify them

Ask the agent to point at the specific source for each claim, then check that the source says what the agent claims. Faithfulness metrics from tools like Ragas can flag answers that are not supported by the retrieved material.

Let it say "I do not know"

A large share of hallucination happens because the agent feels obligated to answer. Explicitly permitting and rewarding "I do not have that information" removes the pressure that produces made-up answers.

Key takeaways

  • Ground answers in retrieved sources instead of the model's memory.
  • Require citations and verify claims against the source material.
  • Make it safe for the agent to admit when it does not know.

Further reading

  • Ragas docs.ragas.ioMetrics for measuring whether an answer is actually grounded in its retrieved sources.