Skip to main content
This section will help you quickly understand how to run a complete RAG Pipeline based on UltraRAG. The usage process of UltraRAG mainly includes the following three stages:
  • Write Pipeline configuration file
  • Compile Pipeline and adjust parameters
  • Run Pipeline
In addition, you can also analyze and evaluate the running results through visualization tools.
If you haven’t installed UltraRAG yet, please refer to Installation.
For a more complete RAG development practice, please check the full documentation.

Step 1: Write Pipeline Configuration File

Please ensure that the current working directory is located at the UltraRAG root directory
Create and write your Pipeline configuration file in the examples folder, for example:
examples/rag_full.yaml
UltraRAG’s Pipeline configuration file needs to include the following two parts:
  • servers: Declare the various modules (Servers) depended on by the current process. For example, the retriever Server is required for the retrieval stage.
  • pipeline: Define the calling sequence of functional functions (Tools) in each Server. This example shows a complete process from data loading, retrieval encoding and index construction, to generation and evaluation.

Step 2: Compile Pipeline and Adjust Parameters

Before running the code, you first need to configure the parameters required for operation. UltraRAG provides a shortcut build command, which can automatically generate the complete parameter file depended on by the current Pipeline. The system will read the parameter.yaml file of each Server, parse all parameter items involved in this process, and consolidate them into an independent configuration file. Execute the following command:
After execution, the terminal will output content as follows: The system will generate the corresponding parameter configuration file in the examples/parameters/ folder. Open the file and modify relevant parameters according to the actual situation, for example:
examples/parameters/rag_full_parameter.yaml
You can modify the parameters according to the actual situation, for example:
  • Adjust template to the RAG template prompt/qa_rag_boxed.jinja;
  • Replace model_name_or_path of the retriever and generator with the local downloaded model path;
  • If running in a multi-GPU environment, modify gpu_ids to match available devices.

Step 3: Run Pipeline

When the parameter configuration is complete, you can run the entire process with one click. Execute the following command:
The system will sequentially execute the various Servers and Tools defined in the configuration file, and output running logs and progress information in the terminal in real time: After running, the results (such as generated content, evaluation reports, etc.) will be automatically saved in the corresponding output path, such as output/memory_nq_rag_full_20251010_145420.json in this example, which can be directly used for subsequent analysis and visual display.

Step 4: Visual Analysis Case Study

After completing the process run, you can quickly analyze the generation results through the built-in visualization tool. Execute the following command to start the Case Study Viewer:
After successful operation, the terminal will display the access address. Open the browser and enter the address to enter the Case Study Viewer interface to interactively browse and analyze the results. The interface example is shown below:

Summary

At this point, you have completed the full RAG practice process from Pipeline Configuration, Parameter Compilation to Process Running and Visual Analysis. UltraRAG makes the construction, operation, and analysis of RAG systems more efficient, intuitive, and reproducible through a modular MCP architecture and a unified evaluation system. Based on this, you can:
  • Replace different models or retrievers to explore various combination effects;
  • Customize new Servers and Tools to extend system functions;
  • Use the evaluation module to quickly compare experimental results and conduct systematic research.