Skip to main content
Glama

Rerank

rerank

Re-rank a list of documents by relevance to a query, returning top-N highly relevant results. Enhances RAG pipelines by improving retrieval precision.

Instructions

Re-rank a list of documents by relevance to a query (NaN API, Qwen3-Reranker-8B). Complements embed for RAG pipelines.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
queryYesQuery against which each document's relevance is measured
top_nNoLimit response to the N most relevant documents
documentsYesArray of strings to re-rank
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries full responsibility. It adds useful context by naming the specific API and model (NaN API, Qwen3-Reranker-8B), but it does not disclose return format (e.g., whether scores are included) or other behavioral traits such as tie-handling or ordering guarantees.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Two sentences, front-loaded with the primary action, and no unnecessary wording. Every word adds value, making it an excellent example of conciseness.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

The tool is simple, the schema covers all parameters, and the description gives sufficient context for typical RAG use. However, since there is no output schema, the description would benefit from explicitly stating the return format (e.g., re-ranked list with or without scores), and it omits any operational prerequisites like authentication or rate limits.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, so all parameters are already documented in the schema. The description adds no additional parameter semantics beyond what the schema provides, meeting the baseline for this dimension.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description states a specific action (re-rank) on a specific resource (a list of documents by a query), and explicitly notes it complements embed for RAG pipelines. This clearly distinguishes it from the closest sibling tool (embed) while being unambiguous about its function.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides clear context that this tool is used in RAG pipelines alongside embed, which implies when it should be used. However, it lacks explicit exclusions or alternatives beyond embed, so it doesn't fully address when not to use it.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/luciferfran/nan-mcp-server'

If you have feedback or need assistance with the MCP directory API, please join our Discord server