shipwithjev

Catalog / Tools & apps

0267GitHub

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 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,
    "sour

Also filed under Tools & apps

  1. 0616

    Jevstiller: distill Jev calls into a local model

    A self-hosted proxy that trains a local model on Jev's answers. It served 72% of Banking77 locally at 15 ms, with a 2% audit and a bound on disagreement.

    tomerglick57 · Tools & apps · 15 ms local

  2. 0611

    Scruple: code checks for what linters miss

    Semantic-aware linting with System One models: rules you can state in a sentence, checked against your code by Jev.

    @nalexpeae · Tools & apps

  3. 0606

    Algolia-style Postgres search with a Jev reranker

    Typo tolerance, typeahead, barcodes and facet counts in plain Postgres SQL, plus an optional Jev step that asks one question per top-10 result.

    @alex_forman1 · Tools & apps

  4. 0604

    Virtual Closet: outfits from closet videos

    built a virtual closet & outfit generator from raw closet videos. classification + semantic search thanks to jev 🥰. clueless closet dreams finally coming to life

    @maitreemervana · Tools & apps