Table of Contents

Interface IVectorStore

Namespace
LMKit.Data.Storage
Assembly
LM-Kit.NET.dll

Defines an interface for a vector storage system that supports asynchronous database operations for embedding services. Implementations should ensure thread safety and that all vectors stored in a given collection share the same fixed dimension.

public interface IVectorStore

Methods

CollectionExistsAsync(string, CancellationToken)

Asynchronously checks if a collection with the specified identifier exists in the storage system.

CreateCollectionAsync(string, uint, CancellationToken)

Asynchronously creates a new collection for storing vectors of a fixed size.

DeleteCollectionAsync(string, CancellationToken)

Asynchronously deletes the specified collection from the storage system.

DeleteFromMetadataAsync(string, MetadataCollection, CancellationToken)

Asynchronously deletes all vector entries from the specified collection that match the provided metadata filter.

GetMetadataAsync(string, string, CancellationToken)

Asynchronously retrieves the metadata associated with a specific vector entry in a collection.

RetrieveFromMetadataAsync(string, MetadataCollection, bool, bool, CancellationToken)

Asynchronously retrieves vector entries from the specified collection that match the given metadata criteria.

SearchSimilarVectorsAsync(string, float[], uint, bool, bool, CancellationToken)

Asynchronously searches for vectors within the specified collection that are similar to a given query vector.

UpdateMetadataAsync(string, string, MetadataCollection, bool, CancellationToken)

Asynchronously updates the metadata associated with an existing vector entry in the specified collection.

UpsertAsync(string, string, float[], MetadataCollection, CancellationToken)

Asynchronously inserts a new vector entry or updates an existing one in the specified collection, along with its associated metadata.