EvaluateRagFaithfulness 2025.10.9.21

Bundle

com.snowflake.openflow.runtime | runtime-rag-evaluation-processors-nar

Description

Evaluates the faithfulness of generated answers in a Retrieval-Augmented Generation (RAG) system by analyzing responses using an LLM (e.g., OpenAI’s GPT). The processor enriches each FlowFile record with faithfulness metrics and detailed analysis.

Tags

ai, evaluation, faithfulness, llm, nlp, openai, openflow, rag

Input Requirement

REQUIRED

Supports Sensitive Dynamic Properties

false

Properties

PropertyDescription
Context Identifier Record PathThe RecordPath to the array of contexts IDs in the record.
Context Record PathThe RecordPath to the array of contexts in the record.
Evaluation Results Record PathThe RecordPath to write the results of the evaluation to.
Generated Answer Record PathThe path to the answer field in the record
LLM Provider ServiceThe provider service for sending evaluation prompts to LLM
Question Record PathThe RecordPath to the question field in the record.
Record ReaderThe Record Reader to use for reading the FlowFile.
Record WriterThe Record Writer to use for writing the results.

Relationships

NameDescription
failureFlowFiles that cannot be processed are routed to this relationship
successFlowFiles that are successfully processed are routed to this relationship

Writes attributes

NameDescription
average.answer.faithfulnessThe average faithfulness score computed over all records.
json.parse.failuresNumber of JSON parse failures encountered.

Use cases

Use this processor to assess the faithfulness of answers generated by an LLM compared to the provided context. It provides metrics that can be used for monitoring and improving the performance of RAG systems.