A comparison of strategies for RAG
Evaluation and comparison of multiple RAG fine-tuning strategies.
Retrieval augmented generation (RAG) is a popular framework for question answering that is powered by two large language models (LLMs): an embedding model that retrieves context documents from a database that are relevant to a given question, and a generator model that uses the retrieved context to generate an answer to the question. Both the embedding and generator models can be fine-tuned to increase performance of a RAG pipeline on a new task, but multiple fine-tuning strategies exist with different costs and benefits. In this paper, we evaluate and compare several RAG fine-tuning strategies, including independent, joint, and two-phase fine-tuning. In our experiments, we observe that all of these strategies achieve about equal improvement in EM and F1 generation quality metrics, although they have significantly different computational costs. We conclude the optimal fine-tuning strategy to use depends on whether the training dataset includes context labels and whether a grid search over the learning rates for the embedding and generator models is required.
Latest publications
GRAID: Synthetic data generation with geometric constraints and multi-agentic reflection for harmful content detection
A novel pipeline that leverages Large Language Models (LLMs) for dataset augmentation.
EMNLPHarmonizing diverse models: a layer-wise merging strategy
An approach combining systematic synthetic data generation, triplet loss for embeddings, and layer-wise model merging.
EMNLPConfidence-based response abstinence: LLM trustworthiness
A method for confidence estimation in RAG systems that aligns closely with the correctness of LLM outputs.
EMNLP