Why does my RAG system hallucinate even with retrieved context?
RAG & Vector DB Interview: Common RAG Mistakes, Pitfalls, System Design Questions
Audio flashcard · 0:27Nortren·
Why does my RAG system hallucinate even with retrieved context?
0:27
Hallucinations with context usually mean the retrieved chunks do not actually contain the answer, or they contradict each other, or the prompt does not strongly instruct the model to answer only from context. Measure faithfulness on a sample of failed queries to confirm. Fix by improving retrieval quality so relevant chunks actually rank high, adding explicit instructions to the prompt like "answer only from the provided context and say you do not know if the context is insufficient," and using a reranker to filter irrelevant chunks from the top-k.
docs.ragas.io