Skip to content

LifeSciForge/Pharma_Document_Intelligence

Repository files navigation

📄 Pharma Document Intelligence System

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.


🎯 What It Does

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

🛠️ Built With

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

📁 Project Structure

├── 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

🚀 Quick Start

1. Clone the repo

git clone https://github.com/LifeSciForge/Pharma_Document_Intelligence.git
cd Pharma_Document_Intelligence

2. Create virtual environment

python3 -m venv venv
source venv/bin/activate

3. Install dependencies

pip install -r requirements.txt

4. Add your API key

cp .env.example .env
# Edit .env and add your Anthropic API key

5. Run the app

streamlit run streamlit_app.py

💡 Example Documents to Try

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

🎯 Target Users

  • Medical Affairs — rapid evidence lookup
  • HEOR — endpoint and outcomes extraction
  • Regulatory Affairs — guideline and SOP queries
  • MSL — pre-call document preparation

🔑 API Key Setup

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.


👤 Author

Pranjal Das AI & Automation for Life Sciences github.com/LifeSciForge

About

AI-powered pharma document Q&A — upload any FDA label, trial report, or guideline and ask questions with exact page references. Built with RAG, LangChain, and Claude AI

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages