You are here:
Automatic Query Rewrite for Agentic Commerce Search
Agentic Query Rewrite in Agentic Commerce Search for B2C Commerce automatically reformulates queries that return poor or irrelevant results to show more relevant products. The feature activates after provisioning and requires no admin configuration.
When Agentic Query Rewrite Runs
Agentic Query Rewrite works best for emerging trends, specialty terminology, foreign-language queries, and long-tail phrases that the AI model doesn't handle well.
For example, a shopper searches for "glazed donut nails" (a trending nail aesthetic). The query doesn't match product titles or attributes. Agentic Commerce Search recognizes the weak result set, rewrites the query to "sheer gloss nail polish," and caches the improved results. Subsequent searches return the better match immediately.
How Agentic Query Rewrite Refines Results
- A shopper submits a query.
- Agentic Commerce Search evaluates the top results for keyword match quality and relevance.
- Strong results return without a rewrite.
- Poor results trigger a background rewrite.
- The first shopper sees the original results while the rewrite runs.
- Subsequent shoppers see the improved results from the cache.
Salesforce manages the cache duration. To adjust the default period, contact your Salesforce account team.
Influencing Agentic Query Rewrite Quality
Agentic Query Rewrite doesn't expose direct configuration controls. However, complete product titles, descriptions, and attributes give the AI model stronger signals about product intent. You can also manually create a merchandising rule and select Query Rewrite as the action type to override the automatic rewrite for a specific query.

