Skip to content
Alex Morgan
All projects

MedQuery

RAG-powered medical Q&A assistant

WebAI/ML
View repository

MedQuery grounds every answer in a curated set of medical reference documents, reducing hallucination risk compared to a plain language-model chat.

Documents are chunked, embedded, and retrieved at query time, then passed to Llama 2 as context alongside the user's question.

Key contributions

  • Built a document ingestion and chunking pipeline for medical references.
  • Implemented vector retrieval with FAISS for low-latency lookups.
  • Tuned prompts to keep answers grounded and cite source passages.
  • Exposed the assistant through a simple FastAPI service.

The challenge

Long medical documents produced retrieval chunks that lost important context when split naively.

The solution

Switched to overlapping, section-aware chunking that kept headings attached to their content, which noticeably improved retrieval relevance.