Node Function
Large Language Model (LLM) Intent Recognizer Node belongs to Information Processing Node, leveraging LLM to auto infer the user's potential goal or intent from input. It supports intent description and addition through writing prompt, then routes to subsequent node based on intent category.
Directions
Input Variables
Input variables take effect only within the same node and cannot be used cross-node. Support up to 50 input variables to meet scene requirements. Click "Add" to configure input variables as follows.
|
Variable Name | The variable name can only contain letters, digits, or underscores, must start with a letter or underscore, and is mandatory. |
Description | Description of this variable. Optional. |
Data source | The data source of this variable supports two options: "refer" and "input". "Refer" allows selecting output variables from all preceding nodes, while "input" supports manually filling in a fixed value. |
Type | The data type of this variable cannot be selected and defaults to the "refer" variable type or the "input" string type. |
Model
Supports selecting LLMs with usage permissions under the current account.
Content to extract intent from
As input for the intent recognition LLM. Supports user input for expected intent recognition content. Here, it supports direct import of variables, manual input, or a mix of variables and text content.
Intent
For intent categorization, supports user manually filling in possible intent definitions, with a limit of 20 intents. Recommend configuring according to the template format, complete each intent with its intent name, description, and add several intent examples to help the LLM better understand the intent.
Intent Prompt example:
##Intent name: Borrow a book
##Intent description: In a library scenario, the user indicates the intent to borrow a book
##Intent example: I want to borrow a book, borrow a book, I'd like to borrow a book, help me borrow a book
##Intent name: Return a book
##Intent description: In a library scenario, the user indicates the intent to return a book
##Intent example: I want to return a book, return this book, I'd like to return "Harry Potter", return the book "The Little Prince"
##Intent name: Rules and regulations query
##Intent description: In a library scenario, the user asks about library rules and regulations
##Intent example: How many books can I borrow at most, when does the library open, how long can I borrow Chinese books, how long can I borrow foreign books
Once configured, connect the intent recognition node to other nodes to form a complete call trace.
Each intent category of the intent recognition node must be connected to subsequent processing nodes, otherwise the follow-up workflow cannot be triggered when the intent hits this category.
By default, an "other" intent exists. When intent recognition is unable to hit any user-defined intent, it proceeds to the "other" intent for subsequent process.
Prompt
As supplementary input for the intent recognition LLM, it supports user input of priority rules, conflict resolution rules, output requirements, etc., to enhance intent matching accuracy. Here, it supports direct import of variables, manual input, or a mix of variables and text content.
Output Variable
The output variable processed by this node defaults to the hit intent serial number and intent name, as well as runtime Error info (data type is object, this field is empty during normal operation). Manual addition is not supported.
Handling error
Exception handling can be enabled manually, supporting exception retry and output content configuration for anomalies. The configuration content is as follows.
|
Max Retry Attempts | Maximum number of retries when the node runs exceptionally. If retries exceed the set number, consider that node call failed and return the "Exception Output Variable" content, default is 3. |
Retry Interval | Interval between each rerun, default is 1 second. |
Exception Output Variable | The output variable returned when retries exceed the maximum number. |
Application Example
Create an AI tool response assistant to identify different problem types through the intent recognition node and perform categorization.
LLM Intent Recognition configuration as follows:
FAQs
What to do if intent recognition is inaccurate?
The accuracy of intent recognition is affected by multiple factors, such as model performance, category configuration and prompt. If the intent category does not meet expectations, you can refer to the following recommendations to enhance the accuracy of intent recognition node classification:
1. Adjust categories: Ensure intent categories are concise and clear, avoid blurry or confusing semantics. There should be clear differentiation between categories, decrease intersecting semantics to reduce the likelihood of classification confusion. For example, avoid overlap between "animal" and "animals and plants".
2. Provide specific user input examples to help the model understand and execute the classification task more accurately.
3. Switch models: Even if categorization and advanced settings are optimized, intent recognition accuracy remains unsatisfactory. We recommend trying different models to find the one that best meets your requirements.