AccuracyEvaluator uses an LLM judge to compare an agent’s generated output against an expected answer. Each evaluation produces a score from 1 to 10 along with detailed reasoning and constructive critique.
How It Works
- The agent under test receives a query and produces output.
- A separate judge agent evaluates the output against the expected answer and guidelines.
- The judge returns a structured
EvaluationScorecontaining a numeric score, reasoning, pass/fail flag, and critique. - If
num_iterations > 1, the process repeats and scores are averaged.
Parameters
Result Structure
AccuracyEvaluationResult contains:
average_score— Mean score across all iterations (1–10)evaluation_scores— List ofEvaluationScoreobjects, one per iterationgenerated_output— The output produced by the entityuser_query/expected_output— The original inputs
EvaluationScore includes:
score— Numeric score (1–10)reasoning— Step-by-step explanation from the judgeis_met— Boolean indicating whether core requirements are metcritique— Actionable feedback on how to improve
Methods
Usage Examples
Agent
Evaluate a single agent
Team
Evaluate a multi-agent team
Graph
Evaluate a graph workflow

