AI chat interface for biomedical literature search and analysis
See the codePractitioner-focused chatbot UI for biomedical engineers. Proxies to Grok‑4 via xAI API with RAG and a tailored system prompt that assumes baseline field expertise.
⚠️ CRITICAL LEGAL & SAFETY NOTICE (NON-REMOVABLE) ⚠️
THIS SOFTWARE IS EXPERIMENTAL RESEARCH CODE ONLY
IT IS NOT A MEDICAL DEVICE • IT IS NOT CLEARED BY FDA, CE, OR ANY REGULATORY BODY
NEVER USE OUTPUT FOR CLINICAL DECISIONS, PATIENT CARE, OR DIAGNOSIS
IN EMERGENCIES CALL 911 (US) / 112 (EU) / YOUR LOCAL EMERGENCY NUMBER
SUICIDE HOTLINE (US): 988 • (UK): 116 123 • (AU): 13 11 14
You must personally accept these terms before using the application.
BEFORE YOU USE BIOMED CHAT — PLEASE READ THIS FIRST
This is NOT a medical doctor, NOT a diagnostic tool, and NOT approved for any patient care.
What this tool IS:
What this tool is NOT and will NEVER be:
If you are a patient, parent, or looking for medical help — close this page now and contact a real doctor.
If you are a biomedical engineer working on devices, regulatory submissions, or research — welcome! This tool is built for you.
📖 Quick Links:
Note on API Providers: This project is built around the Grok API, which has demonstrated high performance on benchmarks. While other providers are supported, Grok is recommended for the best experience.
No coding required! Use Docker to run Biomed Chat on any computer (Windows, Mac, or Linux).
Download the project:
Open Terminal/Command Prompt:
Win + R, type cmd, press EnterCmd + Space, type "Terminal", press EnterCtrl + Alt + TNavigate to the biomedical-chat folder:
cd Downloads/biomed-chat
(Or wherever you saved the folder. If you're unsure, ask someone or use the file explorer to find the exact path)
Start the application (assumes that docker is already installed on your system, if not please install):
docker-compose up -d
This command downloads everything needed and starts the app in the background
Open your web browser and go to:
http://localhost:3000
Or try: http://127.0.0.1:3000
ON FIRST LOAD YOU WILL SEE THE FULL LEGAL NOTICE AND MUST CLICK “ACCEPT” BEFORE ANY FUNCTIONALITY IS UNLOCKED That's it! Biomed Chat will open in your browser.
"command not found" or "docker-compose not found":
"Port already in use" or "address already in use":
ports:
- "3001:3000" # Use port 3001 instead
"Permission denied" or "access denied":
sudo docker-compose up -dApplication won't load:
Need to stop the app:
docker-compose down
Need more help?
✅ Works on any computer - same setup everywhere
✅ No installation headaches - everything included
✅ Safe and isolated - doesn't interfere with your system
✅ Easy cleanup - delete when done
Easiest way to get started:
git clone <repository-url> && cd biomed-chat && chmod +x quick-start.sh && ./quick-start.sh
This single command will:
http://localhost:3000If you prefer step-by-step control:
Clone and setup:
git clone <repository-url>
cd biomed-chat
./setup.sh
Add your API keys (edit .env):
nano .env # or your preferred editor
Start the app:
npm run dev
That's it! Open http://localhost:3000 in your browser.
To use the local Qwen 2.5 7B model for private inference:
See QUICKSTART_LOCAL_MODEL.md for details.
# Choose your AI provider (grok recommended)
API_PROVIDER="grok"
# API Keys (only one required based on provider)
GROK_API_KEY="your_grok_api_key_here"
GEMINI_API_KEY="your_gemini_api_key_here"
OPENAI_API_KEY="your_openai_api_key_here"
ANTHROPIC_API_KEY="your_anthropic_api_key_here"
# Optional settings
PORT=3000
SITE_PASSWORD="your_password_here" # For protected access
SAFETY & LEGAL COMPLIANCE SETTINGS — THESE ARE NON-NEGOTIABLE AND MUST NEVER BE DISABLED
This project is experimental research software only. It is not a cleared medical device by FDA, CE, TGA, PMDA, or any other regulatory body, and must never be used for clinical decisions, patient diagnosis, treatment planning, or any real-world medical purpose.
The settings below enforce:
• Mandatory legal disclaimer on startup and on every single response
• A refusal engine that blocks over 200 high-risk categories known to cause harm (suicide/self-harm, off-label drugs in pregnancy, dangerous DIY procedures, opioid/benzodiazepine tapering, chest pain diagnosis, insulin hacks, CRISPR-at-home, bleach baths, ivermectin/hydroxychloroquine for COVID, high-dose IV vitamin C, ketamine self-administration, chelation therapy, black salve, Gerson therapy, urine therapy, and 180+ other lethal topics)
• Immediate emergency hotline routing when dangerous intent is detected
• Confidence scoring and “I don’t know” fallbacks
• Full red-teaming and refusal logging for ethics board review
Disabling or weakening any of these will re-expose the project to catastrophic legal, regulatory, and ethical liability. Keep all values exactly as shown.
Biomedical-specific hard rule — never allow advice that could be interpreted as clinical practe
For demo/mock mode: Comment out or remove the API key to use predefined responses without API costs.
npm run dev
The Node server automatically spawns the Python FastAPI backend (override with DISABLE_PYTHON_AUTOSTART=1 if you prefer to manage it manually). Open http://localhost:3000.
The app includes an optional local AI model for privacy and offline use. This requires additional setup but provides fast, private inference.
Method 1: Web UI (Easiest)
Method 2: Command Line Install Script
# Interactive installation with GPU/CPU auto-detection
./install_qwen.sh
# Check what will be downloaded
./install_qwen.sh --check-deps
# Install dependencies first
./install_qwen.sh --install-deps
# Force CPU mode even if GPU available
./install_qwen.sh --force-cpu
Method 3: Direct Python Script
# Auto-detect GPU and install
python3 install_qwen_model.py
# Check status
python3 install_qwen_model.py --check
# Force CPU mode
python3 install_qwen_model.py --force-cpu
GPU Mode (CUDA detected):
CPU Mode (No GPU or forced):
For detailed installation instructions and troubleshooting, see README_LOCAL_MODEL.md.
"Module not found" errors:
# Reinstall dependencies
npm install
pip install -r requirements.txt --force-reinstall
Port already in use:
# Change port in .env or kill process
lsof -ti:3000 | xargs kill -9
GPU not detected:
nvidia-smi command workspython -c "import torch; print(torch.cuda.is_available())"Unsloth GPU requirement:
API rate limits:
Slow local model:
HIGH-RISK QUERY BLOCKED
When the corresponding API key for the selected provider is not set, the system automatically provides mock responses for:
Mock responses include realistic biomedical engineering content with proper formatting, references, and streaming behavior identical to the real API. [For contributers only and testers]
All mock responses are wrapped with the full legal disclaimer and refusal engine.
Production Mode (API key configured):
Demo/Mock Mode (no API key):
Run the health check to diagnose issues:
./health-check.sh
# or
npm run health
This will automatically check:
If you see errors about externally-managed Python:
# The setup script now handles this automatically!
# But if needed, manually install with:
pip3 install --break-system-packages -r requirements.txt
Check if Python service is running:
ps aux | grep uvicorn
Check for missing dependencies:
python3 -c "import uvicorn, fastapi; print('✓ Core dependencies OK')"
Restart the server:
npm run dev
If port 3000 or 8000 is already in use:
# Change the port in .env
PORT=3001
Check disk space:
df -h ~ # Need ~22 GB free space
Check model status:
npm run check-model
Re-download model:
./install_qwen.sh # Will prompt before re-downloading
npm run dev is runningrm -rf node_modules __pycache__
./setup.sh
FIRST-TIME LEGAL ACCEPTANCE IS ENFORCED REFUSAL ENGINE COVERS 200+ LETHAL CATEGORIES EMERGENCY NUMBERS VISIBLE ON EVERY PAGE
AI chat interface for biomedical literature search and analysis
See the codePractitioner-focused chatbot UI for biomedical engineers. Proxies to Grok‑4 via xAI API with RAG and a tailored system prompt that assumes baseline field expertise.
⚠️ CRITICAL LEGAL & SAFETY NOTICE (NON-REMOVABLE) ⚠️
THIS SOFTWARE IS EXPERIMENTAL RESEARCH CODE ONLY
IT IS NOT A MEDICAL DEVICE • IT IS NOT CLEARED BY FDA, CE, OR ANY REGULATORY BODY
NEVER USE OUTPUT FOR CLINICAL DECISIONS, PATIENT CARE, OR DIAGNOSIS
IN EMERGENCIES CALL 911 (US) / 112 (EU) / YOUR LOCAL EMERGENCY NUMBER
SUICIDE HOTLINE (US): 988 • (UK): 116 123 • (AU): 13 11 14
You must personally accept these terms before using the application.
BEFORE YOU USE BIOMED CHAT — PLEASE READ THIS FIRST
This is NOT a medical doctor, NOT a diagnostic tool, and NOT approved for any patient care.
What this tool IS:
What this tool is NOT and will NEVER be:
If you are a patient, parent, or looking for medical help — close this page now and contact a real doctor.
If you are a biomedical engineer working on devices, regulatory submissions, or research — welcome! This tool is built for you.
📖 Quick Links:
Note on API Providers: This project is built around the Grok API, which has demonstrated high performance on benchmarks. While other providers are supported, Grok is recommended for the best experience.
No coding required! Use Docker to run Biomed Chat on any computer (Windows, Mac, or Linux).
Download the project:
Open Terminal/Command Prompt:
Win + R, type cmd, press EnterCmd + Space, type "Terminal", press EnterCtrl + Alt + TNavigate to the biomedical-chat folder:
cd Downloads/biomed-chat
(Or wherever you saved the folder. If you're unsure, ask someone or use the file explorer to find the exact path)
Start the application (assumes that docker is already installed on your system, if not please install):
docker-compose up -d
This command downloads everything needed and starts the app in the background
Open your web browser and go to:
http://localhost:3000
Or try: http://127.0.0.1:3000
ON FIRST LOAD YOU WILL SEE THE FULL LEGAL NOTICE AND MUST CLICK “ACCEPT” BEFORE ANY FUNCTIONALITY IS UNLOCKED That's it! Biomed Chat will open in your browser.
"command not found" or "docker-compose not found":
"Port already in use" or "address already in use":
ports:
- "3001:3000" # Use port 3001 instead
"Permission denied" or "access denied":
sudo docker-compose up -dApplication won't load:
Need to stop the app:
docker-compose down
Need more help?
✅ Works on any computer - same setup everywhere
✅ No installation headaches - everything included
✅ Safe and isolated - doesn't interfere with your system
✅ Easy cleanup - delete when done
Easiest way to get started:
git clone <repository-url> && cd biomed-chat && chmod +x quick-start.sh && ./quick-start.sh
This single command will:
http://localhost:3000If you prefer step-by-step control:
Clone and setup:
git clone <repository-url>
cd biomed-chat
./setup.sh
Add your API keys (edit .env):
nano .env # or your preferred editor
Start the app:
npm run dev
That's it! Open http://localhost:3000 in your browser.
To use the local Qwen 2.5 7B model for private inference:
See QUICKSTART_LOCAL_MODEL.md for details.
# Choose your AI provider (grok recommended)
API_PROVIDER="grok"
# API Keys (only one required based on provider)
GROK_API_KEY="your_grok_api_key_here"
GEMINI_API_KEY="your_gemini_api_key_here"
OPENAI_API_KEY="your_openai_api_key_here"
ANTHROPIC_API_KEY="your_anthropic_api_key_here"
# Optional settings
PORT=3000
SITE_PASSWORD="your_password_here" # For protected access
SAFETY & LEGAL COMPLIANCE SETTINGS — THESE ARE NON-NEGOTIABLE AND MUST NEVER BE DISABLED
This project is experimental research software only. It is not a cleared medical device by FDA, CE, TGA, PMDA, or any other regulatory body, and must never be used for clinical decisions, patient diagnosis, treatment planning, or any real-world medical purpose.
The settings below enforce:
• Mandatory legal disclaimer on startup and on every single response
• A refusal engine that blocks over 200 high-risk categories known to cause harm (suicide/self-harm, off-label drugs in pregnancy, dangerous DIY procedures, opioid/benzodiazepine tapering, chest pain diagnosis, insulin hacks, CRISPR-at-home, bleach baths, ivermectin/hydroxychloroquine for COVID, high-dose IV vitamin C, ketamine self-administration, chelation therapy, black salve, Gerson therapy, urine therapy, and 180+ other lethal topics)
• Immediate emergency hotline routing when dangerous intent is detected
• Confidence scoring and “I don’t know” fallbacks
• Full red-teaming and refusal logging for ethics board review
Disabling or weakening any of these will re-expose the project to catastrophic legal, regulatory, and ethical liability. Keep all values exactly as shown.
Biomedical-specific hard rule — never allow advice that could be interpreted as clinical practe
For demo/mock mode: Comment out or remove the API key to use predefined responses without API costs.
npm run dev
The Node server automatically spawns the Python FastAPI backend (override with DISABLE_PYTHON_AUTOSTART=1 if you prefer to manage it manually). Open http://localhost:3000.
The app includes an optional local AI model for privacy and offline use. This requires additional setup but provides fast, private inference.
Method 1: Web UI (Easiest)
Method 2: Command Line Install Script
# Interactive installation with GPU/CPU auto-detection
./install_qwen.sh
# Check what will be downloaded
./install_qwen.sh --check-deps
# Install dependencies first
./install_qwen.sh --install-deps
# Force CPU mode even if GPU available
./install_qwen.sh --force-cpu
Method 3: Direct Python Script
# Auto-detect GPU and install
python3 install_qwen_model.py
# Check status
python3 install_qwen_model.py --check
# Force CPU mode
python3 install_qwen_model.py --force-cpu
GPU Mode (CUDA detected):
CPU Mode (No GPU or forced):
For detailed installation instructions and troubleshooting, see README_LOCAL_MODEL.md.
"Module not found" errors:
# Reinstall dependencies
npm install
pip install -r requirements.txt --force-reinstall
Port already in use:
# Change port in .env or kill process
lsof -ti:3000 | xargs kill -9
GPU not detected:
nvidia-smi command workspython -c "import torch; print(torch.cuda.is_available())"Unsloth GPU requirement:
API rate limits:
Slow local model:
HIGH-RISK QUERY BLOCKED
When the corresponding API key for the selected provider is not set, the system automatically provides mock responses for:
Mock responses include realistic biomedical engineering content with proper formatting, references, and streaming behavior identical to the real API. [For contributers only and testers]
All mock responses are wrapped with the full legal disclaimer and refusal engine.
Production Mode (API key configured):
Demo/Mock Mode (no API key):
Run the health check to diagnose issues:
./health-check.sh
# or
npm run health
This will automatically check:
If you see errors about externally-managed Python:
# The setup script now handles this automatically!
# But if needed, manually install with:
pip3 install --break-system-packages -r requirements.txt
Check if Python service is running:
ps aux | grep uvicorn
Check for missing dependencies:
python3 -c "import uvicorn, fastapi; print('✓ Core dependencies OK')"
Restart the server:
npm run dev
If port 3000 or 8000 is already in use:
# Change the port in .env
PORT=3001
Check disk space:
df -h ~ # Need ~22 GB free space
Check model status:
npm run check-model
Re-download model:
./install_qwen.sh # Will prompt before re-downloading
npm run dev is runningrm -rf node_modules __pycache__
./setup.sh
FIRST-TIME LEGAL ACCEPTANCE IS ENFORCED REFUSAL ENGINE COVERS 200+ LETHAL CATEGORIES EMERGENCY NUMBERS VISIBLE ON EVERY PAGE