Back to search

Johns Hopkins University

Design and Evaluation of GPT and RAG-Based QA Systems for Genomic and Pharmacogenomic Patient Queries

Abstract

dc:description.abstract

The advent of Large Language Models (LLMs), including Generative Pre-trained Transformers (GPT) and Retrieval-Augmented Reneration (RAG) systems, has opened new frontiers for AI applications in medicine. However, their deployment in areas such as genomics and pharmacogenomics remains largely underexplored. This thesis investigates the comparative performance of three LLM strategies: Baseline GPT (GPT-3.5 Turbo), Keyword-based RAG, and Vector-based RAG, for answering patient queries within specialized biomedical domains -pharmacogenomics and genomics. To enable rigorous analyses, we constructed a synthetic dataset of common questions that clinical genomics and pharmacogenomics experts are asked. We then used each of the three LLM strategies to generate responses to those questions. The Keyword-based and Vector-based RAG strategies leveraged a curated corpus of genomics and pharmacogenomics literature as the retrieval base. All LLM outputs were evaluated using two complementary methods: (i) linguistic profiling through use of a computational linguistic ananalysis approach that quantified analytical thinking, emotional tone, clout, and verbosity text characteristics; and (ii) an LLM-as-the-expert assessment conducted using DeepSeek R1, which and (ii) an LLM-as-the-expert assessment conducted using DeepSeek R1, which rated responses according to question understanding and response quality. This thesis presents an end-to-end retrieval-augmented generation (RAG) pipeline that brings together Azure's Blob Storage and services (Azure Cognitive Search, and Azure OpenAI) to deliver fast and semantically rich responses to clinical genomics and pharmacogenomics questions while maintaining traceable data provenance across services. To maximize information density within the context window of each model, our approach used token-conscious chunking. To securely orchestrate data flow among storage, search, and LLM endpoints, we used a multi-service authentication approach. Together, these design choices enabled creating an efficient and provenance-aware system for genomics and pharmacogenomics question answering. Assessing Baseline GPT, Keyword-based RAG, and Vector-based RAG across three dimensions-linguistic characteristics, question understanding, and response quality—revealed clear patterns. Vector RAG achieved the highest Analytical Thinking scores in both domains, Baseline GPT produced the highest Word Count, and Keyword RAG recorded the lowest Clout. LLM-as-an-expert ratings showed that all three strategies delivered excellent question understanding and strong performance on Relevance of Information, Maxim of Quantity, and Perceived Credibility response quality measures. Differences emerged in User’s Goal Achievement, Understandability, and Meeting Neurodiverse Needs with Keyword RAG producing fewer responses that achieved user goals or met neurodiverse needs, and Vector RAG generating fewer responses that were understandable and met neurodiverse needs. These findings shed light on characteristics beyond accuracy that may be important in designing effective LLM-driven question answering tools for specialty biomedical domains such as clinical genomics and phramacogenomics. Future work exploring architecture enhancements should consider adopting more domain-specific or larger-capacity embedding models, evaluating LLM-based strategies that have extended context windows or multi-turn RAG strategies, and considering automated evaluation and reinforcement loops so that real-world interaction data continually refines chunking, ranking, and answer-generation. Collectively, these enhancements may enable improvements in response quality while also enabling high answer accuracy, broader coverage, and a self-improving feedback cycle.

Degree

thesis:*
Name thesis:degree_name
M.S.E.
Level thesis:degree_level
Masters
Discipline thesis:degree_discipline
Computer Science
Department thesis:degree_department
Computer Science
Grantor dc:publisher
Johns Hopkins University
Year dc:date.issued
2025

Author and committee

dc:creator, dc:contributor.*
Author dc:creator
  • Agarwal, Bhavik
Advisor dc:contributor.advisor
  • Taylor, Casey Overby

Subjects

dc:subject × 30

Rights

Language dc:language.iso
en_US

Identifiers

dc:identifier.*
Repository record dc:identifier.uri
https://jscholarship.library.jhu.edu/handle/1774.2/70866

Chain of custody

source
Harvested from
Johns Hopkins University
Base URL
jscholarship.library.jhu.edu/server/oai/request
Last updated
2026-11-20
Source record
OAI-PMH GetRecord
citation

Agarwal, Bhavik. Design and Evaluation of GPT and RAG-Based QA Systems for Genomic and Pharmacogenomic Patient Queries. Masters thesis, Johns Hopkins University, 2025. https://jscholarship.library.jhu.edu/handle/1774.2/70866