Autonomous, goal-driven agents powered by LLMs have recently emerged as promising tools for solving challenging problems without the need for task-specific finetuned models that can be expensive to procure. Currently, the design and implementation of such agents is ad hoc, as the wide variety of tasks that LLM-based agents may be applied to naturally means there can be no one-size-fits-all approach to agent design. In this work we aim to alleviate the difficulty of designing and implementing new agents by proposing a minimalistic generation framework that simplifies the process of building agents. The framework we introduce allows the user to define desired agent behaviors in a high-level, declarative specification that is then used to construct a decoding monitor which guarantees the LLM will produce an output exhibiting the desired behavior. Our declarative approach, in which the behavior is described without concern for how it should be implemented or enforced, enables rapid design, implementation, and experimentation with different LLM-based agents. We demonstrate how the proposed framework can be used to implement recent LLM-based agents (e.g., ReACT), and show how the flexibility of our approach can be leveraged to define a new agent with more complex behavior, the Plan-Act-Summarize-Solve (PASS) agent. Lastly, we demonstrate that our method outperforms other agents on multiple popular reasoning-centric question-answering benchmarks.
翻译:由大语言模型驱动的自主目标导向智能体近期已成为解决复杂问题的有前景工具,无需为特定任务训练昂贵的高成本微调模型。当前,此类智能体的设计与实现尚处于临时构建阶段——由于LLM智能体可能适用的任务种类繁多,自然不存在放之四海皆准的智能体设计方法。为缓解设计实现新型智能体的困难,本文提出一个极简生成框架,通过简化智能体构建流程来降低开发门槛。该框架允许用户通过高层声明性规约定义期望的智能体行为,进而构建解码监控器,确保LLM输出具备指定行为的生成结果。我们的声明式方法让行为描述无需关注实现或执行细节,从而支持快速设计、实现和实验多种LLM智能体方案。我们展示了该框架如何实现近期提出的LLM智能体(如ReACT),并阐述如何利用该方法灵活性定义具有更复杂行为的新型智能体——计划-行动-摘要-求解(PASS)智能体。最后,在多个主流推理型问答基准测试中,我们的方法展现出优于其他智能体的性能表现。