Retrieving Vectors from existing Pinecone Vector Database

30 Views Asked by At

I have created a vector database on pinecone and am unable to retrieve vectors from it.

For my RAG application, I have successfully created a Vector Database on Pinecone, and now am trying to retrieve vectors from it. This is my code for the same:

searcher = PineconeVectorStore(index_name, embeddings)

retriever = searcher.as_retriever()
retriever.search_kwargs['top_k'] = 25
retriever.search_kwargs['maximal_marginal_relevance'] = True
retriever.search_kwargs['k'] = 15

chain = RetrievalQA.from_chain_type(
    llm=llm, 
    retriever=retriever,
    verbose=True
)

handler = StdOutCallbackHandler()

print(chain.run(
    'Sample Question',
    callbacks=[handler]
))

I am getting the following error:

PineconeVectorStore.similarity_search_with_score() got an unexpected keyword argument 'top_k'

I don't understand why I am getting this error as if I stored the vectors in my RAM, the same code works.

Please let me know how I should proceed.

0

There are 0 best solutions below