Query Rules

While AI search automatically returns results based on relevance, hardcoding rules to modify results in certain scenarios can still be beneficial. With Query Rules, administrators can set custom business rules so that when certain search criteria are present, the Search algorithms will trigger a particular action in the search results. Query Rules are a great way to perfect your user experience or promote your business goals, by ensuring that important queries consistently display the exact results you want users to see.

Set Criteria

Criteria are the properties that need to be met in order to trigger the Query Rule. Criteria options include: search terms, referrer page URLs, search type, vertical name, or context (arbitrary JavaScript, such as data from a CDP, that you can pass to our API to trigger complex rules). You can even combine multiple criteria as the trigger for a rule. The ability to customize criteria allows great flexibility for the administrator to precisely predict the user's intent and surface results fit for that intent.

Set Action

Actions override the algorithm's default results when the criteria is met. Action types include: boosting entities, burying entities, returning no results, adding a filter, boosting vertical intent, or returning a pinned result. Some use cases include cost deflection of support functions (ex: surfacing FAQs ahead of contact information), avoiding negative outcomes (ex: pinning "how to pause a membership" instead of directing the user to cancellations), or perfecting results when an internal acronym or business-specific term is used that the algorithm may not know how to handle right away.

Flexible Configuration

Rules can be easily configured in either our point-and-click interface or in JSON, depending on the administrator's preferences. Non-technical administrators will appreciate the intuitive experience that allows them to create, name, assign boosting strength, and edit each rule. Additionally, developers or administrators who are comfortable with low-level coding will have the ability to configure rules in JSON.

Unlimited Rules

There is no limit to the number of Query Rules that can be set in a given search experience. Each rule will be honored as long as the rule's criteria do not overlap with any other existing rules. You can even set multiple pieces of criteria in one rule, or several actions that should occur in one rule.

Test Search

You can test in real time the effect any newly added Query Rule has on your search results by using our Test Search function in the platform. This way you can ensure you set rules properly and that they're returning results as you expected.

Want to learn more about Query Rules?

Check out the Query Rules module on Hitchhikers! Hitchhikers is our Yext training platform and community where you can test your knowledge, earn badges, and engage with the experts.

Learn More

Explore Related Features

Yext is the leader in managing your brand’s digital presence. Learn why.