Skip to main content
QUICK REVIEW

[Paper Review] Evaluating RAG-Fusion with RAGElo: an Automated Elo-based Framework

Zackary Rackauckas, Arthur Câmara|arXiv (Cornell University)|Jun 20, 2024
Inertial Sensor and NavigationEngineering3 citations
TL;DR

This paper proposes RAGElo, an automated Elo-based evaluation framework that uses LLM-as-a-judge to rank RAG and RAG-Fusion (RAGF) agents in enterprise QA settings. By generating synthetic queries from real user queries and in-domain documents, and injecting relevant retrieved documents into the LLM judge’s context, RAGElo achieves moderate correlation with expert scoring and shows RAGF significantly outperforms RAG in completeness and overall answer quality, though it underperforms in precision.

ABSTRACT

Challenges in the automated evaluation of Retrieval-Augmented Generation (RAG) Question-Answering (QA) systems include hallucination problems in domain-specific knowledge and the lack of gold standard benchmarks for company internal tasks. This results in difficulties in evaluating RAG variations, like RAG-Fusion (RAGF), in the context of a product QA task at Infineon Technologies. To solve these problems, we propose a comprehensive evaluation framework, which leverages Large Language Models (LLMs) to generate large datasets of synthetic queries based on real user queries and in-domain documents, uses LLM-as-a-judge to rate retrieved documents and answers, evaluates the quality of answers, and ranks different variants of Retrieval-Augmented Generation (RAG) agents with RAGElo's automated Elo-based competition. LLM-as-a-judge rating of a random sample of synthetic queries shows a moderate, positive correlation with domain expert scoring in relevance, accuracy, completeness, and precision. While RAGF outperformed RAG in Elo score, a significance analysis against expert annotations also shows that RAGF significantly outperforms RAG in completeness, but underperforms in precision. In addition, Infineon's RAGF assistant demonstrated slightly higher performance in document relevance based on MRR@5 scores. We find that RAGElo positively aligns with the preferences of human annotators, though due caution is still required. Finally, RAGF's approach leads to more complete answers based on expert annotations and better answers overall based on RAGElo's evaluation criteria.

Motivation & Objective

  • To address the lack of gold-standard benchmarks for evaluating RAG systems in enterprise settings, especially for internal, domain-specific QA tasks.
  • To overcome the challenges of hallucination and unreliable evaluation in RAG pipelines due to the absence of human-annotated golden answers.
  • To develop an automated, scalable evaluation framework that aligns with expert preferences and enables fair comparison of RAG variants like RAG and RAG-Fusion.
  • To validate the effectiveness of RAG-Fusion (RAGF) in generating more complete and higher-quality answers compared to standard RAG, using both LLM-as-a-judge and expert annotations.

Proposed method

  • Generate synthetic evaluation queries by prompting LLMs to create questions based on real user queries and in-domain documentation, using few-shot examples from actual user queries.
  • Inject retrieved documents into the context of a judge LLM to improve its ability to assess relevance, accuracy, and hallucination risk during answer evaluation.
  • Use a pairwise LLM-as-a-judge approach where the judge LLM selects the better answer between two candidates from different RAG pipelines.
  • Apply an Elo-based tournament system (RAGElo) to rank RAG pipelines based on pairwise comparison outcomes, enabling automated, scalable ranking of model performance.
  • Use MRR@5 to measure retrieval quality, comparing RAG and RAGF on their ability to rank relevant documents highly.
  • Instruct the judge LLM to evaluate answers across dimensions including comprehensiveness, correctness, helpfulness, completeness, accuracy, depth, and detail.
Figure 1. A traditional Retrieval-Augmented Generation pipeline compared to a -Fusion pipeline. While a traditional RAG agent submits only the original query to the search system, a RAGF agent first generates variations of the user query and combines the rankings induced by these queries into a fina
Figure 1. A traditional Retrieval-Augmented Generation pipeline compared to a -Fusion pipeline. While a traditional RAG agent submits only the original query to the search system, a RAGF agent first generates variations of the user query and combines the rankings induced by these queries into a fina

Experimental results

Research questions

  • RQ1Does the RAGElo framework produce evaluation results that align with human expert preferences in RAG system evaluation?
  • RQ2How does RAG-Fusion (RAGF) compare to standard RAG in terms of answer completeness, precision, and overall quality?
  • RQ3To what extent does injecting retrieved documents into the judge LLM’s context improve the reliability of LLM-as-a-judge evaluations?
  • RQ4Can synthetic query generation based on real queries and domain documents produce high-quality, realistic test sets for enterprise RAG evaluation?
  • RQ5How do retrieval metrics like MRR@5 compare between RAG and RAGF, and what does this imply about their ranking performance?

Key findings

  • LLM-as-a-judge evaluation using RAGElo shows a moderate, positive correlation with domain expert scoring across relevance, accuracy, completeness, and precision.
  • RAGF significantly outperforms RAG in completeness according to expert annotations, indicating more comprehensive answers.
  • RAGF underperforms RAG in precision, suggesting a trade-off between completeness and factual accuracy in answer generation.
  • RAGF demonstrates slightly better document relevance based on MRR@5 scores, indicating improved retrieval quality through query variation and rank-fusion.
  • The RAGElo framework successfully ranks RAGF higher than RAG overall, supporting its use as a reliable, automated evaluation tool.
  • BM25 outperforms vector search in retrieval performance for the given test set, indicating that embedding quality is highly domain-dependent and may require fine-tuning.
Figure 2. Process for creating synthetic queries. We prompt multiple LLMs to generate queries based on existing documents. We include some existing user queries in the prompt as few-shot examples.
Figure 2. Process for creating synthetic queries. We prompt multiple LLMs to generate queries based on existing documents. We include some existing user queries in the prompt as few-shot examples.

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.