Documentation Index
Fetch the complete documentation index at: https://openlayer.com/docs/llms.txt
Use this file to discover all available pages before exploring further.
Definition
The faithfulness test measures the factual consistency of the generated answer against the given context. This metric is based on the Ragas faithfulness metric.Taxonomy
- Task types: LLM.
- Availability: and .
Why it matters
- Faithfulness ensures that your LLM generates responses that are consistent with the provided context and doesn’t hallucinate information.
- This metric helps identify when your model is making up facts or contradicting the given context.
- It’s essential for RAG (Retrieval-Augmented Generation) systems where the model should stay grounded in the provided information.
Required columns
To compute this metric, your dataset must contain the following columns:- Outputs: The generated answer/response from your LLM
- Context: The provided context or background information
Test configuration examples
If you are writing atests.json, here are a few valid configurations for the faithfulness test:
Related
- Ragas integration - Learn more about Ragas metrics.
- Context utilization test - Evaluate how well context is used.
- Answer correctness test - Measure factual accuracy against ground truth.
- Correctness test - Measure overall correctness of answers.
- Aggregate metrics - Overview of all available metrics.

