- The paper presents a novel framework that automates the translation of user intent into FEM-based topology optimization, significantly reducing expert intervention.
- It integrates LLM-agent orchestration with tools like MCP, Bohrium agent SDK, and JAX-FEM, ensuring precise mesh handling and boundary condition verification.
- Benchmark tests across varied geometries and load cases demonstrate high success rates and robust PDE-constrained optimization performance.
TO-Master: An LLM-Agent Framework for Automated Topology Optimization
Introduction and Motivation
TO-Master addresses a core bottleneck in deploying finite-element-based topology optimization (TO) by automating the translation of user intent—including natural language specifications and optional mesh or image-based geometry inputs—into robust TO problem definitions suitable for direct solver execution. While advances in differentiable programming and AD-based FEA toolchains have streamlined sensitivity computation for PDE-constrained TO, the pre-solver pipeline involving geometry, meshing, boundary condition (BC) specification, and constraint mapping remains labor-intensive and error-prone, often requiring expert engineering intervention. By integrating LLM-agent orchestration with deterministic computational mechanics software and interactive user input, TO-Master proposes a tool-oriented, conversational workflow that lowers the TO modeling barrier and significantly accelerates transition from conceptual design brief to optimized topology.
Figure 1: End-to-end workflow of the TO-Master framework, from natural language specification and optional mesh/geometry/image input to FEM-based topology optimization and result reporting.
System Architecture and Workflow
TO-Master is constructed around an LLM-agent that mediates between user requests (expressed textually and optionally via data files or images) and a deterministic, multi-tool topology optimization backend. User requests are interpreted and decomposed into actionable operations, leveraging a stack that includes tool specification via the Model Context Protocol (MCP), the Bohrium agent SDK for execution and artifact management, and a JAX-FEM-based optimization core for automatic differentiation and numerical solution. The system reconstructs or verifies domain meshes, checks and visualizes BCs, orchestrates passive domain specification, and iteratively solves the PDE-constrained optimization (including compliance, stress-constrained, multi-load, and thermal formulations), always mediating via explicit user confirmation at critical modeling stages.
Figure 2: Overview of the tool-orchestrated LLM-agent architecture used by TO-Master for robust model construction, verification, and workflow automation.
Figure 3: Structure of TO-Master system instruction—role specification, tool-usage constraints, internal reasoning checklist, and few-shot mappings define agent behavior and robustness to prompt ambiguity.
The implemented problem classes in TO-Master include standard density-based structural compliance minimization via the SIMP approach, explicit support for density filtering, Heaviside projection, passive domains, multi-load-case compliance, stress constraints with smoothed maximal von Mises stress aggregation, and steady-state thermal conduction minimization. The system relies on discretize-then-optimize formulations with FEA state solution, adjoint-based sensitivity computation using custom autodifferentiation rules, and design variable updating via the Method of Moving Asymptotes (MMA). Meshes are handled as either regular/structured (generated) or arbitrary/unstructured (uploaded or image-derived, including OBJ import and voxelization). The toolchain is strictly modular: mesh preparation, boundary checking and visualization, and problem-specific optimization are each encapsulated as separate callable operations, all with public artifact output.
Prompt Engineering, User Interaction, and Instruction Ablation
Robustness under vague or ambiguous prompts is achieved by a highly structured system instruction. This includes role anchoring, explicit tool-usage policies (including strict user confirmation before heavy solver calls), an internal chain-of-thought (CoT) checklist for agent reasoning, and a substantial library of few-shot prompt-to-tool mapping exemplars. Ablation experiments confirm that these elements are synergistic: removal of CoT, few-shot, or tool-usage constraints independently degrades robustness in ambiguous problem settings, with tool constraints showing the strongest effect.
Benchmark and Engineering Demonstrations
TO-Master is evaluated on canonical benchmarks (2D/3D cantilever/bridge, thermal conduction, multi-load tower, stress-constrained beams), arbitrary geometries (jet engine/airplane brackets), and image-based geometry inputs. In all cases, the agent interprets natural language requests and auxiliary files or images, reconstructs all numerical problem definitions, and delivers optimized distributions and convergence artifacts without user-authored solver code. The optimized topologies exhibit close conformity to reference solutions, with physically meaningful load paths, correct volume and stress constraint handling, and plausible structure for reconstructed meshes.
Figure 4: Boundary condition settings for canonical TO benchmarks covering a range of domain, support, and loading geometries.
Figure 5: Optimized densities/displacements for structural, thermal, and multi-load cases, all constructed from natural language problem statements.
Figure 6: Stress-constrained and arbitrary-geometry optimization results, demonstrating complex mechanical constraint handling and mesh source flexibility.
Figure 7: Iteration histories for stress-constrained cases, showing convergence of objective, stress, and volume fraction constraints.
Instruction Ablation: Quantitative and Qualitative Analysis
A comprehensive ablation on six standard benchmark cases quantifies success rates under various instruction degradations, using fuzzy natural language prompts with 5 independent runs each for four instruction configurations. The full instruction achieves a 96.7% success rate, with failures largely traceable to passive domain ambiguity. Removal of tool-usage constraints drops success to 40%, while removal of few-shot or CoT components yields 73.3% and 83.3%, respectively. Failure analysis demonstrates that most modeling errors are due to BC/passive domain misinterpretation rather than solver failures. The boundary checking phase effectively halts the workflow prior to expensive optimization in most erroneous cases.
Figure 8: Success rates for various ablation configurations, confirming the critical role of structured prompt design and tool-usage constraints.
Figure 9: Representative failure cases under prompt ambiguity, illustrating the impact of passive-domain and boundary misinterpretation.
Implications, Limitations, and Future Outlook
The TO-Master study provides both an integrative demonstration of agentic AI for complex scientific computing tasks and a systematic prompt engineering analysis highlighting the brittleness of current LLM agents to prompt ambiguity, especially in workflows requiring precise geometrical and physical mappings. Strong numerical results verify the agent-tool decomposition, with strict user-in-the-loop confirmation proving essential for reliability. The biggest practical gains are in settings with variable geometry sources and complex BC/prescription requirements—settings traditionally inaccessible to non-experts.
However, further generalization to broader industrial benchmarks, additional physics (e.g., multiphysics, nonlinear constraints), and more extensive human-agent interaction for iterative model refinement remains open. There is clear potential for LLM-agent frameworks to support not just initial setup but active co-design and validation cycles, provided that tool orchestration protocols are formalized and robustness to under-specified or malformed intent is maintained.
Conclusion
TO-Master presents a reproducible, extensible agent-tool architecture for automated topology optimization, demonstrated across a broad spectrum of physical problem classes and input modalities. Its analysis substantiates the necessity for tool-constrained, few-shot-augmented, and chain-of-thought-guided LLM agents for high-stakes scientific workflow automation, and sets clear standards for future AI-augmented engineering design infrastructure (2607.01812).