Revisiting the Solution of Meta KDD Cup 2024: CRAG

Jie Ouyang, Yucong Luo, Mingyue Cheng, Daoyu Wang, Shuo Yu, Qi Liu, Enhong Chen

TL;DR

Team APEX presents their 2nd-place solution for Tasks 2 and 3 of the Meta KDD Cup 2024 Comprehensive RAG Benchmark (CRAG). The authors develop a routing-centric Retrieval-Augmented Generation pipeline that dynamically classifies user questions by domain and temporal volatility. By tailoring API extraction, document retrieval, source fusion, and generation safeguards to these classifications, their system cuts hallucinations dramatically while slashing query latency by over 90%.

What Problem Does This Paper Address?

While Large Language Models (LLMs) paired with Retrieval-Augmented Generation (RAG) mitigate hallucinations, real-world deployments face severe edge cases: rapidly evolving facts (e.g., live sports scores or stock prices), long-tail entities, and massive amounts of web noise. Most academic QA benchmarks evaluate static knowledge and ignore the temporal dimension or the friction of integrating structured tools (like APIs and Knowledge Graphs) alongside unstructured HTML pages.

The Meta KDD Cup 2024 CRAG Challenge was designed to close this gap by evaluating systems across varying entity popularities, temporal dynamics (from seconds to years), and retrieval modes (up to 50 noisy HTML pages and 38 domain-specific Mock APIs).

Methods

The authors adopt an end-to-end adaptive pipeline guided by two lightweight classifiers built by fine-tuning Llama-3-8B-Instruct with LoRA and an MLP classification head:

  1. Domain Router: Classifies queries into finance, sports, music, movie, or open domain.
  2. Dynamism Router: Classifies queries by temporal volatility into static, slow-changing, fast-changing, or real-time.
Query ──► [Routers: Domain & Dynamism]
               │
               ├──► Retrieval:
               │      • Web: Newspaper parsing ──► BM25 pre-rank (1024 tokens)
               │             ──► BGE-M3 dense retrieval ──► BGE Reranker
               │      • APIs: Llama-3-70B NER ──► Entity Match (Exact/BM25)
               │             ──► Time Extraction (pytz/datetime) ──► Markdown
               │
               ├──► Augmentation: Selective fusion based on Domain & Dynamism
               │
               └──► Generation & Safeguards:
                      • Llama-3-70B-Instruct + Chain-of-Thought (CoT)
                      • Few-shot examples detecting false-premise questions
                      • Selective "I don't know" post-processing

Key technical components include:

  • Web Retrieval Pipeline: Raw HTML is parsed into clean text using newspaper (which balanced extraction quality and throughput better than BeautifulSoup or Trafilatura). For Task 3 (50 web pages), text is chunked into 1024-token blocks and pre-ranked via BM25 down to the top 50 chunks. Chunks are then broken into 256-token units, retrieved using bge-m3 dense embeddings (top 10), and finally sorted with bge-m3-v2-reranker to yield the top 5 chunks.
  • Mock API Extractor: The Domain Router directs queries to relevant APIs. The system extracts entities using zero-shot Llama-3-70B-Instruct, normalizes them via exact and BM25 matching, resolves relative time expressions (e.g., "yesterday" relative to query time) via regex and Python datetime libraries, queries the Mock APIs, and converts the resulting JSON into model-friendly Markdown.
  • Domain-Adaptive Augmentation: Rather than concatenating all retrieved contexts:
  • Open domain: Web retrieval only.
  • Movie & Music: Merges web snippets and Mock API data.
  • Sports & Finance: Uses Mock APIs exclusively to avoid stale web snippets.
  • Generation & Refusal Post-Processing: Llama-3-70B-Instruct operates with Chain-of-Thought (CoT) prompting and domain-tailored few-shot examples that illustrate how to handle questions with false premises. If a query is classified as fast-changing/real-time in domains lacking real-time APIs (or if it demands complex arithmetic like averages), the pipeline explicitly falls back to "I don't know".

Datasets

  • CRAG (Comprehensive RAG Benchmark): Comprises 4,409 factual QA pairs (split into 30% validation, 30% public test, and 40% private test) spanning five domains and eight question types. Every question includes a explicit query_time timestamp.
  • Evaluation Subset: The experiments in the paper evaluate 1,371 publicly released test cases against the organizers' baseline.
  • Retrieval Corpus: Up to 50 raw HTML pages per query and a Mock Knowledge Graph containing 2.6 million entities accessible through 38 predefined JSON Mock APIs.

Key Insights and Ideas

  • BM25 pre-filtering is an essential latency killer: Processing 50 raw web pages with neural dense retrievers and rerankers is infeasible under real-world latency budgets. A simple BM25 pre-pass over 1024-token chunks reduced end-to-end Task 3 inference time from 68.17 seconds to 5.96 seconds per query without sacrificing accuracy.
  • Static web search poisons dynamic domains: For domains like sports and finance, web results often introduce outdated, contradictory information. Completely discarding web search in favor of Mock APIs significantly boosted accuracy.
  • Entity and time normalization are make-or-break for structured retrieval: In ablation experiments, dropping Entity Matching or Time Information Extraction collapsed performance more than any modeling change (scores plummeted from 31.22% to 21.44% and 18.45%, respectively). APIs fail outright if tickers or relative dates are resolved incorrectly.
  • Knowing when to say "I don't know": Under evaluation metrics that penalize hallucinations (-1 point) more heavily than omissions (0 points), combining CoT with invalid-premise few-shot prompts and temporal refusal rules reduced hallucinations by up to 71%.

Key Results

Under the official scoring metric (Correct: +1, Missing: 0, Incorrect/Hallucination: -1):

System / Configuration Score (%) Accuracy (%) Hallucination (%) Missing (%) Time / Query (s)
LLM Only (Llama-3-70B) -7.29 28.01 35.30 36.69 —
Direct RAG Baseline -6.78 34.79 41.58 23.63 —
Ours: Task 1 (5 Web Pages) 11.82 29.98 18.16 51.86 —
Ours: Task 2 (5 Pages + APIs) 31.22 46.75 15.54 37.71 —
Ours: Task 3 (50 Pages + APIs) 31.66 48.21 16.56 35.23 5.96
Task 3 w/o BM25 Pre-rank 29.53 44.34 14.81 40.85 68.17

The full system outperformed both naive LLM generation and standard RAG baselines by nearly 38 percentage points on Tasks 2 and 3, securing 2nd place on the competition leaderboard.

Limitations and Future Work

  • Brittle API Selection Rules: The mapping between user queries and specific Mock APIs relies on hand-crafted heuristic rules, which do not scale easily to hundreds of arbitrary production tools.
  • Refusal as a Crutch: Answering "I don't know" to fast-changing queries prevents negative scoring penalties, but it is an evasive maneuver rather than a true solution. Future systems must integrate real-time verification and automated freshness scoring.
  • Evaluation Metric Vulnerabilities: Because missing answers score 0 while incorrect answers score -1, benchmarks like CRAG can inadvertently reward overly conservative systems that refuse to answer difficult questions. The authors advocate for better evaluation frameworks that assess a model's true metacognitive boundaries.

Summary updated

BibTeX
@inproceedings{ouyang2024revisiting,
  author = {Jie Ouyang and Yucong Luo and Mingyue Cheng and Daoyu Wang and Shuo Yu and Qi Liu and Enhong Chen},
  title = {{Revisiting the Solution of Meta KDD Cup 2024: CRAG}},
  booktitle = {KDD Cup CRAG @ KDD},
  year = {2024},
  url = {https://openreview.net/forum?id=PUzLjWIgqC},
}
Figure