trulens.feedback.templates.rag¶
trulens.feedback.templates.rag
¶
RAG evaluation templates: groundedness, context relevance, answer relevance, answerability, comprehensiveness, etc.
Classes¶
Relevance
¶
Bases: Semantics
This evaluates the relevance of the LLM response to the given text by LLM prompting.
Relevance is available for any LLM provider.
CitationAttribution
dataclass
¶
Bases: Semantics, WithPrompt, CriteriaOutputSpaceMixin
Citation-attribution faithfulness.
Unlike groundedness (does the source support the statement somewhere),
this checks attribution: does each [N] citation marker point to the
SOURCE passage that supports the specific claim it is attached to. It
catches misattribution: a claim cited to passage [A] that does not
support it, even though some other passage [B] would.