在使用langchain & code interpreter 过程中,对性能和准确率和性能都有着更高的要求。
而Autogen在这两方面来看,都有一定的提升,而且在中间过程可以接受人的反馈。
下面根据autogen的论文和实际测试样例,做一些说明。
https://arxiv.org/pdf/2308.08155.pdf
https://github.com/microsoft/autogen
AutoGen is a framework that enables the development of LLM applications using multiple agents that can converse with each other to solve tasks. AutoGen agents are customizable, conversable, and seamlessly allow human participation. They can operate in various modes that employ combinations of LLMs, human inputs, and tools.
- AutoGen enables building next-gen LLM applications based on multi-agent conversations with minimal effort. It simplifies the orchestration, automation, and optimization of a complex LLM workflow. It maximizes the performance of LLM models and overcomes their weaknesses.
- It supports diverse conversation patterns for complex workflows. With customizable and conversable agents, developers can use AutoGen to build a wide range of conversation patterns concerning conversation autonomy, the number of agents, and agent conversation topology.
- It provides a collection of working systems with different complexities. These systems span a wide range of applications from various domains and complexities. This demonstrates how AutoGen can easily support diverse conversation patterns.
- AutoGen provides a drop-in replacement of
openai.Completion
oropenai.ChatCompletion
as an enhanced inference API. It allows easy performance tuning, utilities like API unification and caching, and advanced usage patterns, such as error handling, multi-config inference, context programming, etc.
AutoGen is powered by collaborative research studies from Microsoft, Penn State University, and the University of Washington.
AutoGen的主要原因是:
-
利用多个 agent 的协作来提高编码的效率和安全性。通过多角色和多轮来完善内容。
-
活地定义 agent 的行为和交互模式,通过自然语言或编程语言来控制对话流程。各个角色定位更加清晰。
-
使用不同的 LLMs 来实现不同的功能,例如生成代码,执行代码,验证代码,解释结果等。这些功能内置的,通过多轮还强化内容。
-
轻松地扩展和重用现有的 agent,通过注册自定义的回复函数来定制 agent 的行为。
query the books table, group by column "authors" of top 5 in bar picture
这里有一个authors是为null,python代码会出现异常。 Autogen能检测到后。优化方向有随机性,1)对数据做过滤清洗最后剩下四条,2)对null用""处理,都得到最终结果。
从这个prompt可以看到不同类型指令,完成一个比较好的结果。