Overview & result
Zachi published pg-jev, a PostgreSQL extension that lets SQL queries evaluate plain-language conditions with Jev. The demo post reports 129 rows judged in about one second. The repository documents boolean filtering, probability ranking, choice and score functions.
From the original post
I think I just cooked something 🔥
jev(): a PostgreSQL extension that searches your whole database in natural language. No index, no embeddings, just one function.
WHERE jev(people, 'could work from home')
or
WHERE jev(people, 'name sounds european')
129 rows judged in ~1s https://t.co/hPqxL1eCgn
How Jev fits in the loop
- Install the jev extension in PostgreSQL with plpython3u and a TypeSafe API key.
- Use SQL functions such as jev(people, 'the name is European') in a WHERE clause.
- The extension batches rows into Jev questions and reuses connections and session cache, as documented in the repository.
How to reproduce
- Follow https://github.com/realZachi/pg-jev installation instructions for PostgreSQL 14–17 and plpython3u.
- Run CREATE EXTENSION jev CASCADE; in a test database.
- Try the repository’s example queries and measure them on your own data.
Why this build matters
It makes natural-language row checks available directly inside SQL, with an inspectable open-source implementation.
Reported performance
Reported by authorLatency: ~1s / 129 rows (author demo)
Limitations
- Requires PostgreSQL superuser access and plpython3u; some managed hosts do not provide them.
- Each uncached evaluation calls the hosted Jev API.