The Real Fullstack

The Hallucinating RAG

The assistant said 14 days. The policy says 30. Did the model make it up — or did we feed it the wrong page?

Ingénieur10 minSimulateur de fluxLaboratoire de débogage
ragembeddingsvector-dbllmpython

Ce défi n'est pas encore traduit en Français. Vous lisez la version anglaise.

Mission:First find out which evidence reaches the model, then configure retrieval and the answer policy so the assistant answers both parts of the question from current sources, cites them, refuses when evidence is missing, and stays within an 1,800-token context budget.Contexte · Objectifs d'apprentissage ▾

Tallow Cloud, a fictional SaaS company, runs a retrieval-augmented support assistant over its knowledge base. A customer was refused a refund on day 20 after the assistant answered “14 days”, with no citation. The current policy grants 30 days for annual Enterprise plans, on request from an account admin.

Mission: First find out which evidence reaches the model, then configure retrieval and the answer policy so the assistant answers both parts of the question from current sources, cites them, refuses when evidence is missing, and stays within an 1,800-token context budget.

Objectifs d'apprentissage

  • Debug a RAG answer by inspecting what was retrieved, not just what was generated.
  • Use reranking and metadata filters to get the right evidence into a small context.
  • Enforce grounding: cite sources and refuse when the context lacks the answer.
SimulationSimulé
CustomerAssistant APIEmbedding modelVector DBRerankerLLM
Lancer la simulation
  • 09:12:04INFOassistantQ: "What is the refund window for annual Enterprise plans?"
  • 09:12:05INFOassistantA: "Enterprise customers can request a refund within 14 days." (no citation)
  • 09:20:41WARNsupportTicket #4411: customer denied refund on day 20, policy says 30 days for annual Enterprise
  • 09:21:10INFOkb-syncrefund-policy-v3-2025 indexed; refund-policy-v1-2023 still indexed (no version filter)

Simplification

Similarity and reranker scores are fixed, synthetic numbers and each claim is supported by exactly one document. Real systems need evaluation sets to measure retrieval quality and groundedness. Modèle pédagogique — les chiffres illustrent un comportement, ce ne sont pas des benchmarks.

Concepts

Défis liés

Références