The surge in popularity of Large Language Models (LLMs) has opened doors for new approaches to the creation of interactive agents. However, managing the temporal behavior of such agents over the course of an interaction remains challenging. The stateful, long-term horizon and quantitative reasoning required for coherent agent behavior does not fit well into the LLM paradigm. We propose a combination of formal logic-based program synthesis and LLM content generation to create generative agents that adhere to temporal constraints. Our approach uses Temporal Stream Logic (TSL) to generate an automaton that enforces a temporal structure on an agent and leaves the details of each action for a moment in time to an LLM. By using TSL, we are able to augment the generative agent where users have a higher level of guarantees on behavior, better interpretability of the system, and more ability to build agents in a modular way. We evaluate our approach on different tasks involved in creating a coherent interactive agent specialized for various application domains. We found that over all of the tasks, our approach using TSL achieves at least 96% adherence, whereas the pure LLM-based approach demonstrates as low as 14.67% adherence.
翻译:大型语言模型(LLM)的普及为交互式智能体的构建开辟了新途径。然而,在交互过程中管理此类智能体的时间行为仍具挑战性。实现连贯智能体行为所需的有状态、长期时间跨度及定量推理能力,与LLM范式并不契合。本文提出将基于形式逻辑的程序综合与LLM内容生成相结合,以创建遵守时间约束的生成式智能体。本方法采用时间流逻辑(TSL)生成自动机,为智能体施加时间结构约束,同时将每个时间节点的行为细节交由LLM处理。通过使用TSL,我们得以增强生成式智能体,使用户在行为保障级别、系统可解释性及模块化构建能力方面获得提升。我们在面向不同应用领域的连贯交互式智能体创建任务上评估了本方法。实验表明,在所有测试任务中,基于TSL的方法至少达到96%的约束遵循率,而纯LLM方法的遵循率最低仅为14.67%。