# 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.

<div align="left"><figure><img src="https://1886561579-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FXbXiJN0Eq6xgdmU34Ktv%2Fuploads%2FGNOZDf6Ot9a4DwV9GARr%2Fimage.png?alt=media&#x26;token=dbd2d2d0-1410-4d09-a372-d2174da74393" alt=""><figcaption></figcaption></figure></div>

<figure><img src="https://1886561579-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FXbXiJN0Eq6xgdmU34Ktv%2Fuploads%2FeAv5JaKGGxrQdWCTvcsj%2Fimage.png?alt=media&#x26;token=16751411-b976-4882-ad01-c4e397c6b415" alt=""><figcaption></figcaption></figure>

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.

<figure><img src="https://1886561579-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FXbXiJN0Eq6xgdmU34Ktv%2Fuploads%2FLeN1GXp5V8YkTwbCzNVO%2Fimage.png?alt=media&#x26;token=8782c2e2-e94c-4337-bc68-42c25539ec64" alt=""><figcaption></figcaption></figure>

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".

<figure><img src="https://1886561579-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FXbXiJN0Eq6xgdmU34Ktv%2Fuploads%2FsklJdtDGxdTmBHpC1rZq%2Fimage.png?alt=media&#x26;token=09877b5d-6aa6-4daf-b13b-72463b5b6c49" alt=""><figcaption></figcaption></figure>

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

<figure><img src="https://1886561579-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FXbXiJN0Eq6xgdmU34Ktv%2Fuploads%2FT4CA84qBthGQZZC5S9jp%2Fimage.png?alt=media&#x26;token=60717605-718c-4e8c-a8ca-59f7083a11fb" alt=""><figcaption></figcaption></figure>

### 2. Entity management, variable management,File Management

<figure><img src="https://1886561579-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FXbXiJN0Eq6xgdmU34Ktv%2Fuploads%2Fdu522Mk2woS5KIdXtU8F%2Fimage.png?alt=media&#x26;token=1908aff5-9a56-44ef-990b-64092f7a0038" alt=""><figcaption></figcaption></figure>

#### 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.

<figure><img src="https://1886561579-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FXbXiJN0Eq6xgdmU34Ktv%2Fuploads%2FZ2Qs01oXZdOIxxRVzPzh%2Fimage.png?alt=media&#x26;token=c2ec066f-c828-4376-9da4-ebc24d6be282" alt=""><figcaption></figcaption></figure>

<figure><img src="https://1886561579-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FXbXiJN0Eq6xgdmU34Ktv%2Fuploads%2F1JMkeqNorUIa7ASw4Eff%2Fimage.png?alt=media&#x26;token=c45e1e83-6fce-424e-8f80-ec92db86be1a" alt=""><figcaption></figcaption></figure>

#### 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.

  <figure><img src="https://1886561579-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FXbXiJN0Eq6xgdmU34Ktv%2Fuploads%2Fa2wKiPh0wz4kzPlOWRN9%2Fimage.png?alt=media&#x26;token=71c4fe6d-b97f-47d6-9c2f-0ceee475bf8f" alt=""><figcaption></figcaption></figure>

#### 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):

<table><thead><tr><th width="63.3333740234375">Order</th><th width="114">File Category</th><th width="200.33331298828125"> Format</th><th width="339.3333740234375">Maximum number of files uploaded at a time</th></tr></thead><tbody><tr><td>1</td><td>Contracts/Agreements</td><td>PDF, DOCX</td><td>3</td></tr><tr><td>2</td><td>Certificates</td><td>PNG, JPEG, JPG, PDF</td><td>5</td></tr><tr><td>3</td><td>Resumes</td><td>PDF, DOCX</td><td>10</td></tr><tr><td>4</td><td>Financial Statements</td><td>XLSX, XLS, PDF</td><td>1</td></tr><tr><td>5</td><td>Bank<br>Statements</td><td>PDF, CSV</td><td>1</td></tr><tr><td>6</td><td>Expense Reports</td><td>DOCX, PDF</td><td>5</td></tr><tr><td>7</td><td>Policy Documents</td><td>DOCX, PDF</td><td>5</td></tr><tr><td>8</td><td>Invoices/<br>Receipts</td><td>PDF, JPEG, PNG</td><td>01</td></tr><tr><td>9</td><td>Knowledge Base Documents</td><td>HTML, PDF</td><td>1</td></tr><tr><td>10</td><td>Audio Files</td><td>wav、silk、speex、m4a、ogg-opus、mp3、pcm、aac、amr</td><td>1</td></tr><tr><td>11</td><td>Compliance Reports</td><td>PDF, DOCX</td><td>5</td></tr></tbody></table>

* 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:

<figure><img src="https://1886561579-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FXbXiJN0Eq6xgdmU34Ktv%2Fuploads%2Fu4eItcoVtHW37Co6OafL%2Fimage.png?alt=media&#x26;token=33b934dc-7629-483c-95fc-0bbd67024691" alt=""><figcaption></figcaption></figure>

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).

  <figure><img src="https://1886561579-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FXbXiJN0Eq6xgdmU34Ktv%2Fuploads%2FgmtslcfiqRknSPwUxTvS%2Fimage.png?alt=media&#x26;token=f8afb48d-3355-408f-a9cb-949cd83ea6f8" alt=""><figcaption></figcaption></figure>

<figure><img src="https://1886561579-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FXbXiJN0Eq6xgdmU34Ktv%2Fuploads%2Fdo0oFALlqJxOXYZQnmHq%2Fimage.png?alt=media&#x26;token=9bea36fe-fd51-4a57-a248-010b686f3bcd" alt=""><figcaption></figcaption></figure>

#### 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.

<figure><img src="https://1886561579-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FXbXiJN0Eq6xgdmU34Ktv%2Fuploads%2F7ShjJoJFKrX0j6XfsMSX%2Fimage.png?alt=media&#x26;token=0eedec6f-b45d-44d3-87cc-df0432238cba" alt=""><figcaption></figcaption></figure>

#### 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.

<figure><img src="https://1886561579-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FXbXiJN0Eq6xgdmU34Ktv%2Fuploads%2FPMbygK88Rle57AxksbZB%2Fimage.png?alt=media&#x26;token=6dc9f35b-c17f-4321-ac58-7f1fa9572669" alt=""><figcaption></figcaption></figure>

#### 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.

<figure><img src="https://1886561579-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FXbXiJN0Eq6xgdmU34Ktv%2Fuploads%2FZ4pDBNtd05ZP7gc2zIFM%2Fimage.png?alt=media&#x26;token=100218e8-e51d-43ca-a6b2-27b4f51acda9" alt=""><figcaption></figcaption></figure>

#### 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).

<figure><img src="https://1886561579-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FXbXiJN0Eq6xgdmU34Ktv%2Fuploads%2FCpNl9qRDca9FQdHeioND%2Fimage.png?alt=media&#x26;token=44a15ade-1326-4f58-9636-34ddc3631b6b" alt=""><figcaption></figcaption></figure>

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

<figure><img src="https://1886561579-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FXbXiJN0Eq6xgdmU34Ktv%2Fuploads%2F8frpjldIQT7vnI183idN%2Fimage.png?alt=media&#x26;token=0be4a91e-873d-4315-bf76-012f47981481" alt=""><figcaption></figcaption></figure>

* 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).

<figure><img src="https://1886561579-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FXbXiJN0Eq6xgdmU34Ktv%2Fuploads%2FcHr6yLtd4l6gp8j7ykO8%2Fimage.png?alt=media&#x26;token=a5632ab6-f9bd-49c4-8a5d-b19dc2f66f33" alt=""><figcaption></figcaption></figure>

<figure><img src="https://1886561579-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FXbXiJN0Eq6xgdmU34Ktv%2Fuploads%2Fft2grQ4b7e0xrob2aW5c%2Fimage.png?alt=media&#x26;token=279109ae-b0ca-4da4-9c40-0384254ffd08" alt=""><figcaption></figcaption></figure>

<figure><img src="https://1886561579-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FXbXiJN0Eq6xgdmU34Ktv%2Fuploads%2FTwQoTmbSGe6ql0RUPGlZ%2Fimage.png?alt=media&#x26;token=685b483c-9632-42a3-a2cc-8f3881036e4c" alt=""><figcaption></figcaption></figure>

#### 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.

<figure><img src="https://1886561579-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FXbXiJN0Eq6xgdmU34Ktv%2Fuploads%2FeKURpbhZVI1pY6BxtieV%2Fimage.png?alt=media&#x26;token=b3c8117d-3739-4b4c-a359-8424a4ce1c08" alt=""><figcaption></figcaption></figure>

#### 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.

<figure><img src="https://1886561579-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FXbXiJN0Eq6xgdmU34Ktv%2Fuploads%2FMqz70J6HzFVCqef1k2F9%2Fimage.png?alt=media&#x26;token=51737ba5-7830-406b-aa27-1d1fd3af84ac" alt=""><figcaption></figcaption></figure>

#### 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.

<figure><img src="https://1886561579-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FXbXiJN0Eq6xgdmU34Ktv%2Fuploads%2FfB5bpJRhxbFDbioQYuIw%2Fimage.png?alt=media&#x26;token=a8d42be8-bb65-43a7-816f-c451f623183f" alt=""><figcaption></figcaption></figure>

#### 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).

<figure><img src="https://1886561579-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FXbXiJN0Eq6xgdmU34Ktv%2Fuploads%2FozDdQlvSnYlbUhKHgskn%2Fimage.png?alt=media&#x26;token=d6efa163-b60e-4935-b363-e650e6c04525" alt=""><figcaption></figcaption></figure>

* 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.

<figure><img src="https://1886561579-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FXbXiJN0Eq6xgdmU34Ktv%2Fuploads%2Fuj2QjGbOBs7z7ZZJh4EO%2Fimage.png?alt=media&#x26;token=48a11c8c-c821-4d58-ac07-5e19b766e234" alt=""><figcaption></figcaption></figure>

#### 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.

<figure><img src="https://1886561579-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FXbXiJN0Eq6xgdmU34Ktv%2Fuploads%2Fkz0EzFbZbpvVmNrkdnUJ%2Fimage.png?alt=media&#x26;token=6eb866b5-42eb-435f-ae50-49465d74bef2" alt=""><figcaption></figcaption></figure>

#### 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.

<figure><img src="https://1886561579-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FXbXiJN0Eq6xgdmU34Ktv%2Fuploads%2FErb8rLS3Sb4pv6MyTql2%2Fimage.png?alt=media&#x26;token=f999a2a4-1a5c-481b-944e-1ccaea035e5b" alt=""><figcaption></figcaption></figure>

#### 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.

<figure><img src="https://1886561579-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FXbXiJN0Eq6xgdmU34Ktv%2Fuploads%2F7QsNmyjcEQxsyL8edoJ1%2Fimage.png?alt=media&#x26;token=b54996be-83b1-4122-9bc9-3206a521a25d" alt=""><figcaption></figcaption></figure>

#### 3.14 Semantic Judgment

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

<figure><img src="https://1886561579-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FXbXiJN0Eq6xgdmU34Ktv%2Fuploads%2FYBN980lhHm2jeBdHA7mA%2Fimage.png?alt=media&#x26;token=e1520bf9-eb04-4814-a559-dc928ad08642" alt=""><figcaption></figcaption></figure>

### 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.

<figure><img src="https://1886561579-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FXbXiJN0Eq6xgdmU34Ktv%2Fuploads%2FBzaOQ0iSqJLUWamWkvaV%2Fimage.png?alt=media&#x26;token=9892d2a2-1089-44b4-82ff-0b0c3374b2c1" alt=""><figcaption></figcaption></figure>

### 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.

<figure><img src="https://1886561579-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FXbXiJN0Eq6xgdmU34Ktv%2Fuploads%2FF7euj0FcmjDMCXClZx6x%2Fimage.png?alt=media&#x26;token=0c8f38f6-8515-4fe2-bcdc-bd8b797add79" alt=""><figcaption></figcaption></figure>

<figure><img src="https://1886561579-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FXbXiJN0Eq6xgdmU34Ktv%2Fuploads%2Fo6CZY0Se39AlRwAI6RN1%2Fimage.png?alt=media&#x26;token=7f721542-5839-4a5a-87b2-1ce8e1375771" alt=""><figcaption></figcaption></figure>

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)

<figure><img src="https://1886561579-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FXbXiJN0Eq6xgdmU34Ktv%2Fuploads%2FLrmv25xNj0PIROmQPLQK%2Fimage.png?alt=media&#x26;token=78fd373e-3d97-4911-9185-1b96f9d15fac" alt=""><figcaption></figcaption></figure>

### 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.

  <figure><img src="https://1886561579-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FXbXiJN0Eq6xgdmU34Ktv%2Fuploads%2Fz7BboOmf7C88YubtpVTW%2Fimage.png?alt=media&#x26;token=19914653-a711-409c-a4f7-4c448cb6633c" alt=""><figcaption></figcaption></figure>

  <figure><img src="https://1886561579-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FXbXiJN0Eq6xgdmU34Ktv%2Fuploads%2F3XR9CPPHA70KipIS47HS%2Fimage.png?alt=media&#x26;token=94fc8825-e02e-48ae-8c2b-029bb97cf131" alt=""><figcaption></figcaption></figure>

## Reference arrangement

### Example 1: Ordering

<figure><img src="https://1886561579-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FXbXiJN0Eq6xgdmU34Ktv%2Fuploads%2FUergdrxGWHc1AbZ5MFjR%2Fimage.png?alt=media&#x26;token=7f0f0395-1bcd-4fd0-984c-b7286ce53151" alt=""><figcaption></figcaption></figure>

### Example 2: Issuing an invoice

<figure><img src="https://1886561579-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FXbXiJN0Eq6xgdmU34Ktv%2Fuploads%2Fd7VE75vurTdqk0MyE9uH%2Fimage.png?alt=media&#x26;token=208865a3-3012-4e27-a1d0-c49e30552119" alt=""><figcaption></figcaption></figure>

<figure><img src="https://bw320m1hlz7.feishu.cn/space/api/box/stream/download/asynccode/?code=NGI3MTVjOWUyNzdiYTc4OWZhZGE4MjY5NTMwYTc3MzdfeE9qOHQzRjdiWVlBT0RQNzZRNWU1RkU0VVBqcXBLSUdfVG9rZW46SWRuVmI0dGYxb0phYW14YUhQSmMwMk1DbnNkXzE3MjkwNjAzNDM6MTcyOTA2Mzk0M19WNA" alt=""><figcaption></figcaption></figure>
