Observed since 20 Oct, 23:02 UTC
No superseded metadata states collected. Unchanged observations do not create new revisions.
Evaluation package that allows benchmarking of agentic AIs from various sources and frameworks by producing statistical results which can be compared across different use cases and datasets.
Paper Link: https://openreview.net/pdf?id=fHsVNklKOc
Documentation Link: https://sap.github.io/agent-quality-inspect/
This repository contains the implementation of Talk, Evaluate, Diagnose: User-aware Agent Evaluation with Automated Error Analysis (TED).
The agent-quality-inspect toolkit evaluates agentic systems under different user personas (expert and non-expert), reports metrics such as Area Under the Curve (AUC), Progress Per Turn (PPT), pass@k, pass^k, etc., and provides detailed error analysis to identify specific areas for improvement in the agent.
At the core of TED is a subgoal-based evaluation: users specify a set of natural-language subgoals (e.g., "Agent should call search_messages after getting the current timestamp" or "Agent should explicitly state the final answer and justification") in the evaluation dataset. During evaluation, TED:
SubGoal objects in the EvaluationSample schema) as the ground truth of what the agent should achieve over the course of the interaction.AgentDialogueTrace), including turns, intermediate tool calls, and agent responses.git clone https://github.com/SAP/agent-quality-inspect
cd agent-quality-inspect
pip install -e .
.env file in the project root:AZURE_API_VERSION=your_api_version # e.g., 2024-02-15-preview
AZURE_API_BASE=https://your-resource.openai.azure.com/
AZURE_API_KEY=your_api_key
Note: The RapidAPI services used in these agent runners are third-party, user-subscribed services. SAP does not, provide, license or authorize their use.
There are two primary ways to use this repository:
The standard flow of using it as a metrics package is as follows:
pip install git+https://github.com/SAP/agent-quality-inspect.git
or
pip install agent-quality-inspect
Example: constructing a minimal trace and computing an AUC score with the metrics package: Run the script using streamlit run <script>.py.
Important Note: To import our package library use from agent_inspect import ..
from typing import List
from agent_inspect.clients import AzureOpenAIClient
from agent_inspect.metrics.scorer import AUC, ProgressScoresThroughTurns
from agent_inspect.metrics.constants import (
INCLUDE_VALIDATION_RESULTS,
INCLUDE_JUDGE_EXPLANATION,
OPTIMIZE_JUDGE_TRIALS
)
from agent_inspect.models.metrics.agent_trace import (
AgentDialogueTrace,
TurnTrace,
AgentResponse,
)
from agent_inspect.models.metrics.agent_data_sample import EvaluationSample, SubGoal
from agent_inspect.models.tools import ErrorAnalysisDataSample
from agent_inspect.tools import ErrorAnalysis
# Create LLM client (requires env vars: AZURE_API_VERSION, AZURE_API_BASE, AZURE_API_KEY)
client = AzureOpenAIClient(model="gpt-4.1", max_tokens=4096)
# Build a minimal agent trace with a single turn
agent_trace = AgentDialogueTrace(
turns=[
TurnTrace(
id="turn_1",
agent_input="What is my current account balance?",
agent_response=AgentResponse(
response="Your current balance is 100 USD.",
),
)
]
)
# 2. Define the evaluation data sample and subgoals
data_sample = EvaluationSample(
sub_goals=[
SubGoal(
details="Agent should correctly state the user's current account balance.",
)
]
)
# Step 1: Calculate progress rates using the evaluation sample and agent trace
progress_metric = ProgressScoresThroughTurns(
llm_client=client,
config={
INCLUDE_VALIDATION_RESULTS: True,
INCLUDE_JUDGE_EXPLANATION: True,
OPTIMIZE_JUDGE_TRIALS: False
}
)
progress_scores = progress_metric.evaluate(
agent_trace=agent_trace,
evaluation_data_sample=data_sample
)
print(f"Progress scores calculated for {len(progress_scores)} turn(s)")
for i, score in enumerate(progress_scores, 1):
print(f" Turn {i}: {score.score:.2f}")
# Step 2: Calculate AUC from progress scores
auc_result = AUC.get_auc_score_from_progress_scores(progress_scores)
print(f"AUC score: {auc_result.score:.2f}")
# Step 3: Run error analysis
# Extract validation results from the final turn
subgoal_validations = progress_scores[-1].validation_results
# Prepare data for error analysis
error_analysis_data_samples: List[ErrorAnalysisDataSample] = [
ErrorAnalysisDataSample(
data_sample_id=1,
agent_run_id=1,
subgoal_validations=subgoal_validations,
)
]
# Run error analysis
error_analyzer = ErrorAnalysis(llm_client=client, max_workers=3)
error_analysis_result = error_analyzer.analyze_batch(error_analysis_data_samples)
# Display results
error_categories = list(error_analysis_result.analyzed_validations_clustered_by_errors.keys())
print(f"\nIdentified {len(error_categories)} error categories:")
for i, category in enumerate(error_categories, 1):
count = len(error_analysis_result.analyzed_validations_clustered_by_errors[category])
print(f" {i}. {category} ({count} occurrences)")
print(f"Completed validations: {len(error_analysis_result.completed_subgoal_validations)}")
Benchmarks are orchestrated via the runners in paper_experiments and external agent runners (for example, Tau2Bench or ToolSandbox).
python -m paper_experiments.runner \
--agent tau2bench \
--samples-file paper_experiments/datasets/tau2bench_dataset_easy.json \
--user-proxy-persona expert
Additional options (agent type, datasets, number of trials, max turns, etc.) are documented in paper_experiments/readme.md.
After running evaluations, results and error analysis are written to timestamped folders under paper_experiments/.
See paper_experiments/readme.md for a full description of the output format.
You may also view the results of evaluation using our leaderboard UI at demo/agent-eval-dashboard.
To add your experiment results to the leaderboard, you can follow these steps:
add_results.py script via the following command:python demo/agent-eval-dashboard/scripts/add_results.py --results-dir <path-to-experiment-output>
# Example
python demo/agent-eval-dashboard/scripts/add_results.py --results-dir paper_experiments/experiment_outputs_17042026
open demo/agent-eval-dashboard/leaderboard/index.html
See demo/agent-eval-dashboard/README.md for more details.
We also provide pre-computed experiment results on HuggingFace so that you can explore the results without running the full evaluation pipeline yourself.
1. Install the HuggingFace huggingface_hub library (if not already installed):
pip install huggingface_hub
2. Download the dataset using the provided script:
python paper_experiments/download_hf_dataset.py --output-dir downloaded-dataset
See paper_experiments/download_hf_dataset.py for all available options (--repo-id, --repo-type, etc.).
3. Run agent leaderboard on the downloaded results:
Once you have downloaded the results, you can view them by using our agent leaderboard UI. To do this.
downloaded-dataset folder):./demo/agent-eval-dashboard/scripts/recreate_dashboard.sh downloaded-dataset
open demo/agent-eval-dashboard/leaderboard/index.html
You can plug in your own agentic system as long as it exposes a suitable interface and you can convert its interaction traces into the data structures expected by the metrics.
Typical steps:
AgentDialogueTrace. Extend the BaseAdapter class in agent_inspect.metrics.adapters to implement this mapping.BaseSession class in paper_experiments/session.py.The code in paper_experiments and agent_runners provides concrete examples you can follow when integrating a new agent.
After connecting your agent to our evaluation framework, you will need to define your EvaluationSample, which contains the subgoals and user proxy instruction.
We provide a helper in paper_experiments/convert_to_data_sample.py to convert your JSON dataset into the EvaluationSample format expected by our framework. This helper assumes your dataset follows the schema below (array of samples):
[
{
"id": "<string>",
"input": [
{
"role": "user",
"content": "<task description and instructions>",
"terminating_condition": "<natural-language condition describing when the task is considered complete>"
}
],
"metadata": {
"subgoals": [
{
"type": "<string>",
"details": "<natural-language subgoal describing expected agent behavior>",
"turn": "<turn index or 'all'>"
},
...
],
"expected_tools": [
"[{'tool_code': '<tool_name>(param1=value1, ...)', 'output': '$AnyValue'}]",
"... additional tool specifications ..."
],
"trace_type": "<string>"
},
"target": "<optional expected response or list of responses>",
"domain": "<string>"
}
]
Concretely, each element in the top-level array represents one evaluation sample. The subgoals array defines the SubGoal objects used during evaluation, input[0].content is used as the user_instruction, and metadata.expected_tools (if present) encodes expected tool calls that are mapped into ExpectedToolCall and ToolInputParameter objects.
Note: expected_tools is optional for now, in the future we plan to support tool call related metrics.
No known issues.
Create an issue in this repository if you find a bug or have questions about the content.
For additional support, ask a question in SAP Community.
Please refer to CONTRIBUTING.md for more information.
If you use this repository or the TED evaluation methodology in your research, please consider citing us:
@inproceedings{
chong2026talk,
title={Talk, Evaluate, Diagnose: User-aware Agent Evaluation with Automated Error Analysis},
author={Penny Chong and Harshavardhan Abichandani and Jiyuan Shen and Atin Ghosh and Min Pyae Moe and Yifan Mai and Daniel Dahlmeier},
booktitle={The Fourteenth International Conference on Learning Representations},
year={2026},
url={https://openreview.net/forum?id=fHsVNklKOc}
}
Copyright (c) 2026 SAP SE or an SAP affiliate company. All rights reserved. This project is licensed under the Apache Software License, version 2.0 except as noted otherwise in the LICENSE file.
Disclaimer: This repository uses third‑party APIs that are subject to their own terms, fees, and compliance obligations.
Download counts and popularity will appear here as the collector receives them.
| Version | Published | Direct dependencies | Open version |
|---|---|---|---|
| 2.3.6a1 | 26 Jun 2026 | 3 |
This describes our collected data; it is not a security assessment.
Observed since 20 Oct, 23:02 UTC
No superseded metadata states collected. Unchanged observations do not create new revisions.
package:f31644f4a34c2c45b7eca1cf22f1bde2031a5c4ac73ed1e3e6b82411974f7a35