All tools

Relevance Score

AI / Agent

Score a single text passage against a query. Returns a 0-1 relevance score, grade, matched terms, and coverage.

Paste a query and a candidate passage and get back a 0-1 relevance score with a letter grade, useful for sanity-checking a RAG retriever's output before it ever reaches an LLM prompt. Under the hood this is lexical scoring: it tokenizes both strings, strips stopwords, and blends normalized term-frequency overlap with a coverage metric, not an embedding or cosine-similarity model, so it reflects keyword match strength rather than true semantic meaning. That makes it fast and fully client-side, but a passage phrased differently from the query with the same meaning can score lower than expected. For scoring and reordering a whole batch of chunks at once rather than one passage at a time, use the companion Rerank Chunks tool instead.

relevancescoreragretrievaltfidfquery

How to use Relevance Score

  • 1.Paste a query and a candidate passage to get a 0-1 relevance score plus a letter grade, useful for spot-checking a single retrieval result.
  • 2.Use the matched-terms output to see exactly which words drove the score, helping you debug why a passage ranked higher or lower than expected.
  • 3.Check the coverage metric to see what fraction of your query terms actually appear in the passage before deciding whether to include it in an LLM prompt.

Frequently asked questions

What method computes the score?
It's a TF-IDF-style term overlap and coverage calculation, not a semantic embedding model, so the score reflects keyword match strength rather than true meaning similarity.
Can a passage score low but still be relevant?
Yes — if the passage discusses the same topic using different vocabulary than your query, the score can undersell its actual relevance since this is a lexical, not semantic, method.
Is my text sent to a server?
No, scoring runs entirely client-side in your browser.
Can I batch-score many passages at once?
This tool scores one passage at a time — use the Rerank Chunks tool if you need to score and sort a whole list against a single query.

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/score-relevance \
  -H "Authorization: Bearer utx_live_..." \
  -H "Content-Type: application/json" \
  -d '{"query": "What is the capital of France?", "passage": "Paris is the capital of France."}'

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