Authors:
Kaaviya Varshini, Sameera Banu, Shreenidhi Kovai Sivabalan, Adithi Venkatakrishnan
Addresses:
Department of Computer Science and Engineering in AI, SRM Institute of Science and Technology, Ramapuram, Chennai, Tamil Nadu, India. Department of Artificial Intelligence Engineering, Marzal Labs, London, England, United Kingdom. Department of Information Technology and Management, University of Texas at Dallas, Richardson, Texas, United States of America.
Abstract:
Medical information is one of the biggest gaps in global healthcare. Med RAG, an end-to-end medical chatbot, uses Meta's Llama 2 large language model and a Retrieval-Augmented Generation (RAG) pipeline to answer clinician- and patient-facing health inquiries factually and with traceable sources. A documented failure investigation of a standalone Llama 2 deployment shows that purely parametric generation gives hallucinated results in 34% of evaluated medical inquiries. Researchers use this diagnostic to motivate every Med RAG architecture decision. Hugging Face sentence-transformer embeddings (all-MiniLM-L6-v2), Pinecone cloud vector indexing, LangChain's Retrieval QA chain, C Transformers CPU inference, and a Flask/Bootstrap web application comprise the system. The RAG-augmented system improves relevance by 26% and factual accuracy by 38% over a non-retrieval baseline on a curated test set of 100 medical questions across five clinical categories. On GPU-free consumer devices, inference latency averages 8.3 seconds. This study shows that open-source, locally deployable LLMs with domain-specific vector retrieval can offer therapeutically meaningful responses at $0 marginal API cost with explicit source attribution and privacy-safe local operation. Researchers believe this is the first production-ready RAG architecture evaluation on a balanced, category-stratified test set that describes and remediates Llama 2's hallucinatory failure mode in medical question-answering.
Keywords: Medical Chatbot; Llama and Retrieval-Augmented Generation; LangChain and CTransformers; Healthcare AI; Sentence Transformers; Hallucination Mitigation; RAG Pipeline.
Received on: 08/06/2025, Revised on: 19/07/2025, Accepted on: 10/09/2025, Published on: 03/06/2026
DOI: 10.64091/ATIIR.2026.000378
Ave Trends in Intelligent Informatics Reports, 2026 Vol. 1 No. 2 , Pages: 91-104