GLLM: Self-Corrective G-Code Generation using Large Language Models with User Feedback

Fuente: arXiv
Guardado en:
Detalles Bibliográficos
Autores principales: Abdelaal, Mohamed, Lokadjaja, Samuel, Engert, Gilbert
Formato: Preprint
Publicado: 2025
Materias:
Acceso en línea:
Etiquetas: Agregar Etiqueta
Sin Etiquetas, Sea el primero en etiquetar este registro!
_version_ 1866913669769592832
author Abdelaal, Mohamed
Lokadjaja, Samuel
Engert, Gilbert
author_facet Abdelaal, Mohamed
Lokadjaja, Samuel
Engert, Gilbert
contents This paper introduces GLLM, an innovative tool that leverages Large Language Models (LLMs) to automatically generate G-code from natural language instructions for Computer Numerical Control (CNC) machining. GLLM addresses the challenges of manual G-code writing by bridging the gap between human-readable task descriptions and machine-executable code. The system incorporates a fine-tuned StarCoder-3B model, enhanced with domain-specific training data and a Retrieval-Augmented Generation (RAG) mechanism. GLLM employs advanced prompting strategies and a novel self-corrective code generation approach to ensure both syntactic and semantic correctness of the generated G-code. The architecture includes robust validation mechanisms, including syntax checks, G-code-specific verifications, and functional correctness evaluations using Hausdorff distance. By combining these techniques, GLLM aims to democratize CNC programming, making it more accessible to users without extensive programming experience while maintaining high accuracy and reliability in G-code generation.
format Preprint
id arxiv_https___arxiv_org_abs_2501_17584
institution arXiv
publishDate 2025
record_format arxiv
spellingShingle GLLM: Self-Corrective G-Code Generation using Large Language Models with User Feedback
Abdelaal, Mohamed
Lokadjaja, Samuel
Engert, Gilbert
Software Engineering
Computation and Language
Machine Learning
This paper introduces GLLM, an innovative tool that leverages Large Language Models (LLMs) to automatically generate G-code from natural language instructions for Computer Numerical Control (CNC) machining. GLLM addresses the challenges of manual G-code writing by bridging the gap between human-readable task descriptions and machine-executable code. The system incorporates a fine-tuned StarCoder-3B model, enhanced with domain-specific training data and a Retrieval-Augmented Generation (RAG) mechanism. GLLM employs advanced prompting strategies and a novel self-corrective code generation approach to ensure both syntactic and semantic correctness of the generated G-code. The architecture includes robust validation mechanisms, including syntax checks, G-code-specific verifications, and functional correctness evaluations using Hausdorff distance. By combining these techniques, GLLM aims to democratize CNC programming, making it more accessible to users without extensive programming experience while maintaining high accuracy and reliability in G-code generation.
title GLLM: Self-Corrective G-Code Generation using Large Language Models with User Feedback
topic Software Engineering
Computation and Language
Machine Learning
url https://arxiv.org/abs/2501.17584