Automating vertical bearing capacity calculations using python: Prompt engineering of ChatGPT on API RP 2A

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.

Authors

Institutions

Publication Details

Journal
Developments in the Built Environment
Published
2025-02-21
DOI
https://doi.org/10.1016/j.dibe.2025.100628
Citations
4
Primary Topic
Software Engineering Research
Type
article
Field-Weighted Citation Impact
12.98

Funders

Controls
|||
ALL TIME
JAN
FEB
MAR
APR
MAY
JUN
JUL
AUG
SEP
OCT
article

Automating vertical bearing capacity calculations using python: Prompt engineering of ChatGPT on API RP 2A

Heejung Youn, S.J. Kim, Dong Jin Kim
4 citations
Developments in the Built Environment
Software Engineering Research
12.98
article

Automating vertical bearing capacity calculations using python: Prompt engineering of ChatGPT on API RP 2A

Heejung Youn, S.J. Kim, Dong Jin Kim
article en
4 citations

Abstract

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.

Developments in the Built EnvironmentVol. 21
Hongik University (KR)
National Research Foundation of Korea
Affordable and clean energy
Openalex Percentile: Top 2%
Software Engineering Research
12.98
AI Navigator

Ask Laika to Summarize, Analyze, and Connect papers live on the map.

Summarize Papers & Methodologies

Extract key findings, datasets, and comparative methods across publications.

Benchmark Rankings & Visual Analytics

Rank top research institutions, authors, funders, topics, and journals by Field-Weighted Citation Impact (FWCI) and paper volume with instant charts.

Connect Distant Disciplines

Bridge topological clusters on the map to find hidden collaborative intersections.