Welcome to MicroROS V2 Robot Car repository
2. RAG Retrieval Augmented and Training Samples
RAG Retrieval-Augmented Generation and Training Samples
RAG Retrieval-Augmented Generation and Training Samples1. Course Content2. What is large model hallucination? Why do large models hallucinate?3. RAG Retrieval-Augmented Generation and Training Samples3.1 RAG Retrieval-Augmented Generation3.2 Training Samples4. The Role of RAG Retrieval-Augmented Generation and Training Samples in Robots4.1 Reducing Large Model Hallucination4.2 Enhancing the Robot's Scenario Generalization Capability
1. Course Content
- Understand and master the three concepts: large model hallucination, RAG retrieval-augmented generation, and model training samples.
[!TIP]
- This course is a pure theory course. If you want to quickly get started with hands-on features, you can skip this course for now.
2. What is large model hallucination? Why do large models hallucinate?
RAG retrieval-augmented generation and model training samples mainly serve to reduce large model hallucination. Let's first understand large model hallucination.
Large model hallucination refers to the situation where, when understanding the environment, generating instructions, or planning actions, the model outputs content that does not match real-world facts or logic, causing the robot to perform wrong behaviors or the user's expected results to deviate significantly.
Why does large model hallucination occur? At its core, a large model is a probability prediction system trained on massive amounts of text. In certain specific domains or unknown task scenarios, the training data may lack sufficient samples, causing the model to "fabricate" content to fill the gaps.
3. RAG Retrieval-Augmented Generation and Training Samples
3.1 RAG Retrieval-Augmented Generation
RAG is an architecture that combines a retrieval system with a generative model, aiming to solve the limitations of traditional generative models in scenarios such as open-domain knowledge question answering and real-time information queries (e.g., outdated knowledge, factual hallucination, long-text dependence). Its core logic is: obtain relevant knowledge through retrieval and incorporate it into the prompt, allowing the large model to reference the relevant knowledge, achieving "retrieve first, then generate".

3.2 Training Samples
Training samples are included in the RAG knowledge base. The robot comes with two knowledge bases preset at the factory: an action function library and training samples. The training samples contain samples from the course case scenarios, providing ideas for the large model's decision planning in specific scenarios. Later, the 【AI Large Model Development】-【RAG Knowledge Base Deployment】 chapter will explain how to configure and extend dedicated knowledge bases and training samples.
4. The Role of RAG Retrieval-Augmented Generation and Training Samples in Robots
4.1 Reducing Large Model Hallucination
When a large model encounters completely unfamiliar domains and special user requirements, it will give possible results based on existing training data. However, these results may differ from what the user expects or may not meet the requirements of a specific scenario.
4.2 Enhancing the Robot's Scenario Generalization Capability
The ROSMASTER-M1 robot comes with training samples related to the course cases preset at the factory (detailed in the large model configuration course). These training samples provide the large model with reference information for specific scenarios. Users can also add their own training samples to customize their own dedicated robots to suit different application fields.