Jev knowledge base·verified Sep 22, 2026

evaluate agent tool calls with jev

Evaluate semantic tool choice with Jev while schemas, permissions, arguments, execution and side effects remain deterministic evidence.

the short answer

Use Jev for a bounded semantic question such as whether a proposed tool matches the user’s intent or whether its result supports a claim. Keep tool existence, schema validity, permissions, argument constraints and execution status deterministic. Evaluate proposal, execution and downstream outcome separately, using only evidence available at each stage and preserving trace references.

Semantic layer
Intent-to-tool fit and bounded result interpretation
Deterministic layer
Schema, permission, exact arguments and status
Temporal rule
Judge proposals without future result leakage
Side effects
Measured separately after execution
Required artifact
Tool/event IDs linked to every judgment

A Tool Call Has Four Distinct Correctness Layers

Collapsing these layers into “correct tool call” makes diagnosis impossible. A semantically sensible refund call can be unauthorized; an authorized lookup can use the wrong order; a correct call can fail due to the provider. Each result needs its own owner and remediation.

LayerQuestionBest mechanism
EligibilityMay this identity invoke this tool?Deterministic authorization
ShapeDo arguments satisfy schema and exact constraints?Parser/schema/rules
Semantic fitDoes this tool and argument intent match the request?Candidate for Jev
Execution/outcomeDid the tool run and produce the intended effect?Runtime telemetry plus bounded evaluation

Place Semantic Evaluation Beside—Not Inside—the Authorization Boundary

Jev is a probabilistic signal, not an authorization service. A high probability cannot grant a capability the caller lacks, override a spending limit or make malformed arguments valid. Conversely, a low semantic-fit score should not erase the exact reason a deterministic check denied the call. Keep both records.

This separation also defines outage behavior. If the semantic evaluator times out, application code follows an explicit fail-closed, fail-open, queue or fallback path based on the action’s consequence. The Jev policies overview discusses runtime placement; the errors and retries guide covers bounded failure handling.

01Proposed callThe agent emits a tool name and arguments without executing them.
02Deterministic checksCode validates identity, permission, schema, limits and invariant constraints.
03Semantic signalJev evaluates one bounded intent-to-action question from controlled pre-call state.
04Decision logicApplication code applies a tested allow, review or deny/fallback rule.
05ExecutionA capability-scoped tool adapter performs the permitted operation.
06Post-call evidenceTelemetry records status, side effects and later task outcome separately.
The runtime should remain safe even when Jev is wrong or unavailable.

Evaluate Proposals with Pre-Call Evidence Only

Code should first ensure cancel_order is permitted and the argument matches its schema. A Noul can then ask whether the proposed call fulfills the stated request given the pre-call observations. Do not include the successful result when judging whether the proposal was reasonable; that leaks future information.

Construct the state from trusted fields, not by concatenating an entire transcript. Tool descriptions, retrieved text and prior tool output can contain instructions that compete with the evaluator question. Delimit their roles, strip irrelevant fields and test injected examples. OWASP identifies prompt injection and excessive agency as separate LLM-application risks; a tool-evaluation design must address both.

{
  "user_request": "Cancel order A-104 before it ships",
  "pre_call_observations": {
    "order_id": "A-104",
    "status": "processing"
  },
  "permitted_tools": {
    "cancel_order": "Cancel an unshipped order",
    "lookup_order": "Read order state without changing it"
  },
  "proposed_call": {
    "tool": "cancel_order",
    "arguments": {"order_id": "A-104"}
  }
}

Ask One Question Whose Answer Maps to One Action

Use separate Nouls when several independent conditions may all hold. Use Choice only when one member of a complete candidate set should win—for example, the primary intent among billing, technical support, account access and explicit no-match. Use Score only for a defensible ordered construct such as recovery quality. The Choice-versus-Noul guide covers the statistical difference.

Write positive, negative, boundary and missing-evidence examples before selecting a threshold. A threshold is fitted against labeled consequences, not chosen because 0.8 sounds confident. See Jev thresholds and confidence versus probability.

Weak evaluatorWhy it failsNarrow replacement
Is this tool call good?Mixes authorization, fit, arguments and outcomeDoes the proposed tool purpose match the user’s requested operation?
Will this call succeed?Requires unavailable future stateDoes available state satisfy the documented semantic preconditions?
Is this safe?Undefined consequence and threat boundaryDoes the proposed target match the user-confirmed account?
Did the tool work?Confuses transport success with business outcomeDoes the returned order state show cancellation?

Execution and Outcome Need Separate Records

A 200 response does not prove the intended effect occurred, and a denied call is not necessarily a bad proposal if policy changed after planning. Use stable event IDs and timestamps to attribute each conclusion.

01ProposalAgent-selected tool and arguments with pre-call context.
02AuthorizationRuntime permits or denies under exact policy.
03ExecutionTool status, latency, retries and returned evidence.
04OutcomeExternal state change and user-visible task success.
05EvaluationSeparate criteria attach to the relevant stage.
One tool attempt can be appropriate, malformed, denied, failed or ineffective in different combinations.

Use a Failure Taxonomy That Points to the Owning System

A single session can contain several rows from this table. Preserve them independently so a provider outage is not counted as a semantic-selection error and a misleading final answer is not hidden by a successful API response. The RAG groundedness method applies the same claim-to-evidence discipline to final responses.

Observed failureLikely ownerEvidence required
Nonexistent tool selectedAgent/tool registryRegistry snapshot and proposed name
Valid tool, wrong intentPlanner or tool descriptionsUser request, available tools and proposal
Correct tool, wrong entityState extraction or argument bindingEntity mentions, resolved ID and arguments
Forbidden action attemptedAuthorization and agent behaviorIdentity, policy decision and proposal
Provider returned an errorTool/provider pathAttempt chain, status and response body
Call succeeded but goal failedWorkflow or outcome modelSide effect, subsequent trace and user-visible state
Agent misreported resultFinal-response groundingTool result and atomic response claim

Useful Semantic Criteria

Ask these separately. Avoid a broad question that mixes tool selection, arguments, execution and final response. Use code for exact equality, counts and schemas, and Jev Score only for a genuinely ordered qualitative rubric.

  • The selected tool’s documented purpose matches the user’s requested outcome.
  • The proposed target refers to the entity identified in available evidence.
  • The tool result supports one specific claim in the final response.
  • The agent recovered appropriately after a particular tool error.
  • A handoff was appropriate because no permitted tool could complete the task.

Build Labels Around Realistic Failure Modes

Sample real tool distributions rather than a balanced toy set alone. Report evaluator error and calibration by tool, agent version and consequence. Rare destructive tools deserve explicit stress tests even when they contribute little to average accuracy.

Create one immutable row from the evidence available at the evaluated stage. Group calls from the same session, incident and synthetic template before splitting so related examples do not leak across development and test. Keep natural-prevalence traffic separate from destructive-action stress tests; the dataset construction guide gives the complete lineage and adjudication workflow.

FixtureWhy include it
Correct tool, wrong entityTests argument/evidence association
Wrong tool with plausible nameTests semantic description overlap
Correct proposal, provider failurePrevents outcome hindsight from changing fit label
Unauthorized but semantically relevant toolProves authorization remains deterministic
No permitted tool fitsTests handoff and no-match handling
Injected instruction in tool resultTests untrusted evidence behavior

Measure the Evaluator and the Guarded Workflow Separately

Offline agreement proves only the frozen evaluator task. A runtime gate can still fail through missing traces, stale permissions, timeouts or a costly review queue. Shadow the decision on live traffic first, retain the action that would have occurred, and compare it with eventual outcomes before enforcement.

Compare alternatives at the same evidence and operating point: deterministic rules, Jev, a pinned generative judge, or a layered combination. Report error at equal coverage rather than comparing one system that decides everything with another that defers difficult cases. The benchmark protocol defines paired analysis; Jev versus LLM judge covers interface differences.

MeasurementUnitWhy it matters
Semantic classificationLabeled proposalPrecision/recall or class errors against blind review
CalibrationProbability and observed labelWhether action bands have measured meaning
Selective riskAutomatically acted proposalsError at a stated automation coverage
Runtime reliabilityEligible live proposalTimeout, invalid response and fallback rates
Decision latencyFull pre-call pathp50/p95/p99 delay added before execution
Intervention impactSession or incidentPrevented harm, false blocks, review work and task completion

Store Enough Evidence for an Incident Review

OpenTelemetry’s GenAI semantic conventions provide a useful vocabulary for model and agent events, but applications still need domain-specific tool and outcome fields. The agent-trajectory guide shows how tool evidence fits the larger session.

  • Session, span and tool-call IDs plus event timestamps.
  • Pre-call observations and permission decision reference.
  • Proposed name and arguments, validation output and execution status.
  • Jev question/state/model versions and full distribution.
  • Derived finding, reviewer override and observed side effect.

Keep a Decision Record That Can Be Replayed

This is an application-level audit shape, not a TypeSafe or Failproof wire format. It shows the joins required to reconstruct a decision. Store the complete distribution and versioned inputs rather than only allow; future threshold changes can then be replayed without rerunning the model.

Avoid copying sensitive arguments into every analytics table. Keep controlled evidence references and purpose-specific projections, with retention and access rules appropriate to the underlying data. The evaluation architecture shows how these records connect to audits and recurring findings.

{
  "decision_id": "tool-decision-921",
  "session_id": "session-91",
  "proposal_event_id": "event-8",
  "tool_registry_version": "tools-42",
  "authorization": {"result": "allow", "policy_version": "authz-17"},
  "semantic_eval": {
    "criterion": "intent_tool_fit_v3",
    "model": "jev-1.13.0",
    "projection": "precall-v2",
    "distribution": {"true": 0.94, "false": 0.06}
  },
  "decision": "allow",
  "execution_event_id": "event-9",
  "outcome_ref": "order:A-104:state-change-3"
}

FAQ

Should Jev validate tool arguments?

Use schemas and deterministic code for shape, types, exact ranges and permissions. Jev can evaluate a narrowly defined semantic fit.

Can I include the tool result when evaluating the proposed call?

Not if the criterion is whether the choice was justified at decision time. Evaluate execution and outcome separately to avoid hindsight leakage.

Can a high Jev probability authorize a tool?

No. Authorization remains an exact runtime decision independent of model confidence.

What is the ground truth for tool choice?

Use blind expert labels for appropriateness plus execution and task outcomes. They answer different questions and should remain separate.

Sources

Checked against the sources below on September 22, 2026. Model versions, prices and limits change.

  1. TypeSafe AI docs: Primitives
  2. TypeSafe AI docs: State
  3. TypeSafe AI docs: Jev 1.13 jaggedness
  4. LangChain: Can Jev be a better agent evaluator?
  5. OpenTelemetry: GenAI semantic conventions
  6. OWASP: Top 10 for LLM Applications
  7. NIST: Generative AI Profile