Stage Category: REDUCE (Aggregates documents)Transformation: N documents → 1 summary document (or N documents with summaries)
When to Use
When NOT to Use
Parameters
Available Models
Setprovider and model_name together. If provider is omitted, it is inferred from model_name (defaults to google / gemini-2.5-flash-lite).
Configuration Examples
Grouping
Single Summary (default)
With nogroup_by, all documents are combined into one summary (N→1):
Per-Group Summaries
Setgroup_by to a field path to produce one summary per unique group value (N→M).
Use {{GROUP_VALUE}} in the prompt to reference the current group:
Output Schema
The summary is written tooutput_field (default summary). When include_sources is
true, source_document_ids is added; when include_metadata is true, document_count
and tokens_used are added.
Single Summary (no group_by)
Per-Group (with group_by)
One summary document per unique group value:
Performance
Common Pipeline Patterns
Full RAG Pipeline
Multi-Document Synthesis
Preview Summaries
Comparison: summarize vs rag_prepare
Error Handling
Related
- RAG Prepare - Format for LLM without calling
- LLM Enrich - Structured extraction
- Rerank - Improve input quality first

