Linking Broken Supply-Chain Records:
Entity Resolution with Calibrated LLM Agents
When contaminated food is discovered, regulators trace it backward through the supply chain. The trace routinely dead-ends: a lot leaves a farm under one lot code, is received at a distributor under a different code, and is blended into a new product carrying a new identity. The same physical food ends up in two companies' files with no shared key linking them. We reframe traceback as a probabilistic record-linkage problem: link records by accumulated weight of evidence rather than exact keys, reconstruct blending events with mass-balance arithmetic, and adjudicate ambiguous pairs with language-model agents whose verdicts are treated as one more calibrated evidence field — never as decisions. On a simulated 3,000-lot network graded against generated ground truth, deterministic key-matching traces 34.8% of lots to their true stores; the fused probabilistic engine reaches 66.9%; with calibrated adjudication, 89.1% — at ~0.96 precision throughout.
01The problem
Foodborne contamination causes an estimated 48 million illnesses a year in the United States. A farm-to-store traceback takes weeks today; from July 20, 2028, FSMA 204 requires lot-level records to be produced within 24 hours. The gap is not missing data — every handoff is already recorded somewhere. The gap is that the records don't join. Lot codes are rewritten at receiving, quantities drift between shipping and receiving documents, and commingling destroys identity entirely: ten incoming lots become one new output lot with a new code.
Existing approaches ask the industry to fix the records — shared ledgers, standardized labels, portal onboarding for every counterparty. We take the records as they are, and ask instead: how much identity evidence survives in the fields nobody bothered to rewrite?
02Data
All results are measured on a simulated network: a generator produces a clean 18-event supply chain (farm → ship → receive → blend → store), then degrades it with dial-controlled noise — code rewrites, quantity drift, timestamp jitter, commingling — while retaining ground-truth labels. The generator's shape is calibrated against public sources (openFDA recall enforcement records, Open Food Facts, GS1 EPCIS samples). Every number below is graded by code against the generated answer key; nothing is eyeballed. The headline harness is 3,000 lots across 60 stores; scale results use 30,000 lots.
03Methods
3.1 Identity linkage (Fellegi–Sunter)
Records on either side of a custody seam are compared pairwise. For each candidate pair, a comparison vector γ records graded agreement across fields (origin, quantity, timing, product, lot code), with per-level likelihoods m(γ) = P(γ | match) and u(γ) = P(γ | non-match). Pairs are ranked by the log-likelihood ratio Σ log[m(γ)/u(γ)], and two thresholds partition them into links, non-links, and a review region where the evidence is insufficient to decide. Blocking reduces the 9,000,000-pair comparison space to 62,443 candidate pairs. A one-to-one assignment is then imposed across the two files, following the bipartite formulation of Sadinle (2017).
3.2 Genealogy (mass balance)
Commingling breaks identity linkage by construction — the output lot matches nothing. We recover it with arithmetic: genealogy is formulated as a constrained subset-sum, requiring input quantities to sum to each output within tolerance and a bounded time window, with a conservation check correcting violations.
3.3 Calibrated LLM adjudication
Records in the review region — pairs the score could not separate — are re-read by language-model agents against the original documents. The verdict is incorporated as one additional field in γ, with its own estimated m and u, updating the score rather than determining the decision. Measured like any other comparison field, the verdict has m = 0.92, u = 0.28, and is nearly perfectly calibrated (Cllr ≈ 0.01). Promotion to link status must still clear the engine's own threshold: the agent proposes, the engine disposes.
04Results
Traceback is graded end-to-end: a lot counts only if it is traced to its true store. Each layer compounds on the last — identity linkage alone reaches 47.0%, genealogy alone 49.2%, but each repairs the record breaks the other depends on, so together they reach 66.9%.
| CONFIGURATION | LOTS TRACED (n = 3,000) | SHARE |
|---|---|---|
| Deterministic key-match (exact codes only) | 1,045 / 3,000 | 34.8% |
| Identity engine only (Fellegi–Sunter) | — | 47.0% |
| Genealogy engine only (mass balance) | — | 49.2% |
| Full engine (identity + genealogy) | 2,006 / 3,000 | 66.9% |
| Engine v2 (+ calibrated LLM adjudication) | 2,673 / 3,000 | 89.1% |
Precision holds at every stage. Scoring with one-to-one assignment produced 2,116 links at 0.959 precision, with realized error rates μ = 1.5×10⁻³ (false link) and λ = 0.013 (missed match), leaving a review region of 2,059 pairs — 933 true matches and 1,126 non-matches, too mixed for the score to separate. Adjudication of that region added 690 links at 0.958 precision. Mass balance recovered 944 of the 956 links destroyed by blending, 903 of them correctly (0.957). A full trace runs in roughly one millisecond.
At 30,000 lots with proportionally scaled density, the engine reaches 95.5%. Compressing the same volume into the original 45-day window degrades it to 68.2%: record density, not dataset size, is the binding constraint.
05Discussion
- Weak fields, summed, replace the lost key. No single surviving field identifies a lot; origin, quantity, and timing together do.
- The two engines compound. Identity linkage and mass-balance genealogy reach 47.0% and 49.2% alone but 66.9% together — each repairs the record breaks the other depends on.
- LLM verdicts work as evidence, not decisions. Calibrated and folded into the score, agents resolve the review region while promotion still must clear the engine's own bar.
In practice, the difference is a recall that pulls the few truly contaminated stores instead of every store the company serves — against the millions of dollars in food waste and sickness attributed to slow, bulk recall procedures.
06References
- I. P. Fellegi and A. B. Sunter. A theory for record linkage. JASA, 1969.
- M. Sadinle. Bayesian estimation of bipartite matchings for record linkage. JASA, 2017.
- R. Gutman, C. C. Afendulis, and A. M. Zaslavsky. A Bayesian procedure for file linking to analyze end-of-life medical costs. JASA, 2013.
- G. Kamat, M. Shan, and R. Gutman. Bayesian record linkage with variables in one file.
- N. G. Marchant, A. Kaplan, D. N. Elazar, B. I. P. Rubinstein, and R. C. Steorts. d-blink: distributed end-to-end Bayesian entity resolution. JCGS, 2021.
- FDA. Requirements for additional traceability records for certain foods (FSMA 204 final rule), 2022.