Part VI Storing and Searching Vectors in Coherence
With the increased popularity of Gen AI, and Retrieval Augmented Generation (RAG) use cases in particular, the need for a way to store and search a large number of dense vector embeddings efficiently is larger than ever.
Vector DB
Coherence already provides a number of features that make this possible, such as efficient serialization format, filters, and aggregators, which allow you to search across large data sets in parallel by using all the CPU cores in a cluster, and gRPC proxy, which allows remote clients written in any supported language, including Python, to access data in a Coherence cluster efficiently.
- Built-in support for Vector Types:
float32,int8, andbitdense vectors of arbitrary dimension. - Built-in support for Semantic Search,
including:
- HNSW indexing
- Binary Quantization
- Index-Optimized Exact Searches
- Metadata Filtering
- Built-in support for Document Chunks, addressing a common RAG use case.
- Integration with LangChain and LangChain4j.
- Integration with Spring AI.
Part VI contains the following chapters and provides more details about each of these features:
- Vector Types
To support arbitrary vector types, Coherence provides thecom.oracle.coherence.ai.Vector<T>interface, with three built-in implementations: - Performing Similarity Search
To perform a similarity search against vectors stored in Coherence, you can use theSimilaritySearchaggregator. The easiest way to construct one is by using theAggregators.similaritySearchfactory method. - Retrieval Augmented Generation (RAG) Support
Coherence provides theDocumentChunkclass, which you can use to represent document chunks containing text, embedding, and metadata, as typically represented in various RAG frameworks. - Integrations
The following sections describe integrations with popular AI frameworks that Coherence supports.