rag-fusion  by Raudaschl

Search methodology using query generation and result re-ranking

created 1 year ago
886 stars

Top 41.6% on sourcepulse

GitHubView on GitHub
1 Expert Loves This Project
Project Summary

RAG-Fusion is a search methodology designed to enhance information retrieval by generating multiple queries from an initial user query, performing vector searches with each, and then re-ranking the results using Reciprocal Rank Fusion. This approach aims to uncover deeper, more relevant information often missed by traditional search methods, targeting users who need to extract nuanced knowledge from large document sets.

How It Works

The system leverages OpenAI's GPT models to generate diverse queries from a single user input. These generated queries are then used to perform independent vector searches against a document corpus. Finally, the Reciprocal Rank Fusion algorithm is applied to consolidate and re-rank the results from all searches, prioritizing documents that appear highly relevant across multiple query variations. This multi-query, re-ranking strategy aims to improve recall and precision.

Quick Start & Requirements

  • Install dependencies: pip install openai
  • Requires an OpenAI API key.
  • Run the provided script.

Highlighted Details

  • Implements Reciprocal Rank Fusion for re-ranking.
  • Utilizes GPT for multiple query generation.
  • Aims to improve discovery of less obvious, highly relevant information.

Maintenance & Community

No specific details on contributors, community channels, or roadmap are provided in the README.

Licensing & Compatibility

The README does not specify a license. Compatibility for commercial or closed-source use is undetermined.

Limitations & Caveats

The project is described as an "ongoing experiment." It relies heavily on OpenAI's API, incurring costs and external dependency. The effectiveness is contingent on the quality of generated queries and the underlying vector search implementation, which are not detailed.

Health Check
Last commit

9 months ago

Responsiveness

1+ week

Pull Requests (30d)
0
Issues (30d)
0
Star History
20 stars in the last 90 days

Explore Similar Projects

Feedback? Help us improve.