QuaBook AI is a reasoning layer woven directly into QC, CAPA, traceability, maintenance, and operations. It reads your live plant data, applies structured models, and produces auditable, human-review-required outputs — no hallucinated advice, no black boxes.
◆ TWO MODELS, RIGHT-SIZED PER TASK
1. Net weight on PKG-002 is drifting below spec (493g vs 498g minimum).
2. Because the weighing head calibration offset has drifted — consistent with the −0.8g/check slope observed over the last 6 readings.
3. Because calibration was last verified 47 days ago, exceeding the 30-day PM schedule. The last 3 deviations in 90 days occurred at 35, 42, and now 47 days post-calibration.
4. Because the PM reminder for PKG-002 weigher calibration was not escalated when overdue by >7 days.
5. Because there is no automated work order creation when a scheduled PM is overdue — only a passive alert.
Configure a maintenance work order auto-trigger rule: if weigher calibration PM is overdue by >5 days, auto-create Critical MWO and notify Line Supervisor and QC Manager. Review PM schedule across all packaging lines for same gap.
Pull the last 10 weigher calibration records for PKG-002. Plot actual vs target weight over time. Correlate calibration dates with deviation dates. If pattern holds (>30 days → drift), reduce calibration interval to 21 days and reassess in 60 days.
Data sources: CAPA metadata, all QCValues for the failing variable (last 90 days), SPC analysis (OLS slope + state), machine maintenance history, 90-day deviation frequency. SPC context is injected as structured JSON — model sees slope, direction, breach estimate, and historical baseline. Output requires human review and sign-off before CAPA can be closed.
Raw material lot LOT-RM-2026-0412 (Roasted Cashews, 6,000 kg, received Mar 4 from Al-Nasser Foods) has been implicated in 14 downstream production lots across 3 distribution channels. Estimated 4,200 kg of finished product is at risk. This package initiates Class II voluntary recall procedures per SFDA and FSMA 204 requirements.
Production lots: FG-2026-0441 through FG-2026-0454 (inclusive). Finished product: Roasted Cashews 500g (SKU RCK-500), Mixed Nuts 250g (SKU MXN-250). Distribution: Retail Channel A (6 customers), Retail Channel B (3 customers), Export — UAE (1 customer). Lot status: 9 fully distributed, 3 in transit, 2 in finished goods warehouse (immediate hold recommended).
Subject: Voluntary Product Recall Notice — {{CUSTOMER_NAME}}
Dear {{CONTACT_NAME}},
We are initiating a voluntary recall of {{PRODUCT_NAME}} (Lot: {{LOT_NUMBERS}}, Qty: {{QUANTITY_KG}} kg) received on {{DELIVERY_DATE}}. Please quarantine stock immediately and contact {{QC_MANAGER_EMAIL}} within 24 hours. Return instructions follow…
SFDA notification required within 48 hours (Class II). FSMA 204 traceability records: KDE documentation complete for receiving (CTE-1) through shipping (CTE-4). Key Data Elements available for all 14 production lots. Electronic records export available from Traceability module.
T+0: Place 2 warehouse lots on immediate hold. T+4h: Notify all 10 distribution customers. T+24h: SFDA notification filed. T+48h: Confirm all in-transit lots located and quarantined. T+7d: Disposition report filed.
Uses traceForward() engine for full BOM/lot chain traversal — follows ingredient lots through all production steps, blends, and sub-assemblies. Merges supplier data, QC inspection results, and distribution records. FSMA 204 KDE mapping is pre-configured per product category. Full audit trail attached to generated document.
Al-Nasser Foods is an approved raw cashew and mixed nut supplier with a generally acceptable 90-day performance record. However, a declining pass rate trend (97% → 91.4% over 6 months) and 2 open SCARs — both related to moisture control — warrant escalated monitoring. Country-level food fraud risk (nut adulteration) is categorized as moderate per SSAFE/EMA assessment.
Country risk: Saudi Arabia — moderate. Category risk: Tree nuts — elevated (adulteration, mycotoxin). Fraud risk flags: 2 lots in past 18 months required aflatoxin re-testing; both passed. SCAR-1: Moisture OOS on raw cashews (open 34 days, no CAPA response received). SCAR-2: Labelling non-conformance (closed, 11 days).
Pass rate: 91.4% (last 90 days) vs 97.0% (prior 90 days). Trend: declining. Rejected lots: 4 (moisture: 3, foreign matter: 1). On-time delivery: 94%. Average lead time: 18 days. Critical finding: 3 of last 5 moisture failures occurred on the same SKU (Roasted Cashews, natural humidity pack).
Inspection results (pass/fail/partial, variable-level data) · SCAR records with aging and response status · Qualification documents and expiry dates · Food fraud vulnerability assessments · Rejected lot history with root cause codes. Quick summary variant: <200 words for QC managers to act fast without reading the full brief.
3 of 12 machines require immediate attention. Mixer-01 is the highest priority — 8 unplanned stops in 30 days with 14 cumulative downtime hours represents a significant reliability failure. PKG-003 thermal trend is a predictive concern requiring intervention before failure. Remaining 10 machines are operating within acceptable parameters.
Mixer-01: Based on stop frequency trend (2 stops/week → 4 stops/week), projected total failure probability within 10–14 days: HIGH. Recommend immediate inspection of drive belt and motor bearings. Estimated repair window: 4–6 hours.
PKG-003: Bearing temperature rising at +2°C/week. At current rate, will exceed 85°C (critical threshold) in 3–4 weeks. Recommend bearing replacement during next scheduled PM slot. If temperature exceeds 78°C before then, treat as emergency.
Fleet PM compliance: 83% (10/12 machines on schedule). Overdue: Mixer-01 belt tensioner (9 days overdue), PKG-003 blade inspection (7 days overdue). 2 PM tasks scheduled this week — confirm technician availability.
Configurable thresholds fire the analysis automatically: unplanned_stops > 5/30d, downtime_hours > 8/30d, pm_overdue_days > 7. When a rule fires, the fleet brief is generated and a maintenance work order is auto-created with the recommended action pre-populated. Human approval required before work order is dispatched.
OLS linear regression on the last 4–8 readings, projecting the value N checks ahead and flagging the breach window. This context is injected directly into every RCA and deviation alert prompt — the AI sees your trend before it reasons about your problem.
Multi-turn conversation with full plant context — active work orders, open CAPAs, recent rejections, overdue maintenance, SPC alerts. Every answer is grounded in your live data, not generic food safety knowledge.
Sessions stored in FactoryChatSession table, messages as JSON array. Auto-title generated from first user message. Up to 50 sessions per user, configurable. Each message includes the full plant context snapshot at time of query — work orders, CAPAs, SPC states, maintenance alerts. Context window managed to stay within model limits.
Configurable rule engine: 5 metrics, 5 operators, 4 scopes, 3 severities. Rules fire in real time and push alerts to dashboard, email, and WhatsApp. Rules are created by QC Managers without code.
| Rule Name | Metric | Condition | Scope | Severity | Action |
|---|---|---|---|---|---|
| Weight Drift | spec_failure | > 15% in 10 inspections | Machine: PKG-002 | CRITICAL | Alert + auto-CAPA |
| Moisture Trend | deviation_rate | > 3 in 5 days | Product: Cashews 500g | WARNING | Alert + notify QC Mgr |
| Lab Failure Spike | rejection_rate | > 20% in 24h | Global | CRITICAL | Alert + escalate |
| PM Overdue | pm_overdue_days | > 7 days | Machine: All | WARNING | Auto-create MWO |
| Supplier Pass Rate | supplier_pass_rate | < 85% in 30 days | Supplier: All | WARNING | Alert + SCAR prompt |
The 90-day trial auto-starts on your first AI call. Bring your own Anthropic API key any time to continue without expiry — and keep your billing separate.
Every AI-generated document is traceable, attributed, and requires human sign-off before it affects any record. QuaBook AI is designed to meet HACCP, FSMA 204, BRC, SQF, and ISO 22000 audit expectations.
AI outputs are advisory. Operators, QC managers, and supervisors retain full authority over all quality, safety, and regulatory decisions. QuaBook AI surfaces patterns, drafts documents, and projects trends — it does not make or execute decisions autonomously.
All generated documents are clearly labeled as AI-assisted in the UI and in exported PDFs. The generating user's identity and the AI model version are attached to every document for auditor review.
Designed to support documentary requirements under: HACCP (hazard analysis records), FSMA 204 (traceability records, KDE mapping), BRC Global Standard (CAPA documentation), SQF Code (supplier management records), ISO 22000 (food safety management system documentation).