Skip to main content
An eval set groups related cases. Both ADK and LangGraph projects author these files using ADK’s EvalSet schema. Harnest validates them during compilation and keeps them out of the deployed agent’s prompts, tools, and capabilities. Custom questions do not require a custom Python metric. Use this page to author cases with built-in scoring, or follow Create custom evals when you need to implement your own scoring rule.

Directory contract

AGENT_DIR/evals/
Nested SubAgent eval assets may be reached while validating composition, but harnest test --evals runs only the root agent’s eval sets.

Author a static case

A static case replays each authored userContent and records the actual agent response. The authored finalResponse and intermediateData are the golden values used by reference metrics.
evals/city-facts.evalset.json
This is a genuine multi-turn test: the second prompt says only “it” and cannot identify Paris without the first turn. Both invocation objects belong to one case, so the evaluator sends them through the same evaluator-owned session in order. Managed agents use history="session" by default, which includes earlier user and assistant turns from that session. See Agents and graphs before selecting history="turn" for a context-dependent eval. The expected behavior is explicit per turn: Run the case with response and trajectory metrics, then inspect evalMetricResultPerInvocation to compare actual and expected content and tool events on each turn. sessionDetails contains the evaluator session, state, and recorded events. See Run and inspect evaluation results.

Case fields

Exactly one of conversation and conversationScenario is required.

Invocation fields

For ADK agents, Harnest removes response parts marked as model thoughts before metrics inspect the actual result. This keeps hidden reasoning out of response matching while preserving visible text and tool events. LangGraph evaluation already consumes the neutral runtime’s public result.

Configure criteria

Every key under criteria names a built-in or custom metric. A numeric value is a threshold. Metrics with judge, rubric, hallucination, simulation, or trajectory options use an object containing threshold and their additional fields.
evals/test_config.json
If test_config.json is absent, ADK’s default criteria are:
A threshold is a pass boundary, not a target shown only in reports. A metric passes when its score is greater than or equal to its threshold. A failed metric makes its case and the command fail.

Choose tool trajectory behavior

Harnest names two policies and applies the selected policy to tool_trajectory_avg_score without changing its threshold or any other metric.
The CLI selection replaces an authored matchType for this metric. Use separate business and strict CI lanes when you need both behavioral confidence and exact orchestration.

Add rubrics

Rubric metrics require at least one testable property. The simplest reusable location is the metric criterion in test_config.json:
Rubrics can also live on an eval case or static invocation. Set their type to FINAL_RESPONSE_QUALITY, TOOL_USE_QUALITY, or TRAJECTORY_QUALITY so ADK routes them to the intended built-in rubric evaluator. Keep rubricId values unique within the effective set. Criterion-level rubrics do not need a type. See Metrics reference for judge configuration and score behavior.