Package org.springframework.ai.vectorstore


@NonNullApi @NonNullFields package org.springframework.ai.vectorstore
Provides interfaces and implementations for working with vector databases in Spring AI.

Vector databases store embeddings (numerical vector representations) of data along with the original content and metadata, enabling similarity search operations. This package contains two primary interfaces:

  • VectorStoreRetriever - A read-only functional interface that provides similarity search capabilities for retrieving documents from a vector store. This interface follows the principle of least privilege by exposing only retrieval operations.
  • VectorStore - Extends VectorStoreRetriever and adds mutation operations (add, delete) for managing documents in a vector store. This interface provides complete access to vector database functionality.

The package also includes supporting classes such as:

  • SearchRequest - Configures similarity search parameters including query text, result limits, similarity thresholds, and metadata filters.
  • Filter - Provides filtering capabilities for metadata-based document selection (located in the filter subpackage).

This package is designed to support Retrieval Augmented Generation (RAG) applications by providing a clean separation between read and write operations, allowing components to access only the functionality they need.

Since:
1.0.0
Author:
Mark Pollack
See Also: