Decision owner
Quality manager
The named role remains accountable for the consequential decision.
Agriculture & Food
Designed for Quality manager
Let the quality manager trace a suspect finished lot back through every input lot, process step and sensor excursion, evaluate it against the food safety plan and specification, and scope a hold or recall to exactly the affected lots rather than a whole production week.
Contract AGR-02 · primary aggregate ProductionLotGenealogy · 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 consumer complaint of an off-flavor in a retort soup names a date code that maps to lot 24-187-B.
Let the quality manager trace a suspect finished lot back through every input lot, process step and sensor excursion, evaluate it against the food safety plan and specification, and scope a hold or recall to exactly the affected lots rather than a whole production week.
dispositionDecision 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: Process historian or consumer affairs intake performs deviation or complaint trigger using ProcessReading and produces deviationSignal. The transition is deterministic and does not require autonomous model approval.
Why it matters: deviationSignal gives Traceability resolver the evidence needed to begin Bidirectional genealogy expansion, with the decision trail retained for review.
Loading relevant sample records.
Ready to run.
POST /api/domain/workflow/deviation-or-complaint-trigger
Run this API to see its formatted outcome.
| Field | Value |
|---|
| Field | Value |
|---|
Automated stage
What happens: Traceability resolver performs bidirectional genealogy expansion using deviationSignal and produces affectedLotSet. The transition is deterministic and does not require autonomous model approval.
Why it matters: affectedLotSet gives Food quality and traceability assistant the evidence needed to begin Specification and plan grounding, with the decision trail retained for review.
Loading relevant sample records.
Ready to run.
POST /api/domain/workflow/bidirectional-genealogy-expansion
Run this API to see its formatted outcome.
| Field | Value |
|---|
| Field | Value |
|---|
Automated stage
What happens: Food quality and traceability assistant performs specification and plan grounding using affectedLotSet and produces FoodSafetyPlanChunk. The transition is deterministic and does not require autonomous model approval.
Why it matters: FoodSafetyPlanChunk gives Food quality and traceability assistant the evidence needed to begin Disposition recommendation, with the decision trail retained for review.
Loading relevant sample records.
Ready to run.
POST /api/domain/workflow/specification-and-plan-grounding
Run this API to see its formatted outcome.
| Field | Value |
|---|
| Field | Value |
|---|
Automated stage
What happens: Food quality and traceability assistant performs disposition recommendation using FoodSafetyPlanChunk and produces DispositionRecommendation. The transition is deterministic and does not require autonomous model approval.
Why it matters: DispositionRecommendation gives Quality manager the evidence needed to begin Quality manager hold or release decision, with the decision trail retained for review.
Loading relevant sample records.
Ready to run.
POST /api/domain/workflow/disposition-recommendation
Run this API to see its formatted outcome.
| Field | Value |
|---|
| Field | Value |
|---|
Human approval required
What happens: Quality manager performs quality manager hold or release decision using DispositionRecommendation and produces dispositionDecision. A named human approver must review the evidence before the transition completes.
Why it matters: dispositionDecision 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/quality-manager-hold-or-release-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 ProductionLotGenealogy evidence.
Select a starter question or enter your own.
Loaded live from /api/config, /api/domain/model, and
/api/domain/sample.
productionLotGenealogies/tenantId + /lotIdA consumer complaint of an off-flavor in a retort soup names a date code that maps to lot 24-187-B. The assistant expands genealogy to four input lots including a tomato paste lot from a single supplier, finds a 96-second shortfall against the 120-second minimum hold time on retort vessel 3 during a 41-minute window, and cites the preventive-control clause requiring destruction when the thermal process minimum is not met and no validated rework exists. It scopes the exposure to 1,840 cases across two finished lots rather than the full day's 9,200 cases. The quality manager approves the hold, and the frozen lot set drives the customer notification list.
| Container | Role | Hierarchical partition key | Document types |
|---|---|---|---|
productionLotGenealogies |
Primary | /tenantId + /lotId |
ProductionLot, GenealogyLink, ProcessReading, InspectionResult, DispositionRecommendation |
foodSafetyPlanLibrary |
Reference | /tenantId + /ccpCode |
FoodSafetyPlanChunk |
| Type | Container | Partition key | Identifier pattern | Embedding fields |
|---|---|---|---|---|
ProductionLot |
productionLotGenealogies |
/tenantId + /lotId |
lot::{lotId} |
None |
GenealogyLink |
productionLotGenealogies |
/tenantId + /lotId |
lot::{lotId}::genealogy::{direction}::{relatedLotId} |
None |
ProcessReading |
productionLotGenealogies |
/tenantId + /lotId |
lot::{lotId}::reading::{readingTimestampUtc}::{ccpCode} |
None |
InspectionResult |
productionLotGenealogies |
/tenantId + /lotId |
lot::{lotId}::inspection::{inspectionId} |
None |
FoodSafetyPlanChunk |
foodSafetyPlanLibrary |
/tenantId + /ccpCode |
ccp::{ccpCode}::plan::{planDocId}::{chunkOrdinal} |
chunkVector |
DispositionRecommendation |
productionLotGenealogies |
/tenantId + /lotId |
lot::{lotId}::disposition::{recommendationId} |
rationaleVector |
Expand every input lot consumed by the suspect lot for supplier-side investigation.
productionLotGenealogies
single-partition
SELECT * FROM c WHERE c.tenantId = @tenantId AND c.lotId = @lotId AND c.type = 'GenealogyLink' AND c.direction = 'consumedFrom' ORDER BY c.receivedAtUtc ASC
Return all critical control point readings that breached a limit during the lot's production window.
productionLotGenealogies
single-partition
SELECT * FROM c WHERE c.tenantId = @tenantId AND c.lotId = @lotId AND c.type = 'ProcessReading' AND c.isDeviation = true ORDER BY c.readingTimestampUtc ASC
Show every lot currently held for a product so the plant can size the exposure. Application-side partition-key fan-out recall-scoping query: bounded by the tenantId prefix, a single product code and the hold disposition.
productionLotGenealogies
partition-key-fan-out
SELECT * FROM c WHERE c.tenantId = @tenantId AND c.type = 'ProductionLot' AND c.productCode = @productCode AND c.dispositionState = 'hold' ORDER BY c.productionStartUtc ASC
Retrieve the preventive-control clause and regulatory reference for the hazard and CCP that deviated.
foodSafetyPlanLibrary
single-partition
SELECT * FROM c WHERE c.tenantId = @tenantId AND c.ccpCode = @ccpCode AND c.type = 'FoodSafetyPlanChunk' AND c.hazardCategory = @hazardCategory ORDER BY RANK RRF(VectorDistance(c.chunkVector, @queryVector), FullTextScore(c.chunkText, @queryTerms))