RAG
Open-book AI: retrieve, then generate
What is RAG?
Lab honesty
Evaluate the chain, not only the final prose
- 1 · Retrieval: did the system find evidence that can answer the question?
- 2 · Context: did chunking or ranking omit a necessary qualifier?
- 3 · Grounding: is each answer claim supported by the supplied evidence?
- 4 · Usefulness: is the grounded answer complete and relevant to the user?
Demo queries
Press Enter or Retrieve to rank corpus chunks, then answer.
Corpus (6 docs)
- Return Policyscore 100
Customers may return unopened items within 30 days of purchase for a full refund. Opened electronics have a 14-day window. Gift cards are non-refundable.
- Shipping Times
Standard shipping takes 5 to 7 business days. Express shipping arrives in 2 business days. Orders placed after 2pm ship the next business day.
- Aurora Headphones Specs
The Aurora Wireless Headphones offer 40 hours of battery life, active noise cancellation, and Bluetooth 5.3. Weight is 250 grams. Waterproof rating is IPX4.
- Nova Laptop Specs
The Nova Laptop includes a 14-inch display, 16GB RAM, 512GB SSD, and up to 12 hours of battery life. It ships with a USB-C charger only.
- Warranty FAQ
All hardware carries a 1-year limited warranty covering manufacturing defects. Accidental damage is not covered. Register your device within 30 days of purchase.
- Cafe Menu
Today's specials include tomato soup, grilled cheese, and iced tea. The cafe closes at 6pm on weekdays.
Ranked retrieval
- Return Policy100%
Model answer
Grounded[Return Policy] Customers may return unopened items within 30 days of purchase for a full refund. [Return Policy] Opened electronics have a 14-day window.
Key Insight
Check your understanding
1/5What does RAG stand for?
Sources, scope & review statusVerified Jul 29, 2026
Claims this lesson makes
- Stable conceptRAG retrieves candidate evidence before generation, so retrieval quality and answer grounding require separate evaluation.
- Stable conceptRetrieval can expose a generator to fresher or private evidence without encoding that evidence into the model parameters.
Scope: Retrieval supplies evidence at inference time; it does not guarantee that the generator will cite or use that evidence faithfully.
- Stable conceptA fluent answer with citations is not sufficient evidence of correctness: systems should evaluate whether the right evidence was retrieved and whether each answer claim is supported by it.
Primary reading
Next content review: 2027-07-29. Source links establish the lesson's claims; interactive numbers remain labeled simulations unless explicitly identified as measured data.