Thanks from mentioning this one, I am facing the same
Summary
I am using the “Summarization Chain” node to help me prepare internal communication based on my latest Slack activity → I want to get first draft of internal communication based on this content
Steps to reproduce
Add a node with data in an array
Add a node “Summarization Chain” linked to a model sub-node
Add option to “Summarization Method and Prompts > Map reduce”
As is normal with the nodes in n8n, it processes each item individually. So it takes each item (in the last example, there were three items passed into the node), and it summarizes each item.
If you want to prevent that behavior, make sure to merge your items first.
The “map reduce” strategy is there for each item individually, and what it does is to split an item into smaller chunks (to make sure it fits in your context window), and then summarizes each chunk. All chunks are then passed to your LLM to be summarized in total.
This means that you get a summary for each item you pass in to the node. You may see a bunch of LLM calls per item, which is expected if you chunk everything.
To reduce the number of LLM calls, you can increase the number of characters per chunk.
To rephrase: default behavior is for multiple items is to loop over them by default as input nodes.
Therefore, on this example, it is expected to have an output with a summary per item.
To prevent this, I should merge the items first.
I will try it out and report back. Thanks a lot!