interactive · 12 min
A Tiny Retriever
Objective: retrieve the most relevant document by simple word overlap, then answer only from it and cite its id.
Real systems swap word-overlap for embedding similarity (subsystem D),
but the shape is identical: score, rank, answer only from the top chunk.
The model — your MockLLM-style policy — never invents facts here; it is
constrained to fetched context.
Best practice: return the source id with every grounded answer; an answer with no retrievable source is a hallucination risk to flag.
Next: RAG Failure Modes