Learning path
LLMOps: observability, evals and cost
Learn LLMOps in practice: trace every request, gate changes with evals in CI, calibrate judges and keep token spend visible and under control in production.
Bookmark
Bookmarks are kept in your free account, so you can find this page again on any device.
Sign in to bookmarkWhat you will be able to do
- Find failure modes by reading real outputs before choosing metrics
- Trace requests with tokens, latency and cost per user action
- Build code-based checks and a calibrated LLM judge for a feature
- Run an eval suite in CI and block changes that regress it
- Cut cost with prompt caching and a cache-friendly prompt layout
Steps
Step 1: Start your evals by reading outputs, not by picking metrics
The fastest way to useful LLM evals is to read real outputs and write down what is wrong. Why error analysis comes before metrics, and how to do it.
Step 2: Agent observability: what to log and why
What to record for AI agents in production: traces and spans, tool calls, cost per task and the signals that catch failures before users report them.
Step 3: Add tracing and cost tracking to an LLM app
One trace per user action, with tokens, latency and cost for each model call, so slow and costly features stand out.
Step 4: Trace an agent with OpenTelemetry
Instrument an agent loop with OpenTelemetry GenAI spans, one per model call and tool call, and send the traces to Langfuse or Arize Phoenix.
Uses the OpenTelemetry GenAI conventions, which are still marked as in development, so check each attribute's status.
Step 5: Write your first LLM eval
Turn real outputs into a small test set, add code-based checks in promptfoo and run them in CI to catch regressions on every change.
Step 6: LLM-as-a-judge: grading outputs you can trust
Write narrow grading criteria, check the judge's verdicts against your own labels and decide when its agreement is good enough.
Step 7: Evaluate RAG answers with a golden dataset
Set up RAG evaluation with a golden dataset and promptfoo: score retrieval, correctness and grounding for every question, and fail CI when answer quality drops.
The CI gate in this workflow works for any eval set, not only retrieval.
Step 8: Run LLM evals in CI with promptfoo
Write a promptfoo config with deterministic and model-graded assertions, run it in GitHub Actions, fail the build on regressions and keep the bill small.
Step 9: Cut LLM costs with prompt caching and token budgets
Lay out prompts so the provider can cache them, measure tokens before you send, and use batch processing and model routing to cut what each request costs.
Step 10: Controlling LLM costs without hurting quality
Where LLM spend actually goes (context, retries, agent loops, output) and the levers that cut it without hurting quality: caching, routing, batching, budgets.
Finish with the other cost levers: model routing, batching and budgets.
LLMOps: observability, evals and cost quiz
7 questions with explanations. Your score is saved when you are signed in.
Final quiz
Related paths
Building with the Claude API
Learn to build with the Claude API from your own code: the Messages API, tool use, structured output and prompt caching, then evaluate and trace what you built.
Evals and safety for LLM features
Catch regressions and attacks before users do, with error analysis, code-based evals, calibrated judges and prompt-injection tests.
Prompt and context engineering
Go from single prompts to deciding what a model sees at each step, from instructions and examples to files and tools.