We’re excited to announce several new features and advancements for search and retrieval functionalities in Azure Cosmos DB for NoSQL including:
- General Availability (GA) of Vector Search in Azure Cosmos DB for NoSQL
- General Availability (GA) of the Microsoft DiskANN vector index
- Public Preview of Full Text Search and Ranking (using BM25)
- Public Preview of Hybrid Search (using RRF)
These features open the door to building new search and AI scenarios on Azure Cosmos DB, particularly benefiting Retrieval-Augmented Generation (RAG) and multi-agent AI applications by enhancing the relevance and accuracy of generated content. Together, they empower developers to build sophisticated AI applications that provide users with more relevant and timely information.
General Availability of Vector Search and DiskANN Vector Index
Vector Search enables you to perform advanced similarity searches using vector embeddings, making it easier to find relevant results based on the context and meaning of your data, rather than just keywords alone. To enable efficient vector search at any scale, we have multiple vector index types including Quantized Flat for smaller scenarios, and Microsoft DiskANN vector index for scalability. Microsoft DiskANN is a suite of state-of-the-art algorithms designed to provide cost-effective, low-latency vector search at any scale. It leverages disk-based storage to handle large datasets efficiently, ensuring that you can perform high-speed searches without compromising on performance or incurring excessive costs. This makes it an ideal solution for applications that require real-time, scalable search capabilities, such as recommendation systems, image and video retrieval, and natural language processing tasks. Learn more about Microsoft DiskANN in Azure Cosmos DB.
Vector Search being Generally Available means it has undergone testing and refinement, ensuring robustness and reliability to power AI applications in production environments. With general availability comes new capabilities including:
- Performance improvements: Continuing our mission to deliver to most cost-efficient vector indexing and search experience, we’re implementing new optimizations to reduce search latency and improve accuracy.
- Compatibility with other Azure Cosmos DB for NoSQL features: Customer managed keys, Point-in-time-restore, Continuous Backup, and Fabric Mirroring.
- Configurable vector index parameters:
- quantizationByteSize: Configures the number of bytes used by a quantized vector. Setting this larger may result in higher accuracy vector searches at expense of higher RU cost and higher latency. This applies to both Quantized Flat and DiskANN vector index types.
- indexingSearchListSize: Determines the number of nearest neighbor points in the search list during index construction. Setting this larger may result in higher accuracy vector searches at the expense of longer index build times and higher vector ingest latencies. Note that this only applies to the DiskANN vector index type.
- Configurable vector search parameter:
- searchListSizeMultiplier: Configurable size of the candidate search list when conducting a vector search. Increasing this may improve accuracy at the expense of RU cost and latency.
Public Preview of Full Text Search and Full Text Ranking (BM25)
We’re also introducing Full Text Search in public preview, which allows you to perform comprehensive text searches across your data. This feature is designed to handle complex queries, including those with keyword matching, stemming, and ranking, ensuring that you can retrieve the most relevant information quickly and accurately. Whether you’re building search experiences into your application or seeking more relevant search results to ground the SLM and LLMs that power your AI applications, Full Text Search in Azure Cosmos DB brings a new level of search flexibility to your Azure Cosmos DB workloads.
Note: Full Text Search and Hybrid Search preview is currently only available in limited regions until complete rollout in early January 2025.
This introduces several new concepts in Azure Cosmos DB for NoSQL:
- A Collection-Level Full Text Policy: This informs the query engine which path contains text, and the primary language of that text. (Note, during early preview English (“en-us”) is the only supported language).
- A Full Text Index: This creates the terms and runs the text analyzer to enable efficient Full Text Search.
- New System Functions:
- FullTextContains: Useful to find documents that contain keywords and terms.
- FullTextContainsAll: Useful to find documents that contain ALL specified keywords and terms.
- FullTextContansAny: Useful to find documents that contain ANY of the specified keywords and terms.
- FullTextScore: Calculates the BM25 score, the relevance of the document according to the frequency of the keywords and other document factors.
- ORDER BY RANK: This can be used with the new FullTextScore function to sort query results in order from most relevant (highest BM25 score) to least relevant (lowest BM25 score)
Public Preview of Hybrid Search
The preview of Hybrid Search preview combines the best of both worlds, allowing you to leverage the strengths of both Vector and Full-Text Search. This hybrid approach enables you to create more nuanced and powerful search experiences by integrating semantic understanding with keyword-based search.
Hybrid Search queries are conducted using the new RRF (reciprocal rank fusion) system function to combine multiple scoring functions like VectorDistance and the new FullTextScore function. This tends to lead to improvements in the relevance of search results than either vector search or full text scoring alone.
How to enable Vector Search on an account
- Navigate to your Azure Cosmos DB for NoSQL resource page.
- Select the “Features” pane under the “Settings” menu item.
- Select the “Vector Search in Azure Cosmos DB for NoSQL” feature.
- Read the description of the feature to confirm you want to enable it.
- Select “Enable” to turn on the vector indexing and search capability.
How to Enable Full Text Search on your account
- Navigate to your Azure Cosmos DB for NoSQL resource page.
- Select the “Features” pane under the “Settings” menu item.
- Select the “Full-Text & Hybrid Search for NoSQL API (preview)” feature.
- Read the description of the feature to confirm you want to enable it.
- Select “Enable” to turn on the vector indexing and search capability.
Other Links
- Learn more about Vector Database capabilities in Azure Cosmos DB for NoSQL.
- Enable the Full Text & Hybrid Search Public Preview feature.
- Read about DiskANN usage and performance.
- Check out the Azure Cosmos DB AI Samples GitHub repository to get started quickly and easily!
About Azure Cosmos DB
Azure Cosmos DB is a fully managed and serverless NoSQL and vector database for modern app development, including AI applications. With its SLA-backed speed and availability as well as instant dynamic scalability, it is ideal for real-time NoSQL and MongoDB applications that require high performance and distributed computing over massive volumes of NoSQL and vector data.
Try Azure Cosmos DB for free here. To stay in the loop on Azure Cosmos DB updates, follow us on X, YouTube, and LinkedIn.
0 comments
Be the first to start the discussion.