Skip to course content
Free LangChain course

LangChain for LLM Applications and RAG

Module 10 Activity

Scenario

Something produced a wrong answer without raising. This is how you find it and how long you keep the evidence.

What you build

A span-per-step trace, a backwards debugging pass, run comparison, and per-field retention.

Steps

  1. Emit one span per step with inputs, outputs and duration - including scores on the retrieval span.
  2. Read a trace from a healthy run first, so you know what normal looks like.
  3. Plant a retrieval fault and find it by reading backwards from the symptom. Note where reading forwards would have sent you.
  4. Run the same input twice with one config field changed and attribute the difference.
  5. Score retrieval and generation as separate booleans across your eval set.
  6. Set retention per field: metrics and versions indefinitely, content on a short limit.

Evidence to hand in

Review checklist