Skip to content
AI Skills Central

Type to search Agent Skills, workflows, tutorials, tools and the glossary.

Building with LLMs

LLM evaluation

Measuring AI system quality with datasets, code checks and model-graded tests.

Intermediate
Bookmark

Bookmarks are kept in your free account, so you can find this page again on any device.

Sign in to bookmark
On this page

Overview

Evals are the tests of AI systems. Because model output varies and "correct" is often fuzzy, you need a set of representative inputs, a way to score outputs, and a habit of running them whenever the prompt, model or retrieval changes.

Good eval work starts with error analysis: read a sample of real outputs, label what went wrong, and only then choose metrics. Scores can come from code (exact match, valid JSON, contains the right ID), from a model grading against a rubric (LLM-as-a-judge, checked against human labels), or from people. Keep the dataset small enough to look at and grow it from production failures.

What you will practise

  • Read and label real outputs before choosing metrics
  • Build a small golden set from real usage and known failures
  • Mix code checks with rubric-based LLM grading
  • Check an LLM judge against human labels before trusting it

Learning paths

  • AI for test engineers

    An AI course for testers: apply generative AI to everyday test automation, from AI-assisted test design to generating, healing and reviewing Playwright tests.

    Beginner9 h10 steps

  • AI for product managers

    An AI course for product managers: prompt for usable drafts, research with sources, write a PRD from evidence, prototype with app builders and read evals.

    Beginner1 day11 steps

  • 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.

    Intermediate5 h9 steps

  • Evals and safety for LLM features

    Learn LLM evals and safety: catch regressions and attacks before users do, with error analysis, code-based evals, calibrated judges and prompt-injection tests.

    Intermediate9 h9 steps

  • 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.

    Intermediate7 h10 steps

  • Local models and fine-tuning

    Run open-weight models on your own hardware, use them on private documents, decide when fine-tuning beats RAG or long context, and try a small LoRA fine-tune.

    Intermediate11 h8 steps

  • Production AI agents: approval, multi-agent and evals

    For engineers moving past single-agent demos: add code-level approval gates, context isolation, multi-agent patterns and automated evals you can trust in CI.

    Intermediate9 h10 steps

  • Prompt and context engineering

    A prompt and context engineering course: go from single prompts to deciding what a model sees at each step, from instructions and examples to files and tools.

    Intermediate3 h8 steps

  • RAG engineer

    A RAG course for engineers who want results they can measure: embeddings, pgvector, a pipeline built in a day, golden datasets, LLM judges and tracing.

    Intermediate14 h8 steps

Tutorials

  • Add input and output guardrails to an LLM app

    Length, topic and PII checks on input, schema and policy checks on output, then measure false positives and latency on a test set.

    Intermediate50 min

  • Design tools an AI agent can use well

    Take one badly designed agent tool, fix its names, descriptions, arguments, errors and output size, and measure the difference with a small eval you can rerun.

    Intermediate1 h

  • Evaluate coding agents on your own repository

    Run Claude Code and Codex headless against 10 closed issues from your repo, then score them with the real fix's tests and a blind review rubric.

    Advanced2 h

  • Optimise a prompt automatically with DSPy

    Write a signature and a metric, run three optimisers on 30 labelled examples, score 20 held-out ones, and see when hand-tuning wins.

    Intermediate1 h 15 min

  • How to test LLM applications as a QA engineer

    Contract tests on a scripted model, a golden set with pass-rate floors, a calibrated LLM judge and a regression gate.

    Intermediate1 h

  • Chunking strategies for RAG, tested

    Compare fixed-size, heading-based and semantic chunking on the same documents and questions, measure retrieval hit rate, and pick a strategy with evidence.

    Intermediate1 h

  • 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.

    Intermediate50 min

  • Evaluate AI agents: outcomes, trajectories and tool use

    Build an agent eval harness that checks the final state, the tool-call trajectory and a judged transcript, run each task several times and read the traces.

    Advanced1 h 30 min

  • Fine-tune a small model with LoRA

    Fine-tune a small open model with LoRA using TRL and PEFT, measure it on a held-out set before and after, and decide whether the gain is worth keeping.

    Advanced2 h

  • 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.

    Beginner40 min

  • 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.

    Intermediate45 min

Workflow recipes

Articles

Tools for this skill

9 of 14 tools tagged with this skill.

  • Arize Phoenix

    Source-available tracing and evaluation for LLM applications, built on OpenTelemetry.

    Evals and observabilityFreeArize

  • Braintrust

    Platform for tracing production LLM traffic, running evals and catching regressions.

    Evals and observabilityFreemiumBraintrust

  • DeepEval

    Open-source, pytest-style framework for evaluating LLM apps, RAG and agents.

    Evals and observabilityOpen sourceConfident AI

  • DSPy

    Write LLM programs as declarative modules and let optimisers tune the prompts.

    Agent frameworks and SDKsOpen source

  • garak

    Scanner that probes LLMs for vulnerabilities such as prompt injection.

    Safety and securityOpen sourceNVIDIA

  • Inspect

    The UK AI Security Institute's open-source framework for LLM and agent evals.

    Evals and observabilityOpen sourceUK AI Security Institute

  • Langfuse

    Tracing, prompt management and evals for LLM applications.

    Evals and observabilityOpen sourceLangfuse

  • LangSmith

    LangChain's tracing and evaluation platform, usable from any code.

    Evals and observabilityFreemiumLangChain

  • MLflow

    Open-source ML and GenAI platform with tracing, evaluation and prompt management.

    Evals and observabilityOpen sourceLinux Foundation (created by Databricks)

Show 5 more

Key terms

Words you will meet while learning this, defined in the glossary.

Full glossary
  • Batch API

    A provider endpoint that takes many requests at once and returns results later, typically within 24 hours, at a lower price than live requests.

  • Benchmark

    A public, standard test set used to compare models on a capability such as coding, maths or knowledge, under the same conditions.

  • Data contamination

    When benchmark or test examples appear in a model's training data, so high scores reflect memorisation rather than ability.

  • Error analysis

    Reading a sample of real outputs, labelling what went wrong and grouping the failures before deciding what to measure or fix.

  • Eval

    A repeatable test that measures how well an AI system performs on a defined set of cases, so you can compare versions instead of guessing.

  • Evaluator-optimizer

    A loop where one model call writes an answer and another grades it against criteria, sending feedback until the answer passes.

  • Golden dataset

    A curated set of inputs with expected outputs or grading notes, used as the fixed reference that your evals are scored against.

  • LLM-as-a-judge

    Using a model to grade another model's outputs against written criteria, ideally checked against a sample of human-labelled cases.

  • Log probabilities (logprobs)

    The log of the probability a model gave each token it generated, returned by some APIs to show how confident the model was.

  • Needle-in-a-haystack test

    A long-context test that hides one fact in a large block of unrelated text and checks whether the model can find and repeat it.

  • pass@k

    The probability that at least one of k generated solutions passes the tests, used to score code generation and other checkable tasks.

  • Reasoning effort

    An API setting that controls how much a reasoning model thinks before answering, trading cost and latency against accuracy.

  • Regression eval

    An eval run automatically on every prompt, model or code change, so that a drop in quality is caught before it reaches users.

  • Sycophancy

    A model's habit of telling users what they want to hear, agreeing with their views or praising their work even when that means being wrong.

  • Synthetic data

    Training or test examples generated by a model or program instead of collected from real users, used when real data is scarce.

  • Trajectory evaluation

    Evaluating the sequence of steps an agent took, its tool calls, arguments and order, rather than only its final answer.