shipwithjev

Catalog / Triage & routing

0328GitHub

pg-jev

PostgreSQL extension for semantic questions over table rows.

realZachi/pg-jevREADME ↗
# jev — ask your Postgres tables questions in plain language

[](https://github.com/realZachi/pg-jev/actions/workflows/ci.yml)
[](https://pgxn.org/dist/jev/)
[](LICENSE)
[](https://pgjev.com)

Write the condition the way you would say it. Postgres does the rest.

`jev` lets you filter, rank and classify rows with plain-language conditions. Every row is judged by
[TypeSafe's Jev](https://docs.typesafe.ai), a System One model that returns calibrated probabilities
instead of generated text. No index, no embeddings, no vector column.

Website: [pgjev.com](https://pgjev.com)

```sql
CREATE EXTENSION jev CASCADE;

SELECT * FROM people WHERE jev(people, 'the name is European');

SELECT subject, jev_prob(tickets, 'the customer is angry') AS p
FROM tickets ORDER BY p DESC LIMIT 20;

SELECT jev_choice(tickets, 'which team should handle this?',
                  ARRAY['billing', 'technical', 'security', 'sales']) AS team, count(*)
FROM tickets GROUP BY 1;

SELECT name, jev_score(products, 'how luxurious is this product?',
                       ARRAY['budget', 'mid-range', 'premium', 'luxury']) AS luxury
FROM products ORDER BY luxury DESC;
```

`jev()` is an ordinary boolean function, so it composes with everything else in SQL: `AND age > 40`,
joins, `GROUP BY`, `LIMIT`, `ORDER BY jev_prob(...)`.

## How it works

1. `jev(table, 'condition')` receives the row as a composite value. The first call for a table + condition starts a
   read-ahead that streams the table in physical order (TID range scans; `OFFSET` pages for views).
   `jev.max_prefetch_rows` limits how far it searches for a requested row and how many skipped rows it retains; it
   does not limit the answer cache or total session memory.
2. Rows are packed `jev.batch_size` (20) per request into one shared *state*
   (`{"

Also filed under Triage & routing

  1. 0613

    momus: staged Rust code and security review

    A fast scanner that reviews code for correctness, security, reliability, compatibility and test gaps, with actionable feedback. Supports the Jev API and local models.

    Brian Luby · Triage & routing

  2. 0602

    Jevops: SRE log triage with Jev

    Jev triages streaming logs into page, digest or resolve, cutting alert noise and paging humans only for high-confidence incidents. About $1–3 for 1M events a month.

    Mu99Ti · Triage & routing · $1–3 per 1M events/month

  3. 0598

    jev-sec-audit: flag risky npm packages with Jev

    npm install is the scariest command in your terminal. One typo → lookalike package → malicious postinstall → secrets gone. jev-sec-audit flags it in milliseconds using Jev, a System 1 model built for fast decisions, not chat. One step in GitHub Actions. Open source.

    @Dhanush_Nehru · Triage & routing

  4. 0555

    Jev Codex Router: model and reasoning selection per call

    A local Codex router asks Jev to choose the next model and reasoning effort while forwarding the complete conversation to that model.

    0xNatoshi · Triage & routing