This article outlines how to troubleshoot issues with the search backend related to NLP Filters.
Be sure to follow the How to Start Debugging Backend Search Issues help article for general troubleshooting steps first. Once you resolve your issue, you may skip the remaining steps.
- Open the search log for the query you’re seeing issues for. Either:
- Navigate to Search > [[Experience Name]] > Home or a Configuration sub-tab. Run a test search and then select Debug Query from the drop-down menu.
- If you’ve already run the search in a staging or production link, navigate to Search > [[Experience Name]] > Search Logs and click on the relevant search log. Use the search bar or filters to help you find the correct search log or run the search again to have it appear at the top.
- Review which, if any, NLP filters were applied for each vertical in the search log. If NLP Filters are applied to fields that should not have it enabled, follow step 5 to disable it.
- Check the tokens the search is comprised of: The tokens of the query will impact what NLP filter is applied. This is shown in the search factors box on the right side of the search log.
- If the NLP filter value is not included as a search token, it is considered a stop word; it does not get evaluated as a query token and therefore no NLP Filter is applied. For example,
state == 'IN'
would not trigger an NLP filter. - Check the number of matching tokens between the query and the desired NLP filter field value: For a field value with a single token, the query must match that one token for the NLP filter to be applied. For field values with more than two tokens, the query must have at least two token matches.
- If there are multiple matches on an NLP filter field value with two or more tokens, the best match is determined by the highest percentage of tokens that are a match. Given a query “blue cross” and candidate filters “blue cross” and “blue cross blue shield” for the “Insurance” field, the NLP filter will be applied on “blue cross” because 2/2 tokens match, as opposed to 2/4 for “blue cross blue shield”.
- If the NLP filter value is not included as a search token, it is considered a stop word; it does not get evaluated as a query token and therefore no NLP Filter is applied. For example,
- Confirm NLP Filters are configured properly: Make sure only fields you want NLP filters to be applied on have it enabled. Check what is configured by:
- Navigate to Search > [[Experience Name]] > Verticals.
- Select the relevant vertical and confirm the appropriate fields are selected and the appropriate fields have NLP filter checked off.
- To add or remove fields, click + Add / Update Fields in the top right. Check or uncheck the desired fields and click Update.
- To add or remove a field as an NLP filter, check or uncheck the box in the NLP Filter column.
- Check for experience training overrides: The desired NLP filter will not show up if it was rejected or another NLP filter was approved for the same search query.
- Navigate to Search > [[Experience Name]] > NLP Filters.
- Use the search bar to filter to the search term you are troubleshooting.
- Click to turn on the toggle for “Show completed”.
- Check to see if there are any NLP filter entries for the relevant vertical.
- If the desired NLP filter was rejected for the relevant vertical, this NLP filter would not be applied for this search query. If you would like it to apply, undo the completed experience training override.
- If a different NLP filter was approved, the desired NLP filter will not be applied.
- Undo the incorrect filter.
- Toggle “Show completed” off.
- Approve the desired result by clicking the green checkmark next to it.
- If there are multiple active overrides, undo undesired ones so that there is only one active override.
- Check the Troubleshooting Experience Training Overrides]help article for more guidance.
- Check the NLP filter order: In situations where there are two candidate NLP Filters with identical values, set an NLP filter order to act as the tiebreaker.
-
- Navigate to Search > [[Experience Name]] > Edit as JSON.
- Edit or add the
nlpFilterOrder
property for the relevant vertical in the following format:"verticals": {
"facilities": {
"entityTypes": [
"healthcareFacility"
],
"name": "Facilities",
"nlpFilterOrder": [
"specialties",
"builtinFile.medicalConditions"
],
"searchableFields": {
"builtinFile.medicalConditions": {
"nlpFilter": true
},
"specialties": {
"nlpFilter": true
},
},
"source": "KNOWLEDGE_MANAGER"
}
}
-
Comments
0 comments
Please sign in to leave a comment.