Research
HiFi-RAG: Hierarchical Content Filtering and Two-Pass Generation for Open-Domain RAG
HiFi-RAG: Hierarchical Content Filtering and Two-Pass Generation for Open-Domain RAG ## Overview - Research area: Natural Language Processing — open-domain Retrieval-Augmented Generation (RAG),
- arXiv
- 2512.22442
- Published
- 2025-12-27
- Authors
- Cattalyya Nuengsigkapian
AI summary
# HiFi-RAG: Hierarchical Content Filtering and Two-Pass Generation for Open-Domain RAG ## Overview - **Research area:** Natural Language Processing — open-domain Retrieval-Augmented Generation (RAG), specifically context selection, filtering, and answer generation for web-scale question answering. - **Technical level:** Intermediate. The pipeline is conceptually simple (five clear stages), but assumes familiarity with RAG, LLM cascade design, and retrieval evaluation metrics such as ROUGE-L and DeBERTaScore. - **Scope in one sentence:** This paper describes HiFi-RAG, a multi-stage LLM pipeline that uses Gemini 2.5 Flash as a cheap filter and Gemini 2.5 Pro as the generator, and reports that it won the closed-source Text-to-Text static evaluation of the MMU-RAGent NeurIPS 2025 Competition. ## What This Paper Is About Open-domain RAG systems often retrieve documents that are topically related but factually irrelevant, and this noise leads the generator to hallucinate or drift away from what the user actually asked. The paper's goal is to maximize precision in the context window rather than recall — discarding low-value web pages and page sections before they ever reach the expensive reasoning model — and then to separate "getting the facts right" from "matching the expected answer style" through a two-turn generation process. ## Key Contributions 1. **A five-stage pipeline (HiFi-RAG):** Query Formulation, Retrieval with URL filtering, Hierarchical Content Parsing and Filtering, Two-Pass Generation, and Post-Hoc Citation Verification. The authors state this system won the closed-source Text-to-Text static evaluation of the MMU-RAGent NeurIPS 2025 Competition. 2. **An LLM-as-a-Reranker approach to content selection:** Instead of embedding-based similarity search, Gemini 2.5 Flash evaluates each parsed section using only its title and the first 200 characters of content, then ranks sections by usefulness. The paper reports this removes 60.5% of chunks on average across 100 queries. 3. **A cost-tiered model cascade:** Gemini 2.5 Flash (described as 4-6× cheaper than Pro) handles query formulation, hierarchical content filtering, and citation attribution, while Gemini 2.5 Pro is reserved for final answer generation — described as a multi-stage cascade where a lightweight signal gates expensive processing. 4. **A custom Test2025 benchmark (100 samples)** built by prompting Gemini 3.0 in Thinking mode with web search, targeting knowledge that became public after February 2025, to test whether the system actually relies on retrieved context rather than parametric memory. ## Main Findings - **Validation set results:** On the MMU-RAGent validation set, the final configuration reached ROUGE-L 0.2739 and DeBERTaScore 0.6772, which the authors report as +19.6% ROUGE-L and +6.2% DeBERTaScore over the baseline. - **Ablation progression (Table 2):** Baseline Q (raw query + length constraint) scored 0.2291 ROUGE-L / 0.6375 DeBERTaScore; Baseline Prompt (no search) 0.2591 / 0.6667; RAG (search enabled) 0.2664 / 0.6677; RAG with URL + chunk filters 0.2695 / 0.6712; and the final system (filters + rephrase + two-turn) 0.2739 / 0.6772. - **Prompt engineering alone helped substantially:** The paper notes Baseline Prompt alone gave a 13% improvement in ROUGE-L over Baseline Q, and that adding search plus filtering added roughly another 4%. - **Filtering volumes:** URL pre-fetch filtering reduced the URL count by 33.5%, and section filtering removed 60.5% of chunks, both averaged across 100 queries. - **Test2025 results:** The final system scored 0.3182 ROUGE-L and 0.7092 DeBERTaScore, versus 0.2022 / 0.6173 for Baseline Q — reported as +57.4% ROUGE-L and +14.9% DeBERTaScore relative to the parametric baseline. Baseline Prompt scored 0.2766 / 0.6574; RAG 0.2915 / 0.6776; RAG with URL filter only 0.2966 / 0.6829; RAG with URL + chunk filters 0.3031 / 0.6840; RAG with filters + rephrase 0.2898 / 0.6832. - **The knowledge-cutoff gap widens on future events:** The RAG-versus-no-search gap grew from 16.3% on the MMU-RAGent validation set to 44.16% on Test2025. The paper states Gemini 2.5 Pro, Gemini 2.5 Flash, and Gemini 3.0 all shared a January 2025 knowledge cutoff as of November 2025. - **Rephrasing needs filtering:** Query rephrasing without URL filtering scored lower (0.2898 / 0.6832) than with it, which the authors attribute to losing context from verbose queries; they conclude rephrasing is most effective combined with filtering. - **Negative results:** Sentence-embedding filtering (Voyage AI) performed worse than LLM filtering; a full Gemini Agent with search tools was 10× more expensive, slower, and often timed out; DSPy with the GEPA evolutionary optimizer overfit the validation set into brittle prompts; and an LLM-as-a-Judge "Checker" module improved answer quality qualitatively but degraded ROUGE and DeBERTaScore. - **Qualitative cases:** On Test2025, the baseline either refused or hallucinated on queries such as the Super Bowl LIX halftime performer and the iPhone 17 Air, and gave outdated information on the Artemis II launch delay, whereas HiFi-RAG answered correctly. For static, long-planned events (World Expo 2025, Windows 10 end of support), both systems answered correctly. ## Methodology in Plain English The system processes a user question through five stages: 1. **Query planning.** Gemini 2.5 Flash rewrites the conversational user question into one or two concise Google-style search queries (for example, turning "Explain to me like I am five, how a camera works" into "how a camera works explained for 5 year old" and "ELI5 how a camera works"). 2. **Retrieval and URL filtering.** Before scraping anything, Gemini 2.5 Flash looks at each search result's URL, title, and preview text and keeps only the promising sources, discarding domains that mismatch the topic (the paper's example is gaming versus aerospace), outdated information, and speculative discussion. 3. **Hierarchical parsing and filtering.** Pages are scraped with the Scrapingdog API, and Reddit threads with the Reddit API. HTML is parsed into sections grouped under their parent headers (``–``) as markdown plain text. Reddit trees are reconstructed with top-k comments (k=5) and two layers of nested replies (m₁=3, m₂=2). Gemini 2.5 Flash then ranks the sections using only their titles and the first 200 characters of content, and drops the rest. 4. **Two-pass generation.** Gemini 2.5 Pro first drafts an answer in one paragraph from the filtered content, then in a second turn revises its answer to match the style and length of three hand-picked question-answer examples drawn from the validation set (distinct from the first 100 pairs used for evaluation). 5. **Citation verification.** A separate Gemini 2.5 Flash call reads the final answer and the sources and returns a JSON list of source indices that directly support the claims, prioritizing the most specific matching source when duplicates exist. Evaluation used ROUGE-L and DeBERTaScore with the `microsoft/deberta-xlarge-mnli` model. The validation set had 300 samples, but because of cost and time constraints during ablation, the first 100 were evaluated. Test2025 added 100 synthesized samples. For the final Test2025 run, the three style examples were replaced with three new pairs generated by Gemini 3.0 to better match the test distribution. ## Why This Matters - **For research:** The paper argues that a structured, deterministic multi-stage pipeline can outperform more autonomous "agentic" workflows for open-domain RAG — a notable counterpoint to the trend toward agent-based retrieval. It also offers a reusable ablation template and a future-events evaluation set for separating retrieval ability from parametric memory. - **Real-world applications:** - Search assistants that must answer questions about events, products, or schedules announced after a model's training cutoff. - Customer support and help-desk bots, where the paper's "how-to" examples (tying shoelaces, leash training a puppy, Photoshop edits) reflect typical user phrasing. - Enterprise or news Q&A systems where citations must be traceable to specific sources and duplicates should resolve to the most authoritative one. - Cost-sensitive deployments that need high retrieval precision without paying frontier-model prices on every filtering step. - **Industry relevance:** The design explicitly targets the cost/latency/accuracy tradeoff by splitting work between a cheap model (Gemini 2.5 Flash, stated as 4-6× cheaper than Pro) and an expensive one (Gemini 2.5 Pro). The reported failures of agentic tooling (10× cost, timeouts) and prompt optimizers (overfitting) are practical warnings for teams building production RAG. ## Future Directions 1. **Close the knowledge-cutoff gap systematically.** The paper shows the RAG-versus-no-search gap ballooning to 44.16% on Test2025; extending and hardening the Test2025-style evaluation would let researchers track how well pipelines compensate for stale parametric knowledge over time. 2. **Resolve the rephrasing trade-off.** Query rephrasing hurt scores unless URL filtering was also applied. Finding a formulation method that preserves verbosity cues without introducing ambiguity is an open problem. 3. **Replace or improve the discarded components.** Embedding-based filtering, agentic search, DSPy/GEPA prompt optimization, and LLM-as-a-Judge checking all underperformed here; each failure has a specific diagnosed cause that invites a better solution. 4. **Better style-alignment without hand-picked examples.** The final system depends on three hand-selected or generated question-answer examples for the refinement turn; automating example selection or generating style targets on the fly is a natural next step. 5. **Reconcile qualitative and automatic metrics.** The "Checker" module improved answers qualitatively while lowering ROUGE and DeBERTaScore, raising the question of whether these metrics fully capture answer quality for RAG. ## Target Audience This paper is most useful to applied NLP engineers and researchers building open-domain RAG systems, especially those working under latency and cost constraints, and to competition participants in benchmarks such as MMU-RAGent. It is also valuable to teams deciding between deterministic multi-stage pipelines and agentic architectures, and to anyone evaluating whether retrieval or parametric memory is carrying the load in a question-answering system. The five-stage structure and the included appendix prompts make it practical to adapt, while the negative results section saves readers from repeating several expensive dead ends.
Authors’ abstract
Retrieval-Augmented Generation (RAG) in open-domain settings faces significant challenges regarding irrelevant information in retrieved documents and the alignment of generated answers with user intent. We present HiFi-RAG (Hierarchical Filtering RAG), the winning closed-source system in the Text-to-Text static evaluation of the MMU-RAGent NeurIPS 2025 Competition. Our approach moves beyond standard embedding-based retrieval via a multi-stage pipeline. We leverage the speed and cost-efficiency of Gemini 2.5 Flash (4-6x cheaper than Pro) for query formulation, hierarchical content filtering, and citation attribution, while reserving the reasoning capabilities of Gemini 2.5 Pro for final answer generation. On the MMU-RAGent validation set, our system outperformed the baseline, improving ROUGE-L to 0.274 (+19.6%) and DeBERTaScore to 0.677 (+6.2%). On Test2025, our custom dataset evaluating questions that require post-cutoff knowledge (post January 2025), HiFi-RAG outperforms the parametric baseline by 57.4% in ROUGE-L and 14.9% in DeBERTaScore.