Workshop paper

An Analysis of Hyper-Parameter Optimization Methods for Retrieval Augmented Generation

Abstract

Finding the optimal Retrieval-Augmented Generation (RAG) configuration for a given use case can be complex and expensive. Motivated by this challenge, frameworks for RAG hyper-parameter optimization (HPO) have recently emerged, but their effectiveness has not been rigorously benchmarked. To address this gap, we present a comprehensive study involving 5 HPO algorithms over datasets from diverse domains, including a new one collected for this work on real-world product documentation. Our experiments explore the largest search space considered to date in this context, with two evaluation metrics. Our analysis shows that RAG HPO can be done efficiently, either greedily or with iterative random search, and that it significantly boosts RAG performance for all datasets. For greedy HPO approaches, we show that optimizing models first is preferable to the prevalent practice of optimizing sequentially according to RAG pipeline order.