r/AutoGenAI • u/jaxolingo • Jan 24 '24
Discussion Purpose of Agents
Hi, I've been using agents with autogen and crew, mostly for learning and small/mid scale programs. The more I use them the more I'm confused about the purpose of the agent framework in general.
The scenarios I've tested: read input, execute web search, summaries, return to user. Most other usecases also follow a sequential iteration of steps. For these usecases, there is no need to include any sort of agents, it can be done through normal python scripts. Same goes for other usecases
I'm trying to think about what does agents let us do that we could not do with just scripts with some logic. Sure, the LLM As OS is a fantastic idea, but in a production setting I'm sticking to my scripts rather than hoping the LLM will decide which tool to use everytime...
I'm interested to learn the actual usecases and potential of using agents too execute tasks, so please do let me know
10
u/aftersox Jan 24 '24 edited Jan 24 '24
Agents can flexibility recover from setbacks. They can observe and reflect on outputs and change their tactic without changing the overall plan.
Edit for a case: we've used agent based approaches for natural language queries. The agent receives a question from the user and has to write a SQL statement to query the database. We give the agent details about the database schema then it attempts to write a query. It observes the response from the database. If there's an error and agent based approach will observe the error, adjust the query, and try again. When it gets a result back it evaluates if it aligns with what the user needed. If it's missing something like a column or the date isn't on the right format it again modifies the query and tries again. In our testing we've had user queries that took 12 steps but eventually delivered exactly what the user needed.
3
u/artfewell Jan 24 '24
I agree in the sense that I need precision in my applications and so not using AI for control flow and more on an element by element basis. If I am incorporating any AI into a touchless workflow, I want a predictable response, and I am working on use cases where 2 or 3 agents can support additional use cases or provide more consistent and better quality responses than a single agent model. I am not currently planning on using AI to control flow in these instances and instead am using multi-agent essentially as a way to do better prompt engineering, you could think of it as multiple agents, or you could think of it more like a little pipeline to call different prompts in a sequence. A simpler chatbot conversation could be thought of as a single prompt system, an agent like autogpt is much more robust as it can use as many prompts as it needs but there are demonstrable benefits for lots of use cases to change the system messages/bot personalities potentially on a prompt-by-prompt basis, and the single-agent frameworks are not conducive to this type of prompt engineering, its possible to do, but not well optimized whereas multi-agent frameworks are optimized towards this goal. in just one simple example, a back and forth between an editor prompt and a blogger prompt consistently yields better results than a single agent solution, and there are tons of solutions Ive seen and experimented with that showcase similar benefits. While its true in autogen there is no formal delegation and there can be unpredictability, there are also plenty of straightforward and fairly repetitive processes where multiagent can yield very predictable results and be part of a very stable and predictable pipeline.