Legacy Semantic Kernel Memory Stores
Tip
We recommend using the Vector Store abstractions instead of the legacy Memory Stores. For more information on how to use the Vector Store abstractions start here.
Semantic Kernel provides a set of Memory Store abstractions where the primary interface is Microsoft.SemanticKernel.Memory.IMemoryStore
.
Memory Store vs Vector Store abstractions
As part of an effort to evolve and expand the vector storage and search capbilities of Semantic Kernel, we have released a new set of abstractions to replace the Memory Store abstractions. We are calling the replacement abstractions Vector Store abstractions. The purpose of both are similar, but their interfaces differ and the Vector Store abstractions provide expanded functionality.
Characteristic | Legacy Memory Stores | Vector Stores |
---|---|---|
Main Interface | IMemoryStore | IVectorStore |
Abstractions nuget package | Microsoft.SemanticKernel.Abstractions | Microsoft.Extensions.VectorData.Abstractions |
Naming Convention | {Provider}MemoryStore, e.g. RedisMemoryStore | {Provider}VectorStore, e.g. RedisVectorStore |
Supports record upsert, get and delete | Yes | Yes |
Supports collection create and delete | Yes | Yes |
Supports vector search | Yes | Yes |
Supports choosing your preferred vector search index and distance function | No | Yes |
Supports multiple vectors per record | No | Yes |
Supports custom schemas | No | Yes |
Supports metadata pre-filtering for vector search | No | Yes |
Supports vector search on non-vector databases by downloading the entire dataset onto the client and doing a local vector search | Yes | No |
Available Memory Store connectors
Semantic Kernel offers several Memory Store connectors to vector databases that you can use to store and retrieve information. These include:
Service | C# | Python |
---|---|---|
Vector Database in Azure Cosmos DB for NoSQL | C# | Python |
Vector Database in vCore-based Azure Cosmos DB for MongoDB | C# | Python |
Azure AI Search | C# | Python |
Azure PostgreSQL Server | C# | |
Azure SQL Database | C# | |
Chroma | C# | Python |
DuckDB | C# | |
Milvus | C# | Python |
MongoDB Atlas Vector Search | C# | Python |
Pinecone | C# | Python |
Postgres | C# | Python |
Qdrant | C# | |
Redis | C# | |
Sqlite | C# | |
Weaviate | C# | Python |