pg-jev
Use Jev decisions directly inside PostgreSQL filters, rankings, and classifications.
What Jev decides
Whether a row matches, how strongly it matches, or which supplied label best describes it.
The extension exposes SQL functions for boolean matching, probabilities, scoring, and choices, so rows can be evaluated against natural-language criteria without adding embeddings or a vector column.
- Jev role
- Evaluate database rows against natural-language conditions from inside SQL.
- Input
- A PostgreSQL row or value plus a natural-language criterion.
- Output
- Boolean Noul decisions, probabilities, Score values, or Choice labels depending on the SQL function.
- Decision frequency
- For each candidate row not satisfied from the extension cache.
- Fallback
- Use ordinary indexed SQL filters first and keep deterministic predicates for exact conditions.
How it works
Overview
pg-jev brings Jev into PostgreSQL through PL/Python functions such as jev(), jev_probability(), jev_score(), and jev_choice(). Queries can filter rows, rank them by semantic criteria, or assign a label while keeping the surrounding data workflow in SQL.
Without ordinary SQL predicates, a query can scan many rows and issue remote model requests for them. Selected row data is sent to the TypeSafe API, installation uses untrusted PL/Python and superuser privileges, and the README recommends narrowing the candidate set with indexed filters before calling Jev.
- Language
- PL/Python and SQL
- License
- PostgreSQL
- Author
- realZachi
Sources
Related projects
jev-spam-eval
A reproducible email-classification study comparing zero-shot Jev decisions with trained TF-IDF baselines.
What Jev decides
Whether an email is ham, spam, or phishing in the main experiment.
Jev Search
Turn a plain-language request into source choices, search lanes, and visibly ranked links without generating an answer.
What Jev decides
Which query, sources, and time range fit the request, and how relevant each returned result is.
Jev Review
A code-review pipeline assembled from small typed judgments instead of one long reviewer prompt.
What Jev decides
What is risky, which files and evidence matter, what could fail, how severe it is, and who should review it.