jev_rank
Ranks files, line ranges, or supplied texts by how well each helps answer a query, using calibrated relevance scores to filter and order candidates.
Instructions
Rank files or texts by how well each helps answer a query: a relative Choice over the batch for order, Jev's calibrated yes/no per item for filtering.
Pass glob or paths for anything you have not already read — do NOT read files to pass their text. The server reads and chunks them and returns only path:start_line-end_line + score, so a 300-file search costs almost no context either way.
Pass candidates (id + text) only for text you already hold: search hits, retrieved passages, tool results.
unit: chunk (default) ranks line ranges, file ranks whole files by their best chunk. Prefer file for 'where is X': a header comment can outrank the code it describes.
Sensitive files (.env, keys, credentials), binaries and generated output are never read; they come back in skipped.
Order comes from a Choice among the strongest candidates: trust the top 1-3 when choice_margin >= 0.10, the tail is by relevance. relevance is P(helps answer the query) and drives min_relevance; low any_relevant means look elsewhere.
score_spread (top minus median relevance) below 0.15 means the absolute scores are flat; choice_margin says whether the top pick was clear.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"query": "<query>"
},
"name": "jev_rank"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| glob | No | A glob for the server to expand and read, e.g. "src/**/*.ts". Supports * ** ? [abc] {a,b}. | |
| unit | No | For paths/glob: `chunk` (default) ranks line ranges, `file` ranks whole files by their best chunk. | |
| paths | No | Files for the server to read, relative to the project root (absolute paths inside it are fine). | |
| query | Yes | What you are trying to find out. | |
| top_k | No | How many ranked results to return. Default 10. | |
| candidates | No | Text you already hold, 1 to 500. Use this only when you did not have to read a file to get it. | |
| instructions | No | Optional extra definition of what counts as relevant here, folded into every question. | |
| min_relevance | No | Drop candidates whose relevance is below this. Default 0 (keep everything). |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| model | Yes | The versioned model id that actually answered. | |
| usage | Yes | Token usage. Jev charges for input tokens only. | |
| chunks | Yes | How many API requests this took: the fan-out over the batches plus the final deciding request. | |
| ranked | Yes | Ordered by the Choice among the strongest candidates, then by relevance for the tail. Text is never echoed back. | |
| skipped | No | File sources only. | |
| latency_ms | Yes | Wall-clock time for the underlying API call(s), including retries. | |
| any_relevant | Yes | P(at least one candidate helps answer the query), judged once over the strongest candidates. Low means: look elsewhere. | |
| est_cost_usd | No | File sources only: estimated input-token cost of this call. | |
| score_spread | Yes | Top relevance minus median relevance, 2 decimals. How much the ranking actually discriminated. Below 0.15 the scores are effectively flat and the ordering is not informative: narrow the glob or rephrase the query rather than trusting the order. | |
| choice_margin | Yes | Top pick's Choice probability minus the runner-up's, in the request that decided the order, 2 decimals. Below 0.10 the top pick and the runner-up were a toss-up; open both. | |
| chunks_scored | No | File sources only: line-range chunks judged. | |
| files_scanned | No | File sources only: files actually read. | |
| total_candidates | Yes | How many items were judged, before top_k/min_relevance. |