Rerank and use only a subset of retrieved results to generate a response

Description

Context: I’m working on implementing Retrieval-Augmented Generation (RAG) by first applying a reranker to refine the retrieved results, followed by generating a response based on the top-ranked content. Example, I would like to retrieve 10 results, rerank them and then use top 3 to generate a response.

Question: Is it possible to do this using collections.generate.hybrid(...) ?

Server Setup Information

  • Weaviate Server Version: 4.9.1
  • Multi Node? Number of Running Nodes: NO
  • Multitenancy?: NO

Any additional Information

hi @steve1 !

AFAIK, this is not possible as of now.

However, this is an interesting use case.

I have poked internally on this, and will get back when I get more results.

Thanks!

Thank you @DudaNogueira. Yes, definitely an interesting use case. I think you might be limited by cohere reranker itself… so no worries.

1 Like