How a record gets enriched
An ATS feed arrives messy and inconsistent per employer: years_experience carries
“Regular/Limited/Flex”, education is “No” on 97% of jobs, pay hides in prose,
and nothing states skills, benefits, visa policy or an occupation code. Closing that gap to one reference job
shape is the product. Doing it without spending a model call on anything a lookup could answer is the engineering.
pjd enrich report, 2026‑09‑18)The rule: the cheapest tier that can do the job
A model is never asked something a lookup can answer, and a larger model is never asked something a smaller one got right. A record enters at the top of the ladder. Each tier answers what it can, and those values leave for the enriched record; only the fields still null descend to the next, more expensive tier. Escalation is decided by code — the gates below — not by asking a model whether it feels sure.
| Tier | Cost | What it decides | Where |
|---|---|---|---|
| SCHEMA MAP | Sonnet | What each raw field really carries — once per organization, from a free statistical profile of the feed (~1K tokens) | enrich/schemamap.py |
| T0 rules | free | Pay strings, employment and arrangement labels, locations, language | normalize.py |
| T0 strip | free | Removes per-organization boilerplate before any model sees the text | enrich/prepare.py |
| SCRAPE | free | schema.org JobPosting / Organization JSON-LD from the job and organization pages | scrape.py |
| ONT-A | free | Title → O*NET-SOC by lexical retrieval over 61k O*NET titles | enrich/ontology.py |
| ONT-B | Jev | Picks among ≤ 8 retrieved candidates, or none; low confidence defers to Haiku | enrich/classify.py |
| T0.5 classify | Jev | Job families, work arrangement, experience, employment type, visa, education — one call per description, each answer with an explicit “not stated” | enrich/classify.py |
| T1 extract | Haiku | Description → structured fields, 6 descriptions per request | enrich/extract.py |
| T2 escalate | Sonnet | Only items that fail a deterministic gate; one item per request | enrich/extract.py |
Step zero: the schema map, once per organization
Field names in the feed are a convention every implementation bends, and per-job extraction cannot fix it — the error is in what the column means. Measured across three organizations:
| Raw field | org 2320 (demo) | org 2089 (Workday) | org 2012 (Oracle) |
|---|---|---|---|
education | degree text / “No” | city names | employment status (Regular / Temporary) |
location_type | On-site / Remote | On-site Flexible | business regions (“Japan”) |
job_type | empty | pay ranges, 100% filled | Parent Job / Child Job |
brand | empty | hospital divisions | audience: Internal / External / Both |
employment_type | Full-Time | Full time / Per diem | フルタイム, Tiempo completo |
So the question is asked once per organization, of a free statistical profile of the feed
(pjd profile: top values per field, ~1K tokens), by the larger model, because it is a judgment call made
once. The resulting field-role map steers the free rules for every job of that organization.
Measured effect on org 2089: pay coverage 0% → 86% of 4,895 jobs, closing dates recovered from a
custom field, and a 3% education rate removed that had been false positives from city names — for one request.
The map only routes raw fields to rules. The rules still validate every value, so a wrong map cannot
invent data — at worst a field stays null. Two roles the map reports are never auto-applied:
apply_url (the ones found were employee-only tenant links, not public apply URLs) and
audience (which postings are public is an operator decision per source, and postings outside it never
enter the API at all).
Why the bill is small: the cache is content-addressed
Model work is keyed by content, not by job. A re-synced job, a re-posted requisition, a second organization that happens to share a title — none of them costs anything, and neither does rebuilding the database, because the cache keys are derived from the text itself. Measured on org 2320 (2,700 jobs, ~3.2M description tokens):
- T1 is keyed by description hash, taken after the boilerplate strip: 2,283 unique descriptions of 2,700 jobs — 15% fewer calls, and a re-posted job costs nothing.
- The ontology is keyed by normalized title: 1,886 unique titles, most of which resolve at the free retrieval tier with zero tokens.
- Each shared boilerplate paragraph is extracted once as its own item (55 paragraphs across three organizations), and a job receives the result only of the paragraphs its own text actually contains. The first version merged one per-organization result into every job, and a Tokyo posting came back with “401(k) match” from a US paragraph it never contained.
- Micro-batching 6 descriptions per request pays the ~1K-token instruction and schema prefix once per six jobs. Prompt caching cannot do this on Haiku 4.5: its minimum cacheable prefix is 4,096 tokens, so a shorter prefix silently never caches.
- Backfills go through the Message Batches API (50% off); hourly deltas run synchronously.
- Re-enrichment only on change: sync’s content hash already knows which descriptions moved.
The merge step is called by sync for every job, so a cached enrichment attaches the moment a job with a known description or title appears, and survives every re-sync.
The gates: what escalates, and what happens when nothing works
An item escalates from Haiku to Sonnet when any of these holds. All five are deterministic code
(enrich/gates.py) — the model is never asked whether it is confident enough:
- It is missing from the micro-batch response, or fails schema validation.
- Pay is incoherent:
min > max, no unit, or outside plausible bounds (HOUR 7–500, YEAR 10k–2M). Pay that merely differs from the feed is not a gate — measured, that was always a stated starting rate against the feed’s full range, and precedence already resolves it. - A summary is empty, longer than 60 words, or a verbatim copy of a description sentence run over 25 words.
ai_taxonomies_ais empty, or carries a value outside the enum.- The model self-reports
confidence: "low".
T2 output that still fails a gate is stored as failed and the job keeps its T0 values.
Nothing is guessed to fill a hole.
The first real run escalated 60 of 192 items (31%). Reading them showed that none was a model error: 51 were
out-of-vocabulary taxonomy labels (“Nursing”, “Allied Health”) that only a transport without
constrained decoding can produce — now dropped in cleanup, since a larger model is not the fix for a label
typo; 7 were the text correctly stating a starting rate while the feed carried the full range; 2 were amounts with
no unit, now settled by the same magnitude rule the rules apply to the feed. pjd enrich regate
re-evaluated the stored results with zero model calls: 60 promoted, escalation 31% → 0%.
Sonnet was never needed.
Every requirement is grounded, or it is gone
Structured requirements are the field most worth faking and the easiest to fake, so they are validated in code
rather than trusted to the prompt. Each requirement carries evidence: the posting’s own phrase,
copied verbatim. After extraction, ground() looks that phrase up in the stored description (case,
whitespace and curly punctuation folded). A paraphrase or an invented requirement is not found and is dropped
before storage — the count survives as ai_requirements_dropped, so the grounding rate is
reportable rather than assumed.
- Character offsets were rejected on purpose: the model sees the boilerplate-stripped text, so offsets into the stored text would not line up, and a substring check gives the same 100% guarantee.
- Losing some requirements is the validator working. Losing all of them is a gate (“no requirement grounded in the text”): the model paraphrased throughout, and the item escalates.
- Measured on the first paid run (2026‑09‑19, 114 descriptions, $0.41): 10.0 requirements per posting, 99.0% grounded — 7 of 670 dropped. 60 of 60 job items passed on the first pass; one escalated, honestly, on a marketing page that is not a job posting, and Sonnet settled it.
required_shareis the barrier audit. The most harmful failure here is a model calling a preferred item required, because it silently narrows who qualifies — so it is measured per run rather than spot-checked.
Precedence, and the honest null
When two tiers have an opinion about the same field, the cheaper and more authoritative one wins. The order is fixed in code:
feed / rules > page (JSON-LD) > LLM > Jev
A structured statement from the employer beats an inference from prose. A Jev value only ever fills a field that
everything above it left null, and its provenance records the confidence it was accepted at
(jev:0.93). With include_beta=true every job carries an enrichment.fields map
naming the tier behind each value, so the precedence is inspectable per record rather than promised in a document
— that is exactly what the inspector shows.
Every classification question can abstain, and every answer is thresholded. Jev always answers something; without an explicit “not stated” option it would name a work arrangement for the 22% of postings that say nothing about one. A code is never invented either: the ontology choice lists only retrieved candidates, and an answer outside that list is rejected in code. Thresholds are calibrated against answers that were already decided, not guessed — the occupation threshold sits at 0.75 because at that level Jev decided 77% of a 299-title calibration set with 91% agreement, and reading the 20 disagreements showed ~17 of them were the earlier label being wrong.
What it actually cost
Model work through 2026‑09‑18, three organizations, 8,764 public jobs, at list prices with no Batch
discount (pjd enrich report):
| Stage | Model | Requests | Items | $ |
|---|---|---|---|---|
| schema map | claude-sonnet-5 | 3 | 3 orgs | 0.03 |
| ontology pick | claude-haiku-4-5 | 78 | 1,936 titles | 0.28 |
| extract (T1) | claude-haiku-4-5 | 56 | 274 descriptions + 55 shared paragraphs | 0.78 |
| escalate (T2) | claude-sonnet-5 | 0 | 0 | 0.00 |
| total | 1.10 | |||
Titles at that point: 1,512 resolved free (1,222 exact + 290 lexical), 1,853 by closed-list pick, 99 honestly “none fits”. Separately, the Jev tier took O*NET coverage from 70% to 86% for $0.07 on a 2,370-title backlog — Haiku’s estimate for the same backlog was $0.39 — and fleet-wide classification runs at roughly $0.17 per 1,000 descriptions.
Remaining work is quoted the same way: ~8,980 descriptions still to extract, estimated $18 via Batches. The prompt-version-2 re-queue of every description across five organizations and 10,410 active jobs estimates $24.85 via Batches, against a naive baseline of $273 for the same output.
The agreement figures above are tier-against-tier, which bounds the error from one side only: two tiers can agree and both be wrong. Human review of the enriched fields is a separate, ongoing exercise, and the numbers it produces are kept apart from the ones here on purpose. See the inspector for the record-level view: source in, enriched out, tier per value.