← All Case Studies
Case Study · Global Pharma Manufacturer

Cutting deviation cycle time with guided AI.

How a global pharmaceutical manufacturer built a suite of AI assistants to accelerate deviation investigations — collecting evidence, guiding writing, and standardizing quality documents.

Engagement AI-Assisted Quality Documentation Domain Quality · Incident Management Approach RAG · LLM Mesh Delivery Phased · 3 Assistants

Three assistants, one governed documentation workflow.

Thousands of deviations, no standardization.

Potential deviations from established procedures are captured, investigated, and documented as part of the quality process.

To meet resolution targets at scale, the following bottlenecks needed to be addressed: manual fact-gathering and inconsistent technical writing across a large, distributed pool of quality management investigators.

AI mapped to every step of the workflow.

We delivered a phased suite of AI assistants aligned to the deviation management workflow — Initiate, Collect Facts, and Populate — using retrieval-augmented generation over historical events plus structured SOP and attachment data.

Everything runs on the client's self-hosted LLM Mesh, so privileged deviation data never leaves their environment — no anonymization or redaction required.

A phased suite built on a shared RAG foundation.

Three assistants shipped in sequence, each one drawing on the same retrieval layer.

Phase 1

Investigator Assistant

RAG search across historical deviations surfaces relevant precedents, SOPs, and information gaps during fact collection.

Phase 2

Initiation Chat

An interactive chat guides operators through initiating a report and capturing observations consistently.

Phase 3

Guided Writing

Suggestions help populate each report section, guiding rather than generating, to stay compliant.

Retrieval

Vector + Relational

Milvus recalls semantically similar events; a relational store handles structured SOP lookups.

Privacy

Local & Governed

Runs entirely inside the client environment; no external integrations, no data leaving the boundary.

Experience

Unified Workflow

A single guided three-step interface tracks state across Initiate → Collect Evidence → Populate Report.

Metrics

Feedback & Logging

Thumbs-up/down capture plus token-usage and session-time logging quantify cycle-time gains.

Models

Model-Agnostic

Configurable across GPT and Claude models, tuned for the best balance of accuracy, cost, and latency.

Faster, more consistent investigations, by design.

Complete at intake

Interactive chat intake guides operators at submission, ensuring critical information is captured up front.

Faster fact collection

Automated retrieval of precedents, SOPs, and attachments replaces slow, manual searching.

Consistent writing

Field-level guidance standardizes report quality across distributed investigation teams.

Compliance-safe

Guides rather than auto-writes, and keeps all data on the client's LLM Mesh.

Measurable

Token and session logging quantify time savings against the five-day cycle target.

The full stack behind the suite.

App & UI
Next.js FastAPI AWS Python Okta
AI & Retrieval
LangChain LangGraph GPT Claude RAG
Data
Milvus PostgreSQL pgVector
Methodology
Semantic Search Prompt Tuning

Trustworthy AI,
inside your walls.

Jahnel Group builds trustworthy AI systems for regulated, quality-critical industries.