极限套娃,Agent自动设计Agentic系统!

Agent智能体系统正在作为通用工具被广泛研究和应用,解决复杂问题通常需要由多个组件组成的复合智能体系统,而手工设计的解决方案最终会被学习到的更高效的解决方案所取代。

为此,提出了自动化设计智能体系统(ADAS:Automated Design of Agentic Systems,已开源)的新研究领域,目标是自动创建强大的智能体系统设计。

通过代码定义整个智能体系统,并由一个“元Agent”自动发现新的智能体,理论上允许ADAS算法发现任何可能的构建块和智能体系统。

元Agent搜索的概述以及发现的Agent示例。指导元Agent迭代地编程新代理,测试它们在任务上的性能,将它们添加到已发现Agent的存档中,并使用这个存档来通知后续迭代中的元Agent。展示了三次运行中的三个示例Agent,所有名称都由元Agent生成。

自动化设计智能体系统(Automated Design of Agentic Systems):

ADAS的定义和目标

  • ADAS旨在自动发明新的构建块,并设计功能强大的智能体系统。智能体系统涉及使用基础模型(Foundation Models,简称FMs)作为模块,通过规划、使用工具和执行多步骤的迭代处理来完成任务。

ADAS的三个关键组成部分

自动化智能体系统设计(ADAS)的三个关键组成部分。搜索空间决定了ADAS中可以表示哪些Agent系统。搜索算法指定了ADAS方法如何探索搜索空间。评估函数定义了如何根据目标目标(如性能)评估候选Agent。

  1. 搜索空间(Search Space):定义了ADAS中可以表示哪些智能体系统。例如,一些研究只变异智能体的文本提示,而其他组件(如控制流)保持不变。

  2. 搜索算法(Search Algorithm):指定了ADAS方法如何探索搜索空间。由于搜索空间通常非常大甚至无界,需要考虑探索与利用的权衡。

  3. 评估函数(Evaluation Function):根据ADAS算法的应用,可能考虑不同的目标来优化,如性能、成本、延迟或智能体的安全性。评估函数定义了如何在这些目标上评估候选智能体。

通过在编码、科学和数学等多个领域的广泛实验,展示了该算法能够逐步发明具有新颖设计的智能体,这些智能体的性能大大超过了手工设计的最先进智能体。

元智能体搜索在ARC挑战上的结果。(a) 元智能体搜索基于不断增长的先前发现的存档,逐步发现高性能智能体。通过五次评估智能体,在保留的测试集上报告中位数准确度和95%的自举置信区间。(b) 元智能体搜索在ARC挑战上发现的最佳智能体的可视化。

来自ARC挑战的一个示例任务。给定输入-输出网格示例,人工智能系统被要求学习转换规则,然后将这些学到的规则应用于测试网格,以预测最终答案。

Meta Agent Search与多个领域内最先进的手工设计智能体之间的性能比较。Meta Agent Search在每个领域中发现的智能体都优于基线。报告了在保留的测试集上的测试准确度和95%自举置信区间。每个领域的搜索是独立进行的。

将MGSM中的顶级智能体转移到其他数学领域时的性能。元智能体搜索发现的智能体在不同数学领域中始终优于基线。我们报告了测试准确度和95%自举置信区间。顶级智能体的名称由元智能体搜索生成。

附录

Meta Agent系统Prompt

You are a helpful assistant. Make sure to return in a WELL-FORMED JSON object.

使用以下提示来指导元智能体基于先前发现的智能体存档来设计新智能体。

Meta Agent核心Prompt

You are an expert machine learning researcher testing various agentic systems. Your objective is to design``building blocks such as prompts and control flows within these systems to solve complex tasks. Your aim``is to design an optimal agent performing well on [Brief Description of the Domain].``[Framework Code]``[Output Instructions and Examples]``[Discovered Agent Archive] (initialized with baselines, updated at every iteration)``# Your task``You are deeply familiar with prompting techniques and the agent works from the literature. Your goal is``to maximize the specified performance metrics by proposing interestingly new agents.``Observe the discovered agents carefully and think about what insights, lessons, or stepping stones can be``learned from them.``Be creative when thinking about the next interesting agent to try. You are encouraged to draw inspiration``from related agent papers or academic papers from other research areas.``Use the knowledge from the archive and inspiration from academic literature to propose the next``interesting agentic system design.``THINK OUTSIDE THE BOX.

使用以下提示来指导和格式化元智能体的输出。在这里,收集并呈现了元智能体在提示中可能犯的一些常见错误,这在提高生成代码的质量方面是有效的。

输出指令和示例

# Output Instruction and Example:``The first key should be (“thought”), and it should capture your thought process for designing the``next function. In the “thought” section, first reason about what the next interesting agent to try``should be, then describe your reasoning and the overall concept behind the agent design, and``finally detail the implementation steps. The second key (“name”) corresponds to the name of``your next agent architecture. Finally, the last key (“code”) corresponds to the exact “forward()”``function in Python code that you would like to try. You must write COMPLETE CODE in “code”:``Your code will be part of the entire project, so please implement complete, reliable, reusable code snippets.``Here is an example of the output format for the next agent:``{“thought”: “**Insights:** Your insights on what should be the next interesting agent. **Overall Idea:**``your reasoning and the overall concept behind the agent design. **Implementation:** describe the``implementation step by step.”,``“name”: “Name of your proposed agent”,``“code”: “def forward(self, taskInfo): # Your code here”}``## WRONG Implementation examples:``[Examples of potential mistakes the meta agent may make in implementation]

在元智能体的第一次响应之后,进行两轮自我反思,以使生成的智能体新颖且无错误。

自我反思第一轮的提示

[Generated Agent from Previous Iteration]``Carefully review the proposed new architecture and reflect on the following points:``1. **Interestingness**: Assess whether your proposed architecture is interesting or innovative compared``to existing methods in the archive. If you determine that the proposed architecture is not interesting,``suggest a new architecture that addresses these shortcomings.``- Make sure to check the difference between the proposed architecture and previous attempts.``- Compare the proposal and the architectures in the archive CAREFULLY, including their actual differences``in the implementation.``- Decide whether the current architecture is innovative.``- USE CRITICAL THINKING!``2. **Implementation Mistakes**: Identify any mistakes you may have made in the implementation.``Review the code carefully, debug any issues you find, and provide a corrected version. REMEMBER``checking "## WRONG Implementation examples" in the prompt.``3. **Improvement**: Based on the proposed architecture, suggest improvements in the detailed``implementation that could increase its performance or effectiveness. In this step, focus on refining and``optimizing the existing implementation without altering the overall design framework, except if you``want to propose a different architecture if the current is not interesting.``- Observe carefully about whether the implementation is actually doing what it is supposed to do.``- Check if there is redundant code or unnecessary steps in the implementation. Replace them with``effective implementation.``- Try to avoid the implementation being too similar to the previous agent.``And then, you need to improve or revise the implementation, or implement the new proposed architecture``based on the reflection.``Your response should be organized as follows:``"reflection": Provide your thoughts on the interestingness of the architecture, identify any mistakes in the``implementation, and suggest improvements.``"thought": Revise your previous proposal or propose a new architecture if necessary, using the same``format as the example response.``"name": Provide a name for the revised or new architecture. (Don’t put words like "new" or "improved"``in the name.)``"code": Provide the corrected code or an improved implementation. Make sure you actually implement``your fix and improvement in this code.

自我反思第二轮的提示

Using the tips in “## WRONG Implementation examples” section, further revise the code.``Your response should be organized as follows:``Include your updated reflections in the “reflection”. Repeat the previous “thought” and “name”. Update``the corrected version of the code in the “code” section.

当在执行生成的代码期间遇到错误时,会进行反思并重新运行代码。如果错误持续存在,这个过程会重复进行,最多五次。以下是用于自我反思任何运行时错误的提示:

运行时错误发生时的自我反思提示

Error during evaluation:``[Runtime errors]``Carefully consider where you went wrong in your latest implementation. Using insights from previous``attempts, try to debug the current code to implement the same thought. Repeat your previous thought in``“thought”, and put your thinking for debugging in “debug_thought”.
https://arxiv.org/pdf/2408.08435``Automated Design of Agentic Systems``https://github.com/ShengranHu/ADAS

如何学习大模型 AI ?

由于新岗位的生产效率,要优于被取代岗位的生产效率,所以实际上整个社会的生产效率是提升的。

但是具体到个人,只能说是:

“最先掌握AI的人,将会比较晚掌握AI的人有竞争优势”。

这句话,放在计算机、互联网、移动互联网的开局时期,都是一样的道理。

我在一线互联网企业工作十余年里,指导过不少同行后辈。帮助很多人得到了学习和成长。

我意识到有很多经验和知识值得分享给大家,也可以通过我们的能力和经验解答大家在人工智能学习中的很多困惑,所以在工作繁忙的情况下还是坚持各种整理和分享。但苦于知识传播途径有限,很多互联网行业朋友无法获得正确的资料得到学习提升,故此将并将重要的AI大模型资料包括AI大模型入门学习思维导图、精品AI大模型学习书籍手册、视频教程、实战学习等录播视频免费分享出来。

在这里插入图片描述

第一阶段(10天):初阶应用

该阶段让大家对大模型 AI有一个最前沿的认识,对大模型 AI 的理解超过 95% 的人,可以在相关讨论时发表高级、不跟风、又接地气的见解,别人只会和 AI 聊天,而你能调教 AI,并能用代码将大模型和业务衔接。

  • 大模型 AI 能干什么?
  • 大模型是怎样获得「智能」的?
  • 用好 AI 的核心心法
  • 大模型应用业务架构
  • 大模型应用技术架构
  • 代码示例:向 GPT-3.5 灌入新知识
  • 提示工程的意义和核心思想
  • Prompt 典型构成
  • 指令调优方法论
  • 思维链和思维树
  • Prompt 攻击和防范

第二阶段(30天):高阶应用

该阶段我们正式进入大模型 AI 进阶实战学习,学会构造私有知识库,扩展 AI 的能力。快速开发一个完整的基于 agent 对话机器人。掌握功能最强的大模型开发框架,抓住最新的技术进展,适合 Python 和 JavaScript 程序员。

  • 为什么要做 RAG
  • 搭建一个简单的 ChatPDF
  • 检索的基础概念
  • 什么是向量表示(Embeddings)
  • 向量数据库与向量检索
  • 基于向量检索的 RAG
  • 搭建 RAG 系统的扩展知识
  • 混合检索与 RAG-Fusion 简介
  • 向量模型本地部署

第三阶段(30天):模型训练

恭喜你,如果学到这里,你基本可以找到一份大模型 AI相关的工作,自己也能训练 GPT 了!通过微调,训练自己的垂直大模型,能独立训练开源多模态大模型,掌握更多技术方案。

到此为止,大概2个月的时间。你已经成为了一名“AI小子”。那么你还想往下探索吗?

  • 为什么要做 RAG
  • 什么是模型
  • 什么是模型训练
  • 求解器 & 损失函数简介
  • 小实验2:手写一个简单的神经网络并训练它
  • 什么是训练/预训练/微调/轻量化微调
  • Transformer结构简介
  • 轻量化微调
  • 实验数据集的构建

第四阶段(20天):商业闭环

对全球大模型从性能、吞吐量、成本等方面有一定的认知,可以在云端和本地等多种环境下部署大模型,找到适合自己的项目/创业方向,做一名被 AI 武装的产品经理。

  • 硬件选型
  • 带你了解全球大模型
  • 使用国产大模型服务
  • 搭建 OpenAI 代理
  • 热身:基于阿里云 PAI 部署 Stable Diffusion
  • 在本地计算机运行大模型
  • 大模型的私有化部署
  • 基于 vLLM 部署大模型
  • 案例:如何优雅地在阿里云私有部署开源大模型
  • 部署一套开源 LLM 项目
  • 内容安全
  • 互联网信息服务算法备案

学习是一个过程,只要学习就会有挑战。天道酬勤,你越努力,就会成为越优秀的自己。

如果你能在15天内完成所有的任务,那你堪称天才。然而,如果你能完成 60-70% 的内容,你就已经开始具备成为一名大模型 AI 的正确特征了。

这份完整版的大模型 AI 学习资料已经上传CSDN,朋友们如果需要可以微信扫描下方CSDN官方认证二维码免费领取【保证100%免费

在这里插入图片描述

  • 23
    点赞
  • 14
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值