rag_jina_reranker_v1_tiny_en
pgrag · Runs jina-reranker-v1-tiny-en locally in a preloaded background worker and exposes SQL rerank scores and distances.
Overview
| ID | Extension | Package | Version | Category | License | Language |
|---|---|---|---|---|---|---|
| 100256 | rag_jina_reranker_v1_tiny_en | pgrag | 0.0.0 | RAG | Apache-2.0 | Rust |
PostgreSQL · 13, 14, 15, 16, 17, 18
| Relationships | |
|---|---|
| Requires | vector |
Usage
Sources:
rag_jina_reranker_v1_tiny_en runs the 33-million-parameter jina-reranker-v1-tiny-en model locally and exposes scalar and batch reranking scores or distances. It is deprecated and no longer maintained.
Core Workflow
The model executes in a background worker, so preload the library and restart PostgreSQL before creating the extension:
On macOS, the upstream instructions use .dylib instead of .so in shared_preload_libraries.
SQL API
rag_jina_reranker_v1_tiny_en.rerank_score(text, text)returns one score; thetext[]overload returns scores in input order.rag_jina_reranker_v1_tiny_en.rerank_distance(text, text)returns one distance; thetext[]overload returns distances in input order.- For every overload, distance equals negative score. Lower distance therefore corresponds to a higher score.
Operational Notes
The reviewed version is 0.0.0, non-relocatable, requires vector, and sets superuser = true. The worker starts with PostgreSQL and lazy-loads the model at first use, so account for first-call latency and memory use. Default builds embed the ONNX model; the optional remote_onnx build downloads it after restart and should point to controlled storage. The project pins patched ONNX Runtime components and is archived and deprecated, so deploy a fixed, tested artifact and plan a replacement.