Class HallucinationGrader

java.lang.Object
dev.langchain4j.adaptiverag.HallucinationGrader
All Implemented Interfaces:
Function<HallucinationGrader.Arguments,HallucinationGrader.Score>

public class HallucinationGrader extends Object implements Function<HallucinationGrader.Arguments,HallucinationGrader.Score>
Provides functionality to grade the groundedness of an LLM generation with respect to a set of facts. The class implements the Function interface, which accepts parameters of type HallucinationGrader.Arguments and returns a score indicating whether the generation is grounded or not.