Let your Virtual Agent listen to particular terms to improve its Intent recognition.

A Lexicon enables the Virtual Agent to recognize a variety of possible expressions. Learn more about Lexicons in our documentation.

#1 Create a Lexicon

Select "Lexicons" from the Sidebar, create a new Lexicon, name it e.g. "Support Issues", and save.

Progress

#2 Add a Lexicon entry

Enter a new Keyphrase that is representative of a topic or a specific term, e.g., "computer". Specify a Slot that is associated with a user input when the Keyphrase or its Synonyms occur in the user input. Use "issue" as an example here. Put in Synonyms for the Keyphrase like "pc", "mac", and "laptop".

#3 Add a second Lexicon entry

Add a support issue with another Keyphrase "phone". The Slot should also be "issue". Useful Synonyms are "mobile", "iphone", "android". 

Progress

 

#4 Attach, activate, and train your Lexicon

Navigate to your Flow, open the NLU tab, and switch to "Attached Lexicons". Attach your lexicon by switching the toggle button. Afterward, you will need to rebuild the ML-Model by clicking "Build Model".

Progress


#DONE! Now add the Lexicon to your Flow to streamline the conversation!


Comments

2 comments

  • Hi Support,

    Please add an example which involves a regex pattern too, this illustration is about matching a fixed set of words.

    1
  • Here’s an example of how you might define a Regex-Based (pattern) entity in Cognigy to catch various spellings/abbreviations of the city Berlin:

    (?i)\b(?:berlin|berlyn|b[\-\s]?e[\-\s]?r[\-\s]?l[\-\s]?i[\-\s]?n|b[-]?e[-]?r[-]?l[-]?n)\b

    Breakdown

    • (?i)
      – Case-insensitive flag so you don’t have to worry about upper/lower case.

    • \b … \b
      – Word boundaries to ensure you match whole words only.

    • (?: … )
      – A non-capturing group for the alternation of variants.

    • berlin|berlyn
      – Two common spellings.

    • b[\-\s]?e[\-\s]?r[\-\s]?l[\-\s]?i[\-\s]?n
      – Allows an optional hyphen or space between each letter (so “B-E-R-L-I-N” or “B E R L I N”).

    • b[-]?e[-]?r[-]?l[-]?n
      – A shorter abbreviation (e.g. “B-E-R-L-N”).



    0

Please sign in to leave a comment.

Was this article helpful?
0 out of 2 found this helpful