Decision owner
Quality manager
The named role remains accountable for the consequential decision.
Manufacturing
Designed for Quality engineer
Drive a quality deviation from detection to closed corrective action by linking inspection data, batch genealogy, and specifications into an evidence-backed root cause that a quality engineer approves before CAPA release.
Contract MAN-02 · primary aggregate QualityInvestigation · mode loading
Decision brief
This brief starts with the decision, evidence, and accountable owner. The guided workflow then shows how the recommendation was produced.
The evidence and control points that shape this recommendation.
Decision owner
Quality manager
The named role remains accountable for the consequential decision.
Governed evidence
6 record types
Structured records and cited text ground the recommendation.
Workflow
5 controlled stages
Each transition records its input, output, status, and audit context.
Human controls
1 approval gate
Approval gates prevent the copilot from making consequential decisions.
A viscosity result falls below specification on a coating lot; the assistant traces genealogy to a single resin input lot shared by six downstream batches, shows the same root cause closed nine months earlier without an effectiveness check, proposes a supplier re-qualification CAPA, and the quality manager approves containment of all six lots..
Drive a quality deviation from detection to closed corrective action by linking inspection data, batch genealogy, and specifications into an evidence-backed root cause that a quality engineer approves before CAPA release.
Approved CAPA and documented lot disposition gives Quality manager the evidence needed to begin the final governed business outcome, with the decision trail retained for review.
Step 1 of 5
| Field | Value |
|---|
| Field | Value |
|---|
The output appears here immediately. More technical evidence remains available below.
The demonstration keeps deterministic controls, AI assistance, and approval separate.
Source systems enforce identity, workflow order, policy filters, and record updates.
Retrieval and generation assemble relevant evidence into a cited recommendation or draft.
Quality manager verifies material claims and approves the consequential action.
Run the stages in order before using the Copilot. Every stage explains what happens, why it matters, the evidence it uses, and the complete API request and response.
Automated stage
What happens: Quality engineer performs log the deviation and classify risk using Out-of-specification result or operator observation and produces QualityInvestigation with risk classification. The transition is deterministic and does not require autonomous model approval.
Why it matters: QualityInvestigation with risk classification gives Genealogy service the evidence needed to begin Bound impact through batch genealogy, with the decision trail retained for review.
Loading relevant sample records.
Ready to run.
POST /api/domain/workflow/log-the-deviation-and-classify-risk
Run this API to see its formatted outcome.
| Field | Value |
|---|
| Field | Value |
|---|
Automated stage
What happens: Genealogy service performs bound impact through batch genealogy using Affected lot identifiers and produces Impacted lot and equipment set for containment. The transition is deterministic and does not require autonomous model approval.
Why it matters: Impacted lot and equipment set for containment gives Evidence agent the evidence needed to begin Assemble inspection and specification evidence, with the decision trail retained for review.
Loading relevant sample records.
Ready to run.
POST /api/domain/workflow/bound-impact-through-batch-genealogy
Run this API to see its formatted outcome.
| Field | Value |
|---|
| Field | Value |
|---|
Automated stage
What happens: Evidence agent performs assemble inspection and specification evidence using Measurements and specification clauses and produces Evidence pack showing the breached criteria. The transition is deterministic and does not require autonomous model approval.
Why it matters: Evidence pack showing the breached criteria gives Investigation agent the evidence needed to begin Propose root cause and corrective actions, with the decision trail retained for review.
Loading relevant sample records.
Ready to run.
POST /api/domain/workflow/assemble-inspection-and-specification-evidence
Run this API to see its formatted outcome.
| Field | Value |
|---|
| Field | Value |
|---|
Automated stage
What happens: Investigation agent performs propose root cause and corrective actions using Evidence pack and prior similar investigations and produces Ranked root cause with CAPA proposals. The transition is deterministic and does not require autonomous model approval.
Why it matters: Ranked root cause with CAPA proposals gives Quality manager the evidence needed to begin Approve CAPA and release the lot decision, with the decision trail retained for review.
Loading relevant sample records.
Ready to run.
POST /api/domain/workflow/propose-root-cause-and-corrective-actions
Run this API to see its formatted outcome.
| Field | Value |
|---|
| Field | Value |
|---|
Human approval required
What happens: Quality manager performs approve capa and release the lot decision using Root cause, CAPA plan, and disposition recommendation and produces Approved CAPA and documented lot disposition. A named human approver must review the evidence before the transition completes.
Why it matters: Approved CAPA and documented lot disposition gives Quality manager the evidence needed to begin the final governed business outcome, with the decision trail retained for review.
Loading relevant sample records.
Ready to run.
POST /api/domain/workflow/approve-capa-and-release-the-lot-decision
Run this API to see its formatted outcome.
| Field | Value |
|---|
| Field | Value |
|---|
Run a stage to see its explanation, evidence, full request, and full response.
Ask a question and receive an answer grounded in retrieved QualityInvestigation evidence.
Select a starter question or enter your own.
Loaded live from /api/config, /api/domain/model, and
/api/domain/sample.
qualityInvestigations/tenantId + /investigationIdA viscosity result falls below specification on a coating lot; the assistant traces genealogy to a single resin input lot shared by six downstream batches, shows the same root cause closed nine months earlier without an effectiveness check, proposes a supplier re-qualification CAPA, and the quality manager approves containment of all six lots.
| Container | Role | Hierarchical partition key | Document types |
|---|---|---|---|
qualityInvestigations |
Primary | /tenantId + /investigationId |
QualityInvestigation, InspectionResult, CorrectiveActionItem |
batchGenealogy |
Reference | /tenantId + /lotId |
BatchGenealogyNode |
qualitySpecificationLibrary |
Reference | /tenantId + /specificationId |
SpecificationClause |
investigationPrecedentIndex |
Reference | /tenantId + /rootCauseCode |
PriorInvestigationSummary |
| Type | Container | Partition key | Identifier pattern | Embedding fields |
|---|---|---|---|---|
QualityInvestigation |
qualityInvestigations |
/tenantId + /investigationId |
investigation::{investigationId} |
deviationVector |
InspectionResult |
qualityInvestigations |
/tenantId + /investigationId |
inspection::{investigationId}::{resultId} |
None |
BatchGenealogyNode |
batchGenealogy |
/tenantId + /lotId |
genealogy::{lotId} |
None |
SpecificationClause |
qualitySpecificationLibrary |
/tenantId + /specificationId |
specification::{specificationId}::{clauseRef} |
clauseVector |
CorrectiveActionItem |
qualityInvestigations |
/tenantId + /investigationId |
capa::{investigationId}::{actionId} |
actionVector |
PriorInvestigationSummary |
investigationPrecedentIndex |
/tenantId + /rootCauseCode |
priorinvestigation::{rootCauseCode}::{priorInvestigationId} |
summaryVector |
Read the investigation, its inspection results, and its corrective actions in a single partition-aligned query. Lot genealogy is read separately from the batchGenealogy container because a lot participates in many investigations and must not be copied into each one.
qualityInvestigations
single-partition
SELECT * FROM c WHERE c.tenantId = @tenantId AND c.investigationId = @investigationId AND c.type IN ('QualityInvestigation','InspectionResult','BatchGenealogyNode','CorrectiveActionItem') ORDER BY c.measuredUtc DESC
Isolate measurements that fell outside their specification limits.
qualityInvestigations
single-partition
SELECT * FROM c WHERE c.tenantId = @tenantId AND c.investigationId = @investigationId AND c.type = 'InspectionResult' AND (c.measuredValue > c.specificationLimits.upper OR c.measuredValue < c.specificationLimits.lower) ORDER BY c.measuredUtc DESC
Knowledge-container query against investigationPrecedentIndex (partition-aligned to /tenantId + /rootCauseCode): prove or disprove recurrence by reading the precedent index for this root cause code, which is a single partition read rather than a scan of every closed investigation.
investigationPrecedentIndex
single-partition
SELECT * FROM c WHERE c.tenantId = @tenantId AND c.rootCauseCode = @rootCauseCode AND c.type = 'PriorInvestigationSummary' AND c.closedUtc > @recurrenceWindowUtc ORDER BY c.closedUtc DESC
Partition-key fan-out control-plane query: list corrective actions whose effectiveness check has not been verified in time. It cannot carry the second partition key because the CAPA compliance report covers every open investigation in the quality system, so it runs as a tenant-scoped scheduled sweep off the interactive path, bounded by pending verifications due inside the current quality review period, executed with MaxItemCount paging and continuation tokens.
qualityInvestigations
partition-key-fan-out
SELECT * FROM c WHERE c.tenantId = @tenantId AND c.type = 'CorrectiveActionItem' AND c.verificationState = 'pending' AND c.effectivenessCheckPlan.dueUtc < @nowUtc ORDER BY c.effectivenessCheckPlan.dueUtc ASC