Pharma AI Workspace
Blog post About R.Z.Pharma Demo work , an AI based Pharma workspace
PROJECT DETAILS
https://rzpharma.in/
6/30/20253 min read
PHARMA AI WORKSPACE
Local-First AI for Indian Pharma Operations
Free • Private • Yours
What It Is
A local-first, desktop AI productivity suite purpose-built for Indian pharmaceutical operations. One .exe installer. Eleven AI-powered modules. Zero monthly cost. Zero data stored in the cloud beyond the prompts themselves.
The 11 Modules
Each module targets a specific, high-friction pharma ops workflow that would otherwise require expensive consultants, SaaS tools, or manual labor.
#
Module
What It Does
1
Product Naming
Generate CDSCO-compliant brand names for new molecules
2
Multi-Language Translator
Translate pharma text to 12 Indian + international languages
3
Agreement Drafter
Draft distribution, CMO, licensing, and NDA agreements
4
Regulatory Reader
Analyse CDSCO/FDA/EMA circulars and extract action items
5
Meeting Minutes
Record or upload meetings → AI-formatted minutes
6
SOP Q&A Bot
Ask questions directly from your SOP documents
7
Visual Aid Analyser
Evaluate promotional material for UCPMP compliance
8
Call Summaries
Transcribe doctor calls → CRM-ready summary
9
Opportunity Scanner
Scan openFDA + PubMed → market opportunity brief
10
Tender Generator
Generate government tender response documents
11
WhatsApp Personaliser
Personalise HCP messages at scale, with UCPMP scoring
Daily Free Limits
Resource
Limit
LLM calls (OpenRouter free)
~1,400 / day
Audio transcription (Whisper)
Unlimited — runs locally
FDA/PubMed lookups
~14,000 / day
Monthly cost
₹0
Hidden Technical Strengths
1. Triple-Layer LLM Fallback Architecture
The LLM dispatcher routes across three backends with intelligent priority — the app essentially never goes down.
Tier
Backeole
1
Ollama (Local)
Fully offline, free, private. Auto-picks best installed model by rank score.
2
OpenRouter
Cloud fallback. ~1,400 free calls/day. Free-tier model rotation.
3
Gemini Flash Lite
Second cloud fallback. 1,500 req/day free.
For large-document modules (SOP, Regulatory, PDF), the priority flips — Gemini goes first because of its 1M-token context window. Local models are last resort. This context-aware routing is architecturally sophisticated; most apps just pick one API and stop.
2. Whisper.cpp — Fully Offline Speech-to-Text
• Uses whisper.cpp (C++ port of OpenAI Whisper) bundled as a PyInstaller binary inside the .exe
• Runs as a spawned Python Flask microservice on a dynamically assigned port (8181–8190)
• Audio never leaves the PC — zero cloud transcription cost, zero HIPAA/data privacy risk
• Unlimited transcription — no per-minute billing, no API quota
• ggml-medium.bin (1.5 GB) gives production-grade accuracy; upgrade to ggml-large-v3 (3 GB) for near-perfect
3. UCPMP Compliance Engine — Deterministic, Not Just AI
A custom rule engine runs a real-time lexical scan on every WhatsApp message and visual aid before output:
• Blocks forbidden superlatives: best, safest, number one, miracle, cure, 100%
• Flags unsubstantiated percentage claims (regex-based, not AI-based)
• Flags comparative claims without head-to-head data
• Scores 0–10 with issues and warnings broken out separately
This is a deterministic compliance layer on top of AI output — the AI can hallucinate, the rule engine cannot. Exactly what legal/medical affairs teams need.
4. OS-Level Encrypted Key Storage
API keys are stored using Electron's safeStorage, which delegates to Windows DPAPI / macOS Keychain under the hood. Keys are tied to the logged-in OS user and machine — even if someone copies the keys.enc file, they cannot decrypt it on another machine.
5. Content Security Policy Lockdown
The Electron main process injects a strict CSP that whitelists only five specific outbound domains: openrouter.ai, generativelanguage.googleapis.com, api.fda.gov, eutils.ncbi.nlm.nih.gov, and localhost. No arbitrary outbound calls. No script injection. No data exfiltration possible even if a module is compromised.
6. MAI — Conversational Agent Over All Modules
The MaiAssistant component implements a tool-calling AI agent:
• Reads which parameters each tool requires at runtime
• Asks for missing ones conversationally — one question at a time
• Emits structured <action> tags that the app intercepts and executes
• Routes naturally — users don't need to know which module to open
Example: 'draft an NDA for us and ABC Ltd' → the agent collects parties, territory, term → fires Agreement Drafter. This is an agentic loop, not a chatbot.
7. Auto-Update Infrastructure
Electron's autoUpdater is already wired in — the app can push silent updates to all deployed instances from a single server. For a pharma ops team of 50+ MRs, this means zero IT involvement for future releases.
Free tier math: OpenRouter free models + Gemini free tier = ~2,900 AI calls/day + ~14,000 FDA/PubMed lookups/day. More than enough for an entire ops department.
Deployment Story
• Single .exe installer — no IT involvement, no Docker, no Python on the user's machine
• Whisper service is PyInstaller-bundled as a standalone binary inside the .exe
• First-run wizard handles model download + API key entry in ~10 minutes
• System tray icon — runs quietly in background, accessible any time
• Docker Compose path available for enterprise IT teams who prefer containerized deployment
• Silent auto-updates — push new versions to all machines without user action
What Makes It Defensible
Domain Specificity
UCPMP rules, CDSCO naming conventions, GeM tender formats, Indian court/arbitration clauses, Indian language support. Generic AI tools don't have any of this.
Privacy-First Architecture
Audio never leaves the PC. Keys encrypted at OS level. Pharma companies dealing with molecule data and doctor relationships cannot use consumer SaaS tools without legal risk.
Zero-Cost Operation
Removes the #1 objection from pharma ops managers — 'we can't expense another AI tool.'
Offline-Capable
With Ollama installed, the entire text AI stack works with no internet. Only FDA/PubMed lookups and cloud model calls need connectivity.
Bottom Line
This is a pharma-ops command center disguised as a desktop app — domain-specific, legally aware, privacy-first, with a fallback AI architecture that most enterprise SaaS tools don't bother to build. The real moat is the combination of regulatory domain knowledge baked into every prompt + the deterministic UCPMP compliance layer + free unlimited local transcription. That's not something a pharma company can easily replicate by buying off-the-shelf tools.
Pharma AI Workspace — Free for internal pharma ops use.

