pinecone-io / pinecone-client

Apache License 2.0
12 stars 2 forks source link

[Feature] Support for Batch Queries #21

Open adrielsumathipala opened 1 year ago

adrielsumathipala commented 1 year ago

Is this your first time submitting a feature request?

Describe the feature

In the Pincone 2.x.x SDK, we have the ability to pass a batch of vectors to index.query method. In the Pinecone 3 SDK, we can only pass a single vector to index.query. We need high performance on the query method because we want to batch process a large vector dataset.

It makes it very slow for reading operations. I found that the Pinecone 2 SDK was at least 6x faster for read operations. Moremover, the Pinecone 3 SDK's query method does not use await like upsert so it cannot be optimized through async calls. Perhaps this is a limitation on the Pinecone DB query engine side where queries. But having batch support in Pinecone 3 would bring parity with the Pinecone 2 SDK and lead to much faster performance.

Describe alternatives you've considered

Potentially making query an asyc by adding an await, like with upsert. However there might be a limitation on the Pineceone side depending on how queries are treated that would not lead to optimizations

Who will this benefit?

Batch uses cases for the query method

Are you interested in contributing this feature?

Don't have the familiarity to contribute actual code, but can help with ideas

Anything else?

No response