Retrieval-augmented generation models for predicting pathological upgrading in endoscopically resected gastric low-grade intraepithelial neoplasia: A dual-center evaluation
World Journal of Gastroenterology · 2027-01-07 · 33 (1)
DOI: 10.3748/wjg.122422 ↗Abstract
BACKGROUND Gastric low-grade intraepithelial neoplasia (LGIN) exhibits highly variable clinical outcomes. The discordance between histological findings from endoscopic forceps biopsy and endoscopic submucosal dissection (ESD) complicates the formulation of appropriate treatment strategies. AIM To evaluate a prediction framework using large language models (LLMs) enhanced with retrieval-augmented generation (RAG) for the pathological upgrading of gastric LGIN. METHODS We retrospectively enrolled 329 patients with 372 gastric LGIN lesions from two tertiary hospitals who underwent ESD following a pre-operative diagnosis of gastric LGIN via biopsy. A RAG knowledge base was constructed based on 28 peer-reviewed articles on LGIN upgrading. Two LLMs (DeepSeek-V3 and Qwen3-235b) were evaluated in a zero-shot setting to generate upgrading probability predictions and reasoning reports for each lesion. Performance was evaluated using the area under the receiver operating characteristic curve (AUC), calibration plots, and decision curve analysis (DCA). The performance of RAG-enhanced LLMs was compared with that of a generalized linear mixed model baseline and two experienced endoscopists. Subgroup analyses were also conducted. RESULTS Pathological upgrading to high-grade intraepithelial neoplasia or early gastric cancer was confirmed in 148 (40%) lesions. The AUCs for the RAG-enhanced DeepSeek-V3 and Qwen3-235b were 0.873 [95% confidence interval (95%CI): 0.828-0.901] and 0.862 (95%CI: 0.818-0.893), respectively, demonstrating performance comparable to that of experienced endoscopists and baseline model (DeLong test, P > 0.05). Based on the maximum Youden index, DeepSeek-V3 achieved a sensitivity of 85.1%, specificity of 80.4%, positive predictive value of 74.1%, and negative predictive value of 89.1% at the optimal threshold of 0.357; Qwen3-235b achieved 84.5%, 77.2%, 71.0%, and 88.3%, respectively, at the threshold of 0.453. DCA demonstrated superior clinical utility across threshold probabilities of 15%-80%. In the subgroup analysis, RAG-enhanced LLMs maintained higher accuracy in lesions measuring 1-2 cm. CONCLUSION This study evaluated a novel RAG-enhanced framework using LLMs for predicting pathological upgrading in gastric LGIN. These models may have the potential to support clinical decision-making for ESD, pending prospective validation.
EUVIMED