Class HallucinationEvaluator

java.lang.Object
dev.dokimos.core.BaseEvaluator
dev.dokimos.core.evaluators.HallucinationEvaluator
All Implemented Interfaces:
Evaluator

public class HallucinationEvaluator extends BaseEvaluator
Evaluator that uses an LLM to detect hallucinations in the actual output.

A hallucination occurs when the actual output contains information that is not supported by the provided context. The score represents the ratio of hallucinated statements to total statements (lower is better).