shipwithjev

Catalog / Research & data

0358GitHub

jev-reranker

Retrieval and RAG: uses Jev Noul judgments to assess retrieved documents for relevance and usefulness as answer evidence, then sorts results and optionally filters them using a…

hotchpotch/jev-rerankerREADME ↗
# jev-reranker: Relevance Filtering & Reranking for RAG

[](https://github.com/hotchpotch/jev-reranker/actions/workflows/ci.yml)
[](https://pypi.org/project/jev-reranker/)
[](LICENSE)

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](https://huggingface.co/blog/hotchpotch/introducing-jev-reranker).

Search results can match a question without helping answer it. Passing every
match to an LLM adds input tokens and potentially distracting context.
`relevance_rerank()` 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.

Use it after retrieval and before assembling context for RAG. Use `rerank()`
when you want to reorder candidates without filtering by default. Both accept
a query string and a list of document strings; scoring runs through the Jev API.
The base package needs no local model or GPU.

## Highlights

- Relevance filtering scores documents for their contribution to an answer,
  including partial answers and facts needed for multi-hop reasoning.
- A configurable threshold determines which documents to keep. Results are sorted
  by score; an empty list means no candidate passed the threshold.
- Prompts are Python dictionaries. You can change the instructions and criteria
  to describe what counts as useful evidence in your application.
- Long candidate lists are split automatically. Document limits and split budgets
  can use charac

Also filed under Research & data

  1. 0620

    Jev Score: rubrics, scores and confidence

    A worked guide to Jev's Score primitive: writing a request, defining rubric levels, reading recorded probabilities and the weighted-score math.

    Jev Trader · Research & data

  2. 0614

    Bot journey classification in WebDecoy

    Sends a detected bot's last 48 request paths to Jev, which picks what it's after (prices, articles…) and how it crawls (pagination, IDs…), or unknown.

    WebDecoy · Research & data

  3. 0610

    Fake / Real: link fact-checker with Jev as judge

    Paste an article or post link. Fake / Real extracts its claims, finds outside evidence, and has Jev judge whether the evidence supports or contradicts each one.

    @DansiDanutz · Research & data

  4. 0609

    AutoRubric: rubric-based evaluation

    Combines rubric science and LLM-as-a-judge research to grade outputs with AI judges: LLMs, decision models like Jev, or both.

    @deliprao · Research & data