Trail 06 · 14 lessons

Production: cost, latency, and operations

Cheap, fast, and observable: tracing, parallel steps, caching, model cascades, a fallback when the provider goes down, and a stack without vendor lock-in.

  1. 01FundamentalCost and latencyDo the math on every call before you ship.
  2. 02FundamentalObservability for AITraces, spans, and logs that let you answer: why did the agent do that?
  3. 03SmellNo TracingWhen something goes wrong, nobody can see which calls, tools, and context led to the answer.
  4. 04RefactoringAdd TracingRecord every call, tool, prompt version, and cost in a browsable trace.
  5. 05SmellSerial Latency StackFive independent calls run one after another and the user waits 20 seconds.
  6. 06RefactoringParallelize Independent StepsRun calls that do not depend on each other at the same time.
  7. 07PatternSectioningBreak the task into independent parts and run them all in parallel.
  8. 08SmellMissing CacheThe same large context and the same questions are processed from scratch every time.
  9. 09RefactoringIntroduce CacheReuse prompt prefixes and answers for equivalent questions.
  10. 10PatternModel CascadeStart with the cheapest model and move up only when needed.
  11. 11SmellSingle Provider DependencyWhen the model API goes down or slows down, the whole product stops with it.
  12. 12RefactoringAdd Fallback PathDefine what happens when the model, the tool, or the provider fails.
  13. 13FundamentalChoosing a stackThe layers of an LLM system, and when LangChain, LangGraph, a provider SDK, or another library earns its place.
  14. 14Real-world scenarioDeep research with citationsInvestigate an open question across dozens of sources and deliver a cited report.
  15. Final projectLangGraph LabDeep research with citationsA system that investigates an open question across dozens of sources and delivers, in minutes, a report with a source for every sentence.5 decisions · 6 tests · Minimum score to complete the track: 70.
Search