Evaluates whether the generated output aligns with the retrieved context in a RAG pipeline.
actual_output
) and the information found in the retrieval_context
. It is a core indicator of hallucination risk in retrieval-augmented generation systems.
A high faithfulness score indicates that the model grounds its answer in retrieved content, rather than introducing unsupported or fabricated information.
faithfulness
metric, the following inputs are required:
input
: The user’s original prompt.actual_output
: The LLM-generated response.retrieval_context
: The retrieved passages or nodes used by the model.actual_output
are substantiated by the retrieval_context
.