shipwithjev

Catalog / Research & data

0453GitHub

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. 0607

    Verify: new-hire onboarding completion

    An agent reports onboarding done; the judge verifies access and equipment claims.

    everyai-com · Research & data

  2. 0606

    Triage: vague meeting request gets a disposition

    A vendor asks for 30 minutes with no agenda; the judge picks the disposition.

    everyai-com · Research & data

  3. 0605

    Triage: data-loss bug gets a severity

    A note-taking app silently drops edits on flaky networks; the judge grades severity.

    everyai-com · Research & data

  4. 0604

    Triage: crash report routing + reproducibility

    A crash report with steps and logs; the judge routes it and checks reproducibility.

    everyai-com · Research & data