Automating vertical bearing capacity calculations using python: Prompt engineering of ChatGPT on API RP 2A
Résumé fourni par la source
This study explores the application of ChatGPT by applying prompt engineering to enable the model to process a design standard documentation and generate computer code for calculating the vertical bearing capacity of piles. A framework is proposed for the prompt engineering of ChatGPT to compute the vertical bearing capacity according to API RP 2A and to generate Python code that complies with this standard. The research is structured into three key steps: providing geotechnical data, refining prompts to guide ChatGPT in processing the API methods for bearing capacity calculation and generating Python code to automate the calculations. Through iterative prompt refinement, the model's accuracy was improved, resulting in Python code that produced reliable outputs aligned with API RP 2A design criteria. In contrast, when ChatGPT performed the calculations directly without generating code, the results were less reliable, underscoring the value of ChatGPT-driven code generation for achieving accurate and consistent outcomes. • Automating vertical bearing capacity calculations using Python code generated by ChatGPT. • A framework developed for the prompt engineering of ChatGPT on API RP 2A for accurate vertical bearing capacity calculations. • Enhanced accuracy achieved through iterative prompt refinement and code correction. • Direct calculation by ChatGPT led to errors, highlighting the importance of code-based automation that ChatGPT generates.