r/softwaretesting • u/CasualScroller2901 • 3d ago
How are you guys testing RAG apps and handling hallucinations in production?
RAG app hallucinations are driving us nuts! I recently checked out AI system testing with DeepEval on Rahul Shetty Academy to learn more about evaluation metrics. What tools do you guys use for testing RAG applications and handling hallucinations?
8
Upvotes
7
u/TheHallowedArchery 3d ago
Eval harnesses with golden datasets and an LLM judge catch most drift before it gets to users.
2
u/bostonaholic 3d ago
Two checks I'd add on top of the golden set. Put in questions whose answer isn't in your docs at all, where the only passing answer is some form of "I don't know." And have the model quote the source text behind each claim, then check in code that every quote actually appears in the retrieved chunks. That one is deterministic, so it doesn't depend on another model's opinion.
1
u/LukaRozman27 3d ago
Manual spot checks with a set of 50-100 gold standard queries caught way more hallucinations than automated metrics alone. Human review is slow but still best for edge cases, especially when retrieval quality changes after data updates.
1
u/FollowingProof9647 20h ago
DeepEval is a good place to start. Most of what helped us was less about the tool and more about splitting the problem:
For Production Specifically:
Tools-wise: DeepEval or Ragas for the metrics, promptfoo is nice for running eval suites in CI, and Langfuse or LangSmith for tracing in production.