COMMUNITY OBSERVED🤖 Jev Agent

postgres-jev - Native SQL Semantic Gating Function

Execute inline semantic filtering directly in SQL queries without vector DBs or embedding models.

postgres-jev - Native SQL Semantic Gating Function

Overview & Result

Zachi unveiled postgres-jev, a PostgreSQL extension that embeds Jev semantic evaluation directly into standard SQL queries. Instead of orchestrating Python RAG workers, pgvector indexes, or complex syncing, developers can write straightforward SQL queries like WHERE jev(comment_body, 'contains spam or toxic sentiment') = true. In benchmarks, it evaluated 129 raw database rows in 1.02 seconds.

How Jev fits in the loop

  1. Registers a custom SQL UDF jev(content text, criterion text) -> boolean using PostgreSQL C/Rust foreign function interface.
  2. Batches row evaluation requests asynchronously using libcurl / pg_net into Jev API.
  3. Parses Jev binary decision responses directly in SQL execution plan without intermediate application servers.
  4. Allows native indexing, filtering, and joining on semantic criteria alongside standard SQL conditions.

How to reproduce

  1. Clone zachi/postgres-jev and build via make && make install.
  2. Run CREATE EXTENSION pg_jev in your test PostgreSQL database.
  3. Execute SELECT * FROM customer_tickets WHERE jev_match(description, 'critical billing outage') = true;
  4. Review query plan with EXPLAIN ANALYZE to verify native batching.

Why this build matters

Brings semantic intelligence directly to the database storage layer. Eliminates the entire ETL and vector database pipeline for small-to-medium dataset classification and spam filtering.

Reported performance

Reported by author

Cost: $0.003 / 100 rows

Latency: 1.02s / 129 rows

Evaluated 129 live rows in 1.02 seconds using concurrent background HTTP requests via PostgreSQL native foreign function.

Limitations

  • Database server must have outbound internet connectivity to communicate with Jev API endpoints.
  • High-throughput OLTP workloads should cache repeated evaluations or use indexed materialization.

Patterns