LLM-ADAM: A Generalizable LLM Agent Framework for Pre-Print Anomaly Detection in Additive Manufacturing

arXiv cs.LG / 5/6/2026

📰 NewsDeveloper Stack & InfrastructureIdeas & Deep AnalysisModels & Research

Key Points

  • The paper introduces LLM-ADAM, an LLM-based framework designed to detect anomalies in additive manufacturing (especially FFF) before printing by screening G-code for harmful or suspect settings.
  • LLM-ADAM separates the problem into three components—Extractor-LLM for mapping G-code to a structured parameter schema, Reference-LLM for aligning printer/material documentation to valid operating ranges, and Judge-LLM for classifying defects using deviation tables and G-code evidence.
  • The framework is presented as generalizable: printer models, materials, and even LLM backbones are treated as interchangeable rather than fixed assumptions.
  • In experiments on 200 FFF G-code samples across two printer families, two materials, and five defect categories (plus non-defective parts), the best configuration achieves 87.5% accuracy versus 59.5% for the strongest single-LLM engineered baseline.
  • The authors conclude that the structured task decomposition drives most of the performance gains, with leading setups identifying defect classes at near “ceiling” levels and remaining errors skewing toward conservative false alarms for non-defective prints.

Abstract

Additive manufacturing (AM) continues to transform modern manufacturing by enabling flexible, on-demand production of complex geometries across diverse industries. Fused filament fabrication (FFF) has extended AM to laboratories, classrooms, and small production environments, but this accessibility shifts process-planning responsibility to users who may lack manufacturing expertise. A syntactically valid slicer profile can still encode thermally or geometrically harmful settings, and subtle G-code edits can alter extrusion, cooling, or adhesion before a print begins. Pre-print G-code screening catches accidental or adversarial machine-program errors before material or machine time is wasted. This paper proposes LLM-ADAM as a generalizable LLM framework for pre-print anomaly detection in AM. The framework decomposes the task into three roles: Extractor-LLM maps a G-code file to a structured process-parameter schema; Reference-LLM converts printer and material documentation into aligned operating ranges; and Judge-LLM interprets a deterministic deviation table and G-code evidence to decide whether a part is non-defective or belongs to an anomaly class. Printers, materials, and LLM backbones are interchangeable test conditions, not fixed assumptions. We evaluate the framework on an N=200 FFF G-code corpus spanning two desktop printer families, two materials, and five classes including non-defective, under-extrusion, over-extrusion, warping, and stringing. The best framework configuration reaches 87.5% accuracy, compared with 59.5% for the strongest engineered single-LLM baseline. The results show that structured decomposition, rather than backbone strength alone, is the dominant source of improvement, with defect classes identified at or near ceiling for leading configurations while residual errors concentrate on conservative false alarms for non-defective samples.

LLM-ADAM: A Generalizable LLM Agent Framework for Pre-Print Anomaly Detection in Additive Manufacturing | AI Navigate