ON-PREM CHOREO CLOUD BOTH

What it is

amp-evaluation is a Python library for scoring how well an AI agent behaved, by reading the OpenTelemetry traces the agent left behind. It offers evaluators (small scoring functions), a Monitor that scores live traces over a time range, an Experiment that runs an agent against a dataset with expected answers, and a set of built-in evaluators. The platform's evaluation job is built on it.

It is a marking guide with a marker's toolkit. Each evaluator is one question on the guide, and the monitor is the marker who reads every recent answer sheet and writes down the scores.

Why it exists

Agents give different answers each time, so quality has to be measured on real runs. One shared shape for evaluators lets the same checks run during development and in production.

How it works

  • An evaluator receives a Trace, an AgentTrace or an LLMSpan, depending on the type hint of its first parameter, and returns an EvalResult with a score and an explanation.
  • A Monitor fetches the traces of a time range through a TraceFetcher and runs every evaluator over them. Evaluators that need an expected answer (a Task) are skipped with a warning in monitor mode.
  • An Experiment runs an invoker (a function that calls the agent) over a Dataset of Tasks and scores the results.
  • builtin(name) returns a ready evaluator. The package defines 11 rule-based ones, 16 that ask an LLM to judge, and 6 DeepEval wrappers that need the DeepEval package installed.
  • In the platform, evaluation-job/main.py imports the library and runs a Monitor inside an Argo workflow.

Key facts

Package
amp-evaluation (PyPI)
Python
3.10 or newer
Levels
trace, agent, llm
Modes
monitor (live traces), experiment (dataset)
Built-in evaluators
11 rule-based, 16 LLM-as-judge, 6 DeepEval
Used by
evaluation-job

Talks to (1)

  • depends on evaluation-job
    Evaluators and Monitor runner
    python import