Blog Post

AI - AI Platform Blog
2 MIN READ

The Future of AI: Single Agent or Multi-Agent - How Should I Choose?

Marco_Casalaina's avatar
Oct 01, 2024
In my last post I explored the virtues of a multi-agent system. The "debating agent" pattern (or, as some say, the "maker-checker" pattern) is a fascinating solution to the errors that can arise from a single LLM call. Multi-agents can also use multiple models, allowing for specialized or lower-cost models for some tasks.
 
With multiple agents, though, comes a fair bit more complexity. There are numerous ways that multiple agents can interact. My Questionnaire Multiagent has a simple, sequential agent pattern - the Question Answerer always goes first, then the Answer Checker, then the Link Checker and then the Manager.

 


Even with this simple interaction model, though, I've had to work through numerous eventualities; for example, I've had to handle the case where they have an infinitely long argument. And I've had to laboriously prompt engineer all four of them. As the number of agents in your multi-agent system grows, the burden of configuring and maintaining them grows proportionally.
 

Before You Try Many Agents, Try Just One

While multi-agent systems garner a lot of attention, single agent systems continue to grow in power. Assistants, now available in Azure OpenAI Service, are a prime example of this.
 
I've recently been experimenting with the use of assistants for both structured and unstructured data, and I've found them to be remarkably powerful on their own. They act sequentially, which makes them easier to debug. They have built-in tools like Code Interpreter, which both writes and executes code, and File Search, which grounds the agent to data. See an example in my 90-second video: 
 
 
More tools are coming for them, including the ability to call Azure Logic Apps, browse the web, and automatically query various sources of structured data like Microsoft Fabric.
 
They're comparatively easy to set up, and they're production-tested among our customers and in OpenAI's ChatGPT. They certainly still require data grounding, prompt engineering, bulk evaluation, and care and feeding - but you really can get a lot out of a single agent setup.
 
So, before you try many AI agents to solve your problem, see if a single agent can get the job done.
 
For more about AI agents,
Updated Sep 30, 2024
Version 1.0
  • Very good perspective.

    Now, eventually we will probably get a well-designed framework that will define agent swarms and their interactions for us based on the tasks/goals and rough guidance given, and that will then test or monitor their interactions to avoid "arguing loops" all automagically adjusting the agent specific prompts in the process.

  • grainnecoghlan's avatar
    grainnecoghlan
    Copper Contributor

    I'm enjoying reading your blog posts, so I hope you are enjoying writing them too!

     

    I really like that you ground your observations with concrete examples & demo's.
    It would be great if you could share the source code behind your examples. I see you were able to do so for the multi-agent example. But I don't see the GitHub repo with the single-agent example you referenced on this post.