# Can Large Language Models Help Developers with Robotic Finite State Machine Modification?

arXiv: https://arxiv.org/abs/2412.05625 · HTML: https://mlsanity.com/paper/2412.05625/

## Key facts

- Cited by 5 papers in the map (data through 14 Oct 2026).
- First posted on arXiv 7 Dec 2024.

## Built on by (most cited first, 5 of 5)

- [Deriving Character Logic from Storyline as Codified Decision Trees](https://mlsanity.com/paper/2601.10080/) (2026)
- [InterPReT: Interactive Policy Restructuring and Training Enable Effective Imitation Learning from Laypersons](https://mlsanity.com/paper/2602.04213/) (2026)
- [Codified Finite-state Machines for Role-playing](https://mlsanity.com/paper/2602.05905/) (2026)
- [An Agentic Flow for Finite State Machine Extraction using Prompt Chaining](https://mlsanity.com/paper/2507.11222/) (2025)
- [Towards An LLM-Driven Unified Conversion Framework for BT and FSM in Autonomous Intelligent Systems](https://mlsanity.com/paper/2609.29228/) (2026)

## Abstract (arXiv)

Finite state machines (FSMs) are widely used to manage robot behavior logic, particularly in real-world applications that require a high degree of reliability and structure. However, traditional manual FSM design and modification processes can be time-consuming and error-prone. We propose that large language models (LLMs) can assist developers in editing FSM code for real-world robotic use cases. LLMs, with their ability to use context and process natural language, offer a solution for FSM modification with high correctness, allowing developers to update complex control logic through natural language instructions. Our approach leverages few-shot prompting and language-guided code generation to reduce the amount of time it takes to edit an FSM. To validate this approach, we evaluate it on a real-world robotics dataset, demonstrating its effectiveness in practical scenarios.
