Skip to main content
This quickstart guide walks you through setting up and running a basic RAG optimization pipeline. You’ll learn how to load dataset files, generate question–answer pairs, define a RAG configuration with tunable hyperparameters and models, and execute the optimization workflow. You can also try it out directly in this Notebook
1

Install Requirements

Install RAGOPT via pip:
2

Prepare the RAG Configuration File

Create a configuration file named rag_config.yaml in your project directory. This file defines the search space for your optimization. You can also copy a sample configuration from the repository RAG Parameters Config YAML File
All available Hugging Face models and inference providers can be found at https://hf.co/settings/inference-providers.
Example:
3

Generate the Dataset

Generate a set of question–answer pairs to be used for optimizing the RAG pipeline.You can use any LLM you prefer from Available Chat Models
4

Run Optimization

Run the optimization process using your generated dataset and configuration file.

Next Steps

  • Explore the Optimization Workflow for a deeper dive into the pipeline.
  • Review Metrics Overview for advanced customization options.
  • Build and experiment with your own RAG pipeline for production use.