Conversation
A Next.js example driving SimplePDF form-filling with Typesafe's JEV (System One): JEV maps a CSV record onto fields, ticks checkboxes and picks constrained-field options, gates every write on a calibrated confidence, and a JEV plausibility pass flags implausible values. A human confirms low-confidence fills, fixes red errors, and downloads. Includes a self-contained benchmark harness (npm run bench) comparing JEV vs any OpenAI-compatible model on the same payload, reporting both latency and output agreement.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Background
A public example showing Typesafe's JEV ("System One") model driving SimplePDF form-filling. It demonstrates the tenet code owns control flow, JEV answers narrow structured questions: the app orchestrates the editor via
@simplepdf/react-embed-pdfactions, while JEV maps a CSV record onto fields, ticks checkboxes / picks constrained-field options, and judges plausibility. No agent, no hallucination.Changes
examples/with-typesafe, two forms (IRS W-9, Medication Prior Auth)get_fieldsoptions/api/jev): path allowlist,redirect: "error", request timeout; BYOK key held in-memory onlynpm run bench): times JEV vs any OpenAI-compatible model on the same payload and reports output agreement, not just latencyNotes
The
benchmark/harness (and itsvitestdevDependency) is opt-in and self-contained. It needsNEXT_PUBLIC_TYPESAFE_API_KEYplusBENCHMARK_MODEL_BASE_URL/BENCHMARK_MODEL_ID/BENCHMARK_MODEL_API_KEYin.env.localto run the second model; delete thebenchmark/dir to ship the example JEV-only.