GenerateAnswersFromContext 2025.10.9.21

Bundle

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

Description

Generates synthetic answers for each question present in the incoming records using a Large Language Model (LLM). For every record, the processor extracts the question and its associated context based on the specified RecordPaths, constructs a prompt, and sends it to an LLM provider to obtain a synthetic answer. The generated answer is then inserted into the record at the designated RecordPath.

Tags

ai, answers, contextual, generation, llm, nlp, openai, openflow, rag, synthetic

Input Requirement

REQUIRED

Supports Sensitive Dynamic Properties

false

Properties

PropertyDescription
Answer Record PathThe RecordPath to the synthetically generated answers
Context Record PathThe RecordPath to the array of contexts in the record.
LLM Provider ServiceThe provider service for sending evaluation prompts to LLM
Max Character Context LengthMaximum character length of context window.
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
answers.successfully.generatedThe total number of successfully generated synthetic answers for the FlowFile.
answers.failed.generatedThe total number of synthetic answer generation attempts that failed for the FlowFile.
json.parse.failuresNumber of JSON parse failures encountered.