Closed MrCsabaToth closed 1 year ago
This could easily be an extra step between the final RAG preparation and the fusion reranking. See https://github.com/pinecone-io/examples/blob/master/learn/generation/better-rag/00-rerankers.ipynb
import cohere os.environ["COHERE_API_KEY"] = os.getenv("COHERE_API_KEY") or getpass.getpass() co = cohere.Client(os.environ["COHERE_API_KEY"]) rerank_docs = co.rerank( query=query, documents=docs.keys(), top_n=25, model="rerank-english-v2.0" )
We can use the reranker to enhance the augmentation for both the document and the connector RAG queries.
This could easily be an extra step between the final RAG preparation and the fusion reranking. See https://github.com/pinecone-io/examples/blob/master/learn/generation/better-rag/00-rerankers.ipynb