Agriculture & Food

Food Quality and Traceability Assistant

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

Quality manager hold or release decision: evidence ready for review

This brief starts with the decision, evidence, and accountable owner. The guided workflow then shows how the recommendation was produced.

Decision signals

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.

Business problem

A consumer complaint of an off-flavor in a retort soup names a date code that maps to lot 24-187-B.

Decision to make

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.

Outcome to show

dispositionDecision gives Quality manager the evidence needed to begin the final governed business outcome, with the decision trail retained for review.

  1. 1Deviation or complaint trigger
  2. 2Bidirectional genealogy expansion
  3. 3Specification and plan grounding
  4. 4Disposition recommendation
  5. 5Quality manager hold or release decision

Step 1 of 5

Ready: Start with the business question, then use the single button above.

The output appears here immediately. More technical evidence remains available below.

System logic, GenAI, and human accountability

The demonstration keeps deterministic controls, AI assistance, and approval separate.

System logic

Source systems enforce identity, workflow order, policy filters, and record updates.

GenAI contribution

Retrieval and generation assemble relevant evidence into a cited recommendation or draft.

Human accountability

Quality manager verifies material claims and approves the consequential action.

Workflow stages

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.

Seeded record
Loading
Document type
Loading
Container
Loading
Partition key
Loading
Current stage
Loading

API demonstration guidance

Run a stage to see its explanation, evidence, full request, and full response.

Grounded chat

Ask a question and receive an answer grounded in retrieved ProductionLotGenealogy evidence.

Answer and evidence

Select a starter question or enter your own.

Evidence

Domain implementation workspace

Loaded live from /api/config, /api/domain/model, and /api/domain/sample.

Domain objective
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.
Primary aggregate
ProductionLotGenealogy
Primary container
productionLotGenealogies
Hierarchical key
/tenantId + /lotId
Schema version
1

Sample scenario

A 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.

Physical Cosmos DB containers

Every container provisioned for this accelerator with its hierarchical partition key.
Container Role Hierarchical partition key Document types
productionLotGenealogies Primary /tenantId + /lotId ProductionLot, GenealogyLink, ProcessReading, InspectionResult, DispositionRecommendation
foodSafetyPlanLibrary Reference /tenantId + /ccpCode FoodSafetyPlanChunk

Document types

Contract document types, their owning container, and their identifier pattern.
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

Query patterns