View Source Rag.Generation.HallucinationDetection.LangChain (rag v0.1.0)
Functions to detect hallucinations in generated responses using LangChain.
Summary
Functions
Takes the values of query, response and context from generation and passes it to an LLM specified by chain to detect potential hallucinations.
Then, puts a new hallucination evaluation in generation.
Functions
@spec detect_hallucination(Rag.Generation.t(), LangChain.Chains.LLMChain.t()) :: Rag.Generation.t()
Takes the values of query, response and context from generation and passes it to an LLM specified by chain to detect potential hallucinations.
Then, puts a new hallucination evaluation in generation.