DashVector is a fully managed vector DB service that supports high-dimension dense and sparse vectors, real-time insertion and filtered search. It is built to scale automatically and can adapt to different application requirements. The vector retrieval serviceIn this notebook, we’ll demo theDashVector
is based on theProxima
core of the efficient vector engine independently developed byDAMO Academy
, and provides a cloud-native, fully managed vector retrieval service with horizontal expansion capabilities.DashVector
exposes its powerful vector management, vector query and other diversified capabilities through a simple and easy-to-use SDK/API interface, which can be quickly integrated by upper-layer AI applications, thereby providing services including large model ecology, multi-modal AI search, molecular structure A variety of application scenarios, including analysis, provide the required efficient vector retrieval capabilities.
SelfQueryRetriever
with a DashVector
vector store.
Create DashVector vectorstore
First we’ll want to create aDashVector
VectorStore and seed it with some data. We’ve created a small demo set of documents that contain summaries of movies.
To use DashVector, you have to have dashvector
package installed, and you must have an API key and an Environment. Here are the installation instructions.
NOTE: The self-query retriever requires you to have lark
package installed.
Create your self-querying retriever
Now we can instantiate our retriever. To do this we’ll need to provide some information upfront about the metadata fields that our documents support and a short description of the document contents.Testing it out
And now we can try actually using our retriever!Filter k
We can also use the self query retriever to specifyk
: the number of documents to fetch.
We can do this by passing enable_limit=True
to the constructor.