Working through this module?
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.
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.
What to Evaluate in Agentic AI?
- Task Completion
- Did the agent complete the task successfully?
- Answer Quality
- Is the response correct, relevant and helpful?
- Tool Usage
- Did the agent use the right tools at the right time?
- Reasoning
- Is the reasoning logical and clear?
- Efficiency
- Time taken, number of steps, token usage.
- Safety
- Avoid harmful, biased or unsafe responses.
- User Satisfaction
- Does it meet the user's need?
1
2
3
4
5
6
7
Common Evaluation Metrics
| Metric | Description | Use case |
|---|---|---|
| Accuracy | Correctness of the final answer | QA, RAG, research |
| Relevance | How relevant the response is to the query | Search, RAG |
| Task success rate | Percentage of successfully completed tasks | Multi-step tasks |
| Latency | Time taken to give response | Real-time applications |
| Token usage | Total tokens consumed | Cost optimization |
| Hallucination rate | Percentage of incorrect / made-up answers | Factual tasks |
| Tool call accuracy | Used correct tool with right parameters | Function calling |
| User feedback | Human rating (e.g. 1–5) | Overall satisfaction |
Types of Evaluation
- Automatic Evaluation
- Using metrics and model-based scoring (e.g. BLEU, ROUGE, BERTScore, GPT-as-judge).
- Human Evaluation
- Human review and rating.
- Task-based Evaluation
- Check if the agent completes a real-world task.
- Comparative Evaluation
- Compare different models, prompts or agents.
- Continuous Evaluation
- Monitor performance over time in production.
1
2
3
4
5
Evaluation Workflow
Test DatasetQuestions / tasks
AgentLLM + tools
Agent ResponseFinal output
EvaluationAutomatic + human
MetricsAccuracy, relevance, task success, etc.
AnalysisFind gaps and improve
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
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:
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.