Not All RAGs Are Created Equal: A Component-Wise Empirical Study for Software Engineering Tasks

Fuente: arXiv
Saved in:
Bibliographic Details
Main Authors: Ke, Qiang, Zhao, Yanjie, Leng, Hongjin, Zhao, Shengming, Wang, Haoyu
Format: Preprint
Published: 2026
Subjects:
Online Access:
Tags: Add Tag
No Tags, Be the first to tag this record!
_version_ 1866918501174738944
author Ke, Qiang
Zhao, Yanjie
Leng, Hongjin
Zhao, Shengming
Wang, Haoyu
author_facet Ke, Qiang
Zhao, Yanjie
Leng, Hongjin
Zhao, Shengming
Wang, Haoyu
contents While Retrieval-Augmented Generation (RAG) is increasingly adopted to ground Large Language Models (LLMs) in software artifacts, the optimal configuration of its components remains an open question for software engineering (SE) tasks. The lack of systematic guidance forces practitioners into costly, ad-hoc experimentation. This paper presents a comprehensive, component-wise empirical study that dissects the RAG pipeline, evaluating over 21 distinct models and methods. Our study systematically isolates and evaluates 4 query processing techniques, 7 retrieval models spanning sparse, dense, and hybrid paradigms, 4 context refinement methods, and 6 distinct generators. We test these components on a suite of 3 core SE tasks: code generation, summarization, and repair. Our empirical findings reveal a crucial insight: the retriever-side components, particularly the choice of the retrieval algorithm, often exert a more significant influence on final system performance than the selection of the generator model. Strikingly, the classic lexical retriever BM25 demonstrates exceptionally robust performance across diverse tasks. Our analysis provides a practical, data-driven roadmap for researchers and practitioners, offering clear guidance on prioritizing optimization efforts when constructing effective RAG systems for software engineering contexts.
format Preprint
id arxiv_https___arxiv_org_abs_2605_14503
institution arXiv
publishDate 2026
record_format arxiv
spellingShingle Not All RAGs Are Created Equal: A Component-Wise Empirical Study for Software Engineering Tasks
Ke, Qiang
Zhao, Yanjie
Leng, Hongjin
Zhao, Shengming
Wang, Haoyu
Software Engineering
While Retrieval-Augmented Generation (RAG) is increasingly adopted to ground Large Language Models (LLMs) in software artifacts, the optimal configuration of its components remains an open question for software engineering (SE) tasks. The lack of systematic guidance forces practitioners into costly, ad-hoc experimentation. This paper presents a comprehensive, component-wise empirical study that dissects the RAG pipeline, evaluating over 21 distinct models and methods. Our study systematically isolates and evaluates 4 query processing techniques, 7 retrieval models spanning sparse, dense, and hybrid paradigms, 4 context refinement methods, and 6 distinct generators. We test these components on a suite of 3 core SE tasks: code generation, summarization, and repair. Our empirical findings reveal a crucial insight: the retriever-side components, particularly the choice of the retrieval algorithm, often exert a more significant influence on final system performance than the selection of the generator model. Strikingly, the classic lexical retriever BM25 demonstrates exceptionally robust performance across diverse tasks. Our analysis provides a practical, data-driven roadmap for researchers and practitioners, offering clear guidance on prioritizing optimization efforts when constructing effective RAG systems for software engineering contexts.
title Not All RAGs Are Created Equal: A Component-Wise Empirical Study for Software Engineering Tasks
topic Software Engineering
url https://arxiv.org/abs/2605.14503