Skip to main content
medRxiv
  • Home
  • About
  • Submit
  • ALERTS / RSS
Advanced Search

Open-Source Offline-Deployable Retrieval-Augmented Large Language Model for Assisting Pancreatic Cancer Staging

View ORCID ProfileHisashi Johno, Akitomo Amakawa, Atsushi Komaba, Ryota Tozuka, Yuki Johno, Junichi Sato, Kentaro Yoshimura, Kazunori Nakamoto, Shintaro Ichikawa
doi: https://doi.org/10.64898/2025.12.26.25343050
Hisashi Johno
1Department of Diagnostic Radiology, Faculty of Medicine, University of Yamanashi, Yamanashi, Japan
MD, PhD
  • Find this author on Google Scholar
  • Find this author on PubMed
  • Search for this author on this site
  • ORCID record for Hisashi Johno
  • For correspondence: johnoh{at}yamanashi.ac.jp
Akitomo Amakawa
1Department of Diagnostic Radiology, Faculty of Medicine, University of Yamanashi, Yamanashi, Japan
  • Find this author on Google Scholar
  • Find this author on PubMed
  • Search for this author on this site
Atsushi Komaba
1Department of Diagnostic Radiology, Faculty of Medicine, University of Yamanashi, Yamanashi, Japan
  • Find this author on Google Scholar
  • Find this author on PubMed
  • Search for this author on this site
Ryota Tozuka
2Department of Therapeutic Radiology, Faculty of Medicine, University of Yamanashi, Yamanashi, Japan
3Department of Radiation Oncology, Tohoku University Graduate School of Medicine, Sendai, Japan
MS
  • Find this author on Google Scholar
  • Find this author on PubMed
  • Search for this author on this site
Yuki Johno
4Department of Internal Medicine, Kyonan Medical Center Fujikawa Hospital, Yamanashi, Japan
MD, PhD
  • Find this author on Google Scholar
  • Find this author on PubMed
  • Search for this author on this site
Junichi Sato
1Department of Diagnostic Radiology, Faculty of Medicine, University of Yamanashi, Yamanashi, Japan
MD
  • Find this author on Google Scholar
  • Find this author on PubMed
  • Search for this author on this site
Kentaro Yoshimura
5Division of Molecular Biology, Center for Medical Education and Sciences, Faculty of Medicine, University of Yamanashi, Yamanashi, Japan
PhD
  • Find this author on Google Scholar
  • Find this author on PubMed
  • Search for this author on this site
Kazunori Nakamoto
6Division of Mathematics, Center for Medical Education and Sciences, Faculty of Medicine, University of Yamanashi, Yamanashi, Japan
DSc
  • Find this author on Google Scholar
  • Find this author on PubMed
  • Search for this author on this site
Shintaro Ichikawa
1Department of Diagnostic Radiology, Faculty of Medicine, University of Yamanashi, Yamanashi, Japan
MD, PhD
  • Find this author on Google Scholar
  • Find this author on PubMed
  • Search for this author on this site
  • Abstract
  • Full Text
  • Info/History
  • Metrics
  • Supplementary material
  • Data/Code
  • Preview PDF
Loading

Abstract

Purpose Large language models (LLMs) are increasingly applied in radiology, but key challenges remain, including data leakage from cloud-based systems, false outputs, and limited reasoning transparency. This study aimed to develop an open-source, offline-deployable retrieval-augmented LLM (RA-LLM) system in which local execution prevents data leakage and retrieval-augmented generation (RAG) improves output accuracy and transparency using reliable external knowledge (REK), demonstrated in pancreatic cancer staging.

Materials and Methods Llama-3.2 11B and Gemma-3 27B were used as local LLMs, and GPT-4o mini served as a cloud-based comparator. The Japanese pancreatic cancer guideline served as REK. Relevant REK excerpts were retrieved to generate retrieval-augmented responses. System performance, including classification accuracy, retrieval metrics, and execution time, was evaluated on 100 simulated pancreatic cancer CT cases, with non-RAG LLMs as baselines. McNemar tests were applied to TNM staging and resectability classification.

Results RAG improved TNM staging accuracy for all LLMs (GPT-4o mini 61%→90%, p<0.001; Llama-3.2 11B 53%→72%, p<0.001; Gemma-3 27B 59%→87%, p<0.001) and mildly improved resectability classification (72%→84%, p=0.012; 58%→73%, p=0.006; 77%→86%, p=0.093), with Gemma-3 27B showing performance comparable to GPT-4o mini. Retrieval performance was high (context recall = 1; context precision = 0.5–1), and local models ran at speeds comparable to the cloud-based GPT-4o mini.

Conclusion We developed an offline-deployable RA-LLM system for pancreatic cancer staging and publicly released its full source code. RA-LLMs outperformed baseline LLMs, and the offline-capable Gemma-3 27B performed comparably to the widely used cloud-based GPT-4o mini.

Competing Interest Statement

The authors have declared no competing interest.

Funding Statement

This study was partially supported by JSPS KAKENHI Grant Number JP24K06686. Our department also received a scholarship grant from Guerbet Japan K.K.

Author Declarations

I confirm all relevant ethical guidelines have been followed, and any necessary IRB and/or ethics committee approvals have been obtained.

Yes

I confirm that all necessary patient/participant consent has been obtained and the appropriate institutional forms have been archived, and that any patient/participant/sample identifiers included were not known to anyone (e.g., hospital staff, patients or participants themselves) outside the research group so cannot be used to identify individuals.

Yes

I understand that all clinical trials and any other prospective interventional studies must be registered with an ICMJE-approved registry, such as ClinicalTrials.gov. I confirm that any such study reported in the manuscript has been registered and the trial registration ID is provided (note: if posting a prospective study registered retrospectively, please provide a statement in the trial ID field explaining why the study was not registered in advance).

Yes

I have followed all appropriate research reporting guidelines, such as any relevant EQUATOR Network research reporting checklist(s) and other pertinent material, if applicable.

Yes

Footnotes

  • Institution from which the work originated: Department of Diagnostic Radiology, University of Yamanashi, 1110 Shimokato, Chuo, Yamanashi 409-3898, Japan

  • A submission-related statement was removed. No changes were made to the scientific content.

Data sharing statement

Data analyzed during this study are fully available at: https://github.com/mohehe1234/local-rag/tree/v1.0.0-with-results

Copyright 
The copyright holder for this preprint is the author/funder, who has granted medRxiv a license to display the preprint in perpetuity. All rights reserved. No reuse allowed without permission.
Back to top
PreviousNext
Posted February 09, 2026.
Download PDF

Supplementary Material

Data/Code
Email

Thank you for your interest in spreading the word about medRxiv.

NOTE: Your email address is requested solely to identify you as the sender of this article.

Enter multiple addresses on separate lines or separate them with commas.
Open-Source Offline-Deployable Retrieval-Augmented Large Language Model for Assisting Pancreatic Cancer Staging
(Your Name) has forwarded a page to you from medRxiv
(Your Name) thought you would like to see this page from the medRxiv website.
CAPTCHA
This question is for testing whether or not you are a human visitor and to prevent automated spam submissions.
Share
Open-Source Offline-Deployable Retrieval-Augmented Large Language Model for Assisting Pancreatic Cancer Staging
Hisashi Johno, Akitomo Amakawa, Atsushi Komaba, Ryota Tozuka, Yuki Johno, Junichi Sato, Kentaro Yoshimura, Kazunori Nakamoto, Shintaro Ichikawa
medRxiv 2025.12.26.25343050; doi: https://doi.org/10.64898/2025.12.26.25343050
Twitter logo Facebook logo LinkedIn logo Mendeley logo
Citation Tools
Open-Source Offline-Deployable Retrieval-Augmented Large Language Model for Assisting Pancreatic Cancer Staging
Hisashi Johno, Akitomo Amakawa, Atsushi Komaba, Ryota Tozuka, Yuki Johno, Junichi Sato, Kentaro Yoshimura, Kazunori Nakamoto, Shintaro Ichikawa
medRxiv 2025.12.26.25343050; doi: https://doi.org/10.64898/2025.12.26.25343050

Citation Manager Formats

  • BibTeX
  • Bookends
  • EasyBib
  • EndNote (tagged)
  • EndNote 8 (xml)
  • Medlars
  • Mendeley
  • Papers
  • RefWorks Tagged
  • Ref Manager
  • RIS
  • Zotero
  • Tweet Widget
  • Facebook Like
  • Google Plus One

Subject Area

  • Radiology and Imaging
Subject Areas
All Articles
  • Addiction Medicine (576)
  • Allergy and Immunology (867)
  • Anesthesia (306)
  • Cardiovascular Medicine (4480)
  • Dentistry and Oral Medicine (449)
  • Dermatology (385)
  • Emergency Medicine (614)
  • Endocrinology (including Diabetes Mellitus and Metabolic Disease) (1528)
  • Epidemiology (15276)
  • Forensic Medicine (31)
  • Gastroenterology (1133)
  • Genetic and Genomic Medicine (6644)
  • Geriatric Medicine (671)
  • Health Economics (1006)
  • Health Informatics (4603)
  • Health Policy (1378)
  • Health Systems and Quality Improvement (1623)
  • Hematology (544)
  • HIV/AIDS (1275)
  • Infectious Diseases (except HIV/AIDS) (15960)
  • Intensive Care and Critical Care Medicine (1111)
  • Medical Education (626)
  • Medical Ethics (147)
  • Nephrology (674)
  • Neurology (6693)
  • Nursing (346)
  • Nutrition (1006)
  • Obstetrics and Gynecology (1152)
  • Occupational and Environmental Health (961)
  • Oncology (3369)
  • Ophthalmology (988)
  • Orthopedics (370)
  • Otolaryngology (421)
  • Pain Medicine (437)
  • Palliative Medicine (131)
  • Pathology (668)
  • Pediatrics (1703)
  • Pharmacology and Therapeutics (699)
  • Primary Care Research (717)
  • Psychiatry and Clinical Psychology (5494)
  • Public and Global Health (9285)
  • Radiology and Imaging (2223)
  • Rehabilitation Medicine and Physical Therapy (1375)
  • Respiratory Medicine (1201)
  • Rheumatology (598)
  • Sexual and Reproductive Health (720)
  • Sports Medicine (535)
  • Surgery (720)
  • Toxicology (100)
  • Transplantation (290)
  • Urology (267)