Tech challenge · Generative AI

The RAG assistant quotes an outdated policy

MediumGenerative AI

An internal assistant answers HR questions with retrieval-augmented generation. Employees report it quoting last year's leave policy. Both the old and the new documents are in the vector index. How do you diagnose and fix it?

Think it through or sketch an answer first, then open the hint or the solution.

Show a hint

Check what was retrieved before blaming the model.

Show the solution

Look at the retrieved chunks for the failing questions: the old policy is being retrieved because it is still indexed and is similar to the question. Fix the data: remove or re-index superseded versions when documents change, store metadata such as effective dates and status, and filter retrieval to current documents. Then add these questions to an evaluation set so regressions are caught.

Common mistakes

  • Changing the prompt to "use the latest policy" when the context only contains the old one.
  • Switching to a bigger model instead of fixing retrieval.

Learn more

More Generative AI challenges

Today's challenge and the full archive