Complaint triage for pharmaceutical lots
Prepared for Jane Doe · Pharmaceutical manufacturing · December 3, 2026
Sample data for illustration.Targets
| Target | Open complaints | 90-day rate | Safety links | Status |
|---|---|---|---|---|
| Lot 24A117 · Tablets 500 mg | 9 | 14 per 100k units | 1 | Active |
| Lot 24A090 · Injectable vial | 5 | 11 per 100k units | 2 | Active |
| Lot 24B032 · Oral solution | 3 | 6 per 100k units | 0 | Watching |
| Lot 23L218 · Inhaler | 1 | 2 per 100k units | 0 | Watching |
Target detail
Lot 24A117 complaints (7 working days)
| Date | New | Open | Top defect | Safety links |
|---|---|---|---|---|
| Nov 16 | 4 | 9 | Black specks | 1 |
| Nov 13 | 2 | 6 | Black specks | 0 |
| Nov 12 | 1 | 5 | Black specks | 0 |
| Nov 11 | 1 | 4 | Tablet chipping | 0 |
| Nov 10 | 1 | 3 | Black specks | 0 |
| Nov 9 | 1 | 2 | Odor | 0 |
| Nov 6 | 1 | 1 | Tablet chipping | 0 |
Lot record
Alerts: what the system watches for
Edit alert
Configured alerts
Decision logic: alerts, conditions, plays and rules
Play: Triage complaints by lot risk
- Serious adverse event linked
- Defect is sterility or potency
- Same defect on 3+ complaints
- Lot complaints above 2x baseline
- Same defect in 2+ lots
Rules
Policy gate
Live feed
Investigate (1)
Caps hard to remove at 2 pharmacies; full investigation opened
Escalate (1)
Black specks in tablets, 1 serious safety link; FAR clock started
Trend (1)
Mixed defects, near baseline; added to monthly trending
Audit trail: one recommendation, start to finish
Data received
Play evaluated → rule fired
Decision
Outcome
Daily flags
ROI scoring and baseline
| Target | Decisions | Avg days to decision | Baseline | Best possible | Captured | Result vs baseline |
|---|---|---|---|---|---|---|
| Lot 24A117 · Tablets 500 mg | 8 | 1.2 | 4.8 | 0.5 | 84% | 3.6 days earlier |
| Lot 24A090 · Injectable vial | 6 | 1.8 | 5.1 | 0.8 | 77% | 3.3 days earlier |
| Lot 24B032 · Oral solution | 4 | 2.6 | 4.2 | 1.0 | 50% | 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.
AI Agent Decision Data
Reads incoming complaints, groups them by lot and defect, and recommends Investigate, Trend or Escalate.
When it acts: As complaints arrive; the QA complaint lead decides.
Agent feed: sample records
| Time | Target | Recommendation | Model | Agent’s reason |
|---|---|---|---|---|
| 11/16 10:18 AM | Lot 24A117 · Tablets 500 mg | Escalate | v2.0 | Black specks on 6 complaints; 1 serious adverse event |
| 11/16 09:03 AM | Lot 24A090 · Injectable vial | Investigate | v2.0 | Hard-to-remove caps on 5 complaints in 7 days |
| 11/16 08:38 AM | Lot 24B032 · Oral solution | Trend | v2.0 | Mixed defects, near baseline |
| 11/15 03:10 PM | Lot 23L218 · Inhaler | Trend | v2.0 | Single dose-counter complaint |
Policy breaches flagged
Checked against the policy gate the moment each output arrives.
Agent's call against the rules' call, last 90 days
| Agent | Investigate | Trend | Escalate |
|---|---|---|---|
| Investigate | 14 | 3 | 1 |
| Trend | 2 | 25 | 0 |
| Escalate | 1 | 0 | 5 |
Rows are the agent's call, columns the rules' call. The agent opens investigations earlier than the rules on small clusters. Shaded cells are agreement.
Disagreements, graded on the outcome
| Target | Agent | Rules | Decision makers | What followed | Better call |
|---|---|---|---|---|---|
| Lot 24B032 · Oral solution | Investigate | Trend | Trend | Two more complaints the next week; investigation opened late | Agent |
| Lot 23L218 · Inhaler | Investigate | Trend | Trend | No further complaints in 30 days | Rules |
Drift
| Period | Model | Agreement |
|---|---|---|
| Aug | v1.8 | 84% |
| Sep | v1.9new | 85% |
| Oct | v2.0new | 87% |
| Nov | v2.0 | 86% |
Agreement improved through the v2.0 update and has held since.
Fit and next steps
What we’d check first
- A daily repeated decision with clear data, a hard deadline and a defined approver
- How consistently complaints are coded by defect type
- How safety links arrive, and how often
- Validation and record rules the quality system requires
- Reading free-text complaints to suggest defect type and lot
Next step: a formal proposal
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.
- It runs entirely in the organization’s own AWS account, and all data stays there.
- Every recommendation is stored with the full data behind it: labeled records data teams can use to train and test models.
- Built with AI in mind, making maintenance and extension simple for a single technical resource.
Design prototype prepared by Stockurai · Sample data for illustration only · stockurai.com