AI intelligence system

BatchResolve

From deviation to evidence, with the audit trail intact.

A deviation investigation assistant that assembles batch records, equipment telemetry, inspection imagery, SOPs and historical deviations into an evidence-linked case file a quality unit can defend to a regulator.

Pharmaceutical Quality Assurance Regulated Manufacturing GxP Document AI
Sector
Pharmaceutical & Regulated Manufacturing
Year
2025
Duration
11 months
Team
8 people
Platforms
Web · Validated environment
Status
In production
BatchResolve — visual identity for the case study
Weeks to days Investigation cycle Driven by evidence assembly time
Every claim Source-linked To document, page and passage
Immutable Audit trail Retrieval through to determination
Version-exact SOP retrieval The revision in force at batch time

01 — The problem

A single deviation investigation consumed weeks of a quality investigator's time, most of it spent locating documents. Batch records in one system, telemetry in a historian, SOPs in a document store, prior deviations in a spreadsheet nobody trusted.

The regulatory constraint made the obvious AI approach unusable. In a GxP environment, an unciteable conclusion is worse than no conclusion, and any system touching the investigation record must itself be validated and fully auditable.

02 — What we did

We built retrieval and assembly, not judgement. BatchResolve locates and links every piece of relevant evidence and proposes hypotheses, but the investigator's determination remains the record. The system never writes a conclusion into the file on its own.

Every action the system takes is logged in an immutable audit trail: what was retrieved, which version of which SOP, what was proposed, who accepted it and when. The trail is designed to be handed to an inspector as-is.

In a regulated environment, an uncited conclusion is worse than none.
Interface

What it looks like in use

Two of the screens that carry the most weight in daily use, rebuilt here from the production design system.

batchresolve.aurezalabs.com/dev/2025-0431
Deviation 2025-0431EVIDENCE LINKED
Batch record · 218 steps parsedLINKED
SOP-4471 rev C · in force at manufactureLINKED
Historian · vessel 7 · 04:12–09:40LINKED
Gap · no environmental record for step 114NAMED
Determination: quality unit

Evidence assembled, not huntedInvestigators open a compiled case file. The system retrieves and links; the quality unit determines and signs.

batchresolve.aurezalabs.com/audit
Audit trailIMMUTABLE
09:41 · retrieved SOP-4471 rev CSYSTEM
09:44 · hypothesis proposedSYSTEM
11:02 · hypothesis rejectedQA-114
11:26 · determination signedQA-007
Weeks to daysEvery claim sourced

Inspector-ready by designEvery retrieval, proposal and acceptance is recorded immutably with user, timestamp and rationale.

Capabilities

What the system does

Grouped by the job each set of capabilities exists to do, rather than by which team built it.

Evidence assembly

01 · The bulk of the old work

Batch record analysis

Executed batch records parsed into structured steps, parameters and signatures, including handwritten annotations.

Version-exact SOP retrieval

The procedure revision in force at the time of manufacture, never the current one.

Equipment telemetry correlation

Historian data pulled for the exact equipment and window, aligned to batch process steps.

Inspection imagery

Visual inspection results linked to the units and steps they relate to.

Investigation support

02 · Proposals, never verdicts

Root-cause hypotheses

Candidate causes proposed with the specific evidence supporting each, and what would confirm or exclude it.

Historical deviation search

Semantically similar prior deviations surfaced with their determinations and effectiveness checks.

Parameter excursion detection

Process parameters compared against validated ranges across the batch timeline.

Gap identification

Evidence the investigation would need but that does not exist is named explicitly.

Compliance and control

03 · Non-negotiable

Complete audit trail

Every retrieval, proposal and acceptance recorded immutably with user, timestamp and rationale.

Electronic signatures

Signature workflows meeting regulatory expectations for record integrity.

Validation package

Documentation supporting computerised system validation delivered with the software.

Role-based control

Segregation of duties between investigator, reviewer and approver enforced in the system.

Architecture

How it is put together

Layer by layer, with the reason each one exists — because the reason is usually the interesting part.

01Document processing

Layout-aware extraction of executed batch records including handwriting, with confidence per field and review routing.

  • Layout models
  • Handwriting OCR
02Knowledge index

Version-aware index over SOPs, specifications and prior deviations, queryable as of any historical date.

  • pgvector
  • Temporal index
03Correlation

Alignment of historian telemetry to batch process steps for the exact equipment train used.

  • Historian API
  • Step alignment
04Reasoning layer

Hypothesis generation constrained strictly to retrieved evidence, with a validator rejecting any unsupported statement.

  • Claude
  • Evidence validator
05Records system

Immutable audit store with electronic signature workflow and segregation of duties.

  • Append-only store
  • e-signature

Technology

Document AI

  • Layout models
  • Handwriting OCR
  • pgvector

Backend

  • Python
  • FastAPI
  • PostgreSQL
  • Celery

Frontend

  • React
  • TypeScript
  • PDF.js

Compliance

  • Append-only audit
  • e-signature
  • Validation package
Outcome

What changed

Measured against how the operation ran before, not against a benchmark chosen after the fact.

  • Evidence assembly stopped being manual. Investigators start from a compiled case file rather than a document hunt.

  • Every statement is traceable to a source. Down to the document version, page and passage.

  • The audit trail is inspector-ready. It was designed to be handed over rather than reconstructed.

  • Determination stayed with the quality unit. The system proposes and evidences; a human decides and signs.

How it ran

  1. Months 1-2

    Regulatory framing

    Established the validation approach and the boundary between system proposal and human determination.

  2. Months 3-5

    Document processing

    Batch record extraction including handwriting, with confidence gating throughout.

  3. Months 6-7

    Version-aware retrieval

    Temporal index so every SOP is retrieved as it stood at manufacture.

  4. Months 8-9

    Hypothesis and validation

    Constrained generation with the evidence validator gating every output.

  5. Months 10-11

    Validation and rollout

    Computerised system validation execution and phased introduction alongside existing process.

Related work

From the same practice

All fifteen projects

Manufacturing & Production Quality

LineTrace

From defect detection to defect causality.

A multimodal system that correlates line video, machine telemetry, batch records and operator actions to explain why a defect happened, not merely that it did..

2025 · 10 months
Telecommunications & Network Operations

NetCause

Not alarm detection. Failure hypothesis reduction.

A correlation engine that turns an alarm storm into a short ranked list of probable root causes by reasoning over network topology and fault propagation rather than alarm counts..

2025 · 8 months
Oil & Gas · Asset Integrity

PipeIntegrity

From a single inspection to longitudinal asset integrity.

A vision system that detects and localises pipeline deterioration, then tracks each defect across inspection cycles so maintenance is prioritised by progression rather than by appearance..

2024 · 9 months
Something similar?

Running into the same problem BatchResolve solved?

Tell us what you run. We will reply within two business days with what we would build for your situation — and, just as usefully, what we would leave out.