Last week a client pinged me. Their internal AI assistant was confidently telling employees the wrong vacation policy. Not hallucinating from nothing. Retrieving an outdated document and presenting it as current. Classic RAG failure. Here is exactly how I debugged it and what we fixed.

The symptom: assistant returns 15 days PTO for new hires. Correct answer is 20 days (policy changed 8 months ago).

First thing I always do is check what actually got retrieved.

# Add this temporarily to your retrieval pipeline

results = vectorstore.similarity_search_with_score(