shipwithjev

Catalog / Tools & apps

0340GitHub

Jev Reranker (Rust CLI)

Rust JSON-in/JSON-out CLI that asks Jev about relevance, usable evidence, or which source text to retain, then applies the resulting order and thresholds in code.

shinpr/jev-rerankerREADME ↗
# Jev Reranker

[](https://github.com/shinpr/jev-reranker/actions/workflows/ci.yml)
[](LICENSE)

Choose the search results worth passing to your LLM.

`jev-reranker` uses TypeSafe AI's [Jev](https://docs.typesafe.ai/introduction) to rerank retrieved
documents, remove candidates that contain no usable evidence, or extract query-specific passages
for your LLM.

It reads a JSON array from stdin and writes a JSON array to stdout. Choose the field that contains
the text; IDs, source paths, retrieval scores, and other metadata pass through unchanged. Use it
after BM25, vector search, or any command that emits a JSON array of candidate objects.

```text
search or vector database -> JSON candidates -> Jev Reranker -> context for your LLM
```

## Install

Requires Node.js 14 or later on macOS, Linux, or Windows (x64 or Arm64).

Install the CLI from npm:

```sh
npm install --global jev-reranker
```

You can also run it without a global installation:

```sh
npx -y jev-reranker --help
```

Create an API key in the [TypeSafe dashboard](https://console.typesafe.ai/), then export it:

```sh
export TYPESAFE_API_KEY="your-api-key"
```

## Try It

Pipe an array of candidate documents into the CLI:

```sh
printf '%s\n' '[{"text":"Build artifacts are cached locally."},{"text":"Access tokens expire after one hour."}]' \
  | jev-reranker --query "How long do access tokens last?"
```

The CLI returns the same objects in best-first order, with a `rerankScore` from 0 to 1 added to
each one. Higher values mean Jev considers the result more relevant to the query.

## Bring Your Own Results

Suppose a search command returns objects shaped like this:

```json
[
  {
    "id": "auth-guide",
    "title": "Authentication",
    "body": "Access tokens expire after one hour.",
    "distance": 0.18,
    "s

Also filed under Tools & apps

  1. 0573

    Support chat: agent offered a human escalation path

    A frustrated customer hits a bot loop twice; the judge checks whether a human handoff was offered.

    everyai-com · Tools & apps

  2. 0572

    Subscription cancel: effective date is explicit

    An agent cancels a subscription; the judge checks the exact date the cancellation takes effect.

    everyai-com · Tools & apps

  3. 0571

    Sales quote: numbers match the official price list

    An agent quotes $29/seat against a price list; the judge checks the quote matches exactly.

    everyai-com · Tools & apps

  4. 0570

    Refund chat: agent stated the amount before issuing it

    A support agent issues a $42.50 refund; the judge checks the exact amount was stated before the refund was confirmed.

    everyai-com · Tools & apps