AG-014Agent · Final resultlayaeval.AgentGroundedness
Agent Groundedness
Is the final answer backed by what the tools returned?
Simulation state:
When it passes
Every line traces back.
Threshold satisfied: evaluation score >= 3.0.
When it fails
One line has no backing.
Violation detected: execution flagged for human review or fallback routing.
SDK Specification
| Parameter | Value | Description |
|---|---|---|
| Class | AgentGroundedness | Python evaluator class in layaeval |
| Required Fields | "tool_outputs", "context", "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-groundedness.py
1from layaeval import AgentGroundedness23metric = AgentGroundedness(threshold=3.0) # passes at or above 3.045res = metric(6 tool_outputs="[{id: 12, name: 'Hotel Lumière', price: 180}]",7 context="Paris is the capital of France.",8 response="Paris is the capital of France.",9)1011print(res.passed, res.value, res.confidence)
Related Agent Checks
Other checks in Final result
AG-015Read →
Agent Hallucination
Did the agent claim results that never happened?
AG-016Read →
Agent Response Relevance
Does the final message answer the user's request?
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?