AG-013Agent · Taking the pathlayaeval.NavigationEfficiency
Navigation Efficiency
Did the agent take the short way, without loops?
Simulation state:
When it passes
Direct path.
Threshold satisfied: evaluation score >= 3.0.
When it fails
Wandered in circles.
Violation detected: execution flagged for human review or fallback routing.
SDK Specification
| Parameter | Value | Description |
|---|---|---|
| Class | NavigationEfficiency | Python evaluator class in layaeval |
| Required Fields | "task", "agent_trace", "expected_workflow" | Arguments expected in the call signature |
| Default Threshold | >= 3.0 | Passes when quality score is at or above this value |
| Category | Agent Evaluation | Taking the path (Sensible order, no repeats, no going in circles.) |
Python Example
navigation-efficiency.py
1from layaeval import NavigationEfficiency23metric = NavigationEfficiency(threshold=3.0) # passes at or above 3.045res = metric(6 task="Book a hotel in Paris for 2 guests on Mar 4.",7 agent_trace="Step 1: search_hotels(city='Paris') -> 3 results\nStep 2: book(id=12) -> confirmed",8 expected_workflow="search -> choose -> book",9)1011print(res.passed, res.value, res.confidence)
Related Agent Checks