An hourly job pulls 68 news queries, decides whether there is enough new material to bother extracting anything, and only spends a model call when there is. That decision — skip extraction when fewer than five headlines are new, extract when five or more are — is the part of this system worth describing.
Problem and failure definition
Structuring news into records with an LLM every hour, every query, forever, is a cost problem before it is anything else: 68 queries run hourly is 1,632 calls a day if every run always extracts, regardless of whether the news actually moved. The failure mode is not inaccuracy — it is a pipeline that burns model calls on queries that returned the same headlines it saw an hour ago.
System
A GitHub Actions cron fires hourly and invokes a Vercel serverless function. The function pulls all 68 queries, then compares each query’s headlines against what it fetched last run. If fewer than five headlines are new, the function skips the extraction call for that query entirely — no model invocation, no cost, no output — rather than running extraction and discarding a near-duplicate result afterward.
Where the new-headline threshold is met, the function passes the headlines to a model for structured extraction into records: what happened, who, and category. Records are written to Supabase, and Supabase Realtime pushes the update to any browser with the page open, so a connected client sees new records without polling. New records are merged against a hardcoded baseline set established when the tracker launched, rather than replacing it.
Verification
The skip logic is the one piece of this system with a clear correctness condition — it must extract when five or more headlines are new, and skip when fewer than five are — and it is exercised against fixture headline sets at that boundary: four new headlines, which must skip, and five new headlines, which must extract, per the verification approach used across these cases.
There is no verification of extraction quality itself. The records the model produces are not checked against a ground-truth or human-labeled set at any point in the pipeline.
Result
The pipeline runs hourly on the deployed schedule, extracts and stores records when its new-headline threshold is met, skips the model call when it is not, and pushes updates to open clients over Realtime.
Limits
Extraction quality is bounded by the model’s judgment on what a query’s headlines mean, and it is not human-audited — nothing downstream catches a misclassified or fabricated record. The choice of 68 queries is itself an editorial decision about what counts as relevant, made once at build time rather than derived from any measured criterion. There is no precision or recall measurement against a labeled set, and none is claimed. The system should be read as a cost-aware extraction pipeline, not as a validated record of fact. There is also no usage or outcome measurement published for this project — no visitor count, no record of how the tracked records are used, and none is claimed.
