Alphakdeps.io is experimental and evolving — the registry and packages may change or reset.
Toolkdeps asset

kdeps-tools-jina_rerank

v1.1.0

Rerank a list of documents by relevance to a query using Jina AI's reranking API. Requires JINA_API_KEY.

set tools / shelf rag

LLM context: ~146 tokens when loaded (prompt or tool definition)

Where it runs

Part of the tools set, used in workflow and agent mode. What the model is told about each built-in tool: its description, usage notes and parameters. kdeps runs the tool itself.

  1. the agent loop builds the request
  2. the tool definitions are sent to the modeltools/jina_rerank
  3. the model calls a tool
  4. kdeps runs it
  5. the result goes back to the model

Loaded by: kdeps (agent loop), /update, /settings, kdeps run, kdeps install, kdeps list, kdeps uninstall, kdeps update

In the code: kdeps (agent loop)agent.RegisterBuiltinToolsagent.definedAs

Install

A kdeps asset: installed with the first-run profile that includes its set, or the first time a command needs it, and updated without a new release.

kdeps install tools/jina_rerank

Pin a version with kdeps install tools/jina_rerank@<version>.

Contents

Rerank a list of documents by relevance to a query using Jina AI's reranking API. Requires JINA_API_KEY.

ParameterTypeDescription
documents *stringJSON array of document texts to rerank
modelstringJina rerank model (default: jina-reranker-v2-base-multilingual)default: jina-reranker-v2-base-multilingual
query *stringThe search query to rank documents against
top_nnumberNumber of top results to return (default: 5)default: 5

HTTP call (declared in YAML, no Go code)

POSThttps://api.jina.ai/v1/rerank

Offered when set: JINA_API_KEY

Content-Type:
application/json
Authorization:
Bearer {{.env.API_KEY}}

Body

{"model": {{json .args.model}}, "query": {{json .args.query}}, "documents": {{json (fromJSON .args.documents)}}, "top_n": {{int .args.top_n}}, "return_documents": true}

Result

{{- $docs := fromJSON .args.documents -}}
[{{range $i, $r := .response.results}}{{if $i}},{{end}}
  {"index": {{int $r.index}}, "text": {{json (or (get $r "document" "text") (get $docs $r.index))}}, "score": {{json $r.relevance_score}}}{{end}}
]

Versions

VersionPublishedStatus
1.1.010/13/2026active
1.0.010/11/2026active

Details

Author
kdeps
License
Apache-2.0
Latest Version
1.1.0
Published
10/11/2026

Tags

kdepstool