AG-004Agent · Understanding the joblayaeval.GoalAchievement
Goal Achievement
Did the agent reach what the user truly wanted?
Simulation state:
When it passes
Goal reached.
Threshold satisfied: evaluation score >= 0.50.
When it fails
Busy, but goal not reached.
Violation detected: execution flagged for human review or fallback routing.
SDK Specification
| Parameter | Value | Description |
|---|---|---|
| Class | GoalAchievement | Python evaluator class in layaeval |
| Required Fields | "goal", "agent_trace", "final_result" | Arguments expected in the call signature |
| Default Threshold | >= 0.50 | Passes when quality score is at or above this value |
| Category | Agent Evaluation | Understanding the job (Did the agent get what you wanted, and finish it?) |
Python Example
goal-achievement.py
1from layaeval import GoalAchievement23metric = GoalAchievement(threshold=0.50) # passes at or above 0.5045res = metric(6 goal="User has a confirmed Paris hotel for Mar 4.",7 agent_trace="Step 1: search_hotels(city='Paris') -> 3 results\nStep 2: book(id=12) -> confirmed",8 final_result="Booked Hotel Lumière, Mar 4, 2 guests.",9)1011print(res.passed, res.value, res.confidence)
Related Agent Checks