Jev in production › Search, ranking and matching
Python library scores each retrieved document with Jev for its usefulness as evidence, sorts them and drops those below a threshold before RAG context assembly, splitting long candidate lists and handling concurrency and retries.
jev-reranker is a Python library for reranking search results and filtering retrieved documents with TypeSafe.AI's Jev. It provides prompts for both tasks and handles concurrent requests, splitting long candidate lists, and retries.
For a walkthrough with examples, read Introducing jev-reranker: Reranking and Relevance Filtering for RAG.
Search results can match a question without helping answer it. Passing every match to an LLM adds input tokens and potentially distracting context. relevancererank() scores documents for their usefulness as evidence, sorts them, and removes those below a configurable threshold. If nothing passes, your application can try another search or stop before generation.
For the project's own README, linking back here: