tools for agent evaluation
Summary
- Agent evaluation needs five kinds of tools: tracing, an evaluation harness, scorers (LLM judges, trace-based judges and code checks), evaluation datasets, and a human review workflow.
- Evaluate the trajectory, not only the final answer. An agent can reach a plausible answer after calling the wrong tool or repeating calls, and only trace-aware scorers catch that.
- Open-source MLflow covers the whole toolkit in one framework:
mlflow.genai.evaluate(), built-in judges including tool-call judges,make_judge()for custom judges that read the full trace, and@scorerfor deterministic checks. - On Databricks, managed MLflow adds Databricks-hosted judge models, a hosted Review App for domain experts, and traces and evaluations governed in Unity Catalog.
tools for agent evaluation
The tools for agent evaluation fall into five groups: tracing to capture every step, an evaluation harness to run the agent against test cases, scorers that judge the results, evaluation datasets that hold the test cases, and a human review workflow that keeps the judges honest. Pick tools that score the agent's full trajectory (which tools it chose, with which arguments, in what order), because a correct final answer can hide a broken process. Open-source MLflow provides all five in one framework, and Databricks runs it as a managed service.
Why agents need different evaluation tools
Evaluating a single LLM call means comparing an output to a reference or a rubric. An agent makes decisions across many steps: it plans, calls tools, reads results and decides again. MLflow's agent evaluation tutorial shows the pattern: opening the trace of a flagged test case reveals a math agent computing in three tool calls where two would do, something an output check alone can't explain. Agent evaluation tools therefore have to read traces, score tool usage, and tie each failing case back to the step that caused it.
The agent evaluation toolkit
| Tool | What it does | In MLflow |
|---|---|---|
| Tracing | Records inputs, outputs, latency and token usage for every step | MLflow Tracing, with autolog() integrations and @mlflow.trace |
| Evaluation harness | Runs the agent on a dataset and applies scorers | mlflow.genai.evaluate() |
| Built-in LLM judges | Score common quality dimensions without custom prompts | RelevanceToQuery, Correctness, RetrievalGroundedness, Guidelines |
| Tool-call judges | Check that tool calls and arguments fit the request and aren't redundant | ToolCallCorrectness, ToolCallEfficiency |
| Trace-based custom judges | An LLM judge that explores the full execution trace | make_judge() with the {{ trace }} template variable |
| Code-based scorers | Deterministic checks such as exact match or format validation | Functions decorated with @scorer |
| Third-party scorers | Specialized metrics from open-source evaluation frameworks | Pass them to mlflow.genai.evaluate() next to built-in judges |
| Evaluation datasets | Inputs plus optional expectations such as expected_facts |
MLflow evaluation datasets |
| Human review and alignment | Experts label traces; judges learn from the labels | Feedback on traces, and the judge align() method |
How Databricks approaches agent evaluation
On Databricks, agent observability and quality is done with MLflow: the same open-source product, managed, with traces, evaluations and prompts kept in Unity Catalog. A typical run combines a deterministic check with the tool-call judges:
import mlflow
from mlflow.genai import scorer
from mlflow.genai.scorers import ToolCallCorrectness, ToolCallEfficiency
@scorer
def exact_match(outputs, expectations) -> bool:
return int(outputs) == expectations["answer"]
# eval_dataset: list of {"inputs": ..., "expectations": ...}
# predict_fn: a function that calls your agent
results = mlflow.genai.evaluate(
data=eval_dataset,
predict_fn=predict_fn,
scorers=[exact_match, ToolCallCorrectness(), ToolCallEfficiency()],
)
The open-source docs mark the tool-call judges as experimental, so pin your MLflow version. For criteria a built-in judge can't express, make_judge() builds a custom judge from natural-language instructions. Instructions can reference {{ inputs }}, {{ outputs }}, {{ expectations }} and {{ trace }}. A trace-based judge explores the trace with Model Context Protocol (MCP) tools to validate tool usage patterns, investigate execution failures and verify multi-step workflows, and it needs an explicit model argument.
Judge alignment is part of MLflow too. Collect human feedback under the judge's name, then call the judge's align() method to produce a judge more aligned with your experts. It works for built-in judges and make_judge() judges (on Databricks it needs MLflow 3.14.0 or above) and doesn't support multi-turn judges.
Databricks adds pieces you'd otherwise build or host yourself:
- Databricks-hosted judge models. By default each built-in judge uses a Databricks-hosted LLM designed for GenAI quality assessment. You can switch models with the
modelargument in the<provider>:/<model-name>format. TheSafetyandRetrievalRelevancejudges are available only in Databricks managed MLflow. - Review App. A hosted Chat UI and expert-labeling UI let domain experts test the agent and label existing traces.
- Synthetic test sets.
generate_evals_dfin thedatabricks-agentspackage generates an evaluation set from your documents for retrieval agents. - No-code scoring. In an experiment's Traces tab, select traces, choose Actions > Evaluate, and run scorers. Results attach to each trace as feedback.
FAQs
Which agent evaluations need ground truth?
Correctness and RetrievalSufficiency need expectations, and the Databricks judge table lists ToolCallCorrectness as needing them too. RelevanceToQuery, Safety and RetrievalGroundedness don't, which makes them usable on production traces that have no labels.
Can I evaluate an agent from its existing traces?
Yes. Answer-sheet evaluation applies scorers to pre-computed outputs or existing traces, so you don't have to re-run the agent.
How many labeled traces does judge alignment need?
The docs say you can achieve reasonable alignment with at least 10 traces, and that more traces give better results. Each trace needs both the judge's assessment and human feedback with the same name.
Do these tools work with any agent framework?
Yes. Evaluation runs on MLflow traces, and MLflow Tracing has autolog integrations for frameworks such as LangGraph and CrewAI, plus manual instrumentation for custom code.
The information provided herein is for general informational purposes only and may not reflect the most current product capabilities or configurations.