Lise Karimi
← All case studies

Pharma · Quality (GxP)

SOP/CAPA Assistant

40% Faster deviation investigations

Challenge

Investigators search SOPs and past deviation and CAPA records by hand.

Approach

A grounded RAG assistant over SOPs and past records, with human-in-the-loop review.

Key outcomes

  • 40% faster investigations
  • 20% fewer recurring deviations
  • 100% grounded, source-cited answers

Context

In pharmaceutical manufacturing and quality operations, every deviation from an approved procedure must be investigated, documented and closed with a justified root cause and a corrective and preventive action (CAPA). Investigations run under strict timelines and are reviewed during regulatory inspections.

The knowledge needed for a good investigation already exists in SOPs, past deviation reports and CAPA records. But it is spread across document repositories and quality systems, and finding the right precedent depends on each investigator's experience.

The problem in detail

  • Scattered knowledge. SOPs, deviation reports and CAPA records live in separate systems, with no single way to search them together.
  • Manual precedent search. Investigators search by keyword and memory, so similar past cases are often missed and root causes repeat.
  • Trust and compliance. In a GxP environment, every AI answer must be traceable to an approved source, and the investigator must stay accountable for the conclusion.

The approach

1

Process mapping with Quality

Map the deviation investigation process end to end with the Quality team, and identify where AI helps without replacing judgment: finding the applicable SOP, retrieving similar past deviations and drafting the investigation summary.

2

Grounded RAG over quality records

Build a RAG pipeline over SOPs and past deviation and CAPA records, with hybrid search (vector and keyword) and metadata filters on SOP version, site and product. Every answer is grounded in approved documents and cites its source and SOP version, so the investigator can verify it in one click.

3

Evaluation, guardrails and human-in-the-loop

Define an evaluation set with Quality and measure groundedness, citation accuracy and answer relevance before each release. Add guardrails that refuse to answer when no approved source exists, prompt-injection defenses, and human-in-the-loop review of every conclusion.

Results

  • 40% faster investigations. Investigators find the applicable SOP and similar past cases with one question, instead of three separate manual searches across SOPs, deviations and CAPAs.
  • 20% fewer recurring deviations. Similar past deviations and CAPAs are surfaced at the start of each investigation, so known root causes are addressed instead of repeated.
  • 100% grounded, source-cited answers. Every answer is grounded in an approved source and SOP version, with groundedness evaluation records and an audit trail ready for inspection.

Tools

Microsoft Copilot Studio, Azure AI Foundry, Power Platform

More case studies

Facing a similar challenge?

Discuss Your Project