Skip to content

jevsql

SQLite and Node library adding Jev judgments to SQL for matching, evidence picking, ranking, review queues and semantic CI checks.

ProjectbetaMIT

Overview

JevSQL adds TypeSafe Jev judgments to SQLite so database rows can become decisions you query, inspect, refresh and test. Functions such as jev_match estimate whether two records refer to the same entity after SQL narrows candidate pairs, and jev_pick selects an exact span from source text or returns NULL rather than inventing characters. It can rank permission-filtered passages with descriptive score levels, route uncertain results to review queues with explicit unknown labels and abstention bands, and detect when a changed source invalidates an earlier decision through refreshable evidence audits.

It includes threshold evaluation on labelled rows to compare accuracy, coverage and review workload, and semantic data checks for CI with failure exit codes. A contrast script shows 31 comparisons against ordinary tooling, including queries that refuse to compile when a join would multiply rows. Separate APIs cover streaming exact money totals without sending arithmetic to a model and typed decisions over PostgreSQL result sets. It runs as a zero-dependency Node library or CLI with batching, caching and cost guards.

What the decision model decides

TypeQuestionAnswers
Yes / noDo these two records refer to the same entity? (jev_match)—
ChoiceWhich exact source span is the correct value, or none? (jev_pick)—
ScoreHow well does this passage answer the question?—
Yes / noDoes the evidence still support this claim?(inferred)—

How it works

  1. Use SQL to narrow candidate rows or pairs
  2. Call jev_* functions to judge, pick, match or rank
  3. Low-confidence results go to review queues
  4. Evidence audits are saved and refreshed when sources change
  5. Semantic checks run in CI with exit codes

Strengths

  • Exact-span picking avoids invented values
  • Threshold evaluation shows accuracy versus review workload
  • Zero runtime dependencies; batched, cached and budgeted
  • Deterministic money arithmetic kept out of the model

Caveats

  • Requires a TypeSafe key for live judgments
  • Broad feature set may take time to learn
  • SQLite-centred, with a separate API for Postgres

Getting started

node examples/contrast.mjs (or --offline) to see the comparisons; use the Node library or CLI with TYPESAFE_API_KEY set.

At a glance

Type
Project
Status
beta
Language
JavaScript
Runtime
Node library and CLI with SQLite
Has code
yes
Has tests
yes
License
MIT

Use cases and integrations

How curated lists describe it

  • Adds Jev semantic judgments to SQLite for filtering, ranking, matching and tracking decision evidence.

    logicrw/awesome-jev-projects
  • SQL-like filtering, ranking, classification, and scoring with natural-language predicates.

    cobanov/awesome-jev
  • SQL with natural-language predicates, powered by TypeSafe's Jev. Filter, rank, classify and score rows by meaning — batched, cached and cost-guarded.

    hellogumbo/awesome-jev

Frequently asked questions

Can it invent values?

jev_pick only selects an exact span from source text or returns NULL.

How do I pick a threshold?

Evaluate labelled rows once and compare accuracy, coverage and review workload across thresholds.

Does it work with Postgres?

Yes, through a separate native row API for already-authorised result sets.

Related projects

  • dbt package whose macros run Jev Choice, Noul and Score over SQL values in DuckDB and ClickHouse models.

    ProjectbetaSQL (Jinja)
  • DuckDB extension that asks Jev about every row in SQL and returns answers as ENUM, DOUBLE or STRUCT columns.

    PluginbetaC++
  • Record linkage for researchers: write the match rule in plain English and Jev judges each candidate pair with a probability.

    ProjectbetaPython
  • Decision-first CSV cleaning: code proposes repairs, Jev scores action, applicability and risk, a fixed policy applies or abstains.

    ProjectprototypePython
  • Neo4j demos using Jev as a calibrated judge in GraphRAG pipelines, starting with entity resolution and a review queue.

    AppprototypePython
  • Sutro's active-learning CLI that finds rows Jev is least sure about, asks you to label them, and uses GEPA to improve the definition.

    CLIbetaPython