Home › Use Cases › Match a supplier's food-safety certificate to the approved-supplier rule for that site
Use caseUC0324
🧪 Use-case kit · runnable

Match a supplier's food-safety certificate to the approved-supplier rule for that site

A small, forkable project that does one job end to end. Run once for real, and every figure on these pages captured from that run.

The business caseThe problem this solves

A buyer's approved-supplier programme says what it buys from a supplier SITE — which product categories, which processes, from which address, from which date — and requires a current food-safety certificate covering it. The supplier files one. Somebody has to hold the two documents side by side and answer one question: does this certificate actually cover what we buy here? Today that is a technologist with a certificate PDF, a requirement line in a spreadsheet and a register of recognised accreditations in a third tab, repeated for every supplier on the list every time a certificate is re-issued. The expensive version of getting it wrong is not arithmetic: it is a certificate that LOOKS current — right dates, right standard, a recognised body — and has been suspended, transferred or narrowed by a letter filed after it was printed. Holding a supplier's certificate beside the approved-supplier requirement and a register of recognised accreditations, one supplier at a time, and reading the amendment letters filed against it. It does not replace the approval decision, the supplier conversation, the audit or the de-listing — none of the four exists anywhere in this kit.

Audience

A supplier-approval technologist working an approved list, and the buyer who reads what they produce. The decision this report is for is narrower than it looks: not 'should we buy a model', but 'which HALF of this job should a model touch'. Every number on these pages came from one real run of this code, not from a vendor page.

The inputThe actual supplier verification dossiers

The corpus is 64 supplier verification dossiers, 0.08 MB (txt 64). It is generated because it has to be. A real supplier verification dossier is a third party's certificate, a buyer's commercial requirement and a certification body's correspondence, and none of the three can be published. Generating it also buys the thing that makes the measurement possible: the corpus builder holds the EFFECT each amendment letter truly has as a structured fact, so the answer key is derived from it rather than typed, and neither arm is ever handed it.

The corpus

  • The 64 supplier verification dossiersgenerated from a fixed seed, so no real record, person or institution appears in it.
  • Where each came fromNowhere — every one of the 64 dossiers, the recognised register and the whole answer key are produced by tools/build_corpus.py. There is no personal data: a supplier is a company name and a site is a street address, and no individual, contact, auditor, signature, telephone number or email appears in any dossier.

Swap this folder for your own material and the kit is pointed at your supplier verification dossiers. That is the whole change — there is no database to migrate.

One supplier verification dossier, as the model receives itSC-0001.txt · 1 of 64
SUPPLIER VERIFICATION DOSSIER
Dossier             SC-0001
Supplier            Halloway Produce Group
Prepared            2026-09-08

APPROVED-SUPPLIER REQUIREMENT
Requirement         ASR-AMBIENT-4
Cover from          2026-10-25
Buying site         Unit 4 Marrow Lane, Elsdon EL7 2QP
Categories bought   ambient sauce; shell egg
Processes bought    modified-atmosphere packing; slicing and dicing
Minimum standard    AFS-3 issue 4 or later
Recognised register ACC-REG-2026

CERTIFICATE
Certificate no      AFS3-2025-11554
Standard            AFS-3 issue 4
Certified site      Unit 4 Marrow Lane, Elsdon EL7 2QP
Issued              2025-10-01
Expires             2027-01-20
Audit date          2025-09-02
Certification body  Calder Vale Registrars
Accreditation ref   ACC-112
Status              in force

SCOPE STATEMENT
Categories covered  ambient sauce; shell egg
Processes covered   modified-atmosphere packing; slicing and dicing
Exclusions          none stated

AMENDMENTS
  none filed

SUPPLIER FILE NOTES
  Supplier questionnaire returned and complete; no outstanding sections.
  Trading terms were reviewed by the commercial team and filed separately.
  Allergen matrix held on the supplier record, version 6.

END OF DOSSIER

The outcomeWhat a good result looks like

One dossier in, four graded answers out: does the certificate answer the requirement, which kind of evidence decides it, the date validity actually ends after any amendment, and the one category or process it does not cover — plus one line of the dossier quoted verbatim and located in it by exact match. On this corpus the paid call returns 64 of 64 expiry dates exact and, after ASV-2026 is re-applied in code, 62 of 64 dossiers with all four answers right.

And when it cannot

And what it does when it cannot. The paid call passed 9 certificates as COVERED that the key says are not — 2 after the station — and every one of the remaining two is the same shape: an amendment letter whose subject claims a rule and whose body grants nothing. On SC-0050 and SC-0053 a letter about the scope confirms the scope and adds no category; the call read 'a scope letter is on file' as 'the gap is closed' and answered COVERED at confidence 1.00. src/recheck.py is silent by design wherever a letter claims a rule, so it keeps both. ⚠︎ IN THE OTHER DIRECTION IT FLAGGED NOTHING: 0 compliant certificates were raised as findings. It errs towards passing, which is the wrong way round for this job and worth knowing before deploying it.

Where it fitsWhat did work

Every line below is a measured result from this kit's own runs, with the figure that supports it. The headline above is not softened by any of them.

  • Your certificates arrive as structured data and amendment letters are rare — the free rules floor, or even the null floor's rechecked column
    pure code scores 57 of 64 here with no model at all, and the null floor scores 40 after the station. If your certificates really are current on their face, that is the whole job.
  • Your suppliers file amendment letters and a person reads them today — the paid call WITH src/recheck.py in front of it
    on the 25 dossiers where the certificate alone is wrong the call scores 25 of 25 against the floor's 18, and every one of those 7 is a letter phrased in words a keyword list does not hold.
  • You want a number that says the model is better than a regex here — a bigger corpus
    62 against 57 on 64 dossiers is exact two-sided p = 0.18. This set cannot establish the gap and the kit does not claim it.
  • You need the verification to be defensible to the supplier — either arm, and read the citation
    every arm returns one line of the dossier and it is located by exact match; 62 of 64 of the call's citations are in the dossier and 64 of 64 of the floor's are.

At a glanceHow the whole thing runs

97%rechecked dossier all correct pct
1,528 msp50, end to end
$1.04per 1,000 supplier verification dossiers · openai/gpt-5-6-luna

Run once, for real, on 2026-09-08. Every figure on these pages was captured from that run — nothing is written from intent.

14 steps, grouped by the question that sends you to them rather than by build order. Each tile carries the one figure that step is about, and opens the page behind it.

Should you use this?What you bring, where it stops, and when not to use it

Before you commit an afternoon to this, these are the answers that decide it. Each one is rendered from the record it lives in — and links the page that holds it in full.

What do I have to bring?Replace data/corpus/*.txt with your own dossiers in the same five-panel layout, data/registers.json with your own recognised register, and data/policy.md + data/policy.json with your own approved-supplier rules. ⚠︎ WHAT STOPS BEING TRUE THE MOMENT YOU DO. Corpus lens →
When is this the wrong choice?Avoid: Paying per supplier for a call whose answer the certificate already contains. That is the case against the best-fitting scenario (“Your certificates arrive as structured data and amendment letters are rare”). 4 scenarios scored in all, each with its own. Eval lens →
Where does it stop working?A scanned or photographed certificate. Every arm here — the model's reading, the floor's column parse and the independent label check — starts from text, and the assembly step that turns a PDF into these panels is not in this kit. 9 recorded failure modes, each from a run rather than a guess. Corpus lens →
What was never verified?Whether the line an arm quoted is the line an approvals technologist would have quoted. The key names ONE defensible line per verdict and the scorer grades EXISTENCE only, deliberately: ASV-2026 admits several lines for most verdicts, so grading against the planted one would convict a correct quotation. 7 items this kit says it could not check. Eval lens →
Can I run this on a model I control?Yes — any OpenAI-compatible endpoint, including one on your own hardware. The shipped adapter takes its host from BASE_URL and its model from MODEL, so nothing in src/ changes. The published figures come from 1 model on the fast tier, one provider, one key. Prompt lens →
And if it fits — what do I stand up?8 artifacts with a stated home and a stated egress, and 3 decisions each with what you provision past its ceiling — plus what was not measured. That is the next page, not this one. step 14 — Run it in your environment →

Not asked of this kit — 2 questions: clone (a fresh clone of this kit runs with nothing fetched); judge (nothing here is graded by a model).

Last verified 2026-09-08 — r001-supplier-cert. Every figure on these pages was captured from that run.

Run itHow this reaches your data

Every result on this page was produced by pure code over checked-in files, with no API key — which is why you can read the numbers before anyone spends anything.

Run this on your own data

  • The pipeline, its eval harness and the runs behind every numberdeployed inside your environment, on your own model endpoints, against your own documents.
  • The corpus above is the shape, not the limitit is a folder swap, and there is no database to migrate.

Talk to us →

Checked before this shipped — A clean checkout with no key configured renders the whole board on 127.0.0.1:9324 and scores every graded cell: both free floors, the derived key, the column walk, the recognised register, the assembled prompt and the committed run's cached answers all need nothing. python3 -m evals.run --run-id b000-supplier-cert-rules --floor rules is the whole install.

A living map of modern AI — kept current every morning