Welcome to ROSMASTER M1 PRO repository
6.Intention Understanding
Intention Understanding
Intention Understanding1. Course Content2. Preparation2.1 Configuring the Intention Mapping File2.2 Configuring the Knowledge Base3. Running the Cases4. Effect Debugging4.1 Visual Workflow
1. Course Content
Basic: Master how to customize a user's unique intention understanding function through a RAG knowledge base (which can be understood as adding training samples to the knowledge base to provide context reference for the AI model's retrieval).
Advanced: Master how to debug the intention understanding effect on the Dify side.
2. Preparation
2.1 Configuring the Intention Mapping File
The file here is used to store personal vague intentions and the corresponding task operations that the robot is expected to perform.
Open the example file in this lesson's folder. Following the reference format, you can add multiple personally customized intentions. The following is a simple example:
| query | answer |
|---|---|
| I am a bit thirsty | 1. Navigate to the kitchen, 2. Check whether there is mineral water or a drink, 3. If so, grasp the drink with the robotic arm, 4. Navigate back to the starting position |
2.2 Configuring the Knowledge Base
Then you need to upload the edited intention mapping file to the
RAGknowledge base ofDify. The example file Intent mapping.xlsx is in the Example Files folder of this lesson.

Tip
For detailed operations on the RAG knowledge base, refer to the tutorial in "2. AI Model Development — 04-Deploying the RAG Knowledge Base".
Dify presets a reference knowledge base named
Intent mappingat the factory to demonstrate how to use the intention understanding function.

You can modify the
Intent mapping.xlsxtemplate, or you can directly delete it and add your own file.


Tip
Note:
To ensure the best intention understanding effect, it is recommended to set the
Intent mappingintention understanding knowledge base to high-quality mode, because intention understanding often needs to retrieve relevant segments between similar semantic hints.
For the operation steps of recording semantic locations to the map mapping file, refer to the previous lesson "Multimodal Visual Understanding + SLAM Navigation".
ros2 launch yahboomcar_bringup dify_llm_agents.launch.py use_nav:=true use_camera:=true use_tts:=true
Voice recognition node
xxxxxxxxxxros2 run multi_brains asr_detect

3. Running the Cases
The test cases here are for reference only. You can write your own conversation commands as you like.
I am in the master bedroom now, and I feel a bit thirsty.

The decision-layer model plans the task steps:

According to the task steps planned by the decision-layer large model, execute them in sequence:

When the robotic arm grasps, a visualization window is displayed, as shown below:

After reaching the "master bedroom", the robot uses the robotic arm to put down the red block in its hand and prompts the user that the task is complete.

4. Effect Debugging
4.1 Visual Workflow
Open the multi_brains application, then click preview. You can enter test content to view the data flow.

You can also open the workflow to view the time consumption of each step and the input and output content of each process.

If in some contexts the classification given by the task routing module is inaccurate and is not classified into
Category 3: Personal Intent, you can add restrictions on the personal intent here or supplement the context description.

In addition, you can also separately test the retrieval effect of the input sentence in the knowledge base of the intent mapping.
