AI & Natural Language Processing
CSML Studio allows you to use your own pre-trained Natural Language Processing (NLP) service directly in your CSML chatbots with very little configuration. You can easily setup your favorite NLP provider in AI & NLU > NLU Configuration:
By default, all bots run in Strict Mode
, where the input needs to exactly match one of the given rules to trigger a flow.
When a NLP provider is configured, all text
events will be sent to the NLP provider and returned either as a payload
event if an intent is found, or untouched if no intent is found. When an intent is found, the value of the payload will be intent:nameOfIntent
.
No matter what NLP provider you pick, any event that passes through this process will have the following properties:
A few additional properties are also set in the resulting event:
event._nlp_provider
: contains details about the NLP provider integrationevent._nlp_result
: contains the raw response from the NLP providerevent.text
: contains the original text input
Using NLU in your flows
You can now use the event by matching a found intent with a flow command, by setting that intent as one of the accepted commands for a flow, using the AI Rules feature.
Alternatively, you can also decide to match buttons or other actions within a flow with the found data. For instance, you can use NLP to detect a YES_INTENT
and match it without having to list all the possible ways to say "yes" in the button's accepts
array.
CSML Tip: except in very specific scenarios, you should not map your NLU provider's default or fallback intent to a CSML flow, as this would result in a behavior where every input that is not a detected intent triggers that flow. Instead, fallback intents should continue any currently open conversation or automagically fallback to the default CSML when needed.
Last updated
Was this helpful?