AI-powered document Q&A for pharma professionals. Upload any pharma PDF and ask questions in plain English — get instant answers with exact page references.
Medical Affairs and HEOR professionals spend hours manually searching through dense pharma documents. This tool does it in seconds.
Upload any document → ask questions → get:
- Direct answers from the document
- Exact page number references
- Source text preview for verification
- Downloadable Q&A session report
| Tool | Purpose |
|---|---|
| Python | Core language |
| LangChain | RAG orchestration |
| FAISS / TF-IDF | Vector search and retrieval |
| Claude API (Anthropic) | AI answer generation |
| PyMuPDF | PDF text extraction |
| Streamlit | Web interface |
├── document_loader.py # PDF loading and chunking
├── vector_store.py # TF-IDF vector search
├── rag_chain.py # RAG pipeline
├── llm_response.py # Claude AI integration
├── streamlit_app.py # Streamlit web interface
├── requirements.txt # Python dependencies
└── .env.example # API key template
1. Clone the repo
git clone https://github.com/LifeSciForge/Pharma_Document_Intelligence.git
cd Pharma_Document_Intelligence2. Create virtual environment
python3 -m venv venv
source venv/bin/activate3. Install dependencies
pip install -r requirements.txt4. Add your API key
cp .env.example .env
# Edit .env and add your Anthropic API key5. Run the app
streamlit run streamlit_app.py| Document | Source | Use Case |
|---|---|---|
| Keytruda FDA label | FDA.gov | Drug contraindications, dosing |
| Ozempic FDA label | FDA.gov | Diabetes/obesity evidence |
| NCCN Guidelines | NCCN.org | Treatment algorithms |
| Clinical trial report | PubMed | Endpoint results |
- Medical Affairs — rapid evidence lookup
- HEOR — endpoint and outcomes extraction
- Regulatory Affairs — guideline and SOP queries
- MSL — pre-call document preparation
Get your free key at console.anthropic.com
Add to .env:
ANTHROPIC_API_KEY=your_key_here
App runs in placeholder mode without API key — document search still works, AI synthesis activates with key.
Pranjal Das AI & Automation for Life Sciences github.com/LifeSciForge