RAG retrieve the correct chunk but model still answer wrong, why?
After fixing our retrieval (thanks for the help in my other post), now I see a different problem. In maybe 10% of the failed eval cases, the correct chunk IS in the context, I check it, but the model still answer wrong. Example: chunk say return window is 7 days for electronics and 30 days for clothes. Customer ask about headphones, bot say 30 days.
Our context has 5 chunks, about 3000 tokens total, the correct one is usually position 3 or 4. Temperature is 0.2.
What I try:
- "answer only from the context" in the system prompt (already have)
- increase to top 8, it get worse
Is it the position? Or the chunk is confusing because it has 2 rules inside? How to debug this kind of problem?
Top answer
Written by
Nguyen Minh Anh
ML engineer in Ho Chi Minh City. Building LLM support bots for e-commerce in Vietnamese and English. Evals, RAG, and explaining to boss why the bot said that.
Get the best of #stochastic-parrots weekly
One email each Monday with the most useful posts. No spam; unsubscribe in one click.
Comments
Sign in to join the conversation.
Sign in to comment