EndoBot: An LLM Workflow-Driven Agent for Intelligent Gastrointestinal Endoscopy Consultation

Read the full article See related articles

Discuss this preprint

Start a discussion What are Sciety discussions?

Listed in

This article is not in any list yet, why not save it to one of your lists.
Log in to save this article

Abstract

Background Gastrointestinal endoscopy plays an irreplaceable and critical role in the early screening and diagnosis of tumors, and a standardized endoscopic examination procedure is essential for ensuring the quality of the procedure. Patient education regarding gastrointestinal (GI) endoscopy procedures—such as colonoscopy and gastroscopy—requires access to accurate, up-to-date information on preparation, risks, and post-procedure care. While large language models (LLMs) offer potential for automated counseling, their standalone use risks generating outdated or hallucinated recommendations. We aimed to to develop a dialogue agent based on a large-model workflow for patient-oriented consultation in gastrointestinal endoscopy. Methods Leveraging the iThink platform—a proprietary system for developing and deploying intelligent agents using prompt engineering, large-model workflows, and retrieval-based technologies—we developed EndoBot, a specialized Agent for gastrointestinal endoscopy consultation. Based on a general LLMs, we integrated publicly available intestinal endoscopy guidelines and our hospital’s internal expert knowledge base. We systematically collected, cleaned, and structured these materials, processing them via Retrieval-Augmented Generation (RAG) to build a unified vector database. Integrated into the agent’s workflow, this database enables the LLM to retrieve authoritative and context-aware information in real time during user consultations. Results This GI endoscopy-specific Agent demonstrates clinical-grade reliability by tethering LLM outputs to authoritative sources. Future work will integrate electronic health record (EHR) data for personalized advice. Conclusions This study demonstrates that RAG-enhanced Agent significantly improve the accuracy and safety of AI-driven GI endoscopy consultations compared to standalone LLMs. By dynamically linking responses to the latest clinical guidelines and enforcing safety constraints, the system mitigates critical risks such as medication misinformation (e.g., bowel preparation advice) and procedural hallucinations. While performance approaches clinical standards for standardized queries, challenges persist in edge cases and non-Chinese inquiries. Future integration with EHR data and multimodal inputs (e.g., endoscopic images) could further personalize recommendations. Clinician oversight remains essential, but this tool shows promise for scaling patient education while reducing provider workload.

Article activity feed