Back to blog
AI Systemsintermediate

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.

Asma Hafeez KhanMay 15, 20264 min read
PharmaBotAI AgentsRAGFastAPIAzureLangChainCourse Orientation
Share:š•

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:

  1. Explains the concept — what it is and why it matters
  2. Shows the code — real implementation, not pseudocode
  3. Points to the exact file — so you can open it and read it
  4. 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.

Enjoyed this article?

Explore the AI Systems learning path for more.

Found this helpful?

Share:š•

Leave a comment

Have a question, correction, or just found this helpful? Leave a note below.