Skip to content

duckdb-jev

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

PluginbetaMIT

Overview

duckdb-jev lets you ask a question about every row of a table or Parquet file in SQL and get a real SQL type back. You create a jev secret with an API key, then call jev_choice with a map of options and meanings (returning an ENUM of those options), jev_score with an ordered rubric (a DOUBLE on that scale), jev_noul with true and false meanings (a DOUBLE probability of yes), or jev_ask with a struct of mixed questions (a STRUCT with one field per question). Choice and score fields carry a confidence beside them.

The criteria literal defines both the allowed answers and the column type, so it must be constant, and many questions about one row go in one request. Without a secret, queries fail at planning time rather than part-way through. The README argues that asking where the data lives, and not generating text, is what makes per-row judgments cheap enough to run.

What the decision model decides

TypeQuestionAnswers
Choiceintent: what does this message want?refund · bug · praise
Scoreseveritytrivial · minor · normal · serious · critical
Yes / nourgent: does this need a reply today?true · false

How it works

  1. CREATE SECRET (TYPE jev, API_KEY ...)
  2. Call jev_choice/jev_score/jev_noul/jev_ask in a query
  3. Jev answers per row in batched requests
  4. Use typed columns in filters, joins and aggregates

Strengths

  • Results typed by construction (ENUM, DOUBLE, STRUCT)
  • Fails at plan time without credentials
  • No data export to scripts

Caveats

  • Per-row API calls cost money on large tables
  • Criteria must be constant literals

Getting started

Load the extension in DuckDB, run CREATE SECRET (TYPE jev, API_KEY 'sk-...'), then SELECT jev_choice(text, MAP{...}) FROM your_table.

At a glance

Type
Plugin
Status
beta
Language
C++
Runtime
DuckDB extension
Has code
yes
License
MIT

Use cases and integrations

How curated lists describe it

  • A DuckDB extension that calls Jev from SQL and returns answers as ENUM, numeric, or STRUCT types.

    logicrw/awesome-jev-projects
  • DuckDB extension that exposes Jev judgments as SQL values with return types derived from the declared criteria.

    cobanov/awesome-jev
  • DuckDB extension that returns Jev's answers as real SQL types.

    MrJev/awesome-jev

Frequently asked questions

What types come back?

ENUM for choice, DOUBLE for score and noul, and STRUCT for mixed questions.

Can I ask several questions per row?

Yes, jev_ask batches them in one request.

What happens without a key?

Queries fail when planned instead of part-way through.

Related projects

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

    ProjectbetaSQL (Jinja)
  • CLI that scans tabular, structured and text files or databases and asks Jev which fields look anomalous, building a review queue.

    CLIbetaPython
  • dbt package and Terraform module adding jev_noul, jev_choice, jev_score and jev_ask SQL functions to Snowflake.

    LibrarybetaSQL
  • PostgreSQL extension with jev(), jev_prob, jev_choice and jev_score to filter, rank and classify rows by plain-language conditions.

    PluginbetaC
  • DuckDB extension that labels rows in CSV, Parquet or DuckDB tables with Jev, reported at about ten seconds per thousand rows.

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

    ProjectbetaJavaScript