EngineAggregatorNode at the end of the control graph.AnswerSynthesizerNodepackages/nl2sql/src/nl2sql/pipeline/nodes/answer_synthesizer/node.pyUpstream:
EngineAggregatorNodeDownstream:
Trigger conditions:
flowchart LR
Aggregator[EngineAggregatorNode] --> Synthesizer[AnswerSynthesizerNode] --> EndNode[PipelineEnd]
From GraphState:
user_query (required)aggregator_response.terminal_results (required)decomposer_response.unmapped_subqueries (optional)Validation performed:
INVALID_STATE.Mutations to GraphState:
answer_synthesizer_response (AnswerSynthesizerResponse)reasoning summaryerrors on failureSide effects:
aggregator_response.INVALID_STATE error and stop.AnswerSynthesizerResponse.AGGREGATOR_FAILED.Implements a LangGraph node callable:
def __call__(self, state: GraphState) -> Dict[str, Any]
Key contracts:
AggregatedResponseAnswerSynthesizerResponseEmits PipelineError with:
INVALID_STATE (no aggregated result)AGGREGATOR_FAILED (LLM failure)Logs failures via logger.error.
answer_synthesizeranswer_synthesizer via llm.yaml.ANSWER_SYNTHESIZER_PROMPT.build_graph() for custom synthesis.packages/nl2sql/src/nl2sql/pipeline/nodes/answer_synthesizer/node.py