Skip to content

AI uses for records

Food traceability exception dataset: tracing a recall with a missing lot

By SourceX Editorial · Reviewed by Noah Loul ·

9 sections

Short answer

Give the agent the broken record and everything that could bridge it, and ask for the smallest set of candidate lots the evidence supports, the customers each reached and what stays unknown. A food traceability exception dataset packages each missing-lot case with its receiving, production and shipping records, the quality decisions in force, the scope the company chose and how it was confirmed.

License terms

Food traceability exception

This page covers food traceability exception dataset: tracing a recall with a missing lot.Illustrative

Key takeaways

  • The test is whether the agent bounds the gap with evidence, not whether it guesses the missing lot.
  • Lot codes are created at packing, first receiving from fishing vessels and transformation, and carried through receiving and shipping records.
  • Keep corrections as dated additions so the case can be replayed with only what existed at trace time.
  • Grade inclusions, exclusions and stated unknowns against cited records, not a closed recall status.
  • Pair each case with a counterexample where a real record legitimately narrows the scope.

What should a recall trace test ask when a lot number is missing?

It should ask the agent to bound the gap, not to fill it. Given a receiving or production record with no lot code, the right answer is the smallest set of candidate lots that the surviving evidence can support, the reasoning that links them, the customers each candidate reached, and a clear statement of what remains unknown. An agent that picks the most likely lot and moves on has produced a plausible answer and a dangerous one.

A food traceability exception dataset is built from those moments. Each case starts with the broken record, links every other record that could bridge it, and ends with the scope the company actually used and how that scope was confirmed. The useful signal is in the bridging: which documents could legitimately narrow the trace, and which only looked as if they could.

Where in the chain of tracking events does a lot code go missing?

Mostly at the handoffs: receiving, transformation and shipping. FDA's food traceability rule, 21 CFR Part 1 Subpart S, ties traceability lot codes to specific events. Section 1.1320 says a lot code is assigned at initial packing of a raw agricultural commodity, at the first land-based receiving of food from a fishing vessel, and at transformation, and that a new lot code must not be established for other activities such as shipping, except as the subpart provides.

Each event then carries the code forward through key data elements. Shipping records under section 1.1340 include the lot code, quantity, product description, locations, ship date, the lot code source or its reference, and the reference document type and number, and the shipper sends that information on to the recipient. Receiving records under section 1.1345 capture the same core elements from the receiver's side. Transformation records under section 1.1350 tie the new lot code to the lots that went in. A gap at any one of these events breaks the link between upstream and downstream.

Where in the chain of tracking events does a lot code go missing?
Tracking eventWhere the lot code should beHow it typically goes missingRecord that may bridge the gap
ReceivingReceiving record with lot code and its sourceDock staff record quantity but not the code on the case labelSupplier shipping record or advance ship notice carrying the code and quantity
TransformationProduction record linking input lots to the new output lotInputs logged by product, not by lot, during a busy runBatch sheet, scale tickets or inventory consumption by lot for that run
ShippingShipping record with the lot code and recipientPick confirmed by item only, lot left blankPick and pack scan history or customer receiving record
Internal moves and reworkInventory transfer and rework recordsPartial cases combined or relabeled without a lot linkRework log, label print history
Supplier substitutionReceipt from an approved alternate supplierSubstitute lot received under the usual supplier's item codePurchase order change and substitute approval record

What should the traceability gap and evidence reconstruction task packet include?

It should contain the broken record, every record that could bridge it, the rules that limit what may be inferred, the scope decision, and the check that confirms it. The table is written to be used directly as a case schema by a food operations team; system names are examples and the field list carries over to any ERP or warehouse system.

At a glance

What should the traceability gap and evidence reconstruction task packet include

Label every field with its provenance. A lot code read from a scanned label, one copied from a supplier's shipping record, and one inferred from timing are three different kinds of evidence, and the packet must say which one each link rests on.

What should the traceability gap and evidence reconstruction task packet include?
Packet fieldContentsTypical sourceProvenance label
case_id and versionStable case key, packet version, date of the snapshotPacket builderrecorded
triggerWhat started the trace: supplier notice, complaint, test result or mock recallQuality systemrecorded
broken_recordThe receiving, production or shipping record with the missing code, as it stoodERP or warehouse systemrecorded
candidate_lotsEvery lot that could fill the gap, with the evidence for and against eachInventory by lot, supplier recordsderived
bridging_evidenceDocuments that narrow the candidates, each with its reference type and numberSupplier shipping records, batch sheets, scan logsrecorded or inferred
quality_decisionsHolds, releases, substitutions and specification versions in forceQuality management recordsrecorded
downstream_reachShipments of each implicated output lot: recipient key, date, quantityShipping recordsrecorded
scope_decisionThe lots and shipments the company included, who approved it, whenRecall or incident filerecorded
outcome_checkHow the scope was confirmed: supplier confirmation, test results, product recoveredIncident file, correspondencerecorded
counterexampleA similar gap where a bridging record did legitimately narrow the traceReal or labeled illustrativerecorded or illustrative

Can the task be replayed through the traceability chain and its quality decisions?

Yes, if the events are stored as an ordered history in which corrections are added rather than written over. Replaying means giving the agent the events as they existed at the time of the trace and checking that its scope follows from them, so a later fix to the record must not leak into the starting state.

GS1's EPCIS 2.0 schema shows one way to keep that history. It models object, aggregation, transformation, association and transaction events; transformation events list input and output items or quantities; lot numbers can travel as instance or lot master data; and dispositions include values such as recalled. When an event turns out to be wrong, EPCIS adds an error declaration to it with a declaration time, a reason such as did_not_occur or incorrect_data, and the identifiers of the corrective events, instead of deleting the original.

Apply the same rule to a packet built from an ERP. Keep the original blank-lot record, add the correction as a separate dated entry with who made it and on what evidence, and give the agent only what existed at the trace time. Quality decisions belong in the same timeline: a hold placed after the trace began is an outcome, not an input.

Illustrative case: one receipt with no lot code before a blending run

Everything in this case is illustrative, with invented counts and times, and describes no real company. A processor receives 3 deliveries of the same ingredient from 2 suppliers on one morning. Two receiving records carry lot codes; the third shows the quantity, 40 cases, and the supplier, but the lot field is blank. That afternoon a blending run consumes 52 cases of the ingredient and produces 2 output lots, which ship to 9 customers over the next 3 days. Eleven days later the second supplier issues a notice naming one of its lots.

The linked evidence narrows the gap only so far. The blank receipt came from the supplier that issued the notice, and that supplier's shipping record for the delivery lists two lots, one of them the named lot. Inventory by lot shows 18 cases of the coded lots still on hand after the run, but no scan history ties individual cases to the blend. The evidence supports that the named lot may have entered either output lot; it does not support excluding either.

The recorded decision placed both output lots and all 9 customers in scope, with the supplier's shipping record cited as the bridging document and the missing case-level scans recorded as the reason the scope could not be narrowed. The outcome check is the confirmation trail: notices to all 9 recipients logged, the supplier's confirmation of lot quantities attached, and the remaining on-hand cases placed on hold.

The counterexample changes one record. In a similar case the pick scans for the blending run recorded each case's lot code, and none of the named lot's cases were consumed in the run that made the second output lot. There, narrowing scope to one output lot is correct, and an agent that still includes both has over-recalled without reason. Both cases belong in the set so that neither caution nor narrowing is rewarded blindly.

What proves the trace scope was right once the gap was bounded?

The proof is a trace that a reviewer can rebuild from the cited records, plus the confirmation trail, not a recall status field marked closed. Grade the agent on whether every lot and shipment in its scope is supported by a cited record, whether every exclusion is supported by one too, and whether it stated what stayed unknown.

The regulation sets a useful format for the answer. Under section 1.1455, when FDA requests traceability records in the public health situations the section describes, a firm must provide them within 24 hours or within a reasonable time to which FDA agrees, and records required under sections 1.1325 through 1.1350 generally must be provided as an electronic sortable spreadsheet. Records must be kept for 2 years. Asking the agent to produce its scope in that shape, one row per event with the key data elements, makes the grading mechanical.

  • Every implicated output lot is linked to an input lot through a cited record or an explicitly stated inference.
  • Every excluded lot has a cited record that rules it out.
  • Every shipment of an implicated lot appears with recipient key, date and quantity.
  • The unknowns are listed, with the record that would resolve each.
  • The output reconciles to the inventory counts on the trace date.

Which records look like evidence but cannot close a gap?

Records that describe intentions or totals rather than the movement of specific lots. A packet should include some of these deliberately, because an agent that treats them as proof will narrow scope when it should not.

At a glance

Which records look like evidence but cannot close a gap

  • A purchase order, which shows what was ordered, not which lot arrived.
  • A supplier invoice without lot detail, which proves a sale, not a lot.
  • A production plan or schedule, which shows what was meant to run, not what was consumed.
  • A first-in, first-out policy, which describes practice, not what happened on that day.
  • A later relabel or correction entered after the trace began, which the agent could not have seen at the time.
  • An unrecorded verbal confirmation from a supervisor, which a reviewer cannot rebuild.

Safety, supplier confidentiality and compliance review before cases are shared

Treat these cases as sensitive on three fronts. They can describe a real food safety incident, they name suppliers and customers whose contracts may restrict disclosure, and they show how a company's traceability worked on a particular day. Replace supplier, customer and facility names with stable keys, remove consumer complaint details, and have a food safety reviewer confirm that the packet describes the trace decision and not anything that could be read as a current public health statement.

Check the regulatory dates rather than repeating them from memory. FDA had set January 20, 2026 as the original compliance date for the traceability rule and has said it will not enforce the rule before July 20, 2028, in line with a congressional directive; confirm the current position on FDA's site. This page describes how to build a test, not how to comply, and counsel should review the specific records and agreements before any case leaves the company.

Can resolved trace gaps become a licensed dataset?

A food company's resolved trace gaps, with the bridging records and the scope decisions attached, are hard to reproduce synthetically and useful to teams building operations agents. SourceX can take selected trace records from a food company through rights review, contracting, preparation, delivery and payment so they become a dataset licensed for AI.

A processor or distributor can start with a short company assessment without uploading data. The company approves the scope and terms and signs the agreement before any records are delivered.

Which call can an agent make when a lot's safety record is missing?

Only a documentation call: whether the file is complete, can be relinked from an original record, must be requested from whoever holds it, or goes to a specialist because nothing on file shows the safety step for that lot. The agent never concludes that a lot without its record is fine. In a food traceability record dataset this is the other broken link, running from a lot to the record of how it was made rather than from one shipment to the next.

FDA's rules give the rest of the decision to named people. Under the preventive controls rule, a preventive controls qualified individual reviews monitoring and corrective action records, or oversees that review, generally within 7 working days of their creation (21 CFR 117.165(a)(4)), and corrective action procedures must have affected food evaluated for safety and kept out of commerce if the facility cannot ensure it is not adulterated (21 CFR 117.150(a)(2)). Low-acid canned food set aside after a processing deviation is evaluated by a competent processing authority, and a record is made of the procedure used and the results (21 CFR 113.89); acidified foods have their own deviation section, 21 CFR 114.89. Which rule applies, and whether a gap is a deviation, is the specialist's call.

Each case takes one of four labels, fixed when the gap was found, and a later dated record settles it: the reviewer's acceptance of a relink, the holder's reply, or the specialist's written evaluation and disposition. The six cases below are invented to show the format and include a control and an over-escalation trap.

Which call can an agent make when a lot's safety record is missing?
Case (illustrative)On file when the gap is foundExpected labelHard negative the agent must rejectLater record that settles it
1. Pasteurized milk vat, controlSigned continuous chart whose number matches the batch sheet; the daily log's summary line is blankRECORD_COMPLETECalling it a gap because a summary line is blank while the original chart is wholeRecords review sign-off inside the review window, with no deviation entry afterward
2. Retort chart filed under the wrong lotChart stored under a lot number with two digits transposed; retort number and start time agree with the batch sheetRELINK_FROM_ORIGINALRelinking on production date alone when two runs that day used different retortsReviewer's acceptance of the dated relink entry, with the chart itself unchanged
3. Co-packed acidified salsaThe brand owner holds no pH record for the lot; the co-packer keeps the process recordsREQUEST_FROM_HOLDER: that lot's pH and process records, from the co-packerTaking a certificate of analysis on a later sample, or the co-packer's blanket assurance letter, as the lot's process recordThe co-packer's dated reply with the records, or its statement that none exist, which moves the case to ESCALATE_UNPROVEN
4. Chart recorder jammed on the first vatNo continuous record for that vat; two indicating thermometer readings in the operator logESCALATE_UNPROVEN to the qualified individual or processing authorityTreating two spot readings as the missing continuous recordWritten evaluation and disposition: release, reprocess, destroy or recall
5. Canned fish lot absent from canning recordsLot code on cases and shipping records; no matching retort or canning entry after a full searchESCALATE_UNPROVENGiving the lot the process of the nearest-dated runThe processing authority's recorded evaluation procedure and result, then the disposition
6. Non-GMO claim the supplier's papers do not supportClaim printed on the label; supplier documents silent on itREQUEST_FROM_HOLDER: claim documents from the supplier, routed to the labeling reviewerPutting the lot on a food safety hold as if the gap were a safety failureThe supplier's dated documents, or a label change record if the claim cannot be supported

How often does a missing record itself end in a food recall?

Rarely, but the public record shows the pattern. We tested every stated reason for recall in a public snapshot of openFDA's food enforcement reports (29,505 reports dated 20 June 2012 to 14 October 2026, from 7,920 recall events) against fixed patterns for a missing, unrecorded or unverifiable record. 64 reports (0.2%) from 21 events (0.3%) matched, reported between 2013 and 2026. More than half concern heat treatment, such as a firm that "can't find the lot code in their canning records" (F-0154-2020). FDA classified 50 of the 64 as Class II and 14 as Class III; none was Class I, its designation for products that predictably could cause serious health problems or death.

Some reasons name only the gap ("Lack of adequate HACCP records", F-0039-2017); others add a measured problem ("pH was found above 4.1 and lack production record", F-0106-2025). Either way, the public file shows only the branch that ended in recall. Lots evaluated and then released, reprocessed or destroyed never reach an enforcement report, so a model trained on notices alone would learn that every gap ends in recall.

How often does a missing record itself end in a food recall?
Record the reason says was missing (keywords, tested in this order)ReportsEventsExample reason, quoted (recall number)
Heat treatment (pasteuri-, thermal, retort, HTST, temperature, 5-log or 5 log, canning, under-processed)3513"the chart recorder paper jammed and did not record the time and temperature of the milk" (F-0373-2018)
Acidity (pH, acidified)193"pH for the products were not tested and recorded as required by acidified food regulation" (F-0754-2016)
Label claim (claim, GMO)11"manufacturers paperwork did not support the claim" (F-1392-2013)
Other monitoring, HACCP or production record (no keyword above)94"Missing processing records/production logs." (F-0849-2020)
All record-gap recalls64 of 29,50521 of 7,920Class II 50, Class III 14, Class I none

How was the record-gap count built, and what can it miss?

With six fixed text patterns applied to one field. The unit is one enforcement report (one recall number), and an event counts when any of its reports matches. Only the reason-for-recall text is tested, case-insensitively and on whole words; a report counts when any of patterns 1 to 6 matches, and it may match several. Groups in the table above take the first keyword match, in table order.

The last two rows are printed for review and never counted: reasons that use a record word without a gap pattern, such as a product called a cheese log or a record that exists and shows a deviation, and reasons that cite a missing scheduled-process filing. The count is a floor, since a gap described in other words is missed. The snapshot is a third-party copy of openFDA data whose record for event 62644 matches the example in FDA's own documentation.

How was the record-gap count built, and what can it miss?
PatternMatches when the reason for recall hasReports (one report can match several patterns)
1. Gap word, then record nounlack, lacks, lacking, missing, no, without, inadequate, absence of, not having, does not have, does not keep or do not keep; up to four words; then record, records, documentation, paperwork, log or logs, where log is not followed by reduction41
2. Negated record verbnot or never; up to three words; then recorded, recording, documented or documenting15
3. Record never madedid not, does not or failed to, followed by record; or no data was (or were) recorded2
4. Recorder failurerecorder, recorders, recording, chart or charts; up to four words; then a word starting with malfunction, or jammed, or out of compliance8
5. Record not found or not supportingcan't, cannot, could not or unable to find; up to six words; then record or records; or paperwork, documentation, record or records followed by did not support or does not support2
6. Not verifiablecannot, could not, can not or can't, followed by be verified3
7. Printed, not counted: record word onlyrecord or records, recorded, recorder or recorders, recording, documentation, documented, documenting, paperwork, log or logs (log not followed by reduction), chart or charts, and none of patterns 1 to 647
8. Printed, not counted: filing onlyno, without, not having or does not have; up to four words; then scheduled process, process on file, filed process or filed scheduled process; or process not on file; and none of patterns 1 to 616

What can a licensed record-gap file show that a recall notice cannot?

How the gap was resolved. openFDA's documentation says its enforcement data should not be used to track the lifecycle of a recall, and that a firm may find an initial recall has to be expanded to more batches or lots than first reported. A company's files hold what the notice leaves out: when the gap was found, the searches and requests that followed, the hold, and the evaluation that ended in release, reprocessing, destruction or recall. That evaluation is the label, an expert's judgment on the file rather than a measurement of the product.

Buyers can name the four labels, the reviewer and an acceptance test in a data request; SourceX sources such sets from companies on request rather than from stock.

Check each case against these points before it leaves the company:

  • The reviewer the governing rule names, such as the preventive controls qualified individual or a processing authority, has confirmed each expected label; the six cases above have not had that review.
  • Each case holds only what was on file when the gap was found; relinks, replies and evaluations are dated outcome entries.
  • Released and reprocessed lots sit beside recalled ones, and a label-claim gap sits beside true safety-record gaps.
  • A disposition without its written evaluation is marked partial.
  • A case that ended in a public recall is treated as identifiable, because product, dates, quantity and codes can match it to the enforcement report; drop the recall number and let counsel decide whether it stays.
  • The stated use is documentation triage and routing, not release, disposition or public health decisions.

Sources for this section

  • 21 CFR 117.165(a)(4) requires monitoring and corrective action records to be reviewed by, or under the oversight of, a preventive controls qualified individual within 7 working days after they are created or within a reasonable timeframe. Source
  • 21 CFR 117.150(a)(2) requires corrective action procedures to ensure all affected food is evaluated for safety and prevented from entering commerce if the facility cannot ensure it is not adulterated. Source
  • 21 CFR 113.89 has low-acid food set aside after a processing deviation evaluated by a competent processing authority, with a record of the evaluation procedures used and the results. Source
  • 21 CFR 114.89 applies when an acidified food process deviates from its scheduled process or the finished product's equilibrium pH is higher than 4.6. Source
  • A public snapshot of openFDA's food recall enforcement reports (commit 62fa0ff, pulled 25 October 2026) holds 29,505 reports dated 20 June 2012 to 14 October 2026 from 7,920 events; 64 reports from 21 events give a missing, unrecorded or unverifiable record as the reason for recall. Source
  • openFDA's documentation says its food enforcement data should not be used to track the lifecycle of a recall and that a firm may find an initial recall must be expanded to more batches or lots than first reported. Source
  • openFDA's field definitions describe recall classification as the relative degree of health hazard and Class I as products that predictably could cause serious health problems or death. Source
  • openFDA's documented example food enforcement record for event 62644 carries the same reason, quantity, dates, classification and code information as the snapshot's record F-2057-2012. Source

Frequently asked questions

What is a food traceability exception dataset?

It is a set of cases where a traceability record was broken or incomplete, each packaged with the records that could bridge the gap, the quality decisions in force, the scope the company chose and how it was confirmed. It is used to test whether an agent bounds a trace correctly.

Should an agent guess the most likely lot when one is missing?

No. It should list every lot the evidence cannot exclude, cite the records that support each inclusion and exclusion, and state what remains unknown. A confident single guess is the failure the test is designed to catch.

Where are traceability lot codes assigned under FDA's rule?

Under 21 CFR 1.1320, at initial packing of a raw agricultural commodity, at first land-based receiving of food from a fishing vessel, and at transformation. Shipping and similar activities carry an existing code forward rather than creating a new one.

How does this differ from a mock recall?

A mock recall tests whether a company can trace forward and back quickly with its current records. A trace exception packet freezes a past gap with its evidence and grades the reasoning used to bound it, so it can be replayed against an agent many times.

Can corrected records be used in the packet?

Yes, as dated additions kept separate from the original entry. The agent's starting state should contain only what existed when the trace began, and the correction belongs in the outcome or the counterexample.

Sources

  • 21 CFR 1.1320 sets when traceability lot codes are assigned and bars new codes for activities such as shipping. Source
  • 21 CFR 1.1340 lists the key data elements a shipper keeps and sends to the recipient. Source
  • 21 CFR 1.1345 lists the key data elements kept on receiving a food on the Food Traceability List. Source
  • 21 CFR 1.1350 sets the records kept when transforming a listed food, including the new lot code and the input lots. Source
  • 21 CFR 1.1455 requires records within 24 hours of an FDA request, generally as an electronic sortable spreadsheet, and sets 2-year retention. Source
  • FDA's Food Traceability Rule page describes key data elements kept for critical tracking events for foods on the Food Traceability List. Source
  • FDA states the original compliance date was January 20, 2026 and that it will not enforce the rule before July 20, 2028. Source
  • The EPCIS 2.0 XSD defines an error declaration with declaration time, reason and corrective event identifiers. Source
  • The EPCIS 2.0 JSON schema defines the event types, transformation inputs and outputs, lot master data, dispositions such as recalled, and error reasons. Source

See if your company qualifies

A short company assessment. No data uploads are needed.

See if your company qualifies