SAP2000 API Expert: a custom generative pre-trained transformer (GPT) for converting narrative structural engineering problems to SAP2000 API codes - Djafar-Henni, Nesreddine; Khelaifia, Akram; Djafar-Henni, Mohamed; Guettala, Salah; Djedoui, Nassim (Asian journal of civil engineering. Building and housing, 2025)
The integration of artificial intelligence (AI) into structural engineering has revolutionized design, analysis, and construction processes by automating complex tasks and optimizing decision-making. Among AI-driven tools, ChatGPT has demonstrated significant potential in assisting engineers with structural modeling and analysis. This study introduces SAP2000 API Expert, a custom Generative Pre-Trained Transformer (GPT) based on ChatGPT, for converting narrative structural engineering problems to SAP2000 API Python codes. Unlike conventional methodologies that necessitate users to possess foundational programming or structural engineering competencies, the SAP2000 API Expert provides dual error resolution pathways: a self-debugging approach designed for users with a programming background, or a natural language interface that allows users to describe errors in conversational terms and receive appropriate solutions. Experimental examples, including two benchmarks, were selected to evaluate the GPT’s ability to translate narrative engineering descriptions into executable Python scripts. To validate the accuracy and reliability of the generated scripts, a systematic verification process was conducted by executing the AI-generated codes within SAP2000 and comparing the numerical results with reference solutions from validated technical documentation. The strong agreement between the GPT-generated outputs and benchmark results confirms its computational effectiveness. The innovation is further validated through comparative testing against standard ChatGPT, demonstrating the latter’s inability to generate executable SAP2000 API code, highlighting the significant practical advantages of the domain-specific approach of SAP2000 API Expert. The findings highlight the potential of AI-driven tools in streamlining computational workflows in structural engineering, making design and analysis processes more efficient and accessible. SAP2000 API Expert is accessible for free through this link: https://chatgpt.com/g/g-67b905bf3278819196f4f8b269dfe08c-sap2000-api-ex .