Anthropic Agentic Systems - #3. Parallelization
Anthropic Agentic Systems: A Five-Part Exploration is sponsored by Agent.ai - Discover, connect with and hire AI agents to do useful things.
Whether we like it or not, agents are going to be co-existing with us. While not everyone will be building agents, I think it helps everyone to get an understanding of what these agents look like under the covers. Anthropic came out with a white paper on 5 patterns that they see as common when building agentic systems. This series is my attempt to demystify agent building with a simple example and a non-technical explanation.
I continue building out my agent - Everyone is a Superhero and this time I extend beyond just generating a Superhero Story for a real person, but I also generate a Superhero Costume, define your Archvillian and your weakness. All key attributes of any superhero.
The five patterns for Agentic Systems that Anthropic is seeing in production are -
This is the third post in the series and takes a practical deep dive into the Parallelization pattern using Agent.ai.
LLMs can sometimes work simultaneously on a task and have their outputs aggregated programmatically. This workflow, parallelization, manifests in two key variations: Sectioning: Breaking a task into independent subtasks run in parallel. Voting: Running the same task multiple times to get diverse outputs.
In plain english, a request comes in and the work is divided into different tasks and each task goes down it's own path and at the end an aggregator combines all the tasks into one output. One important caveat is that Agent.ai does not natively support parallel execution of tasks. That being said, if we think about what happens with parallel execution - we get one output that gets passed on to different downstream tasks and then the output of each of those tasks is aggregated. We can definitely demonstrate this pattern with Agent.ai.
If we remember the flow of our Superhero Story from the Routing example we ended with a Story generated about the person whose information was submitted-
To demonstrate the parallelization pattern, we will take the Story generated and pass it on to 3 different tasks -
Task 1 : Generates a Superhero Costume
Task 2 : Generates an Archvillain
Task 3 : Generates a weakness for the Superhero
Then we have an Output task that Aggregrates, the Story, the Archvillain, the Weakness and the Costume into one output.
This is what the agent looks like. Step 11/12 generates the costume, Step 13 the Archvillian, Step 14 the Weakness and Step 15 the Aggregator. Each of these steps take the same input the Superhero Story and they each generate an output that is then put together by the aggregator.
To see this agent in action and to generate your own Superhero Story, costume, villain and weakness, click here.
So what does the output look like -
Hope this fun example helps make this dry topic a bit more understandable and fun to learn!!
Subscribe to the newsletter to understand more about building agentic systems and if you are a business stakeholder that wants to play around with building agents, go to Agent.ai and sign up. It is not that complicated.
This was my superhero costume that got generated..