Formally Specifying the High-Level Behavior of LLM-Based Agents
Maxwell Crouse, Ibrahim Abdelaziz, Ramon Astudillo, Kinjal Basu, Soham Dan, Sadhana Kumaravel, Achille Fokoue, Pavan Kapanipathi, Salim Roukos, Luis Lastras
TL;DR
The paper addresses the ad hoc nature of designing LLM-based autonomous agents by introducing a lightweight, declarative framework that specifies high-level behavior as a finite-state machine and enforces it with a post-hoc decoding monitor. It demonstrates how popular agents (e.g., ReACT, ReWOO) can be implemented within this framework and introduces the PASS agent, which blends parallel action execution with periodic summarization to improve performance. Empirical results on HotpotQA, TriviaQA, and GSM8K show PASS achieving strong results on multi-hop QA tasks and highlight the value of the summarization step, with hybrid approaches offering further gains. Overall, the approach enables rapid, verifiable, and scalable design of LLM-based agents for tool-augmented reasoning tasks.
Abstract
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.
