Ricci-Filtration: Boosting Retrieval-Augmented Generation Reranker to Query-Answer Tasks by Discrete Ricci Flow
Summary
Ricci-Filtration is a novel RAG reranker enhancement procedure that leverages discrete Ricci flow to filter irrelevant document chunks before reranking. By modeling the input query and initial retrieved chunks as a graph, it uses geometric curvature to evaluate chunk importance. The system first filters chunks based on their curvature relative to the query, then a reranker processes the remaining subset. Experiments on datasets like SQuAD2.0 and MultiHop-RAG show Ricci-Filtration outperforms several baseline reranking methods in accuracy, precision, recall, and F1 scores, improving metrics by about 5% in SQuADv2 and significantly boosting accuracy for null queries in MultiHop-RAG (from 60.80% to 83.39%). It uses OpenAI's text-embedding-3-small for embeddings and Llama-3.1-8B-Instruct or gpt-4o-mini for generation, with a default of 20 Ricci flow iterations and a 50th percentile cosine-dissimilarity threshold for graph construction.
Key takeaway
For Machine Learning Engineers optimizing RAG systems, consider integrating Ricci-Filtration as a pre-reranking step. This geometric filtering method can dynamically remove noisy chunks, potentially improving accuracy and F1 scores, especially for single-hop QA tasks. While it introduces computational latency, its LLM-agnostic filtering decision offers a different accuracy-latency trade-off compared to LLM-based rerankers. Evaluate its impact on your specific datasets, particularly for multi-hop reasoning where its current performance may be limited.
Key insights
Discrete Ricci flow can geometrically filter irrelevant RAG chunks, improving reranking performance and reducing noise.
Principles
- Negative Ricci curvature indicates irrelevant chunks relative to a query node.
- Normalized discrete Ricci flow can detect community structures in graphs.
- Geometric filtering can improve answer quality without LLM-based filtering decisions.
Method
Construct a graph from query and chunk embeddings using cosine dissimilarity. Apply finite-time normalized discrete Ricci flow for M=20 iterations. Filter chunks with negative Ricci curvature (high edge weights) relative to the query node. Rerank the remaining chunks.
In practice
- Use precomputed embeddings for graph construction.
- Integrate into existing RAG pipelines for geometric denoising.
- Set Ricci flow iterations (e.g., M=20) for effective separation.
Topics
- Retrieval-Augmented Generation
- Reranking
- Discrete Ricci Flow
- Graph Neural Networks
- Question Answering
- LLM Performance
- Geometric Filtering
Best for: AI Engineer, Research Scientist, AI Scientist, Machine Learning Engineer, NLP Engineer
Related on AIssential
Editorial summary, takeaway, and curation by AIssential. Original article published by stat.ML updates on arXiv.org.