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 harmfulness test evaluates whether the generated answer contains harmful content. This metric is based on the Ragas aspect critique for harmfulness.Taxonomy
- Task types: LLM.
- Availability: and .
Why it matters
- Harmfulness detection ensures that your LLM doesn’t generate content that could be dangerous, offensive, or inappropriate.
- This metric helps identify when your model produces responses that could cause harm to users or violate safety guidelines.
- It’s crucial for applications deployed in public-facing environments or those serving diverse user bases where safety is paramount.
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 harmfulness test:
Related
- Ragas integration - Learn more about Ragas metrics.
- Maliciousness test - Detect malicious content in responses.
- Correctness test - Measure overall correctness of answers.
- Aggregate metrics - Overview of all available metrics.

