Find answers from the community

Updated 6 months ago

Hey, is it possible use retrieval with

At a glance

The community member asked if it is possible to use retrieval with batch. Another community member responded that it is not possible to do batch retrieval, but you can do async retrieval (assuming the vector store supports it). They provided an example code snippet using index.as_retriever(similarity_top_k=2) and nodes = await retriever.aretrieve("query"). Other community members thanked the first responder and asked if the code snippet was correct.

Hey, is it possible use retrieval with batch?
L
h
W
4 comments
Not batch, but you can do async (assuming your vector store supports async)

Plain Text
retriever = index.as_retriever(similarity_top_k=2)
nodes = await retriever.aretrieve("query")
Will it be
nodes = await retriever.aretrieve("query")
?
ah good catch, whoops
Add a reply
Sign up and join the conversation on Discord