Summary
The paper presents a framework for declarative design of LLM-based agents. In particular, the user/designer expresses the required behavior of the agent using a Linear Temporal Logic (LTL) specification. The agent is contrained to follow such specifications via constrained decoding of LLM outputs. To evaluate the effectiveness of the framework, ReACT-style agents are constructed using the declarative LTL approach and evaluated on three datasets. The constrained ReACT agents outperform the unconstrained ones. Moreover, the authors also provide example LTL specifications for other types of agents, namely, a Chain-of-Thought agent, a Reflexion agent, and a simple Chatbot agent.
Strengths
1. I think it is an extremely interesting idea to use LTL specifications for constraining the behavior of not only LLM-based agents but also of LLMs in general. While there is a growing body of work on constrained decoding for LLMs, using LTL to express these constraints has not been explored and I believe this is a fruitful direction to explore.
2. The fact that the presented framework can be used to express a number of LLM-based agents (ReACT, CoT, Reflexion, Chatbots) suggests the generality of the approach.
Weaknesses
The primary weakness of the paper is the sparsity and lack of precision regarding the technical details about the framework. I list my concerns below:
1. The transition system based formalization of the agent behavior (Section 3.2) is imprecise. What is the precise notion of a state? Does a state include a prompt string (such as "Thought:") along with the generated string? Does a state always need to start with a special string such as "Thought"? Also, to use LTL, each state needs to be associated with corresponding propositions. Such a mapping between states to propositions is never formally defined.
2. How is the set of next valid states from a current state calculated in general? The problem of determining the next set of valid states seems closely related to runtime monitoring of LTL specifications (see [1]). Building such monitors requires sophisticated techniques, so I find it concerning that there is no discussion about this in the paper.
3. Related to the previous question, is there ever a need to backtrack when enforcing an LTL specification? For instance, can it ever be the case that in a state $s_i$, it may seem there are multiple possible valid next states $s_{j1}, s_{j2}, ..., s_{jN}$ but later in the sequence one realizes that some of these states were not actually not valid and the agent needs to backtrack?
3. How is the LTL specification actually enforced? Consider the example of the ReACT agent. In a typical implementation, a *single* call to an LLM generates a response that includes "Thought", "Action", and "Action Input" states (for instance, see implementation of ReACT [here](https://github.com/ysymyth/ReAct)). But to enforce the LTL specification, one would need to constantly monitor the LLM output, i.e., as each token is produced by the LLM. How is this token-level monitoring implemented? If the framework does not use such token-level monitoring, then what is the precise mechanism used and is such mechanism generalizable to any LTL specification? Section 3.3 does not provide sufficient details.
4. It seems like the framework operates at a level of granularity that is higher than token-level granularity. What is precisely this level of granularity? Why can't existing constrained decoding approaches be used?
5. Although I believe that such techniques based on logically constraining the behavior of LLMs are very promising, the empirical results in the paper do not make a strong case for the same.
6. There is a lot emerging literature on constrained decoding with respect to logical constraints that is not cited. For instance, [2] and [3]
[1] Andreas Bauer, Martin Leucker, and Christian Schallhart. 2011. Runtime Verification for LTL and TLTL. ACM Trans. Softw. Eng. Methodol. 20, 4, Article 14 (September 2011), 64 pages. https://doi.org/10.1145/2000799.2000800
[2] Honghua Zhang, Meihua Dang, Nanyun Peng, and Guy Van Den Broeck. 2023. Tractable control for autoregressive language generation. In Proceedings of the 40th International Conference on Machine Learning (ICML'23), Vol. 202. JMLR.org, Article 1716, 40932–40945.
[3] Luca Beurer-Kellner, Marc Fischer, and Martin Vechev. 2023. Prompting Is Programming: A Query Language for Large Language Models. Proc. ACM Program. Lang. 7, PLDI, Article 186 (June 2023), 24 pages. https://doi.org/10.1145/3591300
Confidence
4: You are confident in your assessment, but not absolutely certain. It is unlikely, but not impossible, that you did not understand some parts of the submission or that you are unfamiliar with some pieces of related work.