All tools

Query Expansion

AI / Agent

Expand a search query with synonyms and stemmed variants to improve retrieval recall in RAG pipelines.

Feed in a search query and get back synonyms and stemmed variants to widen a keyword-based search, useful for improving recall in a BM25 or Elasticsearch query, or for adding lexical variety alongside embeddings in a RAG retrieval step. Expansion comes from a fixed synonym dictionary plus simple suffix-stripping rules (-ing, -ed, -s, -er), not an LLM or a tool like WordNet, so it covers common English word relationships well but won't expand domain-specific jargon or unusual terms. Over-expanding a query can also hurt precision by pulling in irrelevant matches, so it's worth treating the output as candidates to review rather than something to feed straight into production search without a look. Everything runs locally with a static lookup table.

queryexpandsynonymsragretrievalsearch

How to use Query Expansion

  • 1.Type a search query to get a list of synonyms and stemmed variants you can OR together to improve recall in a keyword or hybrid search pipeline.
  • 2.Use the expanded terms to widen a BM25 or Elasticsearch query that's returning too few results for short, ambiguous queries.
  • 3.Feed the expanded query list into your RAG retrieval step as an alternative to (or alongside) embedding-based retrieval.

Frequently asked questions

Does this use a language model to generate expansions?
No, expansions come from a synonym dictionary and stemming rules, not an LLM, so results are consistent but limited to common word relationships rather than contextual understanding.
Will it understand domain-specific jargon?
Not reliably — the synonym set is general-purpose English, so specialized technical or industry terms may not expand meaningfully.
Is my query sent anywhere?
No, expansion happens entirely in your browser.
Does more expansion always improve search results?
No, over-expanding a query can introduce noise and hurt precision — treat the output as candidates to test, not a guaranteed improvement.

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/expand-query \
  -H "Authorization: Bearer utx_live_..." \
  -H "Content-Type: application/json" \
  -d '{"query": "machine learning", "maxSynonyms": 5}'

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