Original source

Author(s): Strands Agents (no individual author named)
Title: Faithfulness evaluator
Published in: Strands Agents
Date: 2026-10-16
Original: https://strandsagents.com/docs/user-guide/evals-sdk/evaluators/faithfulness_evaluator/

This is a plain-text archive kept so the wiki’s notes can be checked against the source. Images, scripts and embedded media were removed. All rights stay with the original author(s); read and cite the original at the link above.

Notes on this source: Source note Themes: Evals and agent quality Why it was archived: What does claim-level faithfulness add for agents, where the answer is composed across many tool calls?

Archived text

Faithfulness evaluator

The FaithfulnessEvaluator evaluates whether agent responses are grounded in the conversation history. It assesses if the agent’s statements are faithful to the information available in the preceding context, helping detect hallucinations and unsupported claims. A complete example can be found here.

Key features

Section titled “Key features”

  • Trace-Level Evaluation: Evaluates the most recent turn in the conversation
  • Context Grounding: Checks if responses are based on conversation history
  • Categorical Scoring: Five-level scale from “Not At All” to “Completely Yes”
  • Structured Reasoning: Provides step-by-step reasoning for each evaluation
  • Async Support: Supports both synchronous and asynchronous evaluation
  • Hallucination Detection: Identifies fabricated or unsupported information

When to use

Section titled “When to use”

Use the FaithfulnessEvaluator when you need to:

  • Detect hallucinations in agent responses
  • Verify that responses are grounded in available context
  • Ensure agents don’t fabricate information
  • Validate that claims are supported by conversation history
  • Assess information accuracy in multi-turn conversations
  • Debug issues with context adherence

Evaluation level

Section titled “Evaluation level”

This evaluator operates at the TRACE_LEVEL, meaning it evaluates the most recent turn in the conversation (the last agent response and its context).

Parameters

Section titled “Parameters”

version (optional)

Section titled “version (optional)”

  • Type: str
  • Default: “v0”
  • Description: Prompt template version used when no system_prompt is supplied.

model (optional)

Section titled “model (optional)”

  • Type: Union[Model, str, None]
  • Default: None (uses default Bedrock model)
  • Description: The model to use as the judge. Can be a model ID string or a Model instance.

system_prompt (optional)

Section titled “system_prompt (optional)”

  • Type: str | None
  • Default: None (uses built-in template)
  • Description: Custom system prompt to guide the judge model’s behavior.

Scoring system

Section titled “Scoring system”

The evaluator uses a five-level categorical scoring system:

  • Not At All (0.0): Response contains significant fabrications or unsupported claims
  • Not Generally (0.25): Response is mostly unfaithful with some grounded elements
  • Neutral/Mixed (0.5): Response has both faithful and unfaithful elements
  • Generally Yes (0.75): Response is mostly faithful with minor issues
  • Completely Yes (1.0): Response is completely grounded in conversation history

A response passes the evaluation if the score is >= 0.5.

Basic usage

Section titled “Basic usage”

Evaluation output

Section titled “Evaluation output”

The FaithfulnessEvaluator returns EvaluationOutput objects with:

  • score: Float between 0.0 and 1.0 (0.0, 0.25, 0.5, 0.75, or 1.0)
  • test_pass: True if score >= 0.5, False otherwise
  • reason: Step-by-step reasoning explaining the evaluation
  • label: One of the categorical labels (e.g., “Completely Yes”, “Neutral/Mixed”)

What gets evaluated

Section titled “What gets evaluated”

The evaluator examines:

  • Conversation History: All prior messages and tool executions
  • Assistant’s Response: The most recent agent response
  • Context Grounding: Whether claims in the response are supported by the history

The judge determines if the agent’s statements are faithful to the available information or if they contain fabrications, assumptions, or unsupported claims.

Best practices

Section titled “Best practices”

  • Use with Proper Telemetry Setup: The evaluator requires trajectory information captured via OpenTelemetry
  • Provide Complete Context: Ensure full conversation history is captured in traces
  • Test with Known Facts: Include test cases with verifiable information
  • Monitor Hallucination Patterns: Track which types of queries lead to unfaithful responses
  • Combine with Other Evaluators: Use alongside output quality evaluators to assess responses from multiple angles

Common patterns

Section titled “Common patterns”

Pattern 1: Detecting fabrications

Section titled “Pattern 1: Detecting fabrications”

Identify when agents make up information not present in the context.

Pattern 2: Validating tool results

Section titled “Pattern 2: Validating tool results”

Ensure agents accurately represent information from tool calls.

Pattern 3: Multi-turn consistency

Section titled “Pattern 3: Multi-turn consistency”

Check that agents maintain consistency across conversation turns.

Example scenarios

Section titled “Example scenarios”

Scenario 1: Faithful response

Section titled “Scenario 1: Faithful response”

Scenario 2: Unfaithful response

Section titled “Scenario 2: Unfaithful response”

Scenario 3: Mixed response

Section titled “Scenario 3: Mixed response”

Common issues and solutions

Section titled “Common issues and solutions”

Issue 1: No evaluation returned

Section titled “Issue 1: No evaluation returned”

Problem: Evaluator returns empty results. Solution: Ensure trajectory contains at least one agent invocation span.

Issue 2: Overly strict evaluation

Section titled “Issue 2: Overly strict evaluation”

Problem: Evaluator marks reasonable inferences as unfaithful. Solution: Review system prompt and consider if agent is expected to make reasonable inferences.

Issue 3: Context not captured

Section titled “Issue 3: Context not captured”

Problem: Evaluation doesn’t consider full conversation history. Solution: Verify telemetry setup captures all messages and tool executions.

Related evaluators

Section titled “Related evaluators”

  • HelpfulnessEvaluator: Evaluates helpfulness from user perspective
  • OutputEvaluator: Evaluates overall output quality
  • ToolParameterAccuracyEvaluator: Evaluates if tool parameters are grounded in context
  • GoalSuccessRateEvaluator: Evaluates if overall goals were achieved