← All work

Interfaze Diff Tool

Same extraction call against OpenAI and Interfaze, with evidence you can check.

Jul 2026Demo agent

Next.js 16 (App Router)React 19TypeScriptTailwind CSS 4OpenAI SDKZodVercel

Problem

Interfaze is an OpenAI-API-compatible document-extraction model that claims a one-line migration plus per-field confidence scores and bounding boxes that general LLMs cannot produce. The claim is easy to assert and easy to fake: ask any model for a confidence field in the schema and it will happily invent one. A public demo that could be picked apart as an unfair comparison would do the vendor more harm than good, so fairness had to be the product.

What I built

A Next.js app that sends one byte-identical OpenAI-SDK request to both providers through a single callProvider function; only base URL, key and model string differ, and the request builder takes no provider argument, so the comparison cannot quietly drift. Responses are compared as a field-level diff with loose equality, so "12.00" and 12 are not reported as a disagreement. Confidence and bounding boxes are read only from the precontext OCR array Interfaze attaches to the ordinary response: a normalised string match locates each extracted value in the OCR word stream, and a field with no verbatim match is reported as unmatched rather than given a guessed box. Results render as a plain-English verdict banner that never declares a winner, a resize-aware SVG box overlay on the document, and side-by-side panels with per-call cost computed from reported token usage. Sample runs replay fixtures captured once by a prime script, so page views spend nothing while uploads go live; eleven statically prerendered Q&A pages with FAQPage and Article JSON-LD, sitemap and robots target the searches developers run when a general model misreads their documents.

Highlights

  • Confidence never comes from a schema field: Interfaze's scores and boxes arrive in a precontext array on the normal chat-completions response (checked against the vendor's docs), so the demo cannot be dismissed as "any model would emit that shape, with invented numbers".
  • Fairness enforced in code, not prose: one request builder with no provider parameter, one call function, shared schemas keyed by document type, temperature 0, and the exact prompt, pricing rates and rate-check date rendered on the page so anyone can reconstruct and attack the comparison.
  • Honest empty states: precontext carries no pointer to schema fields, so the field-to-box join is a string match the tool performs and labels as its own inference; unmatched fields get no badge, and a general model's evidence is null rather than zero.
  • Let the data contradict the pitch: on the same document Interfaze reported 6,518 input tokens to OpenAI's 601 and cost more per call, so the methodology note says so and the framing leads with accuracy and verifiability, not price; latency is discounted because the page discloses the OpenAI side is served via OpenRouter.
  • Cached fixtures, labelled as such: a prime script captures real responses once, sample runs never make a live call, and the UI says "cached sample, no live call" rather than passing replays off as live.

Numbers

  • On the cached ID sample, Interfaze attached confidence and a location to 6 of 6 fields; OpenAI attached neither, and the two models disagreed on 2 of 6 fields.
  • Same document, same prompt: Interfaze reported 6,518 prompt tokens vs OpenAI's 601, and the Interfaze call cost $0.0107 vs $0.0041 for OpenAI.
  • 11 static answer pages, each with FAQPage and Article JSON-LD and a canonical URL.

Screenshots

Interfaze Diff Tool: Landing: the whole migration shown as a code diff, then pick a sample or upload.
Landing: the whole migration shown as a code diff, then pick a sample or upload.
Interfaze Diff Tool: Results: the banner reports 2 of 6 fields differ and calls out the address, boxed where Interfaze read it on the vendor's published sample ID.
Results: the banner reports 2 of 6 fields differ and calls out the address, boxed where Interfaze read it on the vendor's published sample ID.