MBA-RAG: a Bandit Approach for Adaptive Retrieval-Augmented Generation through Question Complexity

Xiaqiang Tang, Qiang Gao, Jian Li, Nan Du, Qi Li +1 more
12/2/2024
45 citations
cs.AI
rag

Official code: FUTUREEEEEE/MBA (30 stars, Python, Apache-2.0, last commit 2024-12-23).

Abstract

Retrieval Augmented Generation (RAG) has proven to be highly effective in boosting the generative performance of language model in knowledge-intensive tasks. However, existing RAG framework either indiscriminately perform retrieval or rely on rigid single-class classifiers to select retrieval methods, leading to inefficiencies and suboptimal performance across queries of varying complexity.

Show full abstract

To address these challenges, we propose a reinforcement learning-based framework that dynamically selects the most suitable retrieval strategy based on query complexity. % our solution Our approach leverages a multi-armed bandit algorithm, which treats each retrieval method as a distinct ``arm'' and adapts the selection process by balancing exploration and exploitation. Additionally, we introduce a dynamic reward function that balances accuracy and efficiency, penalizing methods that require more retrieval steps, even if they lead to a correct result. Our method achieves new state of the art results on multiple single-hop and multi-hop datasets while reducing retrieval costs. Our code are available at https://github.com/FUTUREEEEEE/MBA .

View on arXivView PDF

Code Implementations(1)

FUTUREEEEEE/MBAOfficial100%
Apache-2.0

COLING 2025: MBA-RAG: a Bandit Approach for Adaptive Retrieval-Augmented Generation through Question Complexity

306Python, JsonnetSep 11, 20241 years agoApache-2.0

Similar Papers

Cite this paper

@article{tang2024mbarag,
  title  = {MBA-RAG: a Bandit Approach for Adaptive Retrieval-Augmented Generation through Question Complexity},
  author = {Xiaqiang Tang and Qiang Gao and Jian Li and Nan Du and Qi Li and Sihong Xie},
  year   = {2024},
  eprint = {2412.01572},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2412.01572v4}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2412.01572.svg)](https://codeofpaper.com/paper/2412.01572)

Discussion