Working through this module?0 of 19 done
Module 15 · Page 16 of 20 · 10 sections

Evaluation and Benchmarking in Agentic AI

Evaluation dimensions, metric choice per task type, LLM-as-judge, and a full evaluation pipeline.

15.1

Why Evaluation is Important?

  • Evaluation helps to measure the quality, reliability and usefulness of an agent.
  • Agentic systems are more complex than simple LLMs because they take actions, use tools and interact with the environment.
  • We need evaluation to ensure the agent is safe, accurate and aligned with user goals.
  • It helps in comparing different models, prompts and design patterns.
15.2

Key Evaluation Dimensions

1
Accuracy
Gives correct and relevant answers.
2
Task Success
Completes the intended task successfully.
3
Reliability
Produces consistent results.
4
Safety
Avoids harmful or unsafe actions.
5
Groundedness
Uses correct and verifiable information.
6
Efficiency
Completes tasks with minimal time, tokens and cost.
7
User Satisfaction
Meets user expectations and is helpful in real use cases.
15.3

Types of Evaluation

1
Intrinsic Evaluation
Evaluate model output directly (e.g. correctness, fluency).
2
Extrinsic Evaluation
Evaluate based on real-world tasks and user goals.
3
Human Evaluation
Human experts judge the output.
4
Automatic Evaluation
Use metrics and LLM based evaluation.
15.4

Evaluation Flow (General)

InputPrompt / task
AgentLLM + tools
OutputAnswer / action
ReferenceAnswer / expected result
EvaluationMetrics + Human Review
Score + FeedbackImprovement
The agent's steps and its output are both judged against a reference, and the evaluation produces the score and feedback.
15.5

Common Evaluation Metrics

1
Exact Match
Checks if the output matches the expected answer.
2
Semantic Similarity
Measures meaning similarity (using embeddings).
3
Task Success Rate
Percentage of tasks completed successfully.
4
Hallucination Rate
Measures incorrect or fake information.
5
Tool Use Accuracy
Correct selection and usage of tools.
6
Response Time
Time taken to complete the task.
7
Token Usage
Number of tokens used (cost efficiency).
15.6

Example Metrics for Different Tasks

Task typeEvaluation metrics
Q&AExact match, semantic similarity, groundedness
Information searchRelevance, correctness, source citation
Tool usageTool selection accuracy, task success rate
Multi-step taskEnd-to-end success, intermediate step accuracy
Code generationFunctional correctness, compilation success, test case pass rate
SummarizationROUGE, BLEU, human feedback
ReasoningCorrectness, logical consistency, faithfulness
15.7

Human Evaluation Guidelines

  • Use clear evaluation criteria.
  • Provide multiple test cases.
  • Compare with reference answers where possible.
  • Check helpfulness, correctness and safety.
  • Use multiple human reviewers to reduce bias.
  • Give scores (e.g. 1 to 5) for each dimension.
15.8

LLM as a Judge (Automatic Evaluation)

  • Use another LLM to evaluate the output.
  • Provide evaluation criteria in the prompt.
  • Useful for large scale evaluation.
  • Still validate with human review for important cases.
prompt
You are an evaluator. Compare the following output with the
expected answer and give a score from 1 to 5 based on
correctness, relevance and helpfulness.

User Query: {query}
Expected Answer: {reference}
Model Output: {output}

Give score and short explanation.
15.9

Evaluation Pipeline (Detailed)

DatasetTest cases
Run AgentMultiple configurations
Collect ResultsOutputs, logs
EvaluateAuto metrics + human review
AnalyzeCompare & identify improvement areas
Final ReportScores, charts, insights
15.10

Key Takeaways

  1. 1Evaluation is essential for building reliable and useful agents.
  2. 2Use a combination of automatic metrics and human review.
  3. 3Choose the right metrics based on the task type.
  4. 4Continuously evaluate and improve the agent.
  5. 5A good evaluation pipeline helps in real-world deployment.