Unit 7 / 10

Supply Chain and Traceability

Gains:

  • Ability to apply lot/batch traceability, recall and supplier quality concepts
  • Ability to produce traceability record, recall scenario and root-cause outline with AI
  • Ability to verify AI suggested traceability and recall steps with registration and legislation

It's Friday afternoon, you're working in the quality department at a dairy plant. Three days after shipment, an external laboratory analysis shows mold/yeast counts higher than expected on a batch of strawberries from the supplier. Which production lots did this strawberry go into? Which customers and which markets did those lots go to? How many pallets are left in the warehouse? Is recall required, and if so, in which class? He has an ERP screen, a bunch of Excel files and increasing pressure. It's tempting to tell an AI assistant to "give me a recall plan." In this unit, you will practically cover lot traceability, recall logic and supplier quality; Learn how to produce traceability records, recall scenarios and root-cause drafts with AI; Most importantly, we will try to verify every step the AI ​​recommends with real records and legislation.

The foundation of traceability: one step back, one step forward

The traceability principle of food safety legislation is the "one step back, one step forward" principle. Every business must know at least:

  • One step back: From which supplier, with which lot/batch number, did the raw materials/packaging arrive?
  • One step forward: In which lot, to which customer/distributor, in what quantity, and when did the product I produced go?

What connects these two rings is the lot code. If there is no matching between raw material lots and finished product lots, traceability is lost and you will have to recall the entire production in case of a single supplier issue.

Tip: A good lot code is readable and meaningful. For example, 24W29-L2-A = year 2024, week 29, line 2, shift A. If production date, line and shift are embedded in the code, you will see within seconds which variables are common in case of a problem. You can have the AI ​​design the code scheme, but you verify that the scheme is applied consistently across the system of record.

Sample traceability record table

finished goods lot

Production date

Line/Shift

Strawberry raw material lot

Supplier

Production quantity

referred customer

remaining in storage

24W29-L2-A

17.07.2026

Line2/A

CLK-2607-B

Agriculture Inc.

4,800 buckets

Market X (3,000), Market Y (1,200)

600

24W29-L2-B

17.07.2026

Line2/B

CLK-2607-B

Agriculture Inc.

4,500 buckets

Market Z (4,000)

500

24W30-L1-A

18.07.2026

Line1/A

CLK-2801-C

Garden Ltd.

5,000 buckets

Market X (5,000)

0

In this table, if the suspect strawberry lot is CLK-2607-B, the only affected finished goods lots are 24W29-L2-A and 24W29-L2-B; 24W30-L1-A is out of scope because it comes from another supplier's lot. This is exactly the power of traceability: it narrows down the problem to just the affected lots, not the entire production.

Recall classes and steps

Recalls are classified according to the severity of the risk. General framework (nomenclature may vary depending on source):

  • Class I: Serious/fatal risk to health (e.g. pathogen contamination, undeclared allergen, foreign material-glass). Immediate and public recall.
  • Class II: Temporary or reversible health risk (e.g. borderline microbiological exceedance).
  • Class III: Low health risk but non-compliance with legislation (e.g. minor error on label, weight non-compliance).

The basic steps of a recall:

  1. Stop and quarantine: Stop shipping suspicious lots, physically segregate stock in the warehouse, and label it “QUARANTINE.”
  2. Determine scope: Extract all affected finished goods lots and distribution points from traceability records.
  3. Assess and classify risk: Determine the recall class according to hazard type and exposure.
  4. Notify: Inform internal management, customers and, if necessary, the competent authority (Ministry of Agriculture and Forestry / provincial directorate).
  5. Recall and verify: Collect the product, reconcile the quantity collected with the quantity shipped (% recall effectiveness).
  6. Root-cause analysis and corrective action: Implement permanent solution to prevent recurrence.
Security: Never let the AI ​​alone determine the call class and whether a public announcement is required. Classification; It is carried out with the risk assessment of the food safety team and the guidance of the competent authority (legislation). AI saying "this is Class II, no announcement required" is a suggestion; Misclassification creates public health and legal liability.

Recall scenario and root-cause draft with AI

Using AI as a drill (simulation) and draft generator is very valuable. But first, let's look at the difference between weak and strong prompt:

WEAK PROMPT: "There was mold in the strawberry batch, write me a recall plan." (AI FIGURES which lots are affected, distribution, regulatory notification periods; gives a general text, it does not touch your records.) STRONG PROMPT: "Role: You are the food safety recall coordinator. Below is my traceability record table (finished product lot, raw material lot, supplier, customer, quantity). Suspicious raw material lot: CLK-2607-B (mold/yeast overgrowth). Task: 1) LIST AFFECTED product lots and customers only according to this table. 2) Give the recall steps as a sequential checklist. 3) EXACTLY specify the recall class; QUESTIONLY write down the need for notification to the competent authority. period/item FITTING; note 'must be confirmed by relevant legislation' Table: [traceability table here]"

The powerful prompt connects the AI to the recording and narrows the field of hallucination.

Root-cause: 5 Whys method

A common tool in root-cause analysis is the “5 Whys.” For the strawberry example:

Problem: Mold/yeast over limit on CLK-2607-B strawberry lot.1. Why is it high? -> The cold chain may have been broken when accepting strawberries.2. Why was it broken? -> The cooling record of the incoming vehicle showed 11°C instead of 4°C.3. Why 11°C? -> The vehicle's cooling unit malfunctioned on the road.4. Why wasn't it noticed? -> The temperature record was read on acceptance, but the product was admitted with "conditional acceptance" despite the out-of-tolerance value.5. Why was it conditionally accepted? -> Cold chain rejection criteria are not clearly defined in the acceptance procedure; The decision is left to the operator's initiative. Root-cause: The cold chain rejection threshold and decision authority are unclear in the acceptance procedure. Corrective action: Procedure to automatically REJECT cold chain product arriving at >7°C + operator training + data logger obligation.

Attention: Each step of the 5 Whys is a hypothesis. AI can produce this chain fluently, but until each link is verified with the actual record (vehicle temperature log, acceptance form, supplier CoA), the root-cause cannot be determined. Just because AI wrote "the cold chain was broken" does not prove that it was broken; The temperature record is checked.

Supplier quality and cold chain

The prerequisite for traceability is a reliable supplier. Key elements of supplier quality management: approved supplier list, certificate of analysis (CoA) on each shipment, periodic audit, and nonconformance record. Temperature recording is mandatory at every transfer point for cold chain products; A single record gap is the weak link in the traceability chain of the entire batch.

mini case

An ice cream manufacturer detects traces of undeclared almonds in a batch from a hazelnut butter supplier (allergen cross-contamination). To act quickly, the quality manager asks the AI ​​“which products should I recall?” The AI ​​suggests a general list, as no tables are provided, and a broad scope of "probably all variants from the last two weeks." Accordingly, the manager is preparing to recall 40 product types. A senior engineer opens the traceability records: the offending lot of hazelnuts was used in only two products, within a single date range; other varieties are from different supplier lot. Correct coverage is 2 items, not 40. Additionally, since almonds are an undeclared allergen, this is a Class I status and requires notification to the competent authority — AI had downplayed this as a “minor label issue.” Returning to recording both prevented the unnecessary destruction of millions and revealed the seriousness of the real risk.

Common mistakes

  • Not keeping matching between raw material lot and product lot; Having to recall the entire production in case of problem.
  • Using the "affected product list" that AI produces without registration, without verifying it with the actual traceability table.
  • Determining the recall class (I/II/III) based on risk assessment and AI recommendation rather than legislation.
  • Mistaking allergen cross-contamination as a "minor label error" and missing Class I seriousness.
  • Declaring a root cause without verifying each link of the 5 Why chain with an actual record (temperature log, CoA, acceptance form).
  • Not seeing gaps in cold chain temperature records as the weak link in the traceability chain.
  • Assuming reporting obligations and deadlines to the competent authority based on information fabricated by AI; Not confirming from official legislation.

In summary

  • The basis of traceability is "one step back, one step forward" and the lot code ties this together.
  • A well-kept traceability record narrows down the scope of a problem to just the affected lots rather than the entire production.
  • Recalls are classified by risk (I/II/III) and classification is done by risk assessment + legislation, not by AI.
  • It is efficient to produce recall scenarios, checklists and 5 Whys root-cause outlines with AI; however, the output is a draft and is verified by the record.
  • AI can hallucinate affected lots, distribution, notification periods and classification when registration is not provided; Every step is confirmed by actual record and legislation.
  • Final recall decision, scope and notification to authority; It is taken within the framework of the verified records of the quality team and official legislation.

Application task

Create a realistic traceability record table with at least 5 finished goods lots and 3 raw material suppliers in a hypothetical food production (e.g. instant soup, fruit biscuits, fresh salad); Let the table include raw material lot-finished product lot matching, customer distribution and warehouse stock. Identify a non-conformance (microbiological overshoot or undeclared allergen) scenario on a supplier lot. Give the AI ​​a strong prompt to list the affected lots and produce a 5 Why draft with a recall checklist. Then compare the AI ​​output with your own table: confirm or disprove the affected lot scope, suggested recall class, and root-cause chain. In a report; Describe which parts of the AI ​​you confirmed with the record, where it produced hallucinations or over/under coverage, and on what verified evidence you based your final recall decision. Include in the report the need for notification to the authority and that this must be confirmed by legislation.