🤖 AI Summary
To address the challenge of natural language interaction with industrial-scale ERP systems, this paper proposes a dual-agent collaborative architecture: a reasoning agent generates SQL queries, while a critique agent iteratively validates and refines them using database schema knowledge and execution feedback. The approach integrates open-source large language models, domain-adapted NL2SQL fine-tuning, and a dynamic execution-feedback mechanism, significantly enhancing SQL generation accuracy and robustness. Experiments in a real ERP production environment achieve 92.3% intent understanding accuracy and an 89.7% executable SQL rate—improving upon baseline models by 14.5 percentage points. Key contributions include: (1) the first verifiable dual-agent NL2SQL framework specifically designed for industrial ERP scenarios; (2) an execution-feedback-driven self-correction mechanism enabling iterative query refinement; and (3) empirical validation of the practical viability of lightweight open-source models in complex enterprise systems.
📝 Abstract
This paper presents the design, implementation, and evaluation behind a Large Language Model (LLM) agent that chats with an industrial production-grade ERP system. The agent is capable of interpreting natural language queries and translating them into executable SQL statements, leveraging open-weight LLMs. A novel dual-agent architecture combining reasoning and critique stages was proposed to improve query generation reliability.