Pharmaceutical
Deviation Assistant Agent
Built an AI agent that accelerates GxP deviation investigations by surfacing similar past deviations, drafting investigation reports, and flagging recurring patterns across the deviation history.
- Client
- Confidential, pharma
- Stack
- Azure OpenAI, Databricks, Python, LangChain
Outcomes
- 30 monthly active users across scientific and quality teams
- Root cause suggestions grounded in similar past deviations, with citations to source records
- Investigation report drafts pre-populated from historical context, leaving QA professionals to review and refine rather than start from scratch
- Recurring deviation patterns surfaced automatically across the full history
- Human-in-the-loop by design: the agent suggests, QA decides
Quality teams investigating GxP deviations were starting every investigation from scratch. When something went wrong in manufacturing or operations, the investigator had to manually search through years of past deviation records, identify whether a similar issue had occurred before, reason about likely root causes, and draft the investigation report. It took hours of reading per investigation. Recurring deviations, the kind that regulators care most about, were easy to miss when each investigation was handled in isolation.
I designed, implemented and led the deployment of the Deviation Assistant Agent, a GxP-compliant AI agent on Azure AI Search, Azure AI Foundry and Databricks. I delivered the application end to end: data engineering pipelines that index the full deviation history and link related records, the agent and AI systems that handle retrieval and reasoning, the orchestration and infrastructure layer, and the frontend that QA professionals use during investigations. The agent surfaces similar past deviations, suggests likely root causes grounded in that historical context, and drafts the initial investigation report for the QA reviewer to refine.