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

IF 6.2 2区 工程技术 Q1 CONSTRUCTION & BUILDING TECHNOLOGY
Saeyon Kim, Donghwi Kim, Heejung Youn
{"title":"Automating vertical bearing capacity calculations using python: Prompt engineering of ChatGPT on API RP 2A","authors":"Saeyon Kim,&nbsp;Donghwi Kim,&nbsp;Heejung Youn","doi":"10.1016/j.dibe.2025.100628","DOIUrl":null,"url":null,"abstract":"<div><div>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.</div></div>","PeriodicalId":34137,"journal":{"name":"Developments in the Built Environment","volume":"21 ","pages":"Article 100628"},"PeriodicalIF":6.2000,"publicationDate":"2025-02-21","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":"0","resultStr":null,"platform":"Semanticscholar","paperid":null,"PeriodicalName":"Developments in the Built Environment","FirstCategoryId":"5","ListUrlMain":"https://www.sciencedirect.com/science/article/pii/S2666165925000286","RegionNum":2,"RegionCategory":"工程技术","ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":null,"EPubDate":"","PubModel":"","JCR":"Q1","JCRName":"CONSTRUCTION & BUILDING TECHNOLOGY","Score":null,"Total":0}
引用次数: 0

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.
使用python自动计算垂直承载力:基于API RP 2A的ChatGPT提示工程
本研究探索ChatGPT的应用,通过提示工程,使模型能够处理设计标准文档,并生成计算桩竖向承载力的计算机代码。为ChatGPT的提示工程提出了一个框架,根据API RP 2A计算竖向承载力,并生成符合该标准的Python代码。该研究分为三个关键步骤:提供岩土数据,精炼提示以指导ChatGPT处理承载力计算的API方法,并生成Python代码以实现计算自动化。通过迭代的提示改进,模型的准确性得到了提高,从而使Python代码产生符合API RP 2A设计标准的可靠输出。相反,当ChatGPT直接执行计算而不生成代码时,结果不太可靠,强调了ChatGPT驱动的代码生成对于实现准确和一致的结果的价值。
本文章由计算机程序翻译,如有差异,请以英文原文为准。
求助全文
约1分钟内获得全文 求助全文
来源期刊
CiteScore
7.40
自引率
1.20%
发文量
31
审稿时长
22 days
期刊介绍: Developments in the Built Environment (DIBE) is a recently established peer-reviewed gold open access journal, ensuring that all accepted articles are permanently and freely accessible. Focused on civil engineering and the built environment, DIBE publishes original papers and short communications. Encompassing topics such as construction materials and building sustainability, the journal adopts a holistic approach with the aim of benefiting the community.
×
引用
GB/T 7714-2015
复制
MLA
复制
APA
复制
导出至
BibTeX EndNote RefMan NoteFirst NoteExpress
×
提示
您的信息不完整,为了账户安全,请先补充。
现在去补充
×
提示
您因"违规操作"
具体请查看互助需知
我知道了
×
提示
确定
请完成安全验证×
copy
已复制链接
快去分享给好友吧!
我知道了
右上角分享
点击右上角分享
0
联系我们:info@booksci.cn Book学术提供免费学术资源搜索服务,方便国内外学者检索中英文文献。致力于提供最便捷和优质的服务体验。 Copyright © 2023 布克学术 All rights reserved.
京ICP备2023020795号-1
ghs 京公网安备 11010802042870号
Book学术文献互助
Book学术文献互助群
群 号:604180095
Book学术官方微信