{"id":{"repo_id":"sjsu","oai_identifier":"oai:scholarworks.sjsu.edu:etd_projects-2514"},"canonical_url":"https://search.ndltd.org/etd/sjsu/oai:scholarworks.sjsu.edu:etd_projects-2514","repository":{"repo_id":"sjsu","name":"San Jose State University","base_url":"https://scholarworks.sjsu.edu/do/oai/"},"display":{"title":"DISEASE DIAGNOSIS USING RAG LLM WITH SMART PROMPT ENGINEERING","abstract":"Although recent trends indicate that LLMs outperform traditional methods in solving complex problems with enhanced reasoning, there has been barely any progress in replicating the quality of diagnoses like those of actual human doctors. The identification of an accurate diagnosis with thorough reasoning is still a significant challenge, even with advanced AI models. The process of performing accurate diagnosis remains challenging due to a lack of transparency in state-of-the-art models existing today, a lack of explanation in the diagnosis process, an emphasis on results rather than reasoning, and a lack of foundational knowledge in models, along with limited exploration of diseases. To solve these problems, we propose a RAG model with smart prompt engineering to develop a sound medical diagnostic agent. The rapidly evolving techniques in LLMs, particularly RAG models, have shown promising results in processing and interpreting complex data. With the use of smart prompt engineering techniques and the use of a RAG framework with strong databases, we have achieved desirable results and enhanced the diagnostic reasoning performance. Deepseek-R1-Distill-Qwen-7B, Mixtral-8x7B, and MedAlpaca were trained as RAG models with PubMed articles and PMC patient data by varying the number of documents. We observe an average increase of 15% in accuracy scores when we introduce relevant documents in the RAG framework. Additionally, prompt engineering guides the formulation of differential diagnosis and a chain-of-thought inference. This study is the first of its kind to identify the variation in model performance by varying the number of documents in the RAG framework.","abstract_html":"Although recent trends indicate that LLMs outperform traditional methods in solving complex problems with enhanced reasoning, there has been barely any progress in replicating the quality of diagnoses like those of actual human doctors. The identification of an accurate diagnosis with thorough reasoning is still a significant challenge, even with advanced AI models. The process of performing accurate diagnosis remains challenging due to a lack of transparency in state-of-the-art models existing today, a lack of explanation in the diagnosis process, an emphasis on results rather than reasoning, and a lack of foundational knowledge in models, along with limited exploration of diseases. To solve these problems, we propose a RAG model with smart prompt engineering to develop a sound medical diagnostic agent. The rapidly evolving techniques in LLMs, particularly RAG models, have shown promising results in processing and interpreting complex data. With the use of smart prompt engineering techniques and the use of a RAG framework with strong databases, we have achieved desirable results and enhanced the diagnostic reasoning performance. Deepseek-R1-Distill-Qwen-7B, Mixtral-8x7B, and MedAlpaca were trained as RAG models with PubMed articles and PMC patient data by varying the number of documents. We observe an average increase of 15% in accuracy scores when we introduce relevant documents in the RAG framework. Additionally, prompt engineering guides the formulation of differential diagnosis and a chain-of-thought inference. This study is the first of its kind to identify the variation in model performance by varying the number of documents in the RAG framework.","abstract_has_math":false,"creators":["Syed, Qadeerullah"],"institution":null,"degree_name":"Master of Science in Computer Science (MSCS)","degree_level":null,"degree_discipline":"Computer Science","degree_department":null,"school":null,"contributors":["Ching-Seh Wu","Fabio Di Troia","Genya Ishigaki"],"advisors":[],"committee_chairs":[],"committee_members":[],"year":null,"date_issued":"","date_published":null,"updated_at":"2026-11-26T14:03:30Z","subjects":["Large Language Models","Retrieval Augmented Generation","Knowledge Base","Differential Diagnosis","Chain-of-Thought","Other Computer Engineering"],"languages":[],"rights":[],"rights_urls":[],"identifier_entries":[{"key":"dc:identifier","label":"Identifier","values":["https://scholarworks.sjsu.edu/etd_projects/1514"],"render_values":[{"text":"https://scholarworks.sjsu.edu/etd_projects/1514","href":"https://scholarworks.sjsu.edu/etd_projects/1514","code":true}]}],"person_identifier_entries":[]},"links":{"outbound_url":"https://doi.org/10.31979/etd.azur-9jbv","outbound_label":"DOI","outbound_source":"dc:identifier","record_url":"https://doi.org/10.31979/etd.azur-9jbv","record_label":"Repository record","record_kind":"doi","record_source":"dc:identifier","access_status":null,"embargo_until":null,"access_note":null},"oai_pmh_record":{"url":"https://union.ndltd.org/oai-pmh/?verb=GetRecord&metadataPrefix=oai_dc&identifier=oai%3Aunion.ndltd.org%3Arepo%3Asjsu%3Aoai%3Ascholarworks.sjsu.edu%3Aetd_projects-2514","prefix":"oai_dc"},"source_record":{"url":"https://scholarworks.sjsu.edu/do/oai/?verb=GetRecord&metadataPrefix=oai_etdms&identifier=oai%3Ascholarworks.sjsu.edu%3Aetd_projects-2514","prefix":"oai_etdms"},"metadata_groups":[{"id":"people","label":"People","entries":[{"key":"dc:contributor","label":"Contributor","values":["Ching-Seh Wu","Fabio Di Troia","Genya Ishigaki"]},{"key":"dc:creator","label":"Author","values":["Syed, Qadeerullah"]}]},{"id":"academic_context","label":"Academic Context","entries":[{"key":"dc:date.available","label":"Dc Date Available","values":["2026-05-25T07:00:00Z"]},{"key":"dc:date.created","label":"Dc Date Created","values":["2025-01-01T08:00:00Z"]},{"key":"dc:type","label":"Dc Type","values":["Master's Project"]},{"key":"thesis:degree_discipline","label":"Discipline","values":["Computer Science"]},{"key":"thesis:degree_name","label":"Degree Name","values":["Master of Science in Computer Science (MSCS)"]}]},{"id":"subjects_keywords","label":"Subjects and Keywords","entries":[{"key":"dc:subject","label":"Dc Subject","values":["Large Language Models","Retrieval Augmented Generation","Knowledge Base","Differential Diagnosis","Chain-of-Thought","Other Computer Engineering"]}]},{"id":"identifiers","label":"Identifiers","entries":[{"key":"dc:identifier","label":"Identifier","values":["https://doi.org/10.31979/etd.azur-9jbv","https://scholarworks.sjsu.edu/etd_projects/1514"]}]},{"id":"additional","label":"Additional Metadata","entries":[{"key":"dc:description.abstract","label":"Abstract","values":["Although recent trends indicate that LLMs outperform traditional methods in solving complex problems with enhanced reasoning, there has been barely any progress in replicating the quality of diagnoses like those of actual human doctors. The identification of an accurate diagnosis with thorough reasoning is still a significant challenge, even with advanced AI models. The process of performing accurate diagnosis remains challenging due to a lack of transparency in state-of-the-art models existing today, a lack of explanation in the diagnosis process, an emphasis on results rather than reasoning, and a lack of foundational knowledge in models, along with limited exploration of diseases. To solve these problems, we propose a RAG model with smart prompt engineering to develop a sound medical diagnostic agent. The rapidly evolving techniques in LLMs, particularly RAG models, have shown promising results in processing and interpreting complex data. With the use of smart prompt engineering techniques and the use of a RAG framework with strong databases, we have achieved desirable results and enhanced the diagnostic reasoning performance. Deepseek-R1-Distill-Qwen-7B, Mixtral-8x7B, and MedAlpaca were trained as RAG models with PubMed articles and PMC patient data by varying the number of documents. We observe an average increase of 15% in accuracy scores when we introduce relevant documents in the RAG framework. Additionally, prompt engineering guides the formulation of differential diagnosis and a chain-of-thought inference. This study is the first of its kind to identify the variation in model performance by varying the number of documents in the RAG framework."]},{"key":"dc:title","label":"Title","values":["DISEASE DIAGNOSIS USING RAG LLM WITH SMART PROMPT ENGINEERING"]}]}],"canonical_facts":{"dc:contributor":["Ching-Seh Wu","Fabio Di Troia","Genya Ishigaki"],"dc:creator":["Syed, Qadeerullah"],"dc:date.available":["2026-05-25T07:00:00Z"],"dc:date.created":["2025-01-01T08:00:00Z"],"dc:description.abstract":["Although recent trends indicate that LLMs outperform traditional methods in solving complex problems with enhanced reasoning, there has been barely any progress in replicating the quality of diagnoses like those of actual human doctors. The identification of an accurate diagnosis with thorough reasoning is still a significant challenge, even with advanced AI models. The process of performing accurate diagnosis remains challenging due to a lack of transparency in state-of-the-art models existing today, a lack of explanation in the diagnosis process, an emphasis on results rather than reasoning, and a lack of foundational knowledge in models, along with limited exploration of diseases. To solve these problems, we propose a RAG model with smart prompt engineering to develop a sound medical diagnostic agent. The rapidly evolving techniques in LLMs, particularly RAG models, have shown promising results in processing and interpreting complex data. With the use of smart prompt engineering techniques and the use of a RAG framework with strong databases, we have achieved desirable results and enhanced the diagnostic reasoning performance. Deepseek-R1-Distill-Qwen-7B, Mixtral-8x7B, and MedAlpaca were trained as RAG models with PubMed articles and PMC patient data by varying the number of documents. We observe an average increase of 15% in accuracy scores when we introduce relevant documents in the RAG framework. Additionally, prompt engineering guides the formulation of differential diagnosis and a chain-of-thought inference. This study is the first of its kind to identify the variation in model performance by varying the number of documents in the RAG framework."],"dc:identifier":["https://doi.org/10.31979/etd.azur-9jbv","https://scholarworks.sjsu.edu/etd_projects/1514"],"dc:subject":["Large Language Models","Retrieval Augmented Generation","Knowledge Base","Differential Diagnosis","Chain-of-Thought","Other Computer Engineering"],"dc:title":["DISEASE DIAGNOSIS USING RAG LLM WITH SMART PROMPT ENGINEERING"],"dc:type":["Master's Project"],"thesis:degree_discipline":["Computer Science"],"thesis:degree_name":["Master of Science in Computer Science (MSCS)"]},"updated_at":"2026-11-26T14:03:30Z"}