Skip to content
Forward Deployed

Forward Deployed
T5.1

Why RAG & the RAG Lifecycle

Explain the knowledge problem RAG solves: stale training data, private data, hallucination, and context-window limits.

Lessons
7 lessons
By
Sourav Banerjee
Prerequisites
None
7 lessons

Also used in this module

Lessons taught in another module that this one builds on.

Practise and Check

Deliverable
Baseline pipeline: build the canonical lifecycle notebook end to end on the course corpus and save its retrieval and answer metrics. Every later module reports its improvement against this baseline.
Assessment
Answer the five Interview questions without notes, then run the lab.
Interview probe
Larkspur's support assistant answers billing questions from the handbook. The policy team changes the refund window on Monday. A teammate proposes fine-tuning the model on the new handbook. What do you recommend, and what has to happen on Monday?
Common mistakes
  • Dropping every chunk below a fixed cosine of 0.5
  • Re-running from_texts without ids=, so chunks come back twice
  • Tuning the prompt when the evidence never reached the top-k

Checkpoint

8 questions on this module's lessons. Pass mark 70 %. Your result feeds interview readiness, and a failed checkpoint puts the module in your revision queue.

  1. 1. Larkspur Cloud's refund terms change again next month. The support assistant must state the new terms and let customers check where they came from. Which approach fits the update best?
  2. 2. The refund question is still answered wrongly. A teammate has spent an afternoon on the prompt: stricter wording, an instruction to quote the handbook, a worked example. Nothing changed. What should have come first?
  3. 3. With a TF-IDF index, the refund-timing chunk says "Refunds" and the question says "refund". Recall stays at 0.50 for every k from 1 to 12. A teammate proposes raising k to 12. What is the better response?
  4. 4. For the Larkspur export question, recall is 1.00 at k=2, 5 and 12, while precision falls from 1.00 to 0.40 to 0.17. Chunks go straight to the model with no reranker. Which k do you record for the baseline?
  5. 5. On an embedding index, the best export match scores 0.817 and the best outage match scores 0.394 on the same model. A teammate adds a rule that drops every chunk with cosine below 0.5. What happens, and what is the fix?
  6. 6. A teammate reruns the Chroma from_texts cell to pick up a handbook edit. The refund question's top three now contains refund-timing twice, and no error was raised. What prevents this?
  7. 7. A Chroma retriever with a similarity-score threshold of 0.2 returns nothing for the outage question, though its top three chunks all have cosine above 0.25. The collection was created with default settings. What is the fix?
  8. 8. Switching the Larkspur index to embeddings lifts mean recall@2 from 0.50 to 0.67. Refund and outage improve, but the export question falls from 1.00 to 0.50. Under the baseline loop, what do you do?

Your Progress

How confident are you with this module?

1 means "I could not explain it yet"; 5 means "I could teach it". Rate again any time.

 

Saved in this browser when you leave the box.