AG-014Agent · Final resultlayaeval.AgentGroundedness

Agent Groundedness

Is the final answer backed by what the tools returned?

TOOL RESULTAGENT SAYSFound: LumièrePrice: $180Status: bookedFound LumièrePrice is $180Room is bookedBacked by tool results
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

ParameterValueDescription
ClassAgentGroundednessPython evaluator class in layaeval
Required Fields"tool_outputs", "context", "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-groundedness.py
1from layaeval import AgentGroundedness
2
3metric = AgentGroundedness(threshold=3.0) # passes at or above 3.0
4
5res = 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)
10
11print(res.passed, res.value, res.confidence)

Related Agent Checks

Other checks in Final result

View all 42 checks →