0
0
Agentic AIml~20 mins

Measuring agent accuracy and relevance in Agentic AI - Practice Problems & Coding Challenges

Choose your learning style9 modes available
Challenge - 5 Problems
🎖️
Agent Accuracy & Relevance Master
Get all challenges correct to earn this badge!
Test your skills under time pressure!
Metrics
intermediate
2:00remaining
Understanding Precision and Recall in Agent Responses

An AI agent answers 100 questions. It correctly answers 80 questions but also gives 20 wrong answers. What is the precision of the agent?

A0.8
B0.5
C0.67
D1.0
Attempts:
2 left
💡 Hint

Precision is the number of correct answers divided by total answers given.

🧠 Conceptual
intermediate
2:00remaining
Difference Between Accuracy and Relevance

Which statement best describes the difference between accuracy and relevance when measuring an AI agent's output?

AAccuracy and relevance mean the same thing in AI agent evaluation.
BAccuracy measures speed; relevance measures correctness.
CAccuracy measures correctness; relevance measures how useful the answer is to the question.
DAccuracy measures how often the agent responds; relevance measures the length of the response.
Attempts:
2 left
💡 Hint

Think about correctness versus usefulness.

Predict Output
advanced
2:00remaining
Calculating F1 Score for Agent Responses

Given the following code calculating precision and recall, what is the printed F1 score?

Agentic AI
correct = 70
wrong = 30
relevant = 80
precision = correct / (correct + wrong)
recall = correct / relevant
f1_score = 2 * (precision * recall) / (precision + recall)
print(round(f1_score, 2))
A0.75
B0.85
C0.82
D0.78
Attempts:
2 left
💡 Hint

Calculate precision and recall first, then use the F1 formula.

🔧 Debug
advanced
2:00remaining
Identifying the Error in Agent Accuracy Calculation

What error does the following code produce when calculating accuracy?

correct = 50
wrong = 20
accuracy = correct / wrong
print(accuracy)
Agentic AI
correct = 50
wrong = 20
accuracy = correct / wrong
print(accuracy)
AIt raises a ZeroDivisionError.
BIt prints 2.5, which is incorrect for accuracy calculation.
CIt prints 0.714, which is the correct accuracy.
DIt raises a TypeError.
Attempts:
2 left
💡 Hint

Think about how accuracy is calculated.

Model Choice
expert
2:00remaining
Choosing the Best Metric for Evaluating Agent Relevance

You want to measure how well an AI agent's answers match the user's intent, focusing on usefulness rather than just correctness. Which metric is best suited for this?

AMean Reciprocal Rank (MRR)
BPrecision
CBLEU score
DAccuracy
Attempts:
2 left
💡 Hint

Consider metrics that evaluate ranking or relevance rather than exact correctness.