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 coherence test evaluates the logical consistency and flow of the generated answer. This metric is based on the Ragas aspect critique for coherence.Taxonomy
- Task types: LLM.
- Availability: and .
Why it matters
- Coherence ensures that your LLM generates responses that are logically structured and easy to follow.
- This metric helps identify when your model produces disjointed, contradictory, or confusing responses.
- It’s essential for applications where clear communication is important, such as educational content, customer support, or documentation generation.
Required columns
To compute this metric, your dataset must contain the following columns:- Input: The question or prompt given to the LLM
- Outputs: The generated answer/response from your LLM
Test configuration examples
If you are writing atests.json, here are a few valid configurations for the coherence test:
Related
- Ragas integration - Learn more about Ragas metrics.
- Correctness test - Measure overall correctness of answers.
- Conciseness test - Evaluate response brevity and clarity.
- Aggregate metrics - Overview of all available metrics.

