jevbooks

← All projects

jev-reranker

hotchpotch/jev-reranker

Jev-powered relevance filtering and reranking for RAG in Python.

Scoring & Ranking100%Runner-up: Classification & Routing

What it is

A Python library for RAG pipelines that reranks search results and filters retrieved documents by usefulness as answer evidence, using TypeSafe.AI's Jev. It is for developers who want to reduce context tokens and distracting passages before generation.

How it uses Jev

Jev scores each document's usefulness as evidence for a query. relevance_rerank() uses a prompt that pushes weak candidates toward zero, then sorts by score and drops those below a configurable threshold (default 0.2). rerank() orders candidates without filtering by default (threshold 0.0). Results include document_index and score.

Primitives:noul

Technique worth stealing

Use a relevance prompt that explicitly assigns very low scores to topic-only overlaps, making a threshold effective for filtering before LLM context assembly.

Try it

uv add jev-reranker, set TYPESAFE_API_KEY, then run the example with uv run python example.py.

View on GitHub

judged by Jevjev-1.13.0

Evidence

Each line is one question put to Jev about the README. ≥ 0.60 reads as yes, ≤ 0.40 as no; in between Jev is not making a call.

  • Jev-centricyes0.94
  • Shows a System One patternunclear0.45
  • Handles uncertaintyno0.30
  • Measuredno0.06
  • Runnableyes0.96
  • Worth recommendingunclear0.57
  • Model replicano0.04
  • Problem scopescore on a 0–2 scale1.41
  • About Jevyes0.98

Signals by Jev jev-1.13.0, card written by DeepSeek V4.1 Flash from the README on 20 Sept 2026.