CoFE-RAG: A Comprehensive Full-chain Evaluation Framework for Retrieval-Augmented Generation with Enhanced Data Diversity

Jintao Liu, Ruixue Ding, Linhao Zhang, Pengjun Xie, Fie HuangarXiv 2024 · DOI

CoFE-RAG: A Comprehensive Full-chain Evaluation Framework for Retrieval-Augmented Generation with Enhanced Data Diversity

Abstract

Retrieval-Augmented Generation (RAG) systems are increasingly vital for enterprise AI, yet evaluating them remains a significant challenge. Current benchmarks often suffer from limited data diversity, obscure failure points, and a reliance on rigid "golden chunk" labels that break when chunking strategies change. This paper introduces CoFE-RAG, a novel evaluation framework that assesses the entire RAG pipeline—from chunking to generation. By utilizing a multi-granularity keyword approach, CoFE-RAG provides a robust, flexible methodology for pinpointing system failures. Our extensive benchmark, featuring over 1,400 documents in various formats and nearly 4,000 queries, highlights the "analytical gap" in current RAG performance.

Introduction

The evaluation of RAG systems is currently a "wild west" scenario. While these systems are becoming the backbone of enterprise AI, three critical gaps hinder progress:

  1. Limited Data Diversity: Most benchmarks rely on clean text and simple factual questions, failing to represent real-world "messy" data like PDFs, Excel sheets, or complex tutorial queries.
  2. Obscure Problem Location: Metrics typically focus on the final answer, making it impossible to determine if a failure occurred during retrieval, reranking, or generation.
  3. The "Golden Chunk" Trap: Traditional metrics rely on specific text segments ("golden chunks") as ground truth. Changing a chunking strategy (e.g., from 256 to 512 tokens) renders these labels obsolete, necessitating expensive manual relabeling.

Methodology: Multi-granularity Keyword Evaluation

CoFE-RAG addresses these issues through its core innovation: the Multi-granularity Keyword approach. Instead of tying ground truth to a specific slice of text, queries are annotated with coarse-grained keywords (main topics) and fine-grained keywords (specific information points required for an answer).

Comparison of traditional evaluation vs. CoFE-RAG

This approach allows the framework to evaluate four distinct stages independently:

  • Chunking: Assessing how document splitting affects information density.
  • Retrieval: Measuring the ability of embedding models to locate relevant context.
  • Reranking: Evaluating how cross-encoders prioritize the best chunks.
  • Generation: Testing the LLM's ability to synthesize faithful answers from provided context.

Dataset and Pipeline

To support this framework, we introduced a holistic benchmark dataset that significantly raises the bar for RAG evaluation. The dataset includes 1,414 documents across PDF, PPT, DOC, and XLSX formats. We generated 2,826 Chinese and 1,003 English queries, categorized into four types: Factual, Analytical, Comparative, and Tutorial.

The CoFE-RAG data collection and annotation pipeline

The pipeline utilizes a hybrid approach: GPT-4 performs initial generation of queries and keywords, followed by rigorous human review to ensure accuracy and relevance. This ensures that the evaluation is both scalable and high-quality.

Key Insights and Results

Our evaluation revealed several critical insights into the current state of RAG:

  • The "Analytical Gap": While RAG systems excel at factual retrieval (approx. 76% recall), performance drops significantly (by 10-15%) for analytical and tutorial queries. These complex queries often require synthesizing information distributed across multiple document sections.
  • Chunk Size Trade-offs: Larger chunks (512 tokens) generally outperform smaller ones (128 or 256 tokens) by preserving more original context and semantic relationships.
  • Model Performance: In our testing, the BGE-large model led in retrieval, while GPT-4o dominated the generation stage with a correctness score of 4.07/5, far exceeding open-source models like Qwen2-7B.

Conclusion

CoFE-RAG provides a much-needed standardized framework for full-chain RAG evaluation. By moving away from "golden chunks" toward multi-granular keywords, it offers a stable and cost-effective way to optimize RAG components. Future work will focus on expanding the dataset to include multi-hop reasoning and multimodal elements like images and charts.

Summary updated

BibTeX
@misc{liu2024cofe,
  author = {Jintao Liu and Ruixue Ding and Linhao Zhang and Pengjun Xie and Fie Huang},
  title = {{CoFE-RAG: A Comprehensive Full-chain Evaluation Framework for Retrieval-Augmented Generation with Enhanced Data Diversity}},
  year = {2024},
  eprint = {2410.12248},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2410.12248},
}
Figure