# Synonym rules for on-site search

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

## À remplir avant de lancer

- `{{ZERO_RESULT_QUERIES}}`
- `{{CATALOG_TERMS}}`
- `{{LANDING_PAGES}}`

## Prompt

```
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.
```

## Obtenir un meilleur résultat

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

---

Extrait de la bibliothèque de prompts QuQi - https://www.quqi.io/fr/prompts/onsite-search-synonym-dictionary
