Working through this module?0 of 19 done
Module 10 · Page 11 of 20 · 8 sections

Evaluation and Metrics in Agentic AI

What to evaluate, which metrics to track, and how to run evaluation with humans and LLM judges.

10.1

Why Evaluation is Important?

  • Helps measure how well the agent is performing.
  • Ensures the agent gives correct, relevant and safe responses.
  • Useful for comparing different models, tools and approaches.
  • Helps in identifying gaps and areas of improvement.
  • Important for real-world deployment and user trust.
10.2

What to Evaluate in Agentic AI?

1
Task Completion
Did the agent complete the task successfully?
2
Answer Quality
Is the response correct, relevant and helpful?
3
Tool Usage
Did the agent use the right tools at the right time?
4
Reasoning
Is the reasoning logical and clear?
5
Efficiency
Time taken, number of steps, token usage.
6
Safety
Avoid harmful, biased or unsafe responses.
7
User Satisfaction
Does it meet the user's need?
10.3

Common Evaluation Metrics

MetricDescriptionUse case
AccuracyCorrectness of the final answerQA, RAG, research
RelevanceHow relevant the response is to the querySearch, RAG
Task success ratePercentage of successfully completed tasksMulti-step tasks
LatencyTime taken to give responseReal-time applications
Token usageTotal tokens consumedCost optimization
Hallucination ratePercentage of incorrect / made-up answersFactual tasks
Tool call accuracyUsed correct tool with right parametersFunction calling
User feedbackHuman rating (e.g. 1–5)Overall satisfaction
10.4

Types of Evaluation

1
Automatic Evaluation
Using metrics and model-based scoring (e.g. BLEU, ROUGE, BERTScore, GPT-as-judge).
2
Human Evaluation
Human review and rating.
3
Task-based Evaluation
Check if the agent completes a real-world task.
4
Comparative Evaluation
Compare different models, prompts or agents.
5
Continuous Evaluation
Monitor performance over time in production.
10.5

Evaluation Workflow

Test DatasetQuestions / tasks
AgentLLM + tools
Agent ResponseFinal output
EvaluationAutomatic + human
MetricsAccuracy, relevance, task success, etc.
AnalysisFind gaps and improve
10.6

Example: Evaluation for RAG Agent

QuestionWhat are the key benefits of solar energy?
Ground truth
  • Renewable energy source
  • Reduces electricity bills
  • Environment friendly
  • Low maintenance cost
Agent response
  • Solar energy is a renewable source of energy.
  • It helps reduce electricity bills.
  • It is good for the environment.
  • It has low maintenance cost.
EvaluationRelevance 5/5 · Accuracy 5/5 · Hallucination 0% · Overall score 5/5
10.7

Evaluation Using LLM-as-a-Judge

  • Use a strong LLM (e.g. GPT-4) to evaluate the response.
  • Provide a scoring rubric and ask the model to rate.
  • Useful for qualitative evaluation (relevance, coherence, helpfulness, etc.).
prompt
You are an expert evaluator. Evaluate the following response
based on relevance, correctness, completeness and helpfulness.
Give a score from 1 to 5 and provide a short reasoning.

Question: {user_question}
Ground Truth: {ground_truth}
Model Response: {agent_response}

Evaluation Format:
- Relevance:
- Correctness:
- Completeness:
- Helpfulness:
- Overall Score:
- Reasoning:
10.8

Key Takeaways

  • Evaluation is essential for reliable and effective agents.
  • Use a combination of automatic and human evaluation.
  • Focus on task success, relevance, safety and user satisfaction.
  • Monitor metrics continuously in production.
  • Good evaluation helps in building better and trustworthy agentic AI systems.