mlsanityData to 7 Oct 2026

Reinforcement Learning for Optimizing RAG for Domain Chatbots

arXiv 2401.06800 ↗First posted 10 Jan 2024cs.CL cs.AIcited by 26

On the map: Retrieval-augmented generation → RAG pipeline design and evaluation

Abstract (arXiv)

With the advent of Large Language Models (LLM), conversational assistants have become prevalent for domain use cases. LLMs acquire the ability to contextual question answering through training, and Retrieval Augmented Generation (RAG) further enables the bot to answer domain-specific questions. This paper describes a RAG-based approach for building a chatbot that answers user's queries using Frequently Asked Questions (FAQ) data. We train an in-house retrieval embedding model using infoNCE loss, and experimental results demonstrate that the in-house model works significantly better than the well-known general-purpose public embedding model, both in terms of retrieval accuracy and Out-of-Domain (OOD) query detection. As an LLM, we use an open API-based paid ChatGPT model. We noticed that a previously retrieved-context could be used to generate an answer for specific patterns/sequences of queries (e.g., follow-up queries). Hence, there is a scope to optimize the number of LLM tokens and cost. Assuming a fixed retrieval model and an LLM, we optimize the number of LLM tokens using Reinforcement Learning (RL). Specifically, we propose a policy-based model external to the RAG, which interacts with the RAG pipeline through policy actions and updates the policy to optimize the cost. The policy model can perform two actions: to fetch FAQ context or skip retrieval. We use the open API-based GPT-4 as the reward model. We then train a policy model using policy gradient on multiple training chat sessions. As a policy model, we experimented with a public gpt-2 model and an in-house BERT model. With the proposed RL-based optimization combined with similarity threshold, we are able to achieve significant cost savings while getting a slightly improved accuracy. Though we demonstrate results for the FAQ chatbot, the proposed RL approach is generic and can be experimented with any existing RAG pipeline.

Key facts. Cited by 26 papers in the map (data through 7 Oct 2026). Placed in RAG pipeline design and evaluation, one of 15 directions in Retrieval-augmented generation. Builds on 9 of its 11 references that are in the map. First posted on arXiv 10 Jan 2024.

Builds on

9 of 11 references.

Closest ancestors · 1

Same direction, newest first

  1. 2022A Survey on Retrieval-Augmented Text Generation2 Feb

Other references · 8

  1. 2020Retrieval-Augmented Generation for Knowledge-Intensive NLP Taskscited by 9,160
  2. 2018Representation Learning with Contrastive Predictive Codingcited by 7,662
  3. 2023Lost in the Middle: How Language Models Use Long Contextscited by 3,383
  4. 2023G-Eval: NLG Evaluation using GPT-4 with Better Human Alignmentcited by 2,205
  5. 2023Self-RAG: Learning to Retrieve, Generate, and Critique through Self-Reflectioncited by 1,800
  6. 2023Enhancing Retrieval-Augmented Large Language Models with Iterative Retrieval-Generation Synergycited by 343
  7. 2021Self-supervised Pretraining of Visual Features in the Wildcited by 197
  8. 2023Is GPT-4 a reliable rater? Evaluating Consistency in GPT-4 Text Ratingscited by 33

Built on by

Cited by year (2026 to 7 Oct)

Citing papers per year: 2024: 7; 2025: 16; 2026: 3.

26 papers.

Sort:

By area:

  1. 2024Retrieval-Augmented Generation for AI-Generated Content: A Surveycited by 352
  2. 2024The Good and The Bad: Exploring Privacy Issues in Retrieval-Augmented Generation (RAG)cited by 159
  3. 2025Unveiling Privacy Risks in LLM Agent Memorycited by 99
  4. 2025A Survey of Graph Retrieval-Augmented Generation for Customized Large Language Modelscited by 85
  5. 2025A Survey of Personalization: From RAG to Agentcited by 26
  6. 2025MA-RAG: Multi-Agent Retrieval-Augmented Generation via Collaborative Chain-of-Thought Reasoningcited by 24
  7. 2025DynamicRAG: Leveraging Outputs of Large Language Model as Feedback for Dynamic Reranking in Retrieval-Augmented Generationcited by 14
  8. 2026HyperMem: Hypergraph Memory for Long-Term Conversationscited by 14
  9. 2024Human-inspired Perspectives: A Survey on AI Long-term Memorycited by 12
  10. 2024Learning When to Retrieve, What to Rewrite, and How to Respond in Conversational QAcited by 9
  11. 2024Reward-RAG: Enhancing RAG with Reward Driven Supervisioncited by 7
  12. 2025Privacy-Preserving Federated Embedding Learning for Localized Retrieval-Augmented Generationcited by 7
14 more
  1. 2025End-to-End Optimization of LLM-Driven Multi-Agent Search Systems via Heterogeneous-Group-Based Reinforcement Learningcited by 7
  2. 2025Self-Aligned Reward: Towards Effective and Efficient Reasonerscited by 7
  3. 2024Improving LLM Reliability with RAG in Religious Question-Answering: MufassirQAScited by 6
  4. 2025Hybrid AI for Responsive Multi-Turn Online Conversations with Novel Dynamic Routing and Feedback Adaptationcited by 6
  5. 2025Token-Level Precise Attack on RAG: Searching for the Best Alternatives to Mislead Generationcited by 5
  6. 2025Improving Context Fidelity via Native Retrieval-Augmented Reasoningcited by 5
  7. 2026State Contamination in Memory-Augmented LLM Agentscited by 4
  8. 2025Reinforced Informativeness Optimization for Long-Form Retrieval-Augmented Generationcited by 2
  9. 2025Contextually Aware E-Commerce Product Question Answering using RAGcited by 2
  10. 2025Less Is More: Elevating RAG via Performance-Driven Context Compressioncited by 2
  11. 2026MemPot: Defending Against Memory Extraction Attack with Optimized Honeypotscited by 2
  12. 2024NIFTY Financial News Headlines Datasetcited by 1
  13. 2025Optimizing Retrieval for RAG via Reinforcement Learningcited by 1
  14. 2025Reliable Conversational Agents under ASP Control that Understand Natural Languagecited by 0

Similar, not cited

Close in wording, no citation either way

  1. 2024Evaluating the Retrieval Component in LLM-Based Question Answering Systems
  2. 2024FACTS About Building Retrieval Augmented Generation-based Chatbots
  3. 2025Towards Efficient Educational Chatbots: Benchmarking RAG Frameworks
  4. 2025A Knowledge Graph and a Tripartite Evaluation Framework Make Retrieval-Augmented Generation Scalable and Transparent
  5. 2024One Token Can Help! Learning Scalable and Pluggable Virtual Tokens for Retrieval-Augmented Large Language Models
  6. 2024Comparing the Utility, Preference, and Performance of Course Material Search Functionality and Retrieval-Augmented Generation Large Language Model (RAG-LLM) AI Chatbots in Information-Seeking Tasks
  7. 2025HybridRAG: A Practical LLM-based ChatBot Framework based on Pre-Generated Q&A over Raw Unstructured Documents
  8. 2024Adversarial Databases Improve Success in Retrieval-based Large Language Models