Better RAG Results with Reciprocal Rank Fusion and Hybrid Search
1–10 of 59 posts
Re: Better RAG Results with Reciprocal Rank Fusion and Hybrid Search
#2I was however tripped up by this sentence close to the beginning:
> we encountered a significant challenge with RAG: relying solely on vector search (even using both dense and sparse vectors) doesn’t always deliver satisfactory results for certain queries.
Not to be overly pedantic, but that's a problem with vector similarity, not RAG as a concept.
Although the author is clearly aware of that - I have had numerous conversations in the past few months alone of people essentially saying "RAG doesn't work because I use pg_vector (or whatever) and it never finds what I'm looking for" not realizing 1) it's not the only way to do RAG, and 2) there is often a fair difference between the embeddings and the vectorized query, and with awareness of why that is you can figure out how to fix it.
https://medium.com/@cdg2718/why-your-rag-doesnt-work-9755726... basically says everything I often say to people with RAG/vector search problems but again, seems like the assembled team has it handled :)
Re: Better RAG Results with Reciprocal Rank Fusion and Hybrid Search
#3Thanks for sharing, I like the approach and it makes a lot of sense for the problem space. Especially using existing products vs building/hosting your own. I was however tripped up by this sentence close to the beginning: > we encountered a significant challenge with RAG: relying solely on vector search (even using both dense and sparse vectors) doesn’t always deliver satisfactory results for certain queries. Not to…
I've seen the whole gamut of RAG implementations as well, and the implementation, specifically prompting and the document search has a lot to do with the end quality.
Re: Better RAG Results with Reciprocal Rank Fusion and Hybrid Search
#4Re: Better RAG Results with Reciprocal Rank Fusion and Hybrid Search
#5Thanks for sharing, I like the approach and it makes a lot of sense for the problem space. Especially using existing products vs building/hosting your own. I was however tripped up by this sentence close to the beginning: > we encountered a significant challenge with RAG: relying solely on vector search (even using both dense and sparse vectors) doesn’t always deliver satisfactory results for certain queries. Not to…
Author here: you're for sure right -- it's not a problem with RAG the theoretical concept. In fact, I think RAG implementations should likely be specific to their use cases (e.g. our hybrid search approach works well for customer support, but I'm not sure if it would work as well in other contexts, say for legal bots). I've seen the whole gamut of RAG implementations as well, and the implementation, specifically prom…
Re: Better RAG Results with Reciprocal Rank Fusion and Hybrid Search
#6So I'm not sure why the article uses 1/Rank alone. Did you test both and find that the smoothing didn't help? My understanding is that it has been pretty important for the best results.
Re: Better RAG Results with Reciprocal Rank Fusion and Hybrid Search
#7Both of your references use RRF=1/(60+Rank) So I'm not sure why the article uses 1/Rank alone. Did you test both and find that the smoothing didn't help? My understanding is that it has been pretty important for the best results.
We used 1/Rank in the article for simplicity purposes, though I can see why this might be confusing to an astute reader.
Re: Better RAG Results with Reciprocal Rank Fusion and Hybrid Search
#8Both of your references use RRF=1/(60+Rank) So I'm not sure why the article uses 1/Rank alone. Did you test both and find that the smoothing didn't help? My understanding is that it has been pretty important for the best results.
Re: Better RAG Results with Reciprocal Rank Fusion and Hybrid Search
#9Re: Better RAG Results with Reciprocal Rank Fusion and Hybrid Search
#10Any tips on accomplishing this in Postgres with pg_vector?