AutoSAM: an Agentic Framework for Automating Input File Generation for the SAM Code with Multi-Modal Retrieval-Augmented Generation
Researchers created an AI agent that reads engineering docs and generates nuclear simulation code with near-perfect accuracy.
A research team from Argonne National Laboratory and Texas A&M University has developed AutoSAM, an agentic AI framework that dramatically simplifies nuclear reactor modeling. The system tackles one of nuclear engineering's most tedious tasks: manually creating input files for the System Analysis Module (SAM) thermal-hydraulics code. Traditionally, analysts must painstakingly extract data from disparate engineering documents—design reports, system diagrams, data tables—and translate it into solver-specific syntax, a process that can take days or weeks for complex reactor designs.
AutoSAM combines a large language model agent with a sophisticated multi-modal retrieval-augmented generation (RAG) pipeline. The framework ingests unstructured engineering documents, uses specialized tools to analyze PDFs, images, spreadsheets, and text files, and extracts simulation parameters into an auditable intermediate format before generating validated, solver-compatible input decks. Its vision-based component can interpret system diagrams and extract geometric data with 100% completeness, while text extraction from PDFs achieves about 88% accuracy.
The researchers validated AutoSAM across four increasingly complex case studies: from a simple single-pipe model to the full primary loop of the historic Molten Salt Reactor Experiment. In all cases, the agent produced runnable SAM models that exhibited expected thermal-hydraulic behavior. Crucially, the system explicitly identifies missing data and labels assumed values, maintaining transparency in the automated workflow. This represents a significant shift toward prompt-driven reactor modeling, where engineers describe systems in natural language while AI handles the technical translation.
The framework's practical implications are substantial for nuclear design and safety analysis. By automating the labor-intensive documentation-to-code translation, AutoSAM could accelerate reactor development cycles and reduce human error in critical safety calculations. The approach demonstrates how agentic AI with multi-modal capabilities can tackle complex scientific workflows that previously required extensive domain expertise and manual effort.
- AutoSAM achieved 100% completeness in vision-based geometric extraction from engineering diagrams
- The framework processes PDFs, images, spreadsheets, and text with about 88% text extraction accuracy
- Successfully generated executable models for four reactor systems including the Molten Salt Reactor Experiment
Why It Matters
Automates weeks of manual nuclear engineering work, accelerating reactor design and safety analysis while reducing human error.