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