Communications on Applied Nonlinear Analysis ISSN: 1074-133X Vol 32 No. 10s (2025) 2771 https://internationalpubls.com RAG-Based Blood Test Report Analysis to Reverse Metabolic Syndrome Arohi Karhade1, Isha Verma2, Varad Gadaokar3 and Jayshree Mahajan4 1arohikarhade@gmail.com, 220.ishaverma@gmail.com, 3varadgadaokar1510@gmail.com, 4jsmahajan@pict.edu 1,2,3 Student, Department of Computer Engineering, Pune Institute of Computer Technology, Pune, India 4Assistant Professor, Department of Computer Engineering, Pune Institute of Computer Technology, Pune, India Article History: Received: 12-01-2025 Revised: 15-02-2025 Accepted: 01-03-2025 Abstract. Metabolic Syndrome is a group of health conditions which together enhance the risk of getting heart disease, type 2 diabetes, and stroke. These include increased blood glucose, blood pressure, increased body fat, abnormal triglyceride to HDL ratio, abnormal red blood cell width distribution, increased glycated hemoglobin, and insulin resistance, among others. These health metrics are essential indicators of the wellness of a person. Still, interpretation of such complex medical indicators in a blood test report prove difficult for the general population. This research paper aims to simplify complex medical terminologies associated with Metabolic Syndrome, identify the most relevant blood test parameters, and generate tailored lifestyle and dietary suggestions. To achieve this, we propose a Generative Artificial Intelligence (GenAI)-based system that automates the interpretation of blood test data and provides users with personalized health insights in clear and accessible language. Our implementation utilizes the Retrieval Augmented Generation (RAG) framework built on top of the LLaMA3 base model. The RAG architecture allows the system to retrieve accurate and relevant information from a curated knowledge base composed of medical literature, academic books, YouTube videos, and research papers focused on Metabolic Syndrome. Based on the analyzed data, the system not only offers actionable recommendations but also alerts users when medical consultation may be required. This approach empowers patients with actionable insights to improve their health and well-being based on their blood test data. Keywords: Metabolic Syndrome, Blood Test Analysis, Generative Artificial Intelligence (GenAI), Retrieval Augmented Generation (RAG), Personalized Recommendations, LLaMA3. 1 Introduction The following section is adapted from our previous publication[1], which details the GenAI-based approach to analyzing blood test reports for identifying and reversing Metabolic Syndrome. Metabolic Syndrome is a group of conditions that significantly increase the risk of cardiovascular diseases, mainly stroke, diabetes, and other serious health problems. These conditions include abdominal obesity, particularly excess fat around the waist; persistently high blood pressure, which damages the heart and arteries; and hyperglycemia, which contributes to blood vessel damage and clotting. Elevated triglyceride levels and low levels of HDL cholesterol disrupt healthy blood lipid balance, increasing heart disease risk. Additional indicators include high levels of glycated hemoglobin (HbA1c), which reflects long-term blood sugar levels, and a high triglyceride- to-HDL ratio, with values over 4 indicating a greater risk for heart disease[2]-[4]. Blood tests offer crucial insights into our health right from basic cell counts like RBCs, WBCs, and platelets to organ function markers such as liver enzymes, kidney filtration, and cholesterol levels. They help diagnose a wide range of conditions—from infections and anemia to heart disease and diabetes. However, these reports are often difficult for people to understand because of complex medical terms and abbreviations. Minor changes in values are often mistaken for serious problems when they may not be clinically significant. We have aimed address these issues by building a Generative AI model that provides clear and meaningful explanations of blood test results with focus on the detecting and reversing of metabolic syndromes. The paper is organized into sections that cover the problem, related research, feature selection, model implementation, results, conclusion, and future work. mailto:1arohikarhade@gmail.com mailto:220.ishaverma@gmail.com mailto:3varadgadaokar1510@gmail.com mailto:4jsmahajan@pict.edu Communications on Applied Nonlinear Analysis ISSN: 1074-133X Vol 32 No. 10s (2025) 2772 https://internationalpubls.com 2 Problem Statement The growing phenomenon of metabolic syndromes tell us the need for effective tools that help people to understand and act on their blood test reports. Often the blood test reports contain complex and technical jargon that make it difficult for common man to interpret key health indicators and take preventive measures through natural methods such as diet and lifestyle changes. We have proposed a GenAI-based system built on the Retrieval-Augmented Generation (RAG) framework to solve this problem. Our system uses RAG to generate answers that simplify the complex medical terminologies by retrieving knowledge about the relevant domain. It identifies patterns or values linked to metabolic syndromes and provides personalized, context-aware lifestyle and dietary recommendations. By improving the clarity and accessibility of blood test interpretations, our system supports informed decision-making and encourages preventive healthcare. 3 Literature Survey Table 1. summarizes five papers that highlight the importance that AI and lifestyle has in the field of healthcare. The first paper discusses diet, physical activity, and one’s way of life can affect metabolic syndromes or the likelihood of developing one. Both the second and third papers discuss about AI-generated responses in healthcare, specifically how ChatGPT performs in mock clinics and the pros and cons of AI integration into clinical discourse. The fourth paper has a wider scope discussing generative AI in healthcare including the components of its application in diagnosis, case formulation, and the privacy concerns surrounding it. Finally, the fifth and sixth papers (related) focus on RAG-based systems, demonstrating how combining retrieval-augmented generation with medical datasets can enhance clinical reasoning and personalize treatment plans, with performance varying based on tuning strategies. Table 1. Summaries of Related Papers in Healthcare and Generative AI Paper Title Summary Dietary and Lifestyle Risk Factors and Metabolic Syndrome: Litera- ture Review [5] This review explores how diet, physical activity, and lifestyle factors contribute to metabolic syndrome. It emphasizes the impact of nutrition and exercise on health and prevention strategies. Evaluating the Feasibility of Chat- GPT in Healthcare [6] This paper assesses ChatGPT’s suitability for clinical and research use, highlighting its potential in healthcare applications, while addressing concerns of privacy and data accuracy. AI-Generated Draft Replies in Health Records and Physicians’ Electronic Communication [7] This study examines the use of AI-generated responses in electronic health records, noting benefits in efficiency, though personalization and ethical concerns remain critical challenges. Generative AI for Transformer Healthcare: A Comprehensive Study [8] This study analyzes generative AI’s role in healthcare, reviewing applications and challenges, including diagnosis and treatment applications, and data privacy issues. MEDPLAN: A Two-Stage RAG- Based System for Personalized Medical Plan Generation [9] While most LLM applications to EHRs focus on assessment, they often neglect realistic treatment planning. It improves LLM reasoning by mimicking clinician workflows—first generating assessments, then personalized treatment plans using RAG. Systematic Analysis of Retrieval- Augmented Generation-Based This study evaluates how combining fine-tuning RAG can improve open-source LLMs for medical tasks. Models were trained on Meadow-MedQA and Communications on Applied Nonlinear Analysis ISSN: 1074-133X Vol 32 No. 10s (2025) 2773 https://internationalpubls.com LLMs for Medical Chatbot Applications [10] MedMCQA datasets. Two QA methods were tested— direct choice (Type A) and answer generation with confidence (Type B). Type A performed the best. 4 Clinical Feature Selection The following section is adapted from our previous publication \cite{karhade2025genai}, which details the GenAI-based approach to analyzing blood test reports for identifying and reversing Metabolic Syndrome. The system performs a comprehensive analysis of key biomarkers associated with metabolic disorders and recommends evidence-based dietary and lifestyle interventions aimed at mitigating associated health risks. Based on an extensive review of prior research conducted by Avantza Technologies Pvt. Ltd., we have identified and shortlisted 33 critical blood parameters that are strongly correlated with the onset and progression of metabolic syndrome. The clinical relevance and detailed descriptions of the 33 parameters selected for this study have been well- documented in our earlier publication \cite{karhade2025genai}. Readers requiring a detailed explanation of each parameter and its significance with respect to Metabolic Syndrome are requested to refer to that work. The 33 shortlisted parameters and their ranges for males and females have been described in Table 2. Table 2. Parameters and their ranges Parameter Type Parameter Name Unit Normal Value/Range Optimal Value/Range Possible Value/Range CBC Haemoglobin mg/dL 13.8- 17.2(male) 14-16(male) 6-20(male) 12.1- 15.1(female) 13- 15(female) 5-18(female) RDW % 11-15 11.5-14.5 9-18 PDW % 8-18 9-14 7-18 Glucose Fasting Glucose mg/dL 70-100 70-90 40-400 Postprandial Glucose 100-140 <140 100-600 Insulin Fasting Insulin μU/mL 2.6-24.9 2.6-8 2.6-30 Postprandial Insulin 5-50 5-50(lower the better) 5-200 Insulin Resistance HOMA-IR(derived) NA 0.5 and 1.8 <1 0.5-6 HbA1c % 5-6 <5.5 Lipid Profile HDL mg/dL 35-65(male) >40 30-90 35- 80(female) >50 30-100 LDL 70-120 <100 60-300 VLDL 10-30 <30 8-40 Triglycerides 30-120 30-150 30-500 Triglycerides:HDL(derived) <3 <2 0.5-15 Apolipoprotein ApoA mg/dL 110- 180(male) 110- 180(male) 50-200 110- 205(female) 110- 205(female) Communications on Applied Nonlinear Analysis ISSN: 1074-133X Vol 32 No. 10s (2025) 2774 https://internationalpubls.com ApoB 45-135 45-130(lower the better) 45-200 Lp(a) mg/dL 10-30 10-30 10-100 Liver Function Test ALT U/L 10-50 <25 4-150 AST 10-35 <20 5-130 ALP 40-120 <60 30-160 GGT 10-70 <72 6-200 Kidney Function Test eGFR ml/min/1.73m2 >90 >60(higher the better) 15-120 BUN mg/dL 6-24 8-20 3-25 Creatinine 0.7-1.3 0.7-1.3 0.3-10 Uric Acid 2.5-7 3.5-7.2 2-12 Thyroid Function Test TSH mlU/L 0.4-4 T4(free) ng/ml 0.8-1.8 0.8-1.8 0.5-2.5 T3 100-200 100-200 80-120 Vitamins D >20 40-60 5-100 B12 pg/ml 200-800 400-500 200-900 Amino Acids Homocysteine mcmol/L 5-15 5-15 5-40 Inflammation Markers ESR mm/hr 5-20(male) 5-20(male) 5-50 5-30(female) 5-30(female) HSCRP mg/L 0.5-10 <5 0.5-175 5 Implementation 5.1 Model Selection To develop the model, we explored different options including OpenAI's model, Deepseek's model, and Meta's Llama-3 8-billion parameter model. Each model was evaluated based on its ability, convenience, and efficiency to process medical data and generate accurate and meaningful recommendations. Table 3 shows a comparison of the models evaluated for this research. We selected the Llama-3 8-billion parameter model for this research because of its balance between performance and accessibility. Being an open-source model, it provided us with easy customization, automation, and a cost- effective method. The model is computationally more efficient than other large-scale models, making it suitable for real-world development and deployment. In addition, there are ample resources and documentation available for its efficient implementation, making it easier to use[11]. Table 3. Comparison of Language Models OpenAI (GPT) DeepSeek Llama (Chosen) High Cost Free, but new. Free and mature Closed-source Open-source, early stage Open-source, production-ready No local deployment Limited support Full RAG compatibility Communications on Applied Nonlinear Analysis ISSN: 1074-133X Vol 32 No. 10s (2025) 2775 https://internationalpubls.com 5.2 Data Collection and Preprocessing The dataset for building the knowledge base includes three main components: Medical books, YouTube videos, and a parameter document defining 33 key health markers related to metabolic syndromes, as mentioned above. The books in the form of PDFs contain in-depth medical literature relevant to metabolic syndromes. YouTube videos provide insights from medical professionals who have tried and tested some of the most effective methods to reduce and reverse metabolic syndromes using natural methods. In addition, the parameter document specifies the ranges of values for different parameters in the blood test report which are relevant to metabolic syndromes. The dataset consisted of 20 books and 383 YouTube video transcripts. To preprocess the data, the text was extracted from all the PDFs using the python library PyMuPDF. These files were then cleaned by removing the unnecessary parts such as references, foreword, prefaces, table of contents, etc. The YouTube videos were transcribed into text files using the OpenAI whisper module. These transcripts were cleaned by removing irrelevant sections such as introductions, advertisements, and speaker hesitations. We structured the parameter document into a narrative text format that provides a clear explanation of the ranges defined. 5.3 Building Vectorized Knowledge Base To prepare the knowledge base for Retrieval-Augmented Generation (RAG), a structured data preprocessing pipeline was implemented. Each PDF was loaded using PyPDFLoader, which extracts and parses the contents of the document into raw text. These text blocks were then segmented using the RecursiveCharacterTextSplitter with a chunk size of 1024 characters and an overlap of 100 characters. This technique preserves context continuity across adjacent chunks, ensuring that important information is not lost at the boundaries. Each segment contained sufficient context for medical query resolution as well as retrieval granularity. LangChain has been used to implement semantic-aware splitting to avoid breaks in medical explanation and reasoning. The processed text chunks are transformed into vector embeddings. Embeddings are dense vector representations of text, that capture the semantic meaning and allow for similarity-based search. To store and manage these embeddings efficiently, we used ChromaDB — an open-source, lightweight, and persistent vector database purpose-built for machine learning and large language model workflows. ChromaDB supports rapid similarity search through approximate nearest neighbor (ANN) techniques, allowing the system to quickly retrieve the most relevant document chunks based on the user’s input query. 5.4 Retrieval-Augmented Generation Retrieval Augmented Generation or RAG is the process of optimizing the output of a large language model where it references an authoritative knowledge base outside of its training data sources before generating a response. This method optimizes performance for a particular use case. It helps in enhancing the accuracy and relevancy of large-language models. RAG extends the already powerful capabilities of LLMs to specific domains or an organization's internal knowledge base, all without the need to retrain the model. Standard LLMs rely on pre-trained knowledge that might be generalized and out-of-date. RAG supports dynamic information retrieval using vector search over stored embeddings. The RAG pipeline and workflow of our system is shown in Figure 1. The RAG pipeline is a structure that consists of two primary components: the retrieval pipeline and the generation pipeline. Fig. 1. RAG Pipeline Communications on Applied Nonlinear Analysis ISSN: 1074-133X Vol 32 No. 10s (2025) 2776 https://internationalpubls.com Retrieval pipeline The query submitted by the user is also converted into a vector embedding. This ensures consistency between the document embeddings and the query embeddings. A semantic similarity search is performed between the user query embeddings and the precomputed document embeddings. For each comparison a similarity score is calculated using the cosine similarity or the inner product method. The chunks are ranked based on the similarity scores to ensure that contextually relevant information is considered. The top k(k=3) relevant chunks are added to the query as context for the response. Low-relevance documents are discarded using a threshold-based filtering mechanism. Generation Pipeline The retrieved text chunks are concatenated to the user's query to form a context-augmented prompt. The model processes the augmented prompt and generates a structured response. To maintain transparency, the system also returns a list of source documents along with citations from books, research papers, and YouTube transcripts. In case of video sources, it provides with the YouTube link, allowing users to refer to the exact source. If no relevant data is retrieved then a generalized response is generated instead of a personalized response. This prevents issues regarding hallucinations and irrelevant prompts. The model has been specifically prompted to generate a response that provides the user with a simple easy-to-understand explanation of their blood test reports along with dietary and lifestyle changes that they can incorporate to improve their health and potentially reverse or prevent the onset of metabolic diseases. 6 Results This section includes the output and performance of our RAG-based system designed to analyze blood test reports and generate personalized health insights. The system allows users to create an account and log in securely. This enables the system to generate personalized recommendations based on the user's blood test report. The user asks a query and/or uploads a blood test report. This blood test report is securely stored in an encrypted format to ensure privacy and confidentiality. Once the report has been stored, it is automatically referred to in future queries, thus providing personalized and context- aware responses. Figure 2 shows the attached blood test report along with the user query. Figures 3 and 4 show the responses generated by the system for the corresponding prompts. Fig. 2. Prompt Fig. 3. Prompt and Response Communications on Applied Nonlinear Analysis ISSN: 1074-133X Vol 32 No. 10s (2025) 2777 https://internationalpubls.com Fig. 4. Prompt and Response We performed a manual analysis of the AI responses using LLM-supported scoring. In particular, GPT-4 was asked to score each response on four dimensions—Correctness, Clarity, Helpfulness, and Completeness— between 1 and 100. Table 4 shows the values of the metrics. Figure 5 shows the pictorial representation of the values of the metrics. The evaluation prompt was standardized and crafted to mimic expert review. Although the model supplied the ratings, human monitoring guaranteed consistency and reliability. The approach is representative of a semi- automated, expert-in-the-loop assessment strategy, striking a balance between scalability and clinical understanding. Fig. 5. Results Graph Communications on Applied Nonlinear Analysis ISSN: 1074-133X Vol 32 No. 10s (2025) 2778 https://internationalpubls.com Table 4. Results Table Response # Correctness Clarity Helpfulness Completeness 1 95 98 90 85 2 90 95 90 85 3 90 95 90 92 4 95 95 90 85 5 95 90 90 95 6 95 98 90 85 7 95 95 90 85 8 95 98 95 90 9 95 95 90 90 10 95 98 90 92 11 90 95 90 85 12 95 98 95 92 13 90 95 90 85 14 95 90 92 95 15 95 90 85 90 16 95 98 90 92 17 95 100 90 85 18 95 95 90 90 19 95 90 90 95 20 95 90 85 80 7 Conclusion This project presents a Retrieval-Augmented Generation (RAG)-driven GenAI system that interprets blood test reports and provides a personalized health analysis with a focus on Metabolic Syndrome. The system, integrating PDF parsing, structured data extraction, and context-sensitive generation, produces human-like, medically accurate recommendations. To evaluate the quality of the generated recommendations, manual testing was performed on four major metrics—Correctness, Clarity, Helpfulness, and Completeness—each scored on a 1 to 100 basis. The findings showed solid performance, as average scores for Correctness, Clarity, Helpfulness, and Completeness were 92.4, 89.7, 91.1, and 88.9, respectively. These results confirm the robustness of the system in generating good, clear, and useful health recommendations, demonstrating the merit of RAG-based architectures to transform complex laboratory information into useful insights for healthcare providers and patients alike. Therefore, with its ability to direct users towards personalized diet and lifestyle modifications, the RAG model presents a valuable tool to reverse Metabolic Syndrome and enable individuals to make sound health choices. 8 Future Scope The future scope for this project focuses on: multilingual support, personalization and speech recognition. Multilingual support will allow users from different linguistic backgrounds to easily interpret their health data. This will allow for global scalability, ensuring the accessibility of healthcare information to a diverse range of users. Communications on Applied Nonlinear Analysis ISSN: 1074-133X Vol 32 No. 10s (2025) 2779 https://internationalpubls.com Personalization is another major focus, as the system will analyse multiple instances of blood test over time, thus allowing for more predictive insights. By tracking a user's historical data, the system can provide more nuanced recommendations and detect trends that might indicate early health risks for metabolic syndromes. Integration of speech recognition technology will provide a more accessible and intuitive experience for the user. It will allow for a hands-free option for those who may have difficulty navigating the user interface. References 1.Arohi Karhade, Isha Verma, Varad Gadaokar, and Jayshree Mahajan. Using genai to generate blood test report analysis to reverse metabolic syndrome. PICT’s International Journal of Engineering and Technology (PIJET), 2(2):55, June 2025. Available at: https://www.pijet.org. 2.National Heart, Lung, and Blood Institute. Metabolic syndrome, 2024. Accessed: 2024-09-26. 3.Thang S. Han and Michael E.J. Lean. Metabolic syndrome. Medicine, 43(2):80–87, 2015. Nutrition. 4.Prashant Karhade. My Health My Responsibility: A Systematic 15-Step Approach to Take Control of Your Health. APK Publishers, 2024. 5.Ishu Kataria, Ravinder Chadha, and Rakesh Pathak. Dietary and lifestyle modification in metabolic syndrome: A review of randomized control trials in different population groups. Reviews in Health Care, 6(3):97–103, 2015. 6.Matteo Salvagno, Fabio Silvio Taccone, and Andrea G. Gerli. Evaluating the feasibility of chatgpt in healthcare: An analysis of multiple clinical and research scenarios. Journal of Medical Systems, 47(1):33, 2023. 7.Vincent X. Liu, Christine A. Sinsky, Shuhan Lin, et al. Ai-generated draft replies integrated into health records and physicians’ electronic communication. JAMA Network Open, 7(3):e2417615, 2024. 8.Yasin Shokrollahi, Sahar Yarmohammadtoosky, Matthew M. Nikahd, et al. A comprehensive review of generative ai in healthcare. arXiv preprint arXiv:2310.00795, 2023. 9.Hsin-Ling Hsu, Cong-Tinh Dao, Luning Wang, et al. Medplan: A two-stage rag-based system for personalized medical plan generation. arXiv preprint arXiv:2503.17900, 2025 10.Hyeongjun Jeon, Young Kim, and Jin-Ju Kim. Systematic analysis of retrieval-augmented generation-based llms for medical chatbot applica- tions. Information, 6(4):116, 2023. 11.Patrick Lewis, Ethan Perez, Aleksandra Piktus, Fabio Petroni, Vladimir Karpukhin, Naman Goyal, Yash Kulkarni, Mike Lewis, Wen-tau Yih, Tim Rockt¨aschel, et al. Retrieval-augmented generation for knowledge- intensive nlp tasks. Advances in Neural Information Processing Systems, 33:9459–9474, 2020. 12.Mercy Ranjit, Gopinath Ganapathy, Ranjit Manuel, and Tanuja Ganu. Retrieval augmented chest x-ray report generation using openai gpt models. In Kaivalya Deshpande, Madalina Fiterau, Shalmali Joshi, Zachary Lipton, Rajesh Ranganath, I˜nigo Urteaga, and Serene Yeung, editors, Proceedings of the 8th Machine Learning for Healthcare Conference, volume 219 of Proceedings of Machine Learning Research, pages 650–666. PMLR, 11– 12 Aug 2023. https://www.pijet.org/