Deep sight: enhancing periprocedural adverse event recording in endoscopy by structuring text documentation with privacy-preserving large language models

iGIE Pub Date : 2024-12-01 DOI:10.1016/j.igie.2024.08.001
Isabella C. Wiest MD, MSc , Dyke Ferber MD , Stefan Wittlinger MSc , Matthias P. Ebert MD , Sebastian Belle MD , Jakob Nikolas Kather MD, MSc
{"title":"Deep sight: enhancing periprocedural adverse event recording in endoscopy by structuring text documentation with privacy-preserving large language models","authors":"Isabella C. Wiest MD, MSc ,&nbsp;Dyke Ferber MD ,&nbsp;Stefan Wittlinger MSc ,&nbsp;Matthias P. Ebert MD ,&nbsp;Sebastian Belle MD ,&nbsp;Jakob Nikolas Kather MD, MSc","doi":"10.1016/j.igie.2024.08.001","DOIUrl":null,"url":null,"abstract":"<div><h3>Background and Aims</h3><div>The assessment of adverse events from endoscopic procedures is essential for successful interventions, ensuring accurate follow-up, adverse event management, and processing for quality control. Despite the critical need for structured documentation, the current practice often relies on free-text recordings, which poses challenges for scalable intervention analysis; however, the introduction of large language models (LLMs) offers a promising solution by enabling the automatic extraction of adverse event details from procedural reports without altering existing documentation practices.</div></div><div><h3>Methods</h3><div>We analyzed 672 endoscopy reports, using OpenAI’s GPT-4 and Llama-2–based models to structure the data in JavaScript Object Notation for efficient analysis. We used an automated LLM pipeline to extract adverse events such as bleeding, perforation, and aspiration. The dataset was divided into a proof-of-concept set (PoC-S) with n = 171 reports, on which we explored prompt engineering to improve the performance of the models. The final analysis was run on an additional external test set of 501 reports.</div></div><div><h3>Results</h3><div>GPT-4 showed high accuracy, with a sensitivity of 97% and specificity of 92% in the PoC-S and 91% and 96%, respectively, in the test set. GPT-4 use in real-world settings is limited by privacy concerns. Conversely, Llama-2–based models, especially the Llama-2 variants fine-tuned for German language, demonstrated comparable performance (PoC-S: sensitivity of 94%; specificity of 92%, in the test set (TS): sensitivity of 89%; specificity of 93%) and offered a viable privacy-compliant alternative. The model effectiveness was further influenced by the method of prompt engineering, with experiments showing that the specificity and sensitivity could vary substantially based on the inclusion of specific prompt features, underscoring the importance of tailored prompt design.</div></div><div><h3>Conclusions</h3><div>Applying LLMs to extract structured medical information, particularly from endoscopy reports, offers an efficient, scalable, and adaptable documentation method that captures adverse events accurately with a low error rate. It facilitates immediate quality reporting and reduces manual documentation efforts.</div></div>","PeriodicalId":100652,"journal":{"name":"iGIE","volume":"3 4","pages":"Pages 447-452.e5"},"PeriodicalIF":0.0000,"publicationDate":"2024-12-01","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":"0","resultStr":null,"platform":"Semanticscholar","paperid":null,"PeriodicalName":"iGIE","FirstCategoryId":"1085","ListUrlMain":"https://www.sciencedirect.com/science/article/pii/S2949708624001067","RegionNum":0,"RegionCategory":null,"ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":null,"EPubDate":"","PubModel":"","JCR":"","JCRName":"","Score":null,"Total":0}
引用次数: 0

Abstract

Background and Aims

The assessment of adverse events from endoscopic procedures is essential for successful interventions, ensuring accurate follow-up, adverse event management, and processing for quality control. Despite the critical need for structured documentation, the current practice often relies on free-text recordings, which poses challenges for scalable intervention analysis; however, the introduction of large language models (LLMs) offers a promising solution by enabling the automatic extraction of adverse event details from procedural reports without altering existing documentation practices.

Methods

We analyzed 672 endoscopy reports, using OpenAI’s GPT-4 and Llama-2–based models to structure the data in JavaScript Object Notation for efficient analysis. We used an automated LLM pipeline to extract adverse events such as bleeding, perforation, and aspiration. The dataset was divided into a proof-of-concept set (PoC-S) with n = 171 reports, on which we explored prompt engineering to improve the performance of the models. The final analysis was run on an additional external test set of 501 reports.

Results

GPT-4 showed high accuracy, with a sensitivity of 97% and specificity of 92% in the PoC-S and 91% and 96%, respectively, in the test set. GPT-4 use in real-world settings is limited by privacy concerns. Conversely, Llama-2–based models, especially the Llama-2 variants fine-tuned for German language, demonstrated comparable performance (PoC-S: sensitivity of 94%; specificity of 92%, in the test set (TS): sensitivity of 89%; specificity of 93%) and offered a viable privacy-compliant alternative. The model effectiveness was further influenced by the method of prompt engineering, with experiments showing that the specificity and sensitivity could vary substantially based on the inclusion of specific prompt features, underscoring the importance of tailored prompt design.

Conclusions

Applying LLMs to extract structured medical information, particularly from endoscopy reports, offers an efficient, scalable, and adaptable documentation method that captures adverse events accurately with a low error rate. It facilitates immediate quality reporting and reduces manual documentation efforts.
查看原文
分享 分享
微信好友 朋友圈 QQ好友 复制链接
本刊更多论文
求助全文
约1分钟内获得全文 去求助
来源期刊
自引率
0.00%
发文量
0
期刊最新文献
Preliminary validation of the virtual bariatric endoscopic simulator Unexpected clipping failure of a full-thickness resection device during endoscopic full-thickness resection Transgastric biliary drainage through a biliodigestive efferent loop using a lumen-apposing metal stent Clinical safety of a novel over-the-scope gastroduodenal full-thickness resection device for the treatment of upper GI tract lesions: a multicenter experience Novel hemostatic adhesive powder to prevent delayed bleeding after endoscopic submucosal dissection in the GI tract: first U.S. multicenter experience
×
引用
GB/T 7714-2015
复制
MLA
复制
APA
复制
导出至
BibTeX EndNote RefMan NoteFirst NoteExpress
×
×
提示
您的信息不完整,为了账户安全,请先补充。
现在去补充
×
提示
您因"违规操作"
具体请查看互助需知
我知道了
×
提示
现在去查看 取消
×
提示
确定
0
微信
客服QQ
Book学术公众号 扫码关注我们
反馈
×
意见反馈
请填写您的意见或建议
请填写您的手机或邮箱
已复制链接
已复制链接
快去分享给好友吧!
我知道了
×
扫码分享
扫码分享
Book学术官方微信
Book学术文献互助
Book学术文献互助群
群 号:481959085
Book学术
文献互助 智能选刊 最新文献 互助须知 联系我们:info@booksci.cn
Book学术提供免费学术资源搜索服务,方便国内外学者检索中英文文献。致力于提供最便捷和优质的服务体验。
Copyright © 2023 Book学术 All rights reserved.
ghs 京公网安备 11010802042870号 京ICP备2023020795号-1