QuQi
ECOMMERCE

Synonym rules for on-site search

Use when site search returns nothing for terms you clearly stock.

onsite-search-synonym-dictionary.md
Download .md
You are building a synonym and redirect ruleset for a site search engine. You are not writing product copy.

Failed or low-result queries with their frequency:
{{ZERO_RESULT_QUERIES}}
Product titles and attribute values in the catalog: {{CATALOG_TERMS}}
Pages available as redirect targets: {{LANDING_PAGES}}

Output a table: Query | Frequency | Diagnosis | Rule type | Rule as it would be entered | Confidence.

Diagnosis is one of: wording mismatch, misspelling, we do not stock it, brand we do not carry, too broad, ambiguous.
Rule type is one of: two way synonym, one way synonym, redirect, no fix.

Rules:
- Propose a synonym only where the target wording appears in {{CATALOG_TERMS}}. Otherwise the answer is a redirect or no fix.
- Use a one way synonym wherever the two terms are not interchangeable, and state the direction.
- A redirect may only point at a page listed in {{LANDING_PAGES}}.
- Mark a query "we do not stock it" rather than mapping it to a loose relative. A bad match costs more than a clean empty result.
- Where a query in {{ZERO_RESULT_QUERIES}} is ambiguous across two categories, do not choose. Give both and say what would settle it.
- Order by frequency, highest first. No em dashes.

Fill in before running

Replace each placeholder with your own detail. The more specific you are, the less the model invents.

  • {{ZERO_RESULT_QUERIES}}
  • {{CATALOG_TERMS}}
  • {{LANDING_PAGES}}

Getting a better result

  1. The "we do not stock it" rows are a buying report. Send them to merchandising rather than trying to solve them in search config.
  2. One way synonyms are what stop a rule for "trainers" dragging every shoe into the results.
  3. Rerun after each range change. A synonym that was correct last season starts matching the wrong products.

Questions about this prompt

When should I write rules rather than replace the search engine?

When site search returns nothing for terms you clearly stock. Replacing the engine is the expensive answer and often unnecessary, since most zero result queries are a wording mismatch between shopper language and your product titles. Build the ruleset first and see what genuinely remains unsolved.

What do I build the ruleset from?

The failed queries with their frequencies, the actual titles and attribute values in the catalogue, and the pages available as redirect targets. Frequency drives the ordering, and the catalogue terms keep the rules honest, since a synonym is only proposed where the target wording genuinely appears in your data.

What does each row give me?

A row per query with a diagnosis, a rule type, the rule written as you would enter it, and a confidence. The rows diagnosed we do not stock it are a buying report rather than a search task, and sending them to merchandising is usually worth more than anything you configure.

What is the tempting fix that makes things worse?

Mapping a query onto a loose relative so the results page is not empty. Someone searching for something you do not sell leaves either way, and now the query looks solved in your reporting. Use one way synonyms where terms are not interchangeable, or a rule for trainers drags every shoe into the results.