Intentions Chat-Flow Introduction

Positioning

In some real business scenarios, robots not only need to provide basic knowledge Q & A capabilities, but also need to understand complex business requirements, have the ability to identify, guide, and complete tasks, and provide a coherent interactive experience. For example, when a user needs to query the order status, a robot is needed.

  1. Identifying Intent : The robot needs to accurately identify the user's intent.

  2. Guided dialogue : It needs to guide the user through a series of dialogues to provide necessary information, such as order number and order time.

  3. Complete task : It will use the information collected from the user to help the user query the order status.

This process may require several rounds of dialogue to ensure the completeness and accuracy of the information. The robot will guide the user into a closed conversation process during the conversation, ensuring that the dialogue interactions consulted by the user are centered around this clear goal. This closed conversation process is called "dialogue flow".The timing of entering the "dialogue flow" is when the user's question hits the intention bound to the dialogue flow. The timing of exiting the "dialogue flow" is when the node in the dialogue flow transfers to the end node, and then exits.

Feature introduction

1. Intention

  • Intent refers to the purpose or goal expressed by the user through conversation. Intent is usually identified through the user's statements, and the system needs to understand the operation or type of information the user wants to perform. For example, if a user says "I want to book a plane ticket", the intention here may be "booking a ticket".

  • In this system, the intention is the starting point of the dialogue flow. By hitting the dialogue intention, it enters the dialogue flow, which is suitable for the next step of the process. Configuration entrance: "Dialogue Flow Management" in the upper right corner of the homepage, click "+ New" after entering.

Fill in the intention information, including:

  • Intention Name: The name of the process, usually a fixed process name that users will consult, such as account opening, ordering, reservation, inquiry, etc.

  • Intent description: Explanation and descriptive information of intention.

  • Reference question method: It is recommended to list more frequently asked questions by users that may be asked about this intention.

  • Reverse questioning: A questioning method that does not want to hit the intended target, used to eliminate distracting issues.

  • Language: The language used when creating intent.

  • Embedded model: A model intended for vectorization that generally does not require modification.

After filling in the intention information, you can click the "Create Dialogue Flow" button. After clicking, a new intention dialogue flow will appear on the page with the status as "Draft".

Click the intent to enter the dialog flow canvas to arrange the dialog nodes.

2. Entity management, variable management,File Management

2.1 Entity management

The "Entity Management" pop-up window allows you to create, edit, and delete entity information. Entity information can be collected in the "Collect Entity Information Filling" node. "Entity Verification Requirements" uses the big model capability to determine whether the entity information collection is correct. If the verification fails, the verification failure guidance dialogue will be replied.

Entity :

  • In dialogue systems, entities usually refer to specific information points in the dialogue content, such as names, locations, organizations, dates, times, etc.

  • Entities are data fragments identified in a conversation, which are part of the conversation content and are used to understand the user's intention and provide accurate responses.

  • Entities can be selected from system predefined ones, or new custom entities can be created.

2.2 Variable management

The'Variable Management 'pop-up window allows for operations such as creating, editing, and deleting variable information.Variable information will change with the execution process, such as the {last_user_response} variable, which refers to the content of the last user reply, so it will change with the dialogue interaction.Variable :

  • In programming, variables are containers for storing data values. They can contain different types of data, such as numbers, strings, objects, etc.

  • Variables can be assigned and modified during program execution, and they are used to store and manipulate data.

  • Variables have names (identifiers) that are unique in the context of the program and are used to refer to the data stored in the variable.

2.3 File Management

The ‘File Management’ pop-up window allows you to create, edit, and delete file categories. File information is performed in the ‘Collect File Information to Fill Slots’ node.

  • File category: User-defined file types that need to be uploaded after triggering this dialogue flow. If the user needs the bot to collect the order contract for extracting the information of the contract field, the user can select ‘Contract Category’ in the dialogue flow configuration of the bot. Currently, the following file categories are supported in the default configuration (cannot be deleted):

Order
File Category
Format
Maximum number of files uploaded at a time

1

Contracts/Agreements

PDF, DOCX

3

2

Certificates

PNG, JPEG, JPG, PDF

5

3

Resumes

PDF, DOCX

10

4

Financial Statements

XLSX, XLS, PDF

1

5

Bank Statements

PDF, CSV

1

6

Expense Reports

DOCX, PDF

5

7

Policy Documents

DOCX, PDF

5

8

Invoices/ Receipts

PDF, JPEG, PNG

01

9

Knowledge Base Documents

HTML, PDF

1

10

Audio Files

wav、silk、speex、m4a、ogg-opus、mp3、pcm、aac、amr

1

11

Compliance Reports

PDF, DOCX

5

  • If the existing file category can't meet the user's needs, the user can create a new file category (which can be deleted). The following fields need to be added manually:

  1. File Category:Mandatory field. Describes the basic nature of the document, naming can refer to the default category. The name can only contain letters, numbers, _ (underscore), spaces and English, and must begin with a letter or English character;

  2. Category Description:Mandatory field. Provide a brief description of the file type;

  3. File Upload Format:Mandatory field, multiple options available. Currently support 11 kinds of file formats: xls, xlsx, csv, pdf, docx, txt, html, png, jpg, jpeg, wav ;

  4. Maximum number of files uploaded at a time:Required fields. Currently supports a maximum of 10;

  5. ATTENTION:New file categories must not be renamed with the default supported categories, otherwise they cannot be saved.

3. Dialogue nodes

3.1 Reply to User - Large Model Reply

"Large Model Reply" node, a node for generating robot replies to user content for large models. Relevant information can be configured in the configuration bar on the right.

  • Data source: a. Only large model replies (only obtain answers through large models without knowledge retrieval); b. Large model + Knowledge Base replies (knowledge retrieval needs to be performed before the reply is generated by the large model, and the "Knowledge Base Questions" field needs to be filled in more to obtain accurate knowledge retrieval content).

  • Node passing requirements: After turning it on, you can fill in the specific requirements for passing the node. The conversation will only enter the next node when the content meets the "node passing requirements". If it does not meet the requirements, the conversation will continue at the node.

  • Drop-down selection: a. Prompt only (the content passed to the large model does not include context); b. Prompt + context (the content passed to the large model includes the content of the first 10 rounds of this conversation).

  • Prompt text box: This is the prompt information for filling in the generated content for the large model. You can use & to reference variables and @to reference entities.

  • Large model configuration: model selection (select different models), divergence degree (whether the model reply is rigorous or divergent), role setting (can write the character information of the reply robot separately).

3.2 Reply to Users - Text Reply

The "Text Reply" node can output a specified narrative. Support using & to reference variables and @to reference entities.

3.3 Information Collection - Collect user responses to variables

The "Collect User Replies to Variable" node can assign the content of the user's reply in this round to the {last_user_response} variable. After assigning the variable, the user's reply content in the previous round can be dynamically added to the subsequent node arrangement. For example, many nodes such as large model replies, large model variable assignments, text replies, and entity information filling slots (entity guides) can be used in the input information to reference this variable for further content generation, splicing, and processing in combination with the user's reply content in the previous round.

3.4 Information Collection - Collect entity information to fill in the gaps

The "Collect Entity Information Filling Slot" node can collect entity information through multiple rounds of dialogue, such as names, place names, mobile phone numbers, ID numbers and other objective and specific information. You can configure "Entity Value Verification" and "Verification Failure Guidance Script" to guide errors and skip collection. After "Advanced Settings" is turned on, the entity value will be cleared when collecting again.

When there are multiple entity collection tasks in this node, after an entity collection task succeeds, it will continue to collect the next entity or flow to other nodes. The entity information after successful collection can be referenced using "@" in subsequent nodes.

3.5 Collect User Upload Files

3.5.1 Overview

The "Collect User Uploaded Documents" node collects document information, such as business trip request forms, air tickets, train tickets, accommodation invoices, official tax invoices/receipts, reimbursement application forms, contracts/agreements related to expenses, etc., through the document uploading guiding dialogues. (The specific required documents may vary depending on company policies, so it is recommended to choose and configure them according to the dialogue flow usage scenario and refer to the company's internal reimbursement system or consult the finance department).

The node supports the configuration of multiple file categories (upper limit: 20) and supports the order swap of files.

  • File Upload Guide Script:

After the user prompt triggers the chat flow, the robot guides the user to upload relevant documents. e.g., If the flow needs to upload multiple document categories, it can be unified as ‘Please upload your contract, document information, air ticket, business trip application form’ (Edit and add according to the actual needs);

  • Select File Type:

The drop-down box allows you to select the default/new file category, and ( ) allows you to view the file formats that are allowed to be uploaded in that category.

  • File Parsing Variable Assignment

When the user uploads a file, it will be parsed automatically. When the user clicks send, the parsed content will be assigned to the specified variable. After the file is uploaded, it will be stored in the specified path for subsequent HTTP/API nodes to retrieve.

--Customized Parsing Method:The current version supports OCR extraction processing by default, and will support manual addition in the future.

(1)Select File Type: Currently Supported Images

(2)Select Parsing Method: List of supported models by file type

(3)Prompt input: If you select a model, you need to fill in the prompt command. For example: extract the text from the picture; describe the picture, etc.

3.5.2 Q&A effect

After completing the creation&editing of the chat flow and the editing of the document upload node, the user can explain the intention to the robot and upload the relevant documents under its guidance to complete their personal needs. (Here is an example of a travel reimbursement scenario).

3.6 Information Processing - Assignment of Large Model Variables

The "Large Model Variable Assignment" node can analyze, judge, and extract relevant information from user input content as output content through the Natural-language Understanding ability of the large model, and can directly assign the output content to custom variables. The obtained variable information can be referenced using "&" in subsequent nodes.

3.7 Information Processing - Ordinary Variable Assignment

The "Ordinary Variable Assignment" node can fill in the specified information into a text box and assign it to a variable for use in subsequent nodes.

3.8 Long-term Memory Assignment

The ‘Long-term Memory Assignment’ node can retrieve and recall long-term memories according to the ‘long-term memory retrieval words’ and assign the recalled contents to variables. In other words, the robot is able to convert the key information during the interaction with the user into structured data and store it persistently, so that the information can be recalled for reference in future dialogue flow interactions.

3.9 Knowledge Retrieval Variable Assignment

The "Knowledge Retrieval Variable Assignment" node allows for the retrieval and recall of the knowledge base based on "knowledge base search terms" and assigns the recalled content to variables. It supports filtering by knowledge base and also supports secondary filtering by keywords for file names (dataset names).

  • Long-term Memory Retrieval Scope:It is a boundary for searching the recalled information from long-term memory when the robot responds to user commands. The search of all memories, user profile information, and user memory point information is now supported.

  • Bot Scope:Users can retrieve the long-term memories of specified /all robots in the space according to actual needs;

  • Question for Long-term Memory Retrieval:

Example: User: I uploaded my reimbursement earlier, which point in the approval process has I gone to now? Robot: (need to retrieve relevant information from long-term memory)

--Variables assigned to will subsequently support custom additions, which are currently selected from the default options.

  • Retrieval Configuration-Number of Long-term Memory Recalls:

Recall the most relevant N long-term memories from the memory base based on user query.

Example: The search term is ‘dinner’, when configuring long-term memory recall = 2 (N=2), the two most relevant memories related to ‘dinner’ are brought up: 1.[2024-10-20 ] User wants to order a restaurant. 2.[2024-10-20 ] User wants to recommend Beijing specialities for him.

3.10 Information Classification - Conditional Judgment

"Conditional judgment" is the use of conditional judgment statements to classify variables and entity information collected in the previous dialogue according to conditional logic. Different types can be transferred to different process branches. Combined with the "Collect user replies to variables" and "Large model variable replication" nodes, the three can be used together to output different reply contents according to different expressions of users. For example, according to whether the user has verified the invoicing information, there may be three situations in the user's reply: verified, unverified, and other. Different subsequent nodes can be linked according to different situations to achieve a logical closed loop of the process.

3.11 API Invocation

The "API Invocation" node allows for the calling of external APIs at this step. It supports GET and POST methods and also supports previewing the invocation.

3.12 Code Execution

The "Code Execution" node allows for the execution of specified code at this node. It supports customization, definition of input and output variables, and supports execution preview.

3.13 Jump to Intent/Agent

  • Type Selection:

  1. Jump to Global Recognition: Exit current dialogue flow, let the current agent re-identify and distribute the previous round of user questions.

  2. Jump to Intent: Exit current dialogue flow, jump to specified dialogue flow of specified agent within the space.

  3. Jump to Agent: Exit current dialogue flow, jump to other agent to start new conversation.

  • Agent Selection:

Supports jump to any desired agent in the workspace.

  • Carry User Input:

To maintain dialog continuity and contextual consistency - eliminating the need for users to repeat previous exchanges when switching topics or flows - the system now supports transitioning between dialog flows while preserving prior conversation history (up to X turns of context). Maximum context retention: 30 turns.

3.14 Semantic Judgment

The " Semantic Judgment" node can use semantic relevance to semantically classify user responses, which is more flexible to use.

4. Dialogue test

The "Conversation Test" button is located in the upper right corner of the page. You can test the process node during the process configuration or after the process configuration. Click the "Conversation Test" button to pop up the dialog box. By default, you have entered the intention and will automatically start from the first node.

This function can simulate real user input, verify the accuracy and comprehensiveness of the process of the nodes within the process, support the display of the "process variables" of the agent's response interval, and the entity collection status, and verify whether the process arrangement can meet the requirements through "dialogue testing". If the accuracy is not satisfied, it can be optimized by refining the prompt words, adding examples, and improving the description. If the comprehensiveness is not satisfied, it can be optimized by adding classification nodes and completing the branch process.

If comprehensiveness is not met, optimization can be achieved by adding classification nodes and completing branch processes.In "Dialogue Test", the content of the left canvas cannot be modified, and there is a dynamic flow line on the canvas to see the current flow node position. If you need to exit the test, you can click the "Exit Test" button in the upper right corner of this page. After exiting, you can edit again.

5. Publish conversation flow

If the test process meets expectations, click "Publish" in the upper right corner. After publishing, the display status of the intention dialogue flow will change from "Draft" to "Published", and the published dialogue flow can be officially applied to all dialogue interaction pages of the robot.

After the internal release, you can choose to publish the universal dialog flow to the “Dialog Flow Square”, which is convenient for other users in the platform to use and learn from. (Subject to background review)

6. Chat flow settings

  • Intent relevance: The threshold can be adjusted, and the higher the threshold, the higher the hit threshold. If multiple intents are hit, the intention with the highest relevance is selected by default.

  • Whether the new conversation starts from the intention & the intention to enter first: If "Yes" is selected, the intention to enter first will be selected below (the published one is optional). In this way, after the robot starts a new conversation, it will be able to start directly from the specified intention without entering the conversation flow by hitting the intention.

Reference arrangement

Example 1: Ordering

Example 2: Issuing an invoice

Last updated