Search Shortcut cmd + k | ctrl + k
querio_jev

Classify, filter and score table rows with TypeSafe Jev from SQL, with dedupe, a disk cache and concurrent requests.

Maintainer(s): ramiabih

Compatibility Matrix

This table covers all DuckDB releases that have not reached end-of-life, including LTS releases, and shows the 2 most recent patch releases of each. Older patch releases are not listed, but the extension may be available for them as well.

Platform 1.4.4 1.4.5 1.5.5 1.5.6 2.0.0
Linux AMD64
Linux ARM64
macOS AMD64
macOS ARM64
Windows AMD64
Windows ARM64
WebAssembly

Installing and Loading

INSTALL querio_jev FROM community;
LOAD querio_jev;

Example

CREATE SECRET (TYPE jev, API_KEY '...');
SELECT jev_label('I was charged twice this month', ['billing', 'bug', 'churn']);
SELECT jev_if('Please cancel my plan', 'Is the customer about to cancel?');

About querio_jev

querio_jev turns TypeSafe Jev's typed decisions into SQL functions: jev_label and jev_classify (pick one, with calibrated probabilities), jev_if and jev_prob (yes/no), jev_score (ordered levels), jev_tags (multi-label in one request) and jev_ask (any set of native Jev questions in one request). Identical requests are sent once, requests already in flight on other threads are shared, answers are cached in memory and in an answers file on disk, and uncached requests go out concurrently with retries. Works with TypeSafe directly, OpenRouter or the Vercel AI Gateway. HTTPS goes through DuckDB's httpfs extension, which is loaded automatically. Not loadable alongside the community jev extension: both define jev_prob, jev_score and three jev_ settings. Documentation: https://github.com/Querio-App/duckdb-jev

Added Functions

function_name function_type description comment examples
jev_ask scalar NULL NULL  
jev_classify scalar NULL NULL  
jev_clear_cache table NULL NULL  
jev_if scalar NULL NULL  
jev_label scalar NULL NULL  
jev_prob scalar NULL NULL  
jev_score scalar NULL NULL  
jev_tags scalar NULL NULL  
jev_usage table NULL NULL  

Overloaded Functions

This extension does not add any function overloads.

Added Types

This extension does not add any types.

Added Settings

name description input_type scope aliases typed_value
jev_base_url Jev API base URL: https://api.typesafe.ai, https://openrouter.ai/api, or https://ai-gateway.vercel.sh/typesafe VARCHAR GLOBAL [] https://api.typesafe.ai
jev_cache_path Answers file shared by every session and process. Empty string turns it off VARCHAR GLOBAL [] ~/.duckdb/extension_data/querio_jev/answers.tsv
jev_concurrency Requests in flight at once, across the whole process BIGINT GLOBAL [] 32
jev_max_requests Most API requests one query may send; cached and deduplicated rows are free BIGINT GLOBAL [] 10000
jev_max_retries Retries after 408, 429, 5xx, 529 or a dropped connection BIGINT GLOBAL [] 4
jev_model Jev model to call. Pinned by default so answers stay stable VARCHAR GLOBAL [] jev-1.13.0
jev_on_error 'error' fails the query when a request fails; 'null' returns NULL for that row VARCHAR GLOBAL [] error
jev_timeout_seconds Seconds per HTTP attempt BIGINT GLOBAL [] 30
temp_directory Set the directory to which temporary files are written. VARCHAR GLOBAL [] post.db.tmp