OBLYTECH Logo
OBLYTECH Logo

Create a Result Improvement Rule in AI Search

To create a result improvement rule in AI Search, open the target search profile, create the rule, define when it activates, and add boost, block, or promote actions. Use the ais_admin role for rule creation and action configuration. Publish the edited search profile so the new settings take effect.

Choose the result improvement rule your AI Search needs

Start with the result behavior you want to change. A boost changes relevance scores for matching results. A promotion puts selected records ahead of other results. A block removes selected documents from the result set, with an option to restrict that blocking to Genius Result answers.

Each rule supports one action type, although it can contain multiple actions of that type. If a request combines promotion and blocking, plan separate rules. This keeps the activation conditions and the intended result behavior clear when you review the configuration.

Write a short acceptance statement before opening the form: which query or user context should activate the rule, which records should be affected, and what the reader should see afterward. Keep one example that should activate it and another that should remain unaffected. These examples will guide testing after publication.

Check these settings on your instance and release before applying them. For surrounding configuration, see AI Search profiles, synonyms, and stop words.

Create the rule under the correct search profile

The role required to create a result improvement rule is ais_admin. Open the profile you intend to change before creating the rule, rather than starting with an unrelated search experience and assuming it uses the same configuration.

  1. Navigate to All > AI Search > Search Experience > Search Profiles.
  2. Open the search profile that should contain the rule.
  3. In the Result Improvement Rules related list, select Create.
  4. Complete the AI Search Results Improvement Rule form.
  5. Select Submit. The Actions related list then appears.

Use Label to give the rule a unique identifier. A descriptive label should make its purpose recognizable during later review. For example, distinguish a temporary promotion for a specific request from a broader relevance adjustment. Treat that naming choice as an administrative convention rather than a substitute for checking the actual conditions.

Set dates, language, and activation conditions

Start Date and End Date use system time. Leaving Start Date empty sets it to the current date. Leaving End Date empty sets it to 30 days after Start Date. Decide whether that default duration fits the request before saving the rule.

Language also controls eligibility. AI Search evaluates activation when the rule language matches the search query language, or when the field is set to All Languages. Include language in your test notes when otherwise similar queries produce different outcomes.

Selecting Activate on all queries makes the rule eligible for every search query. It also hides Triggers and Expand Synonyms For Query Conditions. For a narrower change, define Triggers using the appropriate subject:

  • Keywords checks words within the query. Choose it when the relevant term may appear inside a longer request.
  • Query checks the complete query. Use it when the full wording matters to the activation decision.
  • User Context checks an element from the search user’s session. The displayed element includes its source table and field.

For example, a Query condition for “device replacement” needs a different test from a Keywords condition for “device.” Try both the intended phrase and a longer variation. The purpose is to verify the boundary you selected, rather than judging the rule from a single successful search.

Add boost actions for relevance adjustments

Configuring boost actions requires ais_admin. In Actions, select Create Boost Action, complete the Rule – Action Mapping form with the boost weight and other fields, and select Submit.

Choose the action type according to how you identify the records. Boost All Documents In Indexed Source applies across results from the selected source. Boost By User Context (dynamic) matches a document field against a user context value. Boost By Field Match (static) uses a specified fixed value. Boost By Synonym Dictionary matches against terms in the selected dictionary.

Boost weights are integers. Positive values raise relevance scores and negative values lower them. The action adjusts records already returned by the search; it does not bring a nonmatching record into the result set. If a record must appear despite not matching the query, consider a promote action instead.

A boost weight of 100 increases the original relevance score by 10%; a weight of 1000 doubles it. A weight of -1000 or lower reduces the score to zero and places the result at the end of the list. Use these relationships to judge the scale of an adjustment, then verify actual ordering with representative queries. Lowering a score does not remove the document, so choose blocking when exclusion is the requirement.

When planning a source-wide adjustment, identify the source before choosing the weight. The AI Search indexed source configuration explains the adjacent source setup. Test a field-based boost with records that satisfy the field match and records from the same source that do not.

Promote selected records or block documents

Configuring promote actions requires ais_admin. Select Promote Documents in Actions. In Select Documents To Promote, search for the intended records and use the plus sign beside each result to add it to the selected results pane. Finish with Add Documents and Close.

A promotion places the selected records ahead of other results. It can also add a spotlighted record that would not otherwise match the query. Review the chosen documents carefully: a successful promotion should bring forward the intended answer, not merely a record with a similar title.

Configuring block actions also requires ais_admin. Select Block Documents, find records in Select Documents To Block, add them with the plus sign, and select Add Documents and Close.

The Apply only to Genius Results setting determines the scope of blocking. Selected documents remain eligible for ordinary search results when this option is selected, but cannot appear as Genius Result answers. With the option cleared, the block covers both ordinary results and Genius Result answers. A rule with this option selected supports block actions only.

Test the ordinary result list and the answer area separately when using this option. For context on that distinction, see AI Search Genius Results.

For help planning these changes, see ServiceNow implementation.

Publish the profile and verify the result

Publish the edited search profile to activate new or updated rule settings. Saving the form or adding an action does not complete that step. Before publication, review the label, activation conditions, selected documents or source, and action type against your acceptance statement.

The rule’s State helps explain its current position. New means it has not been published. Draft indicates saved changes that remain unpublished. Published indicates that saved changes have been published. Expired means the End Date has passed; publishing a profile does not publish expired rules.

After publication, repeat the matching and nonmatching searches you recorded earlier. For a boost, inspect the affected matching records. For promotion, check the chosen record’s placement. For blocking, check absence in the appropriate result surface. Record the query wording, language, user context, and observed behavior so another administrator can reproduce the check.

If the outcome differs from your expectation, inspect date eligibility, language, trigger scope, and action selection before changing several settings together. Reviewing one boundary at a time makes the next test easier to interpret.

Questions about rule maintenance and edge cases

What happens when several boost actions affect one result?

AI Search adds the individual boost weights to determine the combined relevance modifier. Review overlapping actions before increasing a weight, because the effective adjustment may already include other boosts.

How does synonym expansion affect Query conditions?

When enabled, expansion considers active synonyms in the same search profile whose language matches the rule language. A condition can therefore cover equivalent wording beyond the literal argument you entered.

What must a synonym dictionary meet for a dictionary boost?

The dictionary must be published, active, and linked to the current search profile. Matching uses published, active synonyms within it. Check these requirements if expected dictionary terms do not affect results.

How are multiple promote actions ordered?

The Order field accepts integers, and lower values are evaluated before higher values. Review the values across the rule’s promote actions when configuring several selected records.

When does marking a rule for deletion remove it?

Marked for Deletion indicates that AI Search will delete the rule the next time the search profile is published. Include pending deletions in the profile review before publishing other changes.