Skip to main content
Harnest delegates metric computation to the Google ADK 2.x evaluator for both ADK and LangGraph agents. It reflects the installed ADK registry rather than freezing a second allowlist. The registry shipped at Harnest’s Google ADK 2.8 dependency floor contains the 13 metrics below. A compatible later ADK 2.x release can add registry entries without a Harnest code change. Use the playground’s Evals catalog to inspect the exact installed list.

Built-in metrics

Reference and single-turn metrics

tool_trajectory_avg_score gives each invocation either 0 or 1, then averages the invocation scores. Choose business or strict to control matching. final_response_match_v2 produces a binary verdict for each invocation. It uses majority vote across judge samples, then reports the fraction of valid invocations.

Multi-turn and simulation metrics

The three Vertex multi-turn metrics are reference-free and evaluate the complete actual conversation. Their per-invocation result is not_evaluated on earlier turns; the last turn carries the conversation-level score. The rubric-based multi-turn metric uses the same final-turn convention.

Configure thresholds

Use a number for a metric that needs only a threshold:
evals/test_config.json
Scores equal to the threshold pass. Choose a threshold inside the metric’s documented score interval.

Configure model-judged metrics

Judge-backed criteria use the properties below. The final-output option applies only where the evaluator consumes final answer text. Harnest passes only the judge’s final response to verdict parsing. Provider-marked reasoning and partial response chunks are excluded; a rationale written in the final response is retained. Missing final answers do not become passing verdicts. This is separate from includeIntermediateResponsesInFinal, which controls evidence from the agent under test, not the judge.
evals/test_config.json
hallucinations_v1 uses evaluateIntermediateNlResponses, not includeIntermediateResponsesInFinal, to opt visible intermediate natural-language responses into its analysis.

Use a custom judge model

Model precedence is an explicit judgeModel, then the required OPENAI_MODEL. There is no built-in model fallback. Use an explicit provider-prefixed model ID when the judge should differ from the agent:
evals/test_config.json
Replace my-judge-model with a model served by your configured endpoint. This explicit ID overrides OPENAI_MODEL. The judge reuses a compatible agent model transport when one is available, including a lifecycle-owned client, custom gateway, and headers. The shared compatible API uses OPENAI_BASE_URL and optional OPENAI_API_KEY; other native providers use their own model IDs and credentials through the same model environment.
Harnest runs each eval set once. That num_runs=1 safeguard does not replace judgeModelOptions.numSamples: a judge-backed metric can still call its judge several times for one invocation. Lower the sample count deliberately when cost matters, and raise it when judge stability matters more.

Configure rubric metrics

Each rubric criterion requires a non-empty rubrics list. Every rubric has a stable ID and one testable text property.
evals/test_config.json
Use rubric_based_multi_turn_trajectory_quality_v1 with the same criterion shape when a property spans the complete conversation. Rubric verdicts, scores, and rationales are preserved in the complete CLI result.

Configure evaluation backends

The agent under test and every metric backend inherit the same process environment. Follow Configure a model for local, CI, and deployment setup. Metrics may add a second provider to the agent’s normal model and tool stack:
tool_trajectory_avg_score and response_match_score need no metric service. The agent itself can still make live model or tool calls.
test_config.json selects metric backends and judge model IDs. Never put credentials in that file.