Privacy-PreservingLLM Middleware in LIS: Edge-Computing for Coagulation InterpretationUnder High-Dimensional Noise
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.Abstract
Background: The integration of clinical decision support into primary careLaboratory Information Systems (LIS) is severely hindered by strictprivacy regulations and limited computing infrastructure. We propose aprivacy-preserving, edge-computing Large Language Model (LLM)middleware to interpret pre-analytical coagulation tests, addressingthe clinical constraints of data compliance, hardware poverty, andzero-tolerance for AI hallucinations. Methods: We developed a local Retrieval-Augmented Generation (RAG) architectureusing a 4-bit quantized Qwen2.5-7B model deployed via the Ollamaframework on a commercial 32\,GB RAM terminal without a dedicated GPU.To rigorously validate the system, we generated a 2{,}000-casesynthetic baseline of APTT tests and injected 30% semantic and 15%lexical noise to simulate real-world LIS inputs. Output safety wasstrictly enforced utilising Pydantic V2 schemas and a Tenacity-drivenself-reflection mechanism (maximum 3 retries). Results: The proposed LLM-RAG middleware demonstrated exceptional robustness,maintaining a Guideline Concordance Accuracy (\((ACC_{gc})\)) of 97.00%under high-dimensional noise, whereas the traditional rule-basedbaseline collapsed to 10.00%. The system successfully constrainedhallucinations, recording a Critical Violation Rate (CVR) of only1.50%. Clinical and hardware viability were proven with a throughputof 1.45\,RPS and an average latency of 1.38\,seconds (strictly belowthe 3.0\,s threshold), while achieving a Cohen's Kappa score of 0.88in an independent AI-as-Expert adjudication protocol. Conclusion: This edge-deployed LLM paradigm provides a highly reliable,zero-marginal-cost alternative for LIS modernisation, enabling secureand robust AI integration in resource-constrained medical environments.