Tracing LLM calls
A customer writes in, "your assistant took twenty seconds and then told me the wrong price." Your logs say one request came in and one reply went out. In between there were two retrievals, four model calls and a tool call that timed out once. A trace shows you every one of those steps, how long each took and what each one saw.
In this lesson you'll learn to
- Describe a trace as a tree of spans, and say what a span for a model call, a retrieval and a tool call should record.
- Add tracing to an LLM app by hand or with an SDK, and connect spans across services with a trace id.
- Use a trace to find the slow step, the expensive step and the step where an answer went wrong.
- Compare the main kinds of LLM tracing tools and decide what to sample and keep.
Create a free account to open this lesson
It's free. You'll get every free lesson, quizzes that save your progress, daily flashcards and streaks.