rag_relevance_rank
Rank an array of text chunks by relevance to a query using TF-IDF scoring. Simulates retrieval ranking for RAG testing without needing embeddings or an API.
Example tool call
This call uses example arguments supplied in the tool’s input schema.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"query": "quantum",
"chunks": [
"a b c",
"d e f"
]
},
"name": "rag_relevance_rank"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| query | Yes | The user query | |
| top_k | No | Return top K results (default: all) | |
| chunks | Yes | Array of text chunks to rank |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| rank | No | ||
| index | No | ||
| query | No | ||
| score | No | ||
| results | No | ||
| returned | No | ||
| total_chunks | No | ||
| chunk_preview | No | ||
| keyword_overlap | No |