Skip to content

Stokesy-dev/medical-report-simplifier

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Medical Report Simplifier

AI tool that converts complex medical PDFs into plain-language explanations using RAG + LLMs.

The problem

Patients routinely leave hospitals with reports they can't understand. This tool bridges that gap using retrieval-augmented generation.

How to run

git clone https://github.com/YOUR_USERNAME/medical-report-simplifier
cd medical-report-simplifier
python3 -m venv venv && source venv/bin/activate
pip3 install -r requirements.txt
echo "OPENAI_API_KEY=your-key" > .env
streamlit run app/main.py

Tech stack

LangChain · PyMuPDF · BioBERT embeddings · FAISS · GPT-4o-mini · Streamlit

Architecture

PDF → Section-aware parser → Chunker → BioBERT embeddings → FAISS vector store → GPT-4o-mini (RAG) → Safety guardrails → UI

Key design decisions

  • Section-aware chunking over fixed token splits — medical reports have semantic sections. Splitting by section before chunking improves retrieval precision.
  • BioBERT embeddings — domain-specific model understands medical synonyms (HbA1c = glycated hemoglobin) that generic models miss.
  • Guardrail layer — post-processes every LLM response to catch and neutralise diagnosis-style phrasing before it reaches the user.

About

RAG pipeline that converts complex medical PDFs into plain-language explanations using BioBERT embeddings, FAISS, and GPT-4o-mini with safety guardrails.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages