--- title: MedGraphRAG PubMed emoji: 🏥 colorFrom: blue colorTo: green sdk: docker app_port: 7860 --- # MedRAG PubMed Online This is a RAG-based medical research assistant that searches PubMed literature to answer the medical questions. Currently doing RAG based on literature titles. ## Run locally pip install -r requirements.txt (see Dockerfile for more details) export OPENAI_API_KEY= "your-openai-api-key" export NCBI_API_KEY= "your-ncbi-api-key" (optional) python rerankrag.py/simplerag.py "your-medical-research-question" ## Todo list: - [x] integrate pubmed search progress into the citation pipeline - [x] rerank and cutting-edge langchain retriever - [x] gradio interface - [ ] include the abstract/full text in retrieval (efficiency?) - [ ] sophasticated search key word of pubmed - [ ] refine answer based on searched literatures - [ ] make it a non-accessable container and release to huggingface - [ ] consider the weight of literatures (IF?) - [ ] use Medline (med wiki website) to provide grounded explanation and definition - [ ] discriminate different kind of med questions (diagnosis, learn med knowledge, drug match…) and process with different agent-chains - [ ] hard code literature index ## Customer feedback (from health-eco, 2024-12-07) - [x] The answers are too generic - need to extract and show specific treatment plans, disease mechanisms, and patient types from the medical papers we find (updated a version a solve this) - [ ] Need to be honest about limitations - say "I don't know" clearly when we can't find good answers in our search results - [ ] first check a local knowledge graph we maintain, then fall back to online PubMed searches if needed. Keep updating the local graph with new findings - [ ] Add a way to rate how trustworthy each source is, maybe looking at things like the journal's Impact Factor, how often it's cited, the journal's reputation, when it was published, and who wrote it ## Customer feedback (from us-insurance, 2024-12-09) - [ ] Recommend clinical services to patients based on their queries and identify the most cost-efficient, nearest clinic within their insurance network using the data available at: https://transparency-in-coverage.uhc.com. ## Customer feedback (from AI-EHR, 2024-12-09) - [ ] cheaper than GPT - [ ] no latency (they provide phone service) - [ ] diagnosis based on the hospital's private guidelines (personized) - [ ] better searching capabilties based on patient's medical history - [ ] screen monitoring (mainly OCR) based co-pilot (avoid regulation concern as user don't need to upload their data)