mlsanityData to 7 Oct 2026

Few-Shot VLM-Based G-Code and HMI Verification in CNC Machining

arXiv 2512.11296 ↗First posted 12 Dec 2025cs.CV cs.AI cs.HCcited by 0

Not on the map. Why?

Abstract (arXiv)

Manual generation of G-code is important for learning the operation of CNC machines. Prior work in G-code verification uses Large-Language Models (LLMs), which primarily examine errors in the written programming. However, CNC machining requires extensive use and knowledge of the Human-Machine Interface (HMI), which displays machine status and errors. LLMs currently lack the capability to leverage knowledge of HMIs due to their inability to access the vision modality. This paper proposes a few-shot VLM-based verification approach that simultaneously evaluates the G-code and the HMI display for errors and safety status. The input dataset includes paired G-code text and associated HMI screenshots from a 15-slant-PRO lathe, including both correct and error-prone cases. To enable few-shot learning, the VLM is provided with a structured JSON schema based on prior heuristic knowledge. After determining the prompts, instances of G-code and HMI that either contain errors or are error free are used as few-shot examples to guide the VLM. The model was then evaluated in comparison to a zero-shot VLM through multiple scenarios of incorrect G-code and HMI errors with respect to per-slot accuracy. The VLM showed that few-shot prompting led to overall enhancement of detecting HMI errors and discrepancies with the G-code for more comprehensive debugging. Therefore, the proposed framework was demonstrated to be suitable for verification of manually generated G-code that is typically developed in CNC training.

Key facts. No citing papers in the map yet (data through 7 Oct 2026). Builds on 4 of its 27 references that are in the map. First posted on arXiv 12 Dec 2025.

Builds on

4 of 27 references.

References · 4

  1. 2024VMAD: Visual-enhanced Multimodal Large Language Model for Zero-Shot Anomaly Detectioncited by 13
  2. 2023Towards Foundational AI Models for Additive Manufacturing: Language Models for G-Code Debugging, Manipulation, and Comprehensioncited by 9
  3. 2025GLLM: Self-Corrective G-Code Generation using Large Language Models with User Feedbackcited by 3
  4. 2025Formalizing Linear Motion G-code for Invariant Checking and Differential Testing of Fabrication Toolscited by 1

Built on by

Not cited yet.

Similar, not cited

Close in wording, no citation either way

  1. 2025Are Large Pre-trained Vision Language Models Effective Construction Safety Inspectors?
  2. 2025Human Centric General Physical Intelligence for Agile Manufacturing Automation
  3. 2026LLM-based Visual Code Completion for Aerospace Geometric Design
  4. 2026FailBench: How Reliable are VLMs at Judging Robot Task Success?
  5. 2024VLM See, Robot Do: Human Demo Video to Robot Action Plan via Vision Language Model
  6. 2026Zero-Shot Learning in Industrial Scenarios: New Large-Scale Benchmark, Challenges and Baseline
  7. 2024Prompt Selection and Augmentation for Few Examples Code Generation in Large Language Model and its Application in Robotics Control
  8. 2024Vision Language Model for Interpretable and Fine-grained Detection of Safety Compliance in Diverse Workplaces