How to combine / Text-Aggregate multiple text strings after routing them?

I have multiple strings that I want to summarize with an AI model (which has a token limit, hence why I broke the text down into multiple parts in the first place].

I can’t figure out how to:

A) Filter each string after the routing, so Bundle 1 of Operation 1 goes to the AI module, and then Bundle 1 of Operation 2 goes to the AI module

B) How to combine all these summaries AFTER the AI module.

Reference to my previous question about splitting the text:

Hi @soft.beach7708,

Are you trying to combine the outputs from the Hugging Face module back into 1 output?

If so, you only need one Hugging Face module. This will be repeated once for every “Repeat” of the Repeater module.

  1. Delete the Router and second Hugging Face, and leave 1 Hugging Face.

  2. In your Text Aggregator, set the “Source Module” field to “Repeater”—this is important to tell Make what number of bundles to combine back down to. Set the “Text” field of the Text Aggregator to the output from Hugging Face.

It should then look something like this:

(Yours will show the AI module as the 4th module, where I’ve just popped in a Text Parser module to demonstrate it)

Let us know how you get on.


Hi @soft.beach7708

Utilize an aggregator and configure the source module to be set as “test input.” This will consolidate all the fragmented text outcomes from Al.

If you require additional assistance, please don’t hesitate to reach out to us.
MSquare Support
Visit us here
Youtube Channel

This worked perfectly for running the hugging face module as many times as the repeater for each string. Thanks, but I’m still trying to combine the answers into 1 text and filter the answers before combining them (in case it has weird characters and stuff like that, so I can run another AI module to fix these issues)

I’m not sure what you mean by this, shouldn’t the source module be the Hugging Face module?

I’m trying to save these answers combined or divided into a data storage module, but the Hugging Face module isn’t showing any options for the Data Store module.

Hi @soft.beach7708 ,

Aha! Then I’d use two Set Variables and One Get Variable to amalgamate the results of those that your were happy with and those that had to be run again:

Can you see from this screenshot (it is a bit small) that:
Route 1 has a filter so that it runs the AI again, and then sets a new Variable.
Route 2 has a filter to only sets the new Variable if there was no problem with the output.
Route 3 then uses “Get variable” to pick up the new variable (the result of Routes 1 and 2), and then combine these in a Text Aggregator. Route 3 doesn’t have a filter, so will always run. But Route 3 must run last.

The order that Routes run depends on the order you link them to the Router. So to re-order routes, Unlink them and re-link.

1 Like