All tools

Rerank Chunks

AI / Agent

Score and rerank text chunks by relevance to a query using TF-IDF. Drop irrelevant chunks before LLM context.

Testing whether a RAG pipeline's chunking strategy actually surfaces the right passages is easier with a manual reranking pass than by trusting the retrieval step blindly. Paste a query and a list of chunks and this reorders them by TF-IDF keyword-overlap relevance, so you can drop low scorers and trim your context window before generation. It's classic term-frequency statistical scoring, not an embedding or cross-encoder model, which means it ranks by shared keywords rather than semantic similarity: a chunk about "car maintenance" won't rank highly for a query about "vehicle upkeep" if the exact words differ too much. It handles dozens to a few hundred chunks comfortably in the browser; much larger sets slow down since computation runs on the main thread. For scoring a single passage rather than reordering a list, use the companion Relevance Score tool instead.

ragrerankchunksrelevancetfidfretrieval

How to use Rerank Chunks

  • 1.Paste a query and a list of text chunks (from a document splitter) to see each chunk scored and reordered by TF-IDF relevance before you feed the top N into an LLM.
  • 2.Use it to sanity-check a RAG pipeline's retrieval step by manually testing whether your chunking strategy actually surfaces the right passages for a given query.
  • 3.Drop low-scoring chunks from the ranked list to trim your context window and reduce noise before generation.

Frequently asked questions

Is this the same as a neural/embedding-based reranker?
No — this uses TF-IDF, a classic term-frequency statistical method, not embeddings or a cross-encoder model, so it ranks by keyword overlap rather than semantic similarity.
Will it catch semantically related chunks that don't share keywords?
No, TF-IDF only matches on shared terms (with basic stemming), so a chunk about "car maintenance" won't rank highly for a query about "vehicle upkeep" if the exact words differ too much.
Is my data sent anywhere?
No, scoring runs entirely in your browser.
How many chunks can it handle at once?
It's fine for typical RAG batch sizes (dozens to a few hundred chunks), but very large chunk sets will slow down since TF-IDF computation happens on the main thread.

Use via API, SDK, or MCP

cURL# Free: 1,000 req/day · Pro: 10,000 req/day
curl -X POST https://api.utilix.tech/v1/tools/rerank-chunks \
  -H "Authorization: Bearer utx_live_..." \
  -H "Content-Type: application/json" \
  -d '{"query":"how to deploy Next.js","chunks":["Deploy with Vercel in one click.","React is a UI library."]}'

Get an API key from your dashboard · Full API docs →