Skip to content

Example: grounding an LLM-extracted job posting (examples/llm-job) - #41

Open
tylrcc wants to merge 1 commit into
msertdev:mainfrom
tylrcc:fix/issue-33
Open

tylrcc wants to merge 1 commit into
msertdev:mainfrom
tylrcc:fix/issue-33

Conversation

@tylrcc

@tylrcc tylrcc commented Nov 11, 2026

Copy link
Copy Markdown

Closes #33

What's added — examples/llm-job/

  • page.html — a saved job posting page (Data Platform Engineer at Brightpath Analytics) with the posting's title, company, location, employment type, and salary range in the visible body text.
  • llm-response.json — a recorded LLM-style candidate in the same {value, quote} format as examples/llm. Five fields are supported by the page; signingBonus is deliberately hallucinated — its quote appears nowhere in the posting.
  • run.mjs — grounds the candidate against the page as a text/html source (same pattern as examples/llm/run.mjs), prints coverage and the rejection, and compares the receipt against the committed expected receipt.
  • expected-receipt.json — the expected receipt: coverage 5/6 and a single quote-not-found issue at /signingBonus. The clock is pinned via options.now, so the receipt (including its hash) is reproducible byte for byte.

Verification

  • node examples/llm-job/run.mjs — coverage: { grounded: 5, total: 6, invalid: 1 }, REJECT /signingBonus: quote-not-found, PASS receipt matches expected-receipt.json
  • grounded-json verify examples/llm-job/expected-receipt.json examples/llm-job/page.html — PASS 5/6 fields reproduced from the source snapshot
  • oxfmt --check examples/llm-job/ and oxlint examples/llm-job/ — clean
  • Package test suite: 28/29 pass. The one failure (cli.test.ts > runs the zero-setup demo) is a 5s subprocess timeout in my sandbox — the demo itself runs fine directly (4.4s wall here) and is unrelated to this change, which only adds example files.

… a job posting page

examples/llm-job pairs a saved job posting HTML page with a recorded
LLM-style extraction in the {value, quote} format used by
examples/llm. Five of six fields ground cleanly; the sixth
(signingBonus) is a deliberate hallucination whose quote appears
nowhere in the page, so the receipt flags it quote-not-found.

run.mjs grounds the candidate against the page as a text/html source
and compares the receipt with the committed expected-receipt.json
(the clock is pinned through options.now, so the receipt is
reproducible byte for byte).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Example: grounding an LLM-extracted job posting

1 participant