<?xml version='1.0' encoding='UTF-8'?><xml><records><record><source-app name="HighWire" version="7.x">Drupal-HighWire</source-app><ref-type name="Journal Article">17</ref-type><contributors><authors><author><style face="normal" font="default" size="100%">Johno, Hisashi</style></author><author><style face="normal" font="default" size="100%">Amakawa, Akitomo</style></author><author><style face="normal" font="default" size="100%">Komaba, Atsushi</style></author><author><style face="normal" font="default" size="100%">Tozuka, Ryota</style></author><author><style face="normal" font="default" size="100%">Johno, Yuki</style></author><author><style face="normal" font="default" size="100%">Sato, Junichi</style></author><author><style face="normal" font="default" size="100%">Yoshimura, Kentaro</style></author><author><style face="normal" font="default" size="100%">Nakamoto, Kazunori</style></author><author><style face="normal" font="default" size="100%">Ichikawa, Shintaro</style></author></authors><secondary-authors></secondary-authors></contributors><titles><title><style face="normal" font="default" size="100%">Open-Source Offline-Deployable Retrieval-Augmented Large Language Model for Assisting Pancreatic Cancer Staging</style></title><secondary-title><style face="normal" font="default" size="100%">medRxiv</style></secondary-title></titles><dates><year><style  face="normal" font="default" size="100%">2026</style></year><pub-dates><date><style  face="normal" font="default" size="100%">2026-01-01 00:00:00</style></date></pub-dates></dates><elocation-id><style  face="normal" font="default" size="100%">2025.12.26.25343050</style></elocation-id><doi><style  face="normal" font="default" size="100%">10.64898/2025.12.26.25343050</style></doi><volume><style face="normal" font="default" size="100%"></style></volume><issue><style face="normal" font="default" size="100%"></style></issue><abstract><style  face="normal" font="default" size="100%">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&lt;0.001; Llama-3.2 11B 53%→72%, p&lt;0.001; Gemma-3 27B 59%→87%, p&lt;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 StatementThe authors have declared no competing interest.Funding StatementThis study was partially supported by JSPS KAKENHI Grant Number JP24K06686. Our department also received a scholarship grant from Guerbet Japan K.K.Author DeclarationsI confirm all relevant ethical guidelines have been followed, and any necessary IRB and/or ethics committee approvals have been obtained.YesI 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.YesI 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).YesI have followed all appropriate research reporting guidelines, such as any relevant EQUATOR Network research reporting checklist(s) and other pertinent material, if applicable.YesData analyzed during this study are fully available at: https://github.com/mohehe1234/local-rag/tree/v1.0.0-with-results</style></abstract></record></records></xml>