Design prototype · Built on Stockurai

Complaint triage for pharmaceutical lots

Prepared for Jane Doe · Pharmaceutical manufacturing · December 3, 2026

Sample data for illustration.
DecisionWhich complaints to investigate, trend or escalate each day
OptionsInvestigate · Trend · Escalate
Data sourcesCall center and pharmacy intake, Lot and batch records, complaint history, Pharmacovigilance adverse event links
PolicyEscalate reportable issues within 3 working days; recall stays with the committee
Does this design prototype fit your needs? Complete the form to receive a formal proposal. Or answer a few questions to create a custom design prototype.
STEP 01

Targets

Targets are what the system watches. Here, they are the product lots complaints are raised against, with open complaints, the 90-day rate and safety links from the records.
TargetOpen complaints90-day rateSafety linksStatus
Lot 24A117 · Tablets 500 mg914 per 100k units1Active
Lot 24A090 · Injectable vial511 per 100k units2Active
Lot 24B032 · Oral solution36 per 100k units0Watching
Lot 23L218 · Inhaler12 per 100k units0Watching
STEP 02

Target detail

Where the feeds meet: complaints (what customers and pharmacies report) and the lot records (what was made, shipped and reported before). Every complaint is weighed against both.

Lot 24A117 complaints (7 working days)

DateNewOpenTop defectSafety links
Nov 1649Black specks1
Nov 1326Black specks0
Nov 1215Black specks0
Nov 1114Tablet chipping0
Nov 1013Black specks0
Nov 912Odor0
Nov 611Tablet chipping0

Lot record

Units shipped182,000
Baseline rate5 per 100k units
Serious safety link1, linked Nov 16
Reporting deadlineNov 19 (3 working days)
Feeds
ComplaintsNew complaints, defect type, lot number · Every 15 minutes
BatchUnits shipped, past complaints by lot · Daily
SafetyAdverse events linked to complaints · Daily
STEP 03

Alerts: what the system watches for

Alerts are code-free. Pick a field, an operator and a value. Each alert watches one thing, such as a defect type or a lot's complaint rate, and fires when it happens.

Edit alert

Lot complaints above 2x baseline
Complaints (30 days)
Greater than
Lot baseline rate x 2
1 Day
PreviewComplaints (30 days) greater than Lot baseline rate x 2

Configured alerts

Serious adverse event linkedSafety
Defect is sterility or potencyComplaints
Same defect on 3+ complaintsComplaints
Lot complaints above 2x baselineBatch
Same defect in 2+ lotsBatch
Report due within 2 working daysComplaints
STEP 04

Decision logic: alerts, conditions, plays and rules

Alerts evaluate data in real time. Conditions add triggered alerts up to a score, and plays organize the conditions. Rules turn a play’s score into a real-time recommendation on the live feed. The policy gate holds every Field Alert Report to its 3-working-day limit and leaves recall decisions to the recall committee, whatever the score says. Rules drive the recommendations, not AI.

Play: Triage complaints by lot risk

+40Serious harm signal
  • Serious adverse event linked
+20Quality defect reported
  • Defect is sterility or potency
  • Same defect on 3+ complaints
+15Pattern in the lot
  • Lot complaints above 2x baseline
+10Spans several lots
  • Same defect in 2+ lots

Rules

Score ≥ 60, or any sterility or contamination defectESCALATE
Score 20–59INVESTIGATE
Score < 20TREND

Policy gate

Field Alert ReportWithin 3 working days (21 CFR 314.81)
Recall decisionRecall committee only
ApprovalQA complaint lead
STEP 05

Live feed

This is the screen the decision team watches. Each card is a recommendation on one lot, printed the moment its rule is met, with the score and time it fired.

Investigate (1)

Lot 24A090  Score 35 · 5 open complaints
Caps hard to remove at 2 pharmacies; full investigation opened
11/16 09:05 AM

Escalate (1)

Lot 24A117  Score 75 · 9 open complaints
Black specks in tablets, 1 serious safety link; FAR clock started
11/16 10:20 AM

Trend (1)

Lot 24B032  Score 0 · 3 open complaints
Mixed defects, near baseline; added to monthly trending
11/16 08:40 AM
STEP 06

Audit trail: one recommendation, start to finish

Every recommendation is logged and traceable. Anyone can see which complaints, lot records and safety links arrived, which conditions were met, who approved the escalation and how early it was made.
Lot 24A117 — Audit trail

Data received

Complaints feed9 open, 6 mention black specks (call center, pharmacies)
Batch feed182,000 units shipped; 14 per 100k vs 5 baseline
Safety feed1 serious adverse event linked, Nov 16

Play evaluated → rule fired

✓ Serious harm signal (+40)
✓ Quality defect reported (+20)
✓ Pattern in the lot (+15)
Score75 → ESCALATE
Policy gatePassed: report due Nov 19; recall left to the committee

Decision

ActionEscalated for Field Alert Report assessment
Approved byQA complaint lead, 10:35
RecallReferred to recall committee

Outcome

Arrival-order review would have reached itNov 20, after the deadline
ResultEscalated on day 1 of 3 working days
STEP 07

Daily flags

A short daily list of things worth a look, separate from the live feed. Reporting clocks running down, lots with sudden complaint spikes and new adverse event links.
SafetyLot 24A117: serious event linked, day 1 of 3
Field Alert Report due Nov 19; assessment open
BatchLot 24A090 rate is 2.2x its baseline
Hard-to-remove caps on 5 complaints in 7 days
ComplaintsBlack specks reported on a second lot
Lot 24B032 has 1 similar complaint; cross-lot rule armed
ComplaintsIntake up 18% on last week
Mostly pharmacy reports on one product
STEP 08

ROI scoring and baseline

The optimization engine scores every decision. Every recommendation is measured against reviewing in order of arrival, and against the earliest day the signal was visible in the data. The gap is the ROI you can measure.
TargetDecisionsAvg days to decisionBaselineBest possibleCapturedResult vs baseline
Lot 24A117 · Tablets 500 mg81.24.80.584%3.6 days earlier
Lot 24A090 · Injectable vial61.85.10.877%3.3 days earlier
Lot 24B032 · Oral solution42.64.21.050%1.6 days earlier

Baseline: Review in order of arrival. Best possible: Earliest day the signal was visible. Sample figures; in a live installation, these come from the organization’s own decisions and data.

STEP 09

Fit and next steps

What we’d check first

Why
  • A daily repeated decision with clear data, a hard deadline and a defined approver
To verify
  • How consistently complaints are coded by defect type
  • How safety links arrive, and how often
  • Validation and record rules the quality system requires
Extend with AI
  • Reading free-text complaints to suggest defect type and lot

Next step: a formal proposal

ScopeThe decision, targets and data feeds
RulesRules and policy gate, written out
ROIHow ROI is measured against the current process
TermsSetup estimate, timeline and license terms
Where it runsThe organization’s own AWS account
Request a formal proposal Create a custom decision design prototype

For IT and data teams: an AI data pipeline

Stockurai is licensed to researchers and institutions for real-time analysis of equity markets, with AI and machine learning built into the process. The same AI data pipeline can be built for this decision.

Deploying AI agents for decisions like this?

Stockurai runs in shadow alongside the agent, on the same data feeds and business rules. Every recommendation is checked against the rules and policy as it arrives, then scored against what actually happened.

See the AI agent prototype for this decision

Design prototype prepared by Stockurai · Sample data for illustration only · stockurai.com