{"id":7109,"date":"2023-11-15T08:00:46","date_gmt":"2023-11-15T16:00:46","guid":{"rendered":"https:\/\/devblogs.microsoft.com\/cosmosdb\/?p=7109"},"modified":"2024-06-06T08:49:22","modified_gmt":"2024-06-06T15:49:22","slug":"mongodb-vcore-vector-search","status":"publish","type":"post","link":"https:\/\/devblogs.microsoft.com\/cosmosdb\/mongodb-vcore-vector-search\/","title":{"rendered":"Integrated Vector Database in vCore-based Azure Cosmos DB for MongoDB is Generally Available!"},"content":{"rendered":"<p><a href=\"https:\/\/devblogs.microsoft.com\/cosmosdb\/wp-content\/uploads\/sites\/52\/2023\/11\/vectorsearch.png\"><img decoding=\"async\" class=\"size-full wp-image-7113 aligncenter\" src=\"https:\/\/devblogs.microsoft.com\/cosmosdb\/wp-content\/uploads\/sites\/52\/2023\/11\/vectorsearch.png\" alt=\"Image vectorsearch\" width=\"480\" height=\"270\" \/><\/a><\/p>\n<p>We\u2019re thrilled to share the exciting news that the integrated vector database is now officially available to all users of Azure Cosmos DB for MongoDB vCore. This groundbreaking feature paves the way for a multitude of fresh opportunities in the realm of secure and resilient AI-driven applications while making Azure Cosmos DB for MongoDB vCore your go-to data source.<\/p>\n<p>We&#8217;re also announcing new capabilities to enable you to perform faster, more accurate operations with ease:<\/p>\n<ul>\n<li><strong>HNSW vector index algorithm (preview) <\/strong>provides fast and accurate vector searches at scale. Enabling your apps to perform more than 2,000 QPS with sub-100ms latency on 3 million<\/li>\n<li><strong>Integrations: <\/strong>Use Azure Cosmos DB vCore with your favorite LLM orchestration framework such as Semantic Kernel, LangChain, or LlamaIndex<\/li>\n<li><strong>Azure OpenAI Service On Your Data: <\/strong>Quickly and easily <a href=\"https:\/\/learn.microsoft.com\/azure\/ai-services\/openai\/use-your-data-quickstart?tabs=command-line&amp;pivots=programming-language-studio\" target=\"_blank\" rel=\"noopener\">use your own data<\/a> in Azure Cosmos DB for MongoDB vCore with Azure OpenAI completions models using the Azure OpenAI Studio.<\/li>\n<\/ul>\n<p>The integrated vector database enables you to seamlessly integrate AI-powered applications, including those harnessing OpenAI embeddings, with your existing data residing in Azure Cosmos DB. You can effortlessly store, index, and query high-dimensional vector data directly within Azure Cosmos DB for MongoDB vCore, eliminating the necessity of transferring your data to more costly alternatives to meet your vector database needs.<\/p>\n<p>This unified solution simplifies the development of your AI applications by reducing complexity and improving overall efficiency. By using the integrated vector database, you&#8217;ll gain access to a wealth of semantically relevant insights from your data, leading to the creation of more precise and potent applications. The possibilities are now limitless!<\/p>\n<h3>Create a vector index<\/h3>\n<p>Azure Cosmos DB for MongoDB vCore supports two types of vector index algorithms that you can define when creating an index:<\/p>\n<ul>\n<li><strong>IVF (generally available),<\/strong> or Inverted File Indexes which partitions the vectors into clusters and assigns each vector to its nearest cluster center. IVF offers robust stability and performance.<\/li>\n<li><strong>HNSW (preview),<\/strong> or Hierarchical Navigable Small Worlds, which builds a multi-layer graph where each layer has fewer vectors and connections than the previous one. HNSW enables you to scale your indexes to large volumes while still maintaining low latency, high throughput (queries per second), and accuracy.<\/li>\n<\/ul>\n<p>Each vector index has parameters that you can tune to adjust your latency or accuracy performance and select a similarity metric of your choice (cosine, Euclidean, and inner product). <a href=\"https:\/\/learn.microsoft.com\/azure\/cosmos-db\/mongodb\/vcore\/vector-search#use-the-createindexes-template-to-create-a-vector-index\" target=\"_blank\" rel=\"noopener\">Learn how to create a vector index.<\/a><\/p>\n<h3>Perform a vector search<\/h3>\n<p>Once your data is inserted into your Azure Cosmos DB for MongoDB vCore database and collection, and your vector index is defined, you can perform a vector similarity search against a targeted query vector, obtain the top <em>k<\/em> most relevant items in your collection, and view the similarity score indicating how close the returned items are to your query vector. <a href=\"https:\/\/learn.microsoft.com\/azure\/cosmos-db\/mongodb\/vcore\/vector-search#perform-a-vector-search\" target=\"_blank\" rel=\"noopener\">Learn how to perform a vector search.<\/a><\/p>\n<h3>Integrate with LLM orchestration tools<\/h3>\n<p>Azure Cosmos DB for MongoDB vCore\u2019s integration with the LLM orchestration tools\u00a0 <a href=\"https:\/\/learn.microsoft.com\/semantic-kernel\/memories\/vector-db#available-connectors-to-vector-databases\" target=\"_blank\" rel=\"noopener\">Semantic Kernel<\/a>, <a href=\"https:\/\/python.langchain.com\/docs\/integrations\/vectorstores\/azure_cosmos_db\" target=\"_blank\" rel=\"noopener\">LangChain<\/a>, and <a href=\"https:\/\/docs.llamaindex.ai\/en\/stable\/examples\/vector_stores\/AzureCosmosDBMongoDBvCoreDemo.html\" target=\"_blank\" rel=\"noopener\">LlamaIndex<\/a> provides you with more flexibility in developing your applications. You can now effortlessly index and search over your data, ensuring lightning-fast query performance and data retrieval with ease of development with your favorite tooling.<\/p>\n<h3>Integration with Azure OpenAI Service On Your Data<\/h3>\n<p><a href=\"https:\/\/techcommunity.microsoft.com\/t5\/ai-azure-ai-services-blog\/introducing-azure-openai-service-on-your-data-in-public-preview\/ba-p\/3847000\">Originally announced in June 2023<\/a>, Azure OpenAI Service On Your Data allows users to quickly and easily integrate data in Azure with the power of OpenAI large language models (LLMs) such as GPT-4. This experience helps streamline proof-of-concept development, enables quick experimentation, and even allows you to fast-deploy a web application chat powered by your <a href=\"https:\/\/learn.microsoft.com\/azure\/ai-services\/openai\/how-to\/completions\" target=\"_blank\" rel=\"noopener\">Azure OpenAI completions model<\/a>, all from the Azure OpenAI Studio interface.<\/p>\n<p><a href=\"https:\/\/devblogs.microsoft.com\/cosmosdb\/wp-content\/uploads\/sites\/52\/2023\/11\/openai_studio_chat2.png\"><img decoding=\"async\" class=\"aligncenter wp-image-7249 \" src=\"https:\/\/devblogs.microsoft.com\/cosmosdb\/wp-content\/uploads\/sites\/52\/2023\/11\/openai_studio_chat2-1024x499.png\" alt=\"Image openai studio chat2\" width=\"747\" height=\"364\" srcset=\"https:\/\/devblogs.microsoft.com\/cosmosdb\/wp-content\/uploads\/sites\/52\/2023\/11\/openai_studio_chat2-1024x499.png 1024w, https:\/\/devblogs.microsoft.com\/cosmosdb\/wp-content\/uploads\/sites\/52\/2023\/11\/openai_studio_chat2-300x146.png 300w, https:\/\/devblogs.microsoft.com\/cosmosdb\/wp-content\/uploads\/sites\/52\/2023\/11\/openai_studio_chat2-768x374.png 768w, https:\/\/devblogs.microsoft.com\/cosmosdb\/wp-content\/uploads\/sites\/52\/2023\/11\/openai_studio_chat2-1536x748.png 1536w, https:\/\/devblogs.microsoft.com\/cosmosdb\/wp-content\/uploads\/sites\/52\/2023\/11\/openai_studio_chat2.png 1723w\" sizes=\"(max-width: 747px) 100vw, 747px\" \/><\/a><\/p>\n<p>&nbsp;<\/p>\n<h3>Next Steps<\/h3>\n<p><a href=\"https:\/\/learn.microsoft.com\/en-us\/azure\/cosmos-db\/vector-database\">Vector database<\/a> is a game-changer for developers looking to use AI capabilities in their applications. Azure Cosmos DB for MongoDB vCore offers a single, seamless solution for transactional raw data and vector data utilizing embeddings from the Azure OpenAI Service API or other solutions. You&#8217;re now equipped to create smarter, more efficient, and user-focused applications that stand out. Check out these resources to help you get started:<\/p>\n<ul>\n<li><a href=\"https:\/\/learn.microsoft.com\/azure\/cosmos-db\/mongodb\/vcore\/vector-search\" target=\"_blank\" rel=\"noopener\">Vector Database in Azure Cosmos DB MongoDB vCore documentation<\/a><\/li>\n<li>Clone or fork our samples <a href=\"https:\/\/github.com\/microsoft\/AzureDataRetrievalAugmentedGenerationSamples\/\">repository<\/a> and <a href=\"https:\/\/github.com\/Azure\/Vector-Search-AI-Assistant-MongoDBvCore\" target=\"_blank\" rel=\"noopener\">End-to-End RAG Pattern solution for MongoDB vCore with HNSW support<\/a><\/li>\n<li>Learn more about <a href=\"https:\/\/learn.microsoft.com\/azure\/cognitive-services\/openai\/concepts\/understand-embeddings\" target=\"_blank\" rel=\"noopener\">vector embeddings with Azure OpenAI Service<\/a><\/li>\n<\/ul>\n<h3>Get Started with Azure Cosmos DB for free<\/h3>\n<p><a href=\"https:\/\/azure.microsoft.com\/products\/cosmos-db\/\" target=\"_blank\" rel=\"noopener\"><span data-contrast=\"none\">Azure Cosmos DB<\/span><\/a><span data-contrast=\"none\"> is a fully managed NoSQL, relational, and vector database for modern app development with SLA-backed speed and availability, automatic and instant scalability, and support for open-source PostgreSQL, MongoDB, and Apache Cassandra. Learn more about <a href=\"https:\/\/aka.ms\/mongodbfreetier\" target=\"_blank\" rel=\"noopener\">Azure Cosmos DB for MongoDB vCore\u2019s free tier here<\/a>. To stay in the loop on Azure Cosmos DB updates, follow us on <\/span><a href=\"https:\/\/twitter.com\/AzureCosmosDB\" target=\"_blank\" rel=\"noopener\"><span data-contrast=\"none\">Twitter<\/span><\/a><span data-contrast=\"none\">, <\/span><a href=\"https:\/\/www.youtube.com\/AzureCosmosDB\" target=\"_blank\" rel=\"noopener\"><span data-contrast=\"none\">YouTube<\/span><\/a><span data-contrast=\"none\">, and <\/span><a href=\"https:\/\/www.linkedin.com\/company\/azure-cosmos-db\/\" target=\"_blank\" rel=\"noopener\"><span data-contrast=\"none\">LinkedIn<\/span><\/a><span data-contrast=\"none\">.<\/span><span data-ccp-props=\"{&quot;335559739&quot;:240}\">\u00a0<\/span><\/p>\n","protected":false},"excerpt":{"rendered":"<p>We\u2019re thrilled to share the exciting news that the integrated vector database is now officially available to all users of Azure Cosmos DB for MongoDB vCore. This groundbreaking feature paves the way for a multitude of fresh opportunities in the realm of secure and resilient AI-driven applications while making Azure Cosmos DB for MongoDB vCore [&hellip;]<\/p>\n","protected":false},"author":125132,"featured_media":7113,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[15,14],"tags":[499,1768,1870,1868],"class_list":["post-7109","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-mongodb-api","category-core-sql-api","tag-azure-cosmos-db","tag-azure-cosmos-db-api-for-mongodb","tag-vcore","tag-vector-search"],"acf":[],"blog_post_summary":"<p>We\u2019re thrilled to share the exciting news that the integrated vector database is now officially available to all users of Azure Cosmos DB for MongoDB vCore. This groundbreaking feature paves the way for a multitude of fresh opportunities in the realm of secure and resilient AI-driven applications while making Azure Cosmos DB for MongoDB vCore [&hellip;]<\/p>\n","_links":{"self":[{"href":"https:\/\/devblogs.microsoft.com\/cosmosdb\/wp-json\/wp\/v2\/posts\/7109","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/devblogs.microsoft.com\/cosmosdb\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/devblogs.microsoft.com\/cosmosdb\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/cosmosdb\/wp-json\/wp\/v2\/users\/125132"}],"replies":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/cosmosdb\/wp-json\/wp\/v2\/comments?post=7109"}],"version-history":[{"count":0,"href":"https:\/\/devblogs.microsoft.com\/cosmosdb\/wp-json\/wp\/v2\/posts\/7109\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/cosmosdb\/wp-json\/wp\/v2\/media\/7113"}],"wp:attachment":[{"href":"https:\/\/devblogs.microsoft.com\/cosmosdb\/wp-json\/wp\/v2\/media?parent=7109"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/cosmosdb\/wp-json\/wp\/v2\/categories?post=7109"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/cosmosdb\/wp-json\/wp\/v2\/tags?post=7109"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}