Inferensys

Prompt

Tool Result Interpretation Accuracy Prompt Template

A practical prompt playbook for grading how accurately an agent interprets and uses tool outputs in subsequent reasoning or actions. Produces an interpretation fidelity score comparing agent understanding against the actual tool result.
Developer demonstrating multi-agent tool use, agent tool selection interface on laptop, casual tech demo moment.
PROMPT PLAYBOOK

When to Use This Prompt

Defines the job-to-be-done, ideal user, required inputs, and boundaries for the Tool Result Interpretation Accuracy evaluation prompt.

This prompt is designed for agent platform teams who need to evaluate whether their agent correctly interprets tool outputs before acting on them. Tool result misinterpretation is one of the most common failure modes in multi-step agent workflows. An agent calls the right tool with the right arguments, receives a valid response, and then draws the wrong conclusion, extracts the wrong field, or ignores a critical error code. This prompt template produces a structured interpretation fidelity score by comparing the agent's stated understanding against the actual tool result. Use it as part of your evaluation harness when you need automated, model-graded assessment of interpretation accuracy across hundreds of agent traces.

Do not use this prompt for evaluating tool selection correctness or argument accuracy; those require separate evaluation surfaces covered by sibling playbooks like the Tool Selection Correctness Grading Prompt Template and the Function Argument Accuracy Evaluation Rubric Prompt. This prompt assumes you already have the agent's reasoning trace, the raw tool output, and the agent's subsequent action or claim that depends on that output. The ideal user is an AI engineer or evaluation lead running regression suites, pre-release checks, or production monitoring on agent pipelines where tool output drives downstream decisions.

Before using this prompt, verify that you have captured three required inputs per trace: the raw tool response payload, the agent's stated interpretation of that response, and the agent's next action or claim derived from that interpretation. If your agent does not produce an explicit interpretation step, consider adding one to your agent's reasoning trace before applying this evaluation. For high-stakes domains such as finance, healthcare, or safety-critical operations, pair this automated evaluation with human spot-checking on a sample of low-confidence scores.

PRACTICAL GUARDRAILS

Use Case Fit

Tool Result Interpretation Accuracy evaluation is powerful but narrow. It measures whether an agent understands what a tool returned—not whether the tool was correct, the plan was good, or the final answer is right. Apply it where interpretation fidelity is the bottleneck; avoid it where other failures dominate.

01

Good Fit: Multi-Step Agent Pipelines

Use when: an agent calls tools, reads results, and uses those results in later reasoning or actions. Interpretation errors compound across steps. Guardrail: run this eval on every step that consumes a tool output, not just the final answer.

02

Bad Fit: Single-Turn Tool Use Without Downstream Reasoning

Avoid when: the agent calls a tool and returns the result directly to the user without interpretation. If the output is passed through, interpretation accuracy isn't the right metric. Guardrail: use Tool Selection Correctness or Argument Accuracy evals instead.

03

Required Input: Ground-Truth Tool Results

What to watch: this eval requires the actual tool result that the agent received, plus the agent's interpretation of it. Without both, you can't measure fidelity. Guardrail: log raw tool responses alongside agent reasoning traces in your eval harness.

04

Operational Risk: Interpretation vs. Tool Correctness Confusion

Risk: a correct interpretation of an incorrect tool result still scores high on fidelity, but the downstream outcome is wrong. Guardrail: pair this eval with Tool Selection Correctness and Argument Accuracy checks. Never use interpretation fidelity as a standalone quality gate.

05

Good Fit: Structured Output Extraction from Tool Results

Use when: the agent must extract specific fields, values, or entities from a tool response before using them. Misreading a date, amount, or status code breaks everything downstream. Guardrail: add per-field interpretation checks for high-stakes extracted values.

06

Bad Fit: Subjective or Unstructured Tool Outputs

Avoid when: tool results are free-text summaries, natural language descriptions, or creative outputs where there's no single correct interpretation. Fidelity scoring becomes subjective. Guardrail: restrict this eval to tool outputs with clear, verifiable information content.

PROMPT PLAYBOOK

Copy-Ready Prompt Template

A reusable prompt for grading how accurately an agent interprets tool results before acting on them.

This template provides a copy-ready prompt for evaluating tool result interpretation fidelity. It is designed to be dropped into an evaluation harness where a judge model compares the agent's stated understanding and subsequent actions against the actual tool output. The prompt uses square-bracket placeholders that you must replace with real values before each evaluation run. The goal is to produce a consistent interpretation fidelity score and a structured justification that can be logged, reviewed, and trended over time.

text
You are an evaluation judge grading how accurately an AI agent interpreted the result of a tool call.

# CONTEXT
[AGENT_TASK_DESCRIPTION]

# TOOL CALL THAT WAS MADE
Tool name: [TOOL_NAME]
Arguments: [TOOL_ARGUMENTS]

# ACTUAL TOOL RESULT
[TOOL_RESULT]

# AGENT'S STATED INTERPRETATION OF THE RESULT
[AGENT_INTERPRETATION]

# AGENT'S SUBSEQUENT ACTION OR REASONING BASED ON THAT INTERPRETATION
[AGENT_SUBSEQUENT_ACTION]

# EVALUATION INSTRUCTIONS
Compare the agent's stated interpretation against the actual tool result. Then evaluate whether the agent's subsequent action or reasoning was appropriate given what the tool actually returned.

Score the interpretation fidelity on a 1-5 scale:
- 5: Perfect interpretation. Agent correctly understood all relevant fields, values, and implications. Subsequent action is fully appropriate.
- 4: Minor misunderstanding that did not affect the subsequent action. Agent still acted correctly.
- 3: Partial misunderstanding. Agent captured some results correctly but missed or misread one material detail. Subsequent action may be slightly off.
- 2: Significant misunderstanding. Agent misread key fields or drew wrong conclusions. Subsequent action is inappropriate or risky.
- 1: Complete misinterpretation. Agent's understanding contradicts the actual result. Subsequent action is wrong or harmful.

# OUTPUT FORMAT
Return a JSON object with exactly these fields:
{
  "score": <integer 1-5>,
  "interpretation_accuracy": "<one sentence summarizing whether the agent read the result correctly, partially, or incorrectly>",
  "action_appropriateness": "<one sentence on whether the subsequent action made sense given the actual result>",
  "key_errors": ["<list specific misinterpretations or missed details; empty array if none>"],
  "justification": "<2-3 sentence explanation connecting the score to the evidence>"
}

# CONSTRAINTS
- Only use information present in the actual tool result to judge correctness.
- Do not penalize the agent for tool result quality issues; only grade interpretation.
- If the agent correctly identified an error or empty result from the tool, that counts as accurate interpretation.
- If the agent's interpretation is reasonable but the subsequent action is wrong for other reasons, note that in action_appropriateness but do not lower the interpretation score.

Before integrating this template into your evaluation pipeline, replace each bracketed placeholder with concrete values from your agent trace. [AGENT_TASK_DESCRIPTION] should capture what the agent was trying to accomplish so the judge has full context. [TOOL_RESULT] must be the exact, unmodified output from the tool—do not summarize or truncate it, as that would invalidate the fidelity check. [AGENT_INTERPRETATION] should be extracted from the agent's reasoning trace or the message where it acknowledges the tool result. [AGENT_SUBSEQUENT_ACTION] is the next tool call, message, or decision the agent made after interpreting the result. For batch evaluation, wrap this prompt in a harness that iterates over trace segments, collects scores, and logs per-call results alongside the full trace for later audit. If the agent's interpretation is implicit rather than explicitly stated, consider adding a pre-processing step that asks the agent to verbalize its understanding before acting—this makes interpretation grading more reliable and auditable.

IMPLEMENTATION TABLE

Prompt Variables

Replace each placeholder before sending the prompt to the judge model. Missing or malformed variables will cause the judge to produce unreliable scores or refuse evaluation.

PlaceholderPurposeExampleValidation Notes

[AGENT_TRACE]

Full agent execution log including reasoning steps, tool calls, and tool results in chronological order

{"turn_1": {"thought": "Need to check inventory", "tool_call": "check_inventory('SKU-123')", "tool_result": {"quantity": 5}}, "turn_2": ...}

Must contain both tool_call and tool_result for each step. Parse as JSON. Reject if tool_result fields are missing or null without explicit error markers.

[TOOL_OUTPUT_REFERENCE]

Ground-truth interpretation of what each tool result actually means, written by a human or oracle

{"check_inventory('SKU-123')": {"meaning": "5 units in stock, available for immediate shipment", "constraints": ["max_order: 10"], "errors": []}}

Must map 1:1 to every tool_call in [AGENT_TRACE]. Validate key presence. Missing reference entries produce incomplete scores.

[INTERPRETATION_SCHEMA]

JSON Schema defining the expected structure of the agent's interpretation output

{"type": "object", "properties": {"understood_result": {"type": "string"}, "confidence": {"type": "number", "minimum": 0, "maximum": 1}}, "required": ["understood_result", "confidence"]}

Must be valid JSON Schema draft-07. Validate with a schema validator before prompt assembly. Enum constraints preferred for categorical fields.

[SCORING_RUBRIC]

1-5 scale definitions for interpretation fidelity, with anchor descriptions per level

{"5": "Agent interpretation matches reference meaning exactly, all constraints recognized", "3": "Partial match, misses one constraint or adds minor unsupported inference", "1": "Fundamental misunderstanding, contradicts tool output"}

Must define at least levels 1, 3, and 5. Validate that each level has a non-empty description. Missing anchors cause score drift.

[FAILURE_MODE_TAXONOMY]

List of known interpretation failure categories to guide the judge's error classification

["overinference", "constraint_miss", "error_ignored", "quantity_misread", "status_confusion", "temporal_misinterpretation"]

Must be a non-empty array of strings. Validate against allowed taxonomy values if your pipeline enforces a fixed set. Unknown categories produce unclassified errors.

[CONTEXT_WINDOW]

Optional preceding conversation or task context that the agent had access to when interpreting tool results

"User asked to confirm order SKU-123 for shipment today. Warehouse closes at 4pm."

Can be null or empty string. If provided, judge will check whether agent used context appropriately. Validate length under model context limit minus prompt overhead.

[GROUND_TRUTH_ACTIONS]

Correct downstream actions the agent should have taken based on tool result interpretation, for end-to-end fidelity scoring

["confirm_order('SKU-123', quantity=5)", "notify_warehouse('ship_today')"]

Can be null if scoring only interpretation, not action. If provided, must be array of strings matching actual tool names in the catalog. Validate tool name existence.

[MODEL_IDENTIFIER]

Identifier for the agent model being evaluated, used for score tracking and regression comparison

"claude-sonnet-4-20250514"

Must match a known model identifier in your evaluation tracking system. Validate against allowed model list. Null allowed for ad-hoc evaluation.

PROMPT PLAYBOOK

Implementation Harness Notes

How to wire the interpretation accuracy prompt into an evaluation pipeline for agent traces.

This prompt is designed to operate as a post-execution evaluator, not a real-time guardrail. It should be wired into an offline or async evaluation pipeline that processes agent traces after a run completes. The typical integration point is a batch evaluation job that consumes structured trace logs containing the tool call, the raw tool result, and the agent's subsequent reasoning or action. The prompt expects these three artifacts to be aligned by trace ID and step index before invocation.

For a production harness, implement a trace preprocessor that extracts the relevant span from your observability store (e.g., LangSmith, Arize, or a custom trace database). The preprocessor must assemble the [TOOL_RESULT] and [AGENT_INTERPRETATION] fields by isolating the exact tool response payload and the immediate next reasoning step from the agent. Avoid passing the entire conversation history as interpretation context—this dilutes the signal and increases token cost. Instead, extract the specific reasoning block that references the tool output. If your agent framework doesn't cleanly separate reasoning from action, add a parsing layer that identifies the first model-generated text following the tool result observation.

Validation and retries should be built around the structured output schema. The prompt returns a JSON object with an interpretation_fidelity_score (0-1), a misinterpretation_flags array, and an evidence_alignment summary. Implement a post-processing validator that checks: (1) the score is a float between 0 and 1, (2) each flag in misinterpretation_flags references a specific claim from the agent's interpretation, and (3) the evidence_alignment field contains explicit citations to the tool result. If validation fails, retry once with the same inputs and a stricter temperature setting (0.0-0.1). If the retry also fails, log the trace as unevaluable and flag for human review. For high-stakes agent workflows—such as financial transactions, healthcare data interpretation, or safety-critical tool use—route all scores below 0.8 to a human review queue before accepting the evaluation.

Model choice matters for this evaluator. Use a model with strong instruction-following and structured output capabilities (e.g., GPT-4o, Claude 3.5 Sonnet, or Gemini 2.0 Flash with JSON mode enabled). Avoid smaller models for this task because interpretation fidelity grading requires nuanced comparison between the agent's understanding and the actual tool result. If cost is a concern, sample 20% of traces with a strong model and use the results to calibrate a lighter model on the remaining 80%, but monitor for score drift weekly. Do not use this prompt as a real-time gate—the latency and cost of running a full evaluation on every tool call will degrade agent responsiveness. Instead, use it for offline quality monitoring, regression testing during prompt changes, and periodic audit sampling.

Logging and observability should capture the full evaluation payload alongside the trace. Store the interpretation_fidelity_score, misinterpretation_flags, and the evaluator's model version as trace-level metadata. This enables downstream dashboards that track interpretation accuracy trends over time, per tool, and per agent version. Set up an alert that triggers when the rolling 7-day average interpretation fidelity drops below a defined threshold (e.g., 0.85) or when a specific tool shows a sudden increase in misinterpretation flags. This turns the prompt from a one-off check into a continuous reliability signal for your agent platform.

IMPLEMENTATION TABLE

Expected Output Contract

Fields, types, and validation rules for the interpretation accuracy judge's JSON response. Use this contract to parse and validate the model's output before routing scores to dashboards or CI gates.

Field or ElementType or FormatRequiredValidation Rule

interpretation_fidelity_score

number (0.0-1.0)

Must be a float between 0.0 and 1.0 inclusive. Parse check: JSON number. Schema check: minimum 0, maximum 1. Reject if missing or out of range.

tool_output_summary

string

Must be a non-empty string summarizing the actual tool result. Parse check: string type. Schema check: minLength 1. Reject if null or empty.

agent_interpretation_summary

string

Must be a non-empty string describing how the agent used the tool output. Parse check: string type. Schema check: minLength 1. Reject if null or empty.

misinterpretation_flags

array of strings

Must be an array. Each element must be a string from the allowed enum: [value_misread, unit_misread, entity_confusion, omission, hallucinated_addition, temporal_misread, structural_misread, none]. Parse check: array type. Schema check: all items match enum. Empty array allowed only if score is 1.0.

evidence_excerpts

array of objects

Each object must contain source (string, one of tool_output or agent_response), text (string, minLength 1), and relevance (string, one of supports_claim, contradicts_claim, neutral). Parse check: array of objects. Schema check: required fields present. Reject if array is empty when score is below 0.8.

confidence

number (0.0-1.0)

Must be a float between 0.0 and 1.0 representing judge confidence in the fidelity score. Parse check: JSON number. Schema check: minimum 0, maximum 1. If confidence is below 0.7, escalate for human review.

requires_human_review

boolean

Must be true or false. Set to true if confidence is below 0.7, misinterpretation_flags contains non-none values, or score is below 0.6. Parse check: boolean type. Approval required if true.

judge_reasoning

string

Optional free-text explanation of the judge's scoring rationale. If present, must be a non-empty string. Null allowed. Parse check: string or null. No minimum length enforcement when null.

PRACTICAL GUARDRAILS

Common Failure Modes

What breaks first when evaluating tool result interpretation accuracy and how to guard against it.

01

Surface-Level String Matching

What to watch: The judge prompt rewards superficial keyword overlap between the agent's interpretation and the tool result, missing semantic misunderstandings. An agent that parrots output fields without demonstrating comprehension scores well while actually misinterpreting the data. Guardrail: Require the judge to compare the agent's downstream action or reasoning conclusion against what the tool result actually supports, not just vocabulary overlap. Include counterexamples in few-shot prompts where surface match fails.

02

Ignoring Null and Error Tool Responses

What to watch: The evaluation prompt fails to penalize agents that treat empty results, error codes, or null fields as meaningful data. Agents hallucinate content to fill gaps, and the judge scores the fluent fabrication as reasonable interpretation. Guardrail: Add explicit scoring criteria for null-handling: an agent must acknowledge empty results, propagate error states, or request clarification. Weight abstention correctness as heavily as data interpretation correctness.

03

Judge Leniency on Fabricated Details

What to watch: The judge prompt accepts plausible-sounding interpretations that add details absent from the tool result. An agent claims a tool returned '3 high-priority items' when the result only listed items without priority labels, and the judge doesn't flag the fabrication. Guardrail: Require the judge to extract specific claims from the agent's interpretation and verify each claim against the tool result. Any claim without direct evidence in the tool output must reduce the interpretation fidelity score.

04

Context Contamination Across Steps

What to watch: The judge evaluates interpretation accuracy using the full conversation context, including information the agent knew before the tool call. An agent appears to interpret correctly because it repeats prior knowledge, not because it understood the tool result. Guardrail: Structure the evaluation to isolate the tool result as the sole evidence source for scoring. Provide the judge with only the tool result and the agent's interpretation, masking prior conversation context unless it's explicitly referenced as a source.

05

Numerical and Unit Misinterpretation

What to watch: The judge prompt lacks precision for numerical interpretation errors—confusing rates with counts, misreading units, or inverting percentages. An agent reports '20% increase' when the tool returned a 20% decrease, and the judge misses the sign error because the prose reads fluently. Guardrail: Add explicit numerical accuracy checks to the rubric: require the judge to extract all numbers, units, and directional claims from the agent's interpretation and compare them field-by-field against the tool result. Flag magnitude errors, sign errors, and unit mismatches separately.

06

Over-Penalizing Concise Interpretations

What to watch: The judge prompt biases toward verbose interpretations that restate every tool output field, penalizing agents that correctly extract only the relevant subset. An agent that says 'payment confirmed' from a 50-field transaction response scores lower than one that regurgitates irrelevant metadata. Guardrail: Define interpretation fidelity as correctness of extracted meaning, not completeness of restatement. Include scoring examples where concise, accurate interpretations receive full marks and verbose but irrelevant restatements receive partial credit.

IMPLEMENTATION TABLE

Evaluation Rubric

Run these checks on a sample of judge outputs to verify the Tool Result Interpretation Accuracy prompt is producing reliable, actionable scores before integrating it into an agent evaluation pipeline.

CriterionPass StandardFailure SignalTest Method

Interpretation Fidelity Score Alignment

Judge score is within 0.5 points of human-annotated score on a 1-5 scale for 90% of samples

Score delta > 0.5 on more than 10% of samples in a calibration set

Compare judge scores against 20+ human-annotated tool-interpretation pairs; compute mean absolute error

Evidence Grounding in Judge Rationale

Every claim in the judge's rationale cites a specific span from the tool result or agent reasoning trace

Rationale contains unsupported assertions or references to information not present in the provided context

Parse rationale for citation markers; verify each claim maps to a source span using substring match or LLM-as-judge spot check

Hallucination Detection Accuracy

Judge correctly flags fabricated interpretations with >95% recall against a seeded hallucination test set

Judge misses fabricated interpretations or flags accurate interpretations as hallucinations

Run judge on a test set with 10 known-hallucination and 10 known-accurate interpretation pairs; compute precision and recall

Abstention Appropriateness

Judge returns abstention or low-confidence flag when tool result is empty, malformed, or truncated

Judge assigns a high interpretation fidelity score when the tool result is unparseable or missing required fields

Feed judge 5 tool results with intentional corruption; verify confidence score drops below threshold or abstention flag is set

Schema Compliance of Judge Output

Judge output parses as valid JSON matching the [OUTPUT_SCHEMA] with all required fields present

Output fails JSON parse, missing required fields, or contains extra fields not in schema

Validate output with JSON Schema validator; reject on parse failure or schema violation; track violation rate across 50+ samples

Score Consistency Across Similar Cases

Judge assigns scores within 0.3 points for semantically equivalent interpretation pairs

Score variance > 0.3 across pairs where agent interpretation is functionally identical

Create 5 pairs of semantically equivalent interpretations; run judge twice per pair; compute max score delta per pair

Failure Mode Classification Accuracy

Judge correctly categorizes failure mode (misread, overgeneralization, omission, hallucination) in >85% of cases

Judge misclassifies failure mode or uses catch-all category for specific, classifiable errors

Annotate 15 interpretation failures with ground-truth categories; compare judge classification to human labels; compute F1 per category

Latency and Token Budget Adherence

Judge completes evaluation in under 10 seconds and within 2000 output tokens for a single interpretation pair

Judge output exceeds token budget or evaluation takes longer than 30 seconds

Measure end-to-end latency and output token count across 50 evaluation runs; flag outliers exceeding thresholds

ADAPTATION OPTIONS

Adapt This Prompt

How to adapt

Start with the base prompt and a small set of 10-20 tool-result pairs. Remove the strict schema validation layer and use a simple 1-5 Likert scale instead of the full fidelity breakdown. Focus on getting the interpretation accuracy score directionally correct before investing in calibration.

Watch for

  • The judge over-penalizing minor wording differences when the agent's understanding is functionally correct
  • Score inflation on obvious cases where the tool result is trivial to interpret
  • No baseline comparison—you need a few human-scored examples to know if the judge is reasonable
Prasad Kumkar

About the author

Prasad Kumkar

CEO & MD, Inference Systems

Prasad Kumkar is the CEO & MD of Inference Systems and writes about AI systems architecture, LLM infrastructure, model serving, evaluation, and production deployment. Over 5+ years, he has worked across computer vision models, L5 autonomous vehicle systems, and LLM research, with a focus on taking complex AI ideas into real-world engineering systems.

His work and writing cover AI systems, large language models, AI agents, multimodal systems, autonomous systems, inference optimization, RAG, evaluation, and production AI engineering.