sqlite3-jev
Portable SQLite C extension depending only on libcurl that adds jev_noul, jev_choice and jev_score SQL functions.
Overview
sqlite3-jev is a SQLite extension written in C, depending only on libcurl and building on Linux, macOS and Windows (MinGW-w64), that calls TypeSafe Jev straight from SQL. jev_noul returns the probability of yes, jev_choice the chosen option (with a JSON variant including probabilities and confidence), and jev_score a probability-weighted score across ordered levels (with a JSON variant). jev and jev_raw send several mixed questions in one request and return the answers or full response.
State and instructions are sent as strings, but values built with SQLite's JSON functions are embedded as structured JSON, which lets you send records or chat logs. The API key, model, base URL and timeout come from environment variables or jev_config per connection, and the key is never echoed back. The base URL can point at a compatible local server. Classifying a whole table is a matter of calling jev_choice in a SELECT over its rows.
What the decision model decides
| Type | Question | Answers |
|---|---|---|
| Yes / no | Does this convey urgency? | — |
| Choice | Which team should handle this? | billing · technical · sales |
| Score | How frustrated is the customer? | Calm · Frustrated · Very angry |
How it works
- Build and .load the extension
- Set the API key via environment or jev_config
- Call jev_noul/jev_choice/jev_score in queries
- Use JSON variants for confidence and distributions
Strengths
- Only depends on libcurl; cross-platform
- Structured JSON state from SQLite functions
- Compatible base URL can be overridden
Caveats
- One request per row when used in a plain SELECT
- Data is sent to the configured endpoint
Getting started
make, then .load ./jev in sqlite3 and SELECT jev_noul('text', 'question');At a glance
- Type
- Plugin
- Status
- beta
- Language
- C
- Runtime
- SQLite extension
- Has code
- yes
- License
- MIT
Use cases and integrations
How curated lists describe it
SQLite C extension: `jev_noul` / `jev_choice` / `jev_score` as SQL functions via libcurl
AnotiaWang/awesome-decision-modelsSQLite C extension enabling TypeSafe Jev judgments as native SQL functions for semantic scoring and choices.
logicrw/awesome-jev-projects
Frequently asked questions
What functions does it add?
jev_noul, jev_choice, jev_score, their JSON variants, jev, jev_raw and jev_config.
Can I send structured data?
Yes, pass values built with json_object or json_array.
Does it work on Windows?
Yes, built with MinGW-w64.
Related projects
dbt package and Terraform module adding jev_noul, jev_choice, jev_score and jev_ask SQL functions to Snowflake.
LibrarybetaSQLDuckDB extension and Python package for semantic SQL that batches row-level filters, joins and classification on Jev.
PluginresearchC++High-throughput native DuckDB extension that batches and streams Jev Noul, Choice and Score judgments directly from SQL.
PluginbetaC++PostgreSQL extension with jev(), jev_prob, jev_choice and jev_score to filter, rank and classify rows by plain-language conditions.
PluginbetaCSQLite loadable extension and Python package exposing Jev Noul, Choice and Score as SQL functions and batched virtual-table scans.
PluginbetaCVGI worker that exposes System One choice, noul and score as DuckDB table functions you can LATERAL join to classify whole tables.
LibrarybetaPython