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.
翻译:由大语言模型驱动的自主、目标导向型智能体近年来已成为解决复杂问题的有力工具,无需为特定任务训练成本高昂的微调模型。当前这类智能体的设计与实现具有临时性特征,因为大语言模型智能体可能适用的任务种类繁多,自然意味着不存在普适性的智能体设计方案。本研究旨在通过提出一个最小化生成框架来简化智能体构建流程,从而缓解设计新智能体的困难。我们提出的框架允许用户以高层声明式规范定义期望的智能体行为,该规范用于构建解码监控器,确保大语言模型生成的输出能展现所需行为。这种声明式方法允许用户仅描述行为而无需关注实现或执行细节,从而支持快速设计、实现和实验不同的大语言模型智能体。我们展示了该框架如何用于实现近期的大语言模型智能体(如ReACT),并展示了该方法的灵活性如何用于定义具有更复杂行为的新型智能体——计划-行动-总结-求解(PASS)智能体。最后,我们证明该方法在多个主流推理导向问答基准测试中优于其他智能体。