Skip to main contentü¶úÔ∏èüîó LangChainDocsUse casesIntegrationsAPICommunityChat our docsLangSmithJS/TS DocsSearchCTRLKProvidersAnthropicAWSGoogleMicrosoftOpenAIMoreComponentsLLMsChat modelsDocument loadersDocument transformersText embedding modelsVector storesRetrieversAmazon KendraArcee RetrieverArxivAzure Cognitive SearchBM25ChaindeskChatGPT PluginCohere RerankerDocArrayElasticSearch BM25Google Cloud Enterprise SearchGoogle DriveGoogle Vertex AI SearchKay.aikNNLOTR (Merger Retriever)MetalPinecone Hybrid SearchPubMedRePhraseQuerySEC filingSelf-querying retrieverDeep LakeChromaDashVectorElasticsearchMilvusMyScaleOpenSearchPineconeQdrantRedisSupabaseTimescale Vector (Postgres) self-queryingVectaraWeaviateSVMTavily Search APITF-IDFVespaWeaviate Hybrid SearchWikipediayou-retrieverZepToolsAgents and toolkitsMemoryCallbacksChat loadersComponentsRetrieversSelf-querying retrieverMilvusOn this pageMilvusMilvus is a database that stores, indexes, and manages massive embedding vectors generated by deep neural networks and other machine learning (ML) models.In the walkthrough, we'll demo the SelfQueryRetriever with a Milvus vector store.Creating a Milvus vectorstore‚ÄãFirst we'll want to create a Milvus VectorStore and seed it with some data. We've created a small demo set of documents that contain summaries of movies.I have used the cloud version of Milvus, thus I need uri and token as well.NOTE: The self-query retriever requires you to have lark installed (pip install lark). We also need the pymilvus package.#!pip install lark#!pip install pymilvusWe want to use OpenAIEmbeddings so we have to get the OpenAI API Key.import osOPENAI_API_KEY = "Use your OpenAI key:)"os.environ["OPENAI_API_KEY"] = OPENAI_API_KEYfrom langchain.schema import Documentfrom langchain.embeddings.openai import OpenAIEmbeddingsfrom langchain.vectorstores import Milvusembeddings = OpenAIEmbeddings()docs = [    Document(page_content="A bunch of scientists bring back dinosaurs and mayhem breaks loose",
Milvus is a database that stores, indexes, and manages massive embedding vectors generated by deep neural networks and other machine learning (ML) models.
Milvus is a database that stores, indexes, and manages massive embedding vectors generated by deep neural networks and other machine learning (ML) models. ->: Skip to main contentü¶úÔ∏èüîó LangChainDocsUse casesIntegrationsAPICommunityChat our docsLangSmithJS/TS DocsSearchCTRLKProvidersAnthropicAWSGoogleMicrosoftOpenAIMoreComponentsLLMsChat modelsDocument loadersDocument transformersText embedding modelsVector storesRetrieversAmazon KendraArcee RetrieverArxivAzure Cognitive SearchBM25ChaindeskChatGPT PluginCohere RerankerDocArrayElasticSearch BM25Google Cloud Enterprise SearchGoogle DriveGoogle Vertex AI SearchKay.aikNNLOTR (Merger Retriever)MetalPinecone Hybrid SearchPubMedRePhraseQuerySEC filingSelf-querying retrieverDeep LakeChromaDashVectorElasticsearchMilvusMyScaleOpenSearchPineconeQdrantRedisSupabaseTimescale Vector (Postgres) self-queryingVectaraWeaviateSVMTavily Search APITF-IDFVespaWeaviate Hybrid SearchWikipediayou-retrieverZepToolsAgents and toolkitsMemoryCallbacksChat loadersComponentsRetrieversSelf-querying retrieverMilvusOn this pageMilvusMilvus is a database that stores, indexes, and manages massive embedding vectors generated by deep neural networks and other machine learning (ML) models.In the walkthrough, we'll demo the SelfQueryRetriever with a Milvus vector store.Creating a Milvus vectorstore‚ÄãFirst we'll want to create a Milvus VectorStore and seed it with some data. We've created a small demo set of documents that contain summaries of movies.I have used the cloud version of Milvus, thus I need uri and token as well.NOTE: The self-query retriever requires you to have lark installed (pip install lark). We also need the pymilvus package.#!pip install lark#!pip install pymilvusWe want to use OpenAIEmbeddings so we have to get the OpenAI API Key.import osOPENAI_API_KEY = "Use your OpenAI key:)"os.environ["OPENAI_API_KEY"] = OPENAI_API_KEYfrom langchain.schema import Documentfrom langchain.embeddings.openai import OpenAIEmbeddingsfrom langchain.vectorstores import Milvusembeddings = OpenAIEmbeddings()docs = [    Document(page_content="A bunch of scientists bring back dinosaurs and mayhem breaks loose",