GETTING STARTED
SearchAssist Overview
SearchAssist Introduction
Onboarding SearchAssist
Build your first App
Glossary
Release Notes
Current Version
Recent Updates
Previous Versions

CONCEPTS
Managing Sources
Introduction
Files
Web Pages
FAQs
Structured Data 
Connectors
Introduction to Connectors
SharePoint Connector
Confluence Connector
Zendesk Connector
ServiceNow Connector
Salesforce Connector
Azure Storage Connector
Google Drive Connector
Dropbox Connector
Oracle Knowledge Connector
Virtual Assistants
Managing Indices
Introduction
Index Fields
Traits
Workbench
Introduction to Workbench
Field Mapping
Entity Extraction
Traits Extraction
Keyword Extraction
Exclude Document
Semantic Meaning
Snippet Extraction
Custom LLM Prompts
Index Settings
Index Languages
Managing Chunks
Chunk Browser
Managing Relevance
Introduction
Weights
Highlighting
Presentable
Synonyms
Stop Words
Search Relevance
Spell Correction
Prefix Search
Personalizing Results
Introduction
Answer Snippets
Introduction
Extractive Model
Generative Model
Enabling Both Models
Simulation and Testing
Debugging
Best Practices and Points to Remember
Troubleshooting Answers
Answer Snippets Support Across Content Sources
Result Ranking
Facets
Business Rules
Introduction
Contextual Rules
NLP Rules
Engagement
Small Talk
Bot Actions
Designing Search Experience
Introduction
Search Interface
Result Templates
Testing
Preview and Test
Debug Tool
Running Experiments
Introduction
Experiments
Analyzing Search Performance
Overview
Dashboard
User Engagement
Search Insights
Result Insights
Answer Insights

ADMINISTRATION
General Settings
Credentials
Channels
Collaboration
Integrations
OpenAI Integration
Azure OpenAI Integration
Billing and Usage
Plan Details
Usage Logs
Order and Invoices

SearchAssist PUBLIC APIs
API Introduction
API List

SearchAssist SDK

HOW TOs
Use Custom Fields to Filter Search Results and Answers
Add Custom Metadata to Ingested Content
Write Painless Scripts
Configure Business Rules for Generative Answers

Contextual Rules

Contextual rules refer to the business rules that are defined by utilizing the context information available to SearchAssist. These rules can be used to tailor the response based on factors like recent search queries, user context, page context, etc. 

You can define contextual business rules for both Search Results as well as Answers. Business rules for Answers and Business rules for Search results are differentiated by the name of the rule.

Add a Contextual Rule

To add a new rule, go to the Business Rules page under the Indices tab and click Add Contextual Rule.

To define a business rule, you need to specify a name, the condition under which the rule is to be applied, and the outcome of the rule and click Add

Rule Name – Give a unique name for the rule. 

Note that the Business rules for Answers and Business rules for Search results are differentiated by the name of the rule. You can use any name for a rule to be applied to Search results but for rules to be applied to Answers, the name should begin with ‘v_’.

Condition: Condition defines the trigger for the rule to be applied. For contextual rules, conditions are based on the different types of context information available and the parameter values set. Three types of context can be used to define a condition. 

  • Search context  This is based on the user search history.  This context gives access to information like Recent search queries, current search query, and Traits. 
  • Page context  This gives context information from the device, browser, or the current page.  
  • User Context  This can be used to fetch context information about a user. You can pass any custom fields as parameters. 

Using the selected context and parameters, you can define a condition. You can add more than one condition to refine the conditions further. 

Outcome: Outcome defines what happens when the above conditions are met. Choose the actions you wish to take and the response you want to give to the users for the specified conditions or queries. 

The Action field can take the following values:

Field Description
Boost Prioritize the search results by the boost factor. The boost factor can take values between 1 and 5, where 5 being the maximum boost and 1 being the lowest.
Lower  De-prioritize the search results by the lower factor. This factor can take values between 1 and 5. 
Hide Hide the response from the search results
Filter Filter the search results as per the response 

Use the response section to describe the set of results on which the Action is to be taken. Select the field on which you want to apply the action chosen above. Then, specify the condition and a value of the field that will be used to identify the records to be displayed in the results. The value can be set to a static value or can be mapped to a dynamic value.

  • Static: When providing a constant value for a field.
  • Dynamic: When providing a value fetched dynamically from searchContext, userContext, or pageContext.  

For instance, if you consider individuals seeking credit card information as prospective credit card customers, and you aim to enhance the visibility of pages that outline the benefits and promotions linked to credit cards to such users. In this situation, you can define a business rule as shown below.
 

Note: When using the ‘contains’ operator in the outcome, provide the complete word.

Enable/Disable a Contextual Rule

After defining a rule, you need to activate it to put it into effect in the search results. Similarly, you can temporarily deactivate it to not affect the search results. To change the status of the rule,  go to the list of rules and use the slider button to change the status. Alternatively, go to the edit page for the rule and use the slider button at the top to change the status of the rule. 

Edit Contextual Rule

To edit an existing rule, go to the list of rules under Business Rules and use the edit icon against the rule to be edited. You can modify all the fields in the rule as a new rule.

Delete Contextual Rule

To delete an existing rule, go to the list of contextual rules and use the delete icon against the rule to be deleted.  To delete multiple rules at once, select the rules to be deleted and click the Delete button on the top right corner of the page. 

Examples of using Contextual Rules

In a banking scenario, suppose you want to achieve the following: 

  • Present premium customers with a credit card offer. 
  • If a customer is not creditworthy, do not show them loan offers.
  • If the user has only a savings account and is searching for account-related information, do not show information related to other types of accounts.

In such a scenario, you can set the following rules corresponding to each of the above requirements and offer the desired search results.

  • When customerType is ‘Premium’ and his recent search queries include words like ‘credit’,’card’,etc, boost the pages which list the credit card offers and rewards.
  • When the credit score of a customer is not good and recent search history indicates his need for a loan, hide the pages which list loan or credit card offers.
  • When a user with a debit card from the bank is looking for debit card offers, promote credit card offerings.

Contextual Rules

Contextual rules refer to the business rules that are defined by utilizing the context information available to SearchAssist. These rules can be used to tailor the response based on factors like recent search queries, user context, page context, etc. 

You can define contextual business rules for both Search Results as well as Answers. Business rules for Answers and Business rules for Search results are differentiated by the name of the rule.

Add a Contextual Rule

To add a new rule, go to the Business Rules page under the Indices tab and click Add Contextual Rule.

To define a business rule, you need to specify a name, the condition under which the rule is to be applied, and the outcome of the rule and click Add

Rule Name – Give a unique name for the rule. 

Note that the Business rules for Answers and Business rules for Search results are differentiated by the name of the rule. You can use any name for a rule to be applied to Search results but for rules to be applied to Answers, the name should begin with ‘v_’.

Condition: Condition defines the trigger for the rule to be applied. For contextual rules, conditions are based on the different types of context information available and the parameter values set. Three types of context can be used to define a condition. 

  • Search context  This is based on the user search history.  This context gives access to information like Recent search queries, current search query, and Traits. 
  • Page context  This gives context information from the device, browser, or the current page.  
  • User Context  This can be used to fetch context information about a user. You can pass any custom fields as parameters. 

Using the selected context and parameters, you can define a condition. You can add more than one condition to refine the conditions further. 

Outcome: Outcome defines what happens when the above conditions are met. Choose the actions you wish to take and the response you want to give to the users for the specified conditions or queries. 

The Action field can take the following values:

Field Description
Boost Prioritize the search results by the boost factor. The boost factor can take values between 1 and 5, where 5 being the maximum boost and 1 being the lowest.
Lower  De-prioritize the search results by the lower factor. This factor can take values between 1 and 5. 
Hide Hide the response from the search results
Filter Filter the search results as per the response 

Use the response section to describe the set of results on which the Action is to be taken. Select the field on which you want to apply the action chosen above. Then, specify the condition and a value of the field that will be used to identify the records to be displayed in the results. The value can be set to a static value or can be mapped to a dynamic value.

  • Static: When providing a constant value for a field.
  • Dynamic: When providing a value fetched dynamically from searchContext, userContext, or pageContext.  

For instance, if you consider individuals seeking credit card information as prospective credit card customers, and you aim to enhance the visibility of pages that outline the benefits and promotions linked to credit cards to such users. In this situation, you can define a business rule as shown below.
 

Note: When using the ‘contains’ operator in the outcome, provide the complete word.

Enable/Disable a Contextual Rule

After defining a rule, you need to activate it to put it into effect in the search results. Similarly, you can temporarily deactivate it to not affect the search results. To change the status of the rule,  go to the list of rules and use the slider button to change the status. Alternatively, go to the edit page for the rule and use the slider button at the top to change the status of the rule. 

Edit Contextual Rule

To edit an existing rule, go to the list of rules under Business Rules and use the edit icon against the rule to be edited. You can modify all the fields in the rule as a new rule.

Delete Contextual Rule

To delete an existing rule, go to the list of contextual rules and use the delete icon against the rule to be deleted.  To delete multiple rules at once, select the rules to be deleted and click the Delete button on the top right corner of the page. 

Examples of using Contextual Rules

In a banking scenario, suppose you want to achieve the following: 

  • Present premium customers with a credit card offer. 
  • If a customer is not creditworthy, do not show them loan offers.
  • If the user has only a savings account and is searching for account-related information, do not show information related to other types of accounts.

In such a scenario, you can set the following rules corresponding to each of the above requirements and offer the desired search results.

  • When customerType is ‘Premium’ and his recent search queries include words like ‘credit’,’card’,etc, boost the pages which list the credit card offers and rewards.
  • When the credit score of a customer is not good and recent search history indicates his need for a loan, hide the pages which list loan or credit card offers.
  • When a user with a debit card from the bank is looking for debit card offers, promote credit card offerings.