Table of Contents | ||
---|---|---|
|
Intent Detection - Detect what the user wants
Another feature of the AI studio is PIPEFORCE AI has the ability to detect the intent of the user or to classify a given unstructured information and extract additional information based on the detected intent.
...
intentId
This attribute is mandatory and gives the intent a unique id. This should be an explainatory, unique name without special charaters or whitespaces.prompt
Each intent has anprompt
in order to instruct the AI about the criteria to select this intent. In case such an intent is selected by AI, additionally the parameters will be extracted from the input. This parameter is mandatory.params
The list of optional parameters to be detected in case this intent was selected.command
The optional name of the command to be executed in case this intent was detected. Note: AdditionallyrundDetectecCommand
must be set totrue
on theai.intent.detect
command which isfalse
by default.enabled
An intent can optionally be disabled by setting enabled = false. This is useful mainly for testing purposes for example. In this case only the other intents will be considered by the AI.
Intent Parameters
The params
section on each intent lists the parameters of the intent. These parameters will be automatically set in case the given intent was detected. They can later be used for further processing by calling a command of by passing them to external systems for example.
...
All parameter attributes are explained below.
name
(optional)
The name of the parameter.
This attribute is optional. If not set, the params id will be used.
required
(optional)
Defines whether this parameter is required. In case it is required and its value is finally missing or cannot be detected by AI, an error is thrown and further execution stops.
The default value is false
.
type
(optional)
The data type of the parameter such as string
, boolean
, integer
, number
, json
...
The default value is string
.
value
(optional)
The value
of the intent parameter.
This can be a fixed value (literal) or a template.
Templated values
The value can also be template string. By default the Mustache template syntax can be used which starts with {{
and ends with }}
. The variables advice
and intent
are passed as model context to the template. This way you can access for example settings and values of other parameters after they have been resolved by the AI in order to formulate the final parameter for a command.
...
Code Block | ||
---|---|---|
| ||
... params: customerId: value: "1234567" message: value: "The customerId is: {{intent.params.customerId}}" ... |
prompt
(optional)
For each parameter, an attribute prompt
instead of a value
can be set. Not both!
...