Study uses RAG and MCP to help AI write and debug ABB robot programs
Researchers propose a workflow in which a language model generates ABB RAPID programs from general instructions, then automatically tests and debugs them in simulation software.
A new study on arXiv, number 2608.21417, proposes using a Language Model—an AI model that generates text and code—to help program ABB industrial robots. The aim is to reduce the time factories spend adapting programs when products, models, or production-line processes change.
The system takes a natural-language task description and generates code in ABB RAPID, ABB’s robot programming language. Crucially, the model does not rely solely on its internal knowledge. It uses two Retrieval-Augmented Generation, or RAG, pipelines that search both verified technical documentation and manufacturing-task templates, helping the code better comply with system-specific requirements.
Another component is a purpose-built MCP Server that connects the language-model client directly to ABB RobotStudio. The system can upload code, run simulations, and return Diagnostic Feedback to the model for iterative corrections. This creates a feedback loop between coding and testing instead of stopping after the model’s first code generation attempt.
The researchers say simulation can uncover Execution failures that Static checks, which inspect code without running it, or Semantic checks, which assess meaning and command consistency, may miss. Reported examples include an unsuitable part-release height and target positions beyond the robot arm’s reach.
The evaluation includes a 30-question information-retrieval benchmark and code-generation tests within a defined scope. However, the available information does not provide detailed success metrics, so it remains unclear how ready the approach is for factory deployment or use across multiple robot types. The paper is still at arXiv v1 and has been accepted for presentation at CIE53 at Khalifa University in Abu Dhabi in October 2026.
The approach shows how MCP could connect AI to engineering tools so code can be tested before it runs on real machinery. For Thailand’s manufacturing sector, this technology could reduce repetitive programming work, but its safety and reliability still need to be proven in real factory environments.