AG-016Agent · Final resultlayaeval.AgentResponseRelevance
Agent Response Relevance
Does the final message answer the user's request?
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
| Parameter | Value | Description |
|---|---|---|
| Class | AgentResponseRelevance | Python evaluator class in layaeval |
| Required Fields | "query", "response" | Arguments expected in the call signature |
| Default Threshold | >= 3.0 | Passes when quality score is at or above this value |
| Category | Agent Evaluation | Final result (Is the last message true, complete and correct?) |
Python Example
agent-response-relevance.py
1from layaeval import AgentResponseRelevance23metric = AgentResponseRelevance(threshold=3.0) # passes at or above 3.045res = metric(6 query="What is the capital of France?",7 response="Paris is the capital of France.",8)910print(res.passed, res.value, res.confidence)
Related Agent Checks
Other checks in Final result
AG-014Read →
Agent Groundedness
Is the final answer backed by what the tools returned?
AG-015Read →
Agent Hallucination
Did the agent claim results that never happened?
AG-017Read →
Answer Completeness
Did the final reply cover every part of the task?
AG-018Read →
Agent Correctness
Is the final result the correct one?