TapeAgents:面向智能体开发与优化的整体框架
TapeAgents: a Holistic Framework for Agent Development and Optimization
AI总结:
本研究提出以结构化日志磁带为核心的TapeAgents智能体框架,覆盖开发、调试、评估、调优等全生命周期,可低成本将小模型性能优化至接近GPT-4o水平。
摘要:
我们提出TapeAgents,这是一个围绕智能体会话的细粒度结构化日志磁带构建的智能体框架,该日志磁带同时承担会话可恢复状态的作用。在TapeAgents中,我们利用磁带为大语言模型(LLM)智能体开发生命周期的所有阶段提供支持。智能体通过处理磁带和LLM输出进行推理,生成新的思考与行动步骤并追加到磁带上。随后环境对智能体的动作做出响应,同样将观测步骤追加到磁带上。凭借这种以磁带为中心的设计,TapeAgents能够为AI从业者提供端到端的整体支持。在开发阶段,磁带可支持会话持久化、智能体审计和逐步骤调试。部署后,用户可复用磁带进行评估、微调与提示调优;关键的是,用户可以适配来自其他智能体的磁带,或使用经过修订的历史磁带。在本报告中,我们详细阐释了TapeAgents的设计。我们通过多个具体示例展示了TapeAgents的可能应用场景,包括构建单体智能体和多智能体团队、优化智能体提示词以及微调智能体的LLM。我们展示了工具原型,并报告了一项案例研究:我们使用TapeAgents微调Llama-3.1-8B表单填写助手,使其性能达到GPT-4o的水平,同时成本低几个数量级。最后,我们的对比分析表明,TapeAgents相较于现有框架的优势,源于我们将LLM智能体设计为具备结构化配置的可恢复模块化状态机,它能生成细粒度结构化日志,并可将这些日志转换为训练文本——这一独特的特性组合在以往研究中尚未出现。
英文摘要:
We present TapeAgents, an agent framework built around a granular, structured log tape of the agent session that also plays the role of the session's resumable state. In TapeAgents we leverage tapes to facilitate all stages of the LLM Agent development lifecycle. The agent reasons by processing the tape and the LLM output to produce new thought and action steps and append them to the tape. The environment then reacts to the agent's actions by likewise appending observation steps to the tape. By virtue of this tape-centred design, TapeAgents can provide AI practitioners with holistic end-to-end support. At the development stage, tapes facilitate session persistence, agent auditing, and step-by-step debugging. Post-deployment, one can reuse tapes for evaluation, fine-tuning, and prompt-tuning; crucially, one can adapt tapes from other agents or use revised historical tapes. In this report, we explain the TapeAgents design in detail. We demonstrate possible applications of TapeAgents with several concrete examples of building monolithic agents and multi-agent teams, of optimizing agent prompts and finetuning the agent's LLM. We present tooling prototypes and report a case study where we use TapeAgents to finetune a Llama-3.1-8B form-filling assistant to perform as well as GPT-4o while being orders of magnitude cheaper. Lastly, our comparative analysis shows that TapeAgents's advantages over prior frameworks stem from our novel design of the LLM agent as a resumable, modular state machine with a structured configuration, that generates granular, structured logs and that can transform these logs into training text -- a unique combination of features absent in previous work.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。