Query Refinement

Refine a query with domain, filetype, exact-phrase, and term-exclusion constraints to cut noise. Use when results are broad, stale, or off-topic.

SAMRADDHASHRIVASTAVATECH Updated

File contents

Query refinement

Tighten a query so retrieval stays on target: constrain domain and filetype, force exact phrases, and eject noise terms.

When to use

  • Results are too broad or polluted by unrelated terms.
  • You know the target domain or format and want to express it.
  • A phrase must match exactly (quotes) rather than loosely.

Tools used

  • refine_query — from a query, optionally set domain, filetype, exact (wrap in quotes), and remove_terms.

Workflow

  1. State the goal and the noise you saw.
  2. refine_query with the constraints.
  3. validate_search_query the result, then run it.
  4. Compare hit quality against the unrefined version; keep what improved it.

Input schema

{ "query": "str", "domain": "str", "filetype": "str", "exact": "bool", "remove_terms": "list[str]" }

Output schema

{ "refined": "str", "log": "list[str]" }

Security

Constraints shrink the haystack but do not certify needles; weigh hits by source quality, not by how cleanly the query matched.

Related skills

query-builder, query-expansion, search-operators, web-search

SAMRADDHASHRIVASTAVATECH/veyron-skill-and-mcp-pack/tree/main/estate/skills-files/universal-research/query-refinement commit 31ff73b449

Frequently asked questions

npx skillmds@latest add samraddhashrivastavatech/query-refinement