PharmaBot AI ā Course Orientation: Architecture Blueprint & Skills Map
Understand the full system you're going to build, how the 10 skills map to real components, and how to get the most from this course.
What You're Building
PharmaBot AI is a production-grade pharmaceutical assistant chatbot. People type questions like "Can I take ibuprofen with warfarin?" or "What are the side effects of metformin?" and get accurate, grounded, cited answers ā streamed in real time.
This is not a toy. By the end of this course you will have:
- A multi-agent pipeline (Triage ā Drug Info or Interaction Checker)
- A RAG system over 1,200 FDA drug records
- Streaming GPT-4o responses via Azure OpenAI (Server-Sent Events)
- A React chat UI with citation cards and interaction severity alerts
- Security guardrails: rate limiting, prompt injection detection, PII-free sessions
- Azure Container Apps deployment with GitHub Actions CI/CD
The 10 Skills ā Mapped to Components
Every lesson in this course teaches one skill through one real component:
| Skill | What We Build |
|---|---|
| 1. AI Agents + Workflows | Triage Agent ā Drug Info / Interaction Checker Agents (LangChain) |
| 2. Practical LLM Experience | Azure OpenAI GPT-4o streaming, caching, retry |
| 3. Fast Prototyping | Working chatbot in under 2 hours from git clone to first response |
| 4. APIs + Backend Engineering | FastAPI async backend, Pydantic v2, full OpenAPI spec |
| 5. Prompt Engineering | Safety system prompts, medical disclaimers, structured JSON output |
| 6. Vector Search / RAG | Azure AI Search HNSW + pgvector hybrid over drug knowledge base |
| 7. Azure / Cloud | Azure OpenAI, Azure AI Search, Azure Container Apps |
| 8. Security & Privacy | Redis rate limiting, injection detection, PII-free sessions |
| 9. Team Collaboration | OpenAPI-first design, module boundaries, PR conventions |
| 10. Production Delivery | GitHub Actions CI/CD, structlog, health checks, Azure Monitor |
System Architecture
User (Browser)
ā
ā¼
React Chat UI āāāā Server-Sent Events āāāāāŗ FastAPI Backend (port 8000)
ā
āāāāāāāāāāāāāāāāāāāāāāāāā¤
ā ā
Triage Agent (LangChain) ā
/ \ ā
Drug Info Agent Interaction Checker ā
\ / ā
āā RAG Pipeline āā ā
ā ā ā
Azure AI Search pgvector ā
(HNSW vector) (fallback) ā
ā
Azure OpenAI (GPT-4o) ā
Redis (rate limit + session) ā
PostgreSQL (metadata) āRepository Structure
PharmaBot-AI/
āāā pharmabot/
ā āāā agents/ # Triage, Drug Info, Interaction Checker
ā āāā rag/ # Embedder, Retriever, Chunker, Pipeline
ā āāā prompts/ # System prompts, disclaimers, templates
ā āāā api/ # FastAPI routes (chat, search, health)
ā āāā security/ # Rate limiter, sanitizer
ā āāā main.py
āāā frontend/ # React 19 + TypeScript streaming UI
āāā scripts/ # seed_knowledge_base.py
āāā data/ # drugs.jsonl (1,200 FDA records)
āāā tests/Prerequisites
Before starting, confirm you have:
- Python 3.11+ installed ā
python --version - Node.js 18+ installed ā
node --version - Docker Desktop running ā
docker ps - Azure subscription with Azure OpenAI approved (takes 1ā2 business days if new)
- Git installed
If you're missing Azure OpenAI approval, you can still complete lessons 1ā8 using the mock Azure client included in the repo (MOCK_AZURE=true in .env).
How to Use This Course
Each lesson:
- Explains the concept ā what it is and why it matters
- Shows the code ā real implementation, not pseudocode
- Points to the exact file ā so you can open it and read it
- Ends with a checkpoint ā a curl command or test you run to verify it works
Work in order. Each lesson builds on the previous one. If something doesn't work, check the troubleshooting/ folder in the repo ā common errors and fixes are documented there.
Let's build.
Found this helpful?
Leave a comment
Have a question, correction, or just found this helpful? Leave a note below.