LayaEval logoLayaEval/Agent Checks/Agent Response Relevance
AG-016Agent · Final resultlayaeval.AgentResponseRelevance

Agent Response Relevance

Does the final message answer the user's request?

QUESTIONWhen does it open?WHAT WAS ASKEDOpens at 9amANSWERAnswers what was asked
Simulation state:
When it passes

On target.

Threshold satisfied: evaluation score >= 3.0.

When it fails

Off target.

Violation detected: execution flagged for human review or fallback routing.

SDK Specification

ParameterValueDescription
ClassAgentResponseRelevancePython evaluator class in layaeval
Required Fields"query", "response"Arguments expected in the call signature
Default Threshold>= 3.0Passes when quality score is at or above this value
CategoryAgent EvaluationFinal result (Is the last message true, complete and correct?)

Python Example

pip install layaeval
agent-response-relevance.py
1from layaeval import AgentResponseRelevance
2
3metric = AgentResponseRelevance(threshold=3.0) # passes at or above 3.0
4
5res = metric(
6 query="What is the capital of France?",
7 response="Paris is the capital of France.",
8)
9
10print(res.passed, res.value, res.confidence)

Related Agent Checks

Other checks in Final result

View all 42 checks →