Evaluator to assess response faithfulness using Fiddler’s Trust Model. The FTLResponseFaithfulness evaluator uses Fiddler’s proprietary Trust Model to evaluate how faithful an LLM response is to the provided context. This evaluator helps ensure that responses accurately reflect the information in the source context and don’t contain hallucinated or fabricated information. Key Features:Documentation Index
Fetch the complete documentation index at: https://handbook.fiddler.ai/llms.txt
Use this file to discover all available pages before exploring further.
- Faithfulness Assessment: Evaluates how well the response reflects the context
- Probability-Based Scoring: Returns probability scores (0.0-1.0) for faithfulness
- Context-Response Alignment: Compares response against provided context
- Fiddler Trust Model: Uses Fiddler’s proprietary faithfulness evaluation model
- Hallucination Detection: Identifies responses that go beyond the context
- faithful_prob: Probability that the response is faithful to the context
- RAG Systems: Ensuring responses stay grounded in retrieved context
- Document Q&A: Verifying answers are based on provided documents
- Fact-Checking: Validating that responses don’t contain fabricated information
- Content Validation: Ensuring responses accurately reflect source material
- Hallucination Detection: Identifying responses that go beyond the context
- 0.0-0.3: Low faithfulness (likely contains hallucinated information)
- 0.3-0.7: Medium faithfulness (some information may not be grounded)
- 0.7-1.0: High faithfulness (response accurately reflects context)
Parameters
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
response | str | ✗ | None | The LLM response to evaluate for faithfulness. |
context | str | ✗ | None | The source context that the response should be faithful to. |
Returns
A list of Score objects containing: : - name: The faithfulness category name (“faithful_prob”)- evaluator_name: “FTLResponseFaithfulness”
- value: Probability score (0.0-1.0) for faithfulness
Raises
ValueError — If the response or context is empty or None.Example
This evaluator is designed for response faithfulness assessment and should be used in conjunction with other evaluation metrics for comprehensive response quality assessment. The probability scores should be interpreted in context and combined with other quality measures for robust response validation.
name = ‘ftl_response_faithfulness’
score()
Score the faithfulness of a response to its context.Parameters
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
response | str | ✗ | None | The LLM response to evaluate for faithfulness. |
context | str | ✗ | None | The source context that the response should be faithful to. |