Automated Performance Optimization of RAG Chatbots Using Reinforcement Learning
Open Access DepositedWhile Retrieval-Augmented Generation (RAG) addresses the proprietary knowledge gap of LLM, widely used static retrieval settings and human-dependent performance evaluation make the pipeline inefficient by wasting tokens, destabilizing quality, and raising costs. We experimented with RAG plus reinforcement learning (RL) based techniques to find the optimal retrieval configuration at the individual query level over hybrid weight alpha, top-k, and chunk size on 50 Wikipedia articles and questions using performance metrics faithfulness, answer relevance, and context relevance used in the RAGAS paper. Our research found that an RL-based policy to find the global optimal retrieval configuration at the individual query level to maximize reward (mean of faithfulness, answer relevance, and context relevance) does not work
instead, an RL-based small budgeted greedy local search policy achieves statistically significant gains over static (paired t-test, alpha=0.05). We used Deep Neural Network (DNN), Random Forest, and XGBoost as learners within the local policy and observed improvements of 2-18% compared to the best static configuration. In practice, this demonstrates that RAG can be optimized at the individual query level without requiring human annotation.
- All rights reserved
Notice to Authors
If you are the author of this work and you have any questions about the information on this page, please use the Contact form to get in touch with us.