Agentic pipelines: Reasoning & Retrieval // Multi-agent approach

Multi-agent reasoning: classification, planning, CoT, code/query generation & execution, tools use, memories, internal/external sources, databases, etc.

sbagency
5 min readJan 21, 2025

Multi-agentic pipeline provides better decomposition of complex tasks, but it is not self-learning, autonomous agents.

https://huyenchip.com//2025/01/07/agents.html
https://weaviate.io/blog/what-is-agentic-rag
https://huggingface.co/learn/cookbook/multiagent_rag_system
======== New task ========
How many years ago was Stripe founded?
=== Agent thoughts:
Thought: To solve this problem, I need to find out the year Stripe was founded and then calculate the difference between the current year and the year of founding.
>>> Agent is executing the code below:
founding_year = search("When was Stripe founded?")
print(founding_year)
====
======== New task ========
You're a helpful agent named 'search'.
You have been submitted this task by your manager.
---
Task:
When was Stripe founded?
---
You're helping your manager solve a wider task: so make sure to not provide a one-line answer, but give as much information as possible so that they have a clear understanding of the answer.

Your final_answer WILL HAVE to contain these parts:
### 1. Task outcome (short version):
### 2. Task outcome (extremely detailed version):
### 3. Additional context (if relevant):

Put all these in your final_answer tool, everything that you do not pass as an argument to final_answer will be lost.
And even if your task resolution is not successful, please return as much context as possible, so that your manager can act upon this feedback.
=== Agent thoughts:
Thought: I will start by performing a web search to find when Stripe was founded and gather detailed information about the company's founding.
>>> Calling tool: 'web_search' with arguments: {'query': 'When was Stripe founded'}
=== Agent thoughts:
Thought: I found several sources indicating when Stripe was founded and additional information about the company’s founding. I’ll gather the relevant details to provide a comprehensive answer.
>>> Calling tool: 'final_answer' with arguments: {'answer': "### 1. Task outcome (short version):\nStripe was founded in 2010 by brothers John and Patrick Collison.\n\n### 2. Task outcome (extremely detailed version):\nStripe, Inc. is an Irish-American multinational financial services and software as a service (SaaS) company. It was founded in 2010 by Irish entrepreneur brothers John and Patrick Collison in Palo Alto, California. The Collison brothers started working on Stripe while they were still in high school and college, aiming to create a payment platform that would give developers the tools they needed to create secure and novel buying experiences. Patrick Collison serves as the company's CEO, while John Collison is the president.\n\n### 3. Additional context (if relevant):\nThe Collison brothers moved to the USA from a rural village in Ireland at a young age to pursue their entrepreneurial dreams. They identified a gap in the market for a payment platform that would make it easy for small businesses to accept payments from anywhere in the world. Stripe debuted in 2010 and grew exponentially due to its user-friendly front-end and robust back-end infrastructure. Today, more than $1 trillion in payments pass through Stripe's software on behalf of customers, and the company has achieved a valuation of nearly $100 billion."}
Print outputs:
### 1. Task outcome (short version):
Stripe was founded in 2010 by brothers John and Patrick Collison.

### 2. Task outcome (extremely detailed version):
Stripe, Inc. is an Irish-American multinational financial services and software as a service (SaaS) company. It was founded in 2010 by Irish entrepreneur brothers John and Patrick Collison in Palo Alto, California. The Collison brothers started working on Stripe while they were still in high school and college, aiming to create a payment platform that would give developers the tools they needed to create secure and novel buying experiences. Patrick Collison serves as the company's CEO, while John Collison is the president.

### 3. Additional context (if relevant):
The Collison brothers moved to the USA from a rural village in Ireland at a young age to pursue their entrepreneurial dreams. They identified a gap in the market for a payment platform that would make it easy for small businesses to accept payments from anywhere in the world. Stripe debuted in 2010 and grew exponentially due to its user-friendly front-end and robust back-end infrastructure. Today, more than $1 trillion in payments pass through Stripe's software on behalf of customers, and the company has achieved a valuation of nearly $100 billion.

=== Agent thoughts:
Thought: I can see that Stripe was founded in 2010. Now, I will calculate the difference between the current year and the founding year to find out how many years ago Stripe was founded.
>>> Agent is executing the code below:
import datetime

founding_year = 2010 # From the search result
current_year = datetime.datetime.now().year

years_since_founded = current_year - founding_year
final_answer(years_since_founded)
====
Print outputs:

Last output from code snippet:
14
Final answer:
14

Reasoning and Action

https://x.com/Aurimas_Gr/status/1876969695124857031

Question Answering

https://github.com/opea-project/GenAIExamples/tree/main/AgentQnA

News Research AI Agents

--

--

sbagency
sbagency

Written by sbagency

Tech/biz consulting, analytics, research for founders, startups, corps and govs.

No responses yet