Summarization Chain
ai.chain_summarization · version 2 · AI
Summarizes text, splitting long inputs into chunks.
Ports
| Port | Kind | Label | Required | Max connections |
|---|---|---|---|---|
| input 0 | main | |||
| input 1 | ai_languageModel | yes | 1 | |
| input 2 | ai_document | 1 | ||
| input 3 | ai_textSplitter | 1 | ||
| output 0 | main |
Credentials
This node uses no credentials.
Parameters
| Name | Type | Default | Required | Shown when | Description |
|---|---|---|---|---|---|
operationMode | options | "nodeInputJson" | Data to Summarize. One of nodeInputJson, nodeInputBinary, documentLoader. | ||
chunkingMode | options | "simple" | Chunking. One of simple, advanced. | ||
chunkSize | number | 1000 | chunkingMode = simple | Chunk Size. | |
chunkOverlap | number | 200 | chunkingMode = simple | Chunk Overlap. | |
options | collection | ||||
options.summarizationMethodAndPrompts | fixed_collection | Method and Prompts. | |||
options.summarizationMethodAndPrompts.values | collection | ||||
options.summarizationMethodAndPrompts.values.summarizationMethod | options | "map_reduce" | Method. One of map_reduce, refine, stuff. | ||
options.summarizationMethodAndPrompts.values.prompt | string | "Write a concise summary of the text below, keeping its key facts and conclusions.\n\nText:\n{text}\n\nSummary:" | Summary Prompt. | ||
options.summarizationMethodAndPrompts.values.combineMapPrompt | string | "The texts below are summaries of consecutive parts of one document. Merge them into a single concise summary.\n\nSummaries:\n{text}\n\nSummary:" | Combine Prompt. | ||
options.summarizationMethodAndPrompts.values.refinePrompt | string | "You are improving an existing summary.\n\nCurrent summary:\n{existing_answer}\n\nMore of the original text:\n{text}\n\nUpdate the summary with any important new information from this text. If it adds nothing important, return the current summary unchanged.\n\nSummary:" | Refine Prompt. |
Import
Exported workflows that use these node types import to this node. Unverified ranges import with a parameter warning until parity fixtures confirm them; see Migrating.
| Source type | Version range | Status | Fixtures |
|---|---|---|---|
@n8n/n8n-nodes-langchain.chainSummarization | 1 | unverified | |
@n8n/n8n-nodes-langchain.chainSummarization | >=2 <3 | unverified |