paper-with-me

홈 › Papers

Formal-LLM: Integrating Formal Language and Natural Language for Controllable LLM-based Agents

2024-02-01 · Zelong Li, Wenyue Hua, Hao Wang, He Zhu, Yongfeng Zhang

Recent advancements on Large Language Models (LLMs) enable AI Agents to automatically generate and execute multi-step plans to solve complex tasks. However, since LLM's content generation process is hardly controllable, current LLM-based agents frequently generate invalid or non-executable plans, which jeopardizes the performance of the generated plans and corrupts users' trust in LLM-based agents. In response, this paper proposes a novel "Formal-LLM" framework for LLM-based agents by integrating the expressiveness of natural language and the precision of formal language. Specifically, the framework allows agent developers to express their requirements or constraints for the planning process as an automaton. A stack-based LLM plan generation process is then conducted under the supervision of the automaton to ensure that the generated plan satisfies the constraints, making the planning process controllable. We conduct experiments on both benchmark tasks and practical real-life tasks, and our framework achieves over 50% overall performance increase, which validates the feasibility and effectiveness of employing Formal-LLM to guide the plan generation of agents, preventing the agents from generating invalid and unsuccessful plans. Further, more controllable LLM-based agents can facilitate the broader utilization of LLM in application scenarios where high validity of planning is essential. The source code of this work is available at https://github.com/agiresearch/Formal-LLM.

📄 PDF Abstract BibTeX arXiv:2402.00798

Code (1)

agiresearch/formal-llm 공식 구현 pytorch

Similar Papers 제목 키워드 기반

Natural Language Translation of Formal Proofs through Informalization of Proof Steps and Recursive Summarization along Proof Structure

2025-09-10 · Seiji Hattori, Takuya Matsuzaki, Makoto Fujiwara arxiv

This paper proposes a natural language translation method for machine-verifiable formal proofs that leverages the informalization (verbalization of formal language proof steps) and summarization capabilities of LLMs. For…

Formal Evidence Generation for Assurance Cases for Robotic Software Models

2026-02-03 · Fang Yan, Simon Foster, Ana Cavalcanti, Ibrahim Habli 외 arxiv

Robotics and Autonomous Systems are increasingly deployed in safety-critical domains, so that demonstrating their safety is essential. Assurance Cases (ACs) provide structured arguments supported by evidence, but generat…

NILE: Formalizing Natural-Language Descriptions of Formal Languages

2026-02-23 · Tristan Kneisel, Marko Schmellenkamp, Fabian Vehlken, Thomas Zeume arxiv

This paper explores how natural-language descriptions of formal languages can be compared to their formal representations and how semantic differences can be explained. This is motivated from educational scenarios where …

Coherency through formalisations of Structured Natural Language, A case study on FRETish

2026-05-11 · Joost J. Joosten, Marina López Chamosa, Sofía Santiago Fernández arxiv

Formalisation is the process of writing system requirements in a formal language. These requirements mostly originate in Natural Language. In the field of Formal Methods, formalisation is often identified as one of the m…

FMC: Formalization of Natural Language Mathematical Competition Problems

2025-07-15 · Jiaxuan Xie, Chengwu Liu, Ye Yuan, Siqi Li 외 arxiv

Efficient and accurate autoformalization methods, which leverage large-scale datasets of extensive natural language mathematical problems to construct formal language datasets, are key to advancing formal mathematical re…

Mathematical ReasoningFew-Shot Learning