diff --git a/agent-framework/integrations/index.md b/agent-framework/integrations/index.md
index ea5d9556..ef786519 100644
--- a/agent-framework/integrations/index.md
+++ b/agent-framework/integrations/index.md
@@ -81,23 +81,22 @@ These abstractions let you write simple, high-level code against a single API, a
| Implementation | C# | Uses officially supported SDK | Maintainer / Vendor |
| ---------------------------------------------------------------------------------------------------------------------------- | :------------------------: | :---------------------------: | :-----------------: |
-| [Azure AI Search](/semantic-kernel/concepts/vector-store-connectors/out-of-the-box-connectors/azure-ai-search-connector) | ✅ | ✅ | Microsoft |
-| [Cosmos DB MongoDB (vCore)](/semantic-kernel/concepts/vector-store-connectors/out-of-the-box-connectors/azure-cosmosdb-mongodb-connector) | ✅ | ✅ | Microsoft |
-| [Cosmos DB No SQL](/semantic-kernel/concepts/vector-store-connectors/out-of-the-box-connectors/azure-cosmosdb-nosql-connector) | ✅ | ✅ | Microsoft |
+| [Azure AI Search](/semantic-kernel/concepts/vector-store-connectors/out-of-the-box-connectors/azure-ai-search-connector) | ✅ | ✅ | .NET Community Toolkit |
+| [Azure DocumentDB](/semantic-kernel/concepts/vector-store-connectors/out-of-the-box-connectors/azure-cosmosdb-mongodb-connector) | ✅ | ✅ | .NET Community Toolkit |
+| [Azure CosmosDB](/semantic-kernel/concepts/vector-store-connectors/out-of-the-box-connectors/azure-cosmosdb-nosql-connector) | ✅ | ✅ | .NET Community Toolkit |
+| [Chroma](/semantic-kernel/concepts/vector-store-connectors/out-of-the-box-connectors/chroma-connector) | ✅ | ❌ | .NET Community Toolkit |
| [Couchbase](/semantic-kernel/concepts/vector-store-connectors/out-of-the-box-connectors/couchbase-connector) | ✅ | ✅ | Couchbase |
| [Elasticsearch](/semantic-kernel/concepts/vector-store-connectors/out-of-the-box-connectors/elasticsearch-connector) | ✅ | ✅ | Elastic |
-| [In-Memory](/semantic-kernel/concepts/vector-store-connectors/out-of-the-box-connectors/inmemory-connector) | ✅ | N/A | Microsoft |
+| [In-Memory](/semantic-kernel/concepts/vector-store-connectors/out-of-the-box-connectors/inmemory-connector) | ✅ | N/A | .NET Community Toolkit |
| [MongoDB](/semantic-kernel/concepts/vector-store-connectors/out-of-the-box-connectors/mongodb-connector) | ✅ | ✅ | Microsoft |
-| [Neon Serverless Postgres](https://neon.com) | Use [Postgres Connector](/semantic-kernel/concepts/vector-store-connectors/out-of-the-box-connectors/postgres-connector) | ✅ | Microsoft |
| [Oracle](/semantic-kernel/concepts/vector-store-connectors/out-of-the-box-connectors/oracle-connector) | ✅ | ✅ | Oracle |
-| [Pinecone](/semantic-kernel/concepts/vector-store-connectors/out-of-the-box-connectors/pinecone-connector) | ✅ | ❌ | Microsoft |
-| [Postgres](/semantic-kernel/concepts/vector-store-connectors/out-of-the-box-connectors/postgres-connector) | ✅ | ✅ | Microsoft |
-| [Qdrant](/semantic-kernel/concepts/vector-store-connectors/out-of-the-box-connectors/qdrant-connector) | ✅ | ✅ | Microsoft |
-| [Redis](/semantic-kernel/concepts/vector-store-connectors/out-of-the-box-connectors/redis-connector) | ✅ | ✅ | Microsoft |
-| [SQL Server](/semantic-kernel/concepts/vector-store-connectors/out-of-the-box-connectors/sql-connector) | ✅ | ✅ | Microsoft |
-| [SQLite](/semantic-kernel/concepts/vector-store-connectors/out-of-the-box-connectors/sqlite-connector) | ✅ | ✅ | Microsoft |
+| [Postgres](/semantic-kernel/concepts/vector-store-connectors/out-of-the-box-connectors/postgres-connector) | ✅ | ✅ | .NET Community Toolkit |
+| [Qdrant](/semantic-kernel/concepts/vector-store-connectors/out-of-the-box-connectors/qdrant-connector) | ✅ | ✅ | .NET Community Toolkit |
+| [Redis](/semantic-kernel/concepts/vector-store-connectors/out-of-the-box-connectors/redis-connector) | ✅ | ✅ | .NET Community Toolkit |
+| [SQL Server](/semantic-kernel/concepts/vector-store-connectors/out-of-the-box-connectors/sql-connector) | ✅ | ✅ | .NET Community Toolkit |
+| [SQLite](/semantic-kernel/concepts/vector-store-connectors/out-of-the-box-connectors/sqlite-connector) | ✅ | ✅ | .NET Community Toolkit |
| [Volatile (In-Memory)](/semantic-kernel/concepts/vector-store-connectors/out-of-the-box-connectors/volatile-connector) | Deprecated (use In-Memory) | N/A | Microsoft |
-| [Weaviate](/semantic-kernel/concepts/vector-store-connectors/out-of-the-box-connectors/weaviate-connector) | ✅ | ✅ | Microsoft |
+| [Weaviate](/semantic-kernel/concepts/vector-store-connectors/out-of-the-box-connectors/weaviate-connector) | ✅ | ✅ | .NET Community Toolkit |
> [!IMPORTANT]
> The vector store abstraction implementations are built by a variety of sources. Not all connectors are maintained by Microsoft. When considering an implementation, be sure to evaluate quality, licensing, support, etc. to ensure they meet your requirements. Also make sure you review each provider's documentation for detailed version compatibility information.
diff --git a/semantic-kernel/concepts/vector-store-connectors/code-samples.md b/semantic-kernel/concepts/vector-store-connectors/code-samples.md
index 85f35aa5..5a8a56c7 100644
--- a/semantic-kernel/concepts/vector-store-connectors/code-samples.md
+++ b/semantic-kernel/concepts/vector-store-connectors/code-samples.md
@@ -97,7 +97,6 @@ In the following sample, we show how to use these approaches to construct Langch
For each vector store, there is a factory class that shows how to construct the Langchain compatible Vector Store. See e.g.
-- [PineconeFactory](https://github.com/microsoft/semantic-kernel/blob/main/dotnet/samples/Concepts/Memory/VectorStoreLangchainInterop/PineconeFactory.cs)
- [RedisFactory](https://github.com/microsoft/semantic-kernel/blob/main/dotnet/samples/Concepts/Memory/VectorStoreLangchainInterop/RedisFactory.cs)
::: zone-end
diff --git a/semantic-kernel/concepts/vector-store-connectors/out-of-the-box-connectors/TOC.yml b/semantic-kernel/concepts/vector-store-connectors/out-of-the-box-connectors/TOC.yml
index 4b6bde0f..2ab6646d 100644
--- a/semantic-kernel/concepts/vector-store-connectors/out-of-the-box-connectors/TOC.yml
+++ b/semantic-kernel/concepts/vector-store-connectors/out-of-the-box-connectors/TOC.yml
@@ -2,9 +2,9 @@
href: index.md
- name: Azure AI Search connector
href: azure-ai-search-connector.md
-- name: Azure CosmosDB MongoDB (vCore) connector
+- name: Azure DocumentDB connector
href: azure-cosmosdb-mongodb-connector.md
-- name: Azure CosmosDB NoSQL connector
+- name: Azure CosmosDB connector
href: azure-cosmosdb-nosql-connector.md
- name: Chroma connector
href: chroma-connector.md
diff --git a/semantic-kernel/concepts/vector-store-connectors/out-of-the-box-connectors/azure-ai-search-connector.md b/semantic-kernel/concepts/vector-store-connectors/out-of-the-box-connectors/azure-ai-search-connector.md
index 0c7da20e..e7c5900f 100644
--- a/semantic-kernel/concepts/vector-store-connectors/out-of-the-box-connectors/azure-ai-search-connector.md
+++ b/semantic-kernel/concepts/vector-store-connectors/out-of-the-box-connectors/azure-ai-search-connector.md
@@ -10,12 +10,6 @@ ms.service: semantic-kernel
---
# Using the Azure AI Search Vector Store connector (Preview)
-::: zone pivot="programming-language-csharp"
-
-> [!WARNING]
-> The Azure AI Search Vector Store functionality is in preview, and improvements that require breaking changes may still occur in limited circumstances before release.
-
-::: zone-end
::: zone pivot="programming-language-python"
> [!WARNING]
@@ -38,17 +32,17 @@ The Azure AI Search Vector Store connector can be used to access and manage data
| Feature Area | Support |
| ------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Collection maps to | Azure AI Search Index |
-| Supported key property types | string |
-| Supported data property types |
- string
- int
- long
- double
- float
- bool
- DateTimeOffset
- *and enumerables of each of these types*
|
+| Supported key property types | |
+| Supported data property types | - string
- int
- long
- double
- float
- bool
- DateTime
- DateTimeOffset
- DateOnly (.NET only)
- *and arrays or `List` of each of these types*
|
| Supported vector property types | - ReadOnlyMemory\
- Embedding\
- float[]
|
-| Supported index types | |
+| Supported index types | |
| Supported distance functions | - CosineSimilarity
- DotProductSimilarity
- EuclideanDistance
|
-| Supported filter clauses | |
+| Supported filter clauses | LINQ expressions: `==`, `!=`, `<`, `<=`, `>`, `>=`, `&&`, `\|\|`, `!`, `Contains` and `Any` with `Contains` over arrays and lists |
| Supports multiple vectors in a record | Yes |
| IsIndexed supported? | Yes |
-| IsFullTextIndexed supported? | Yes |
+| IsFullTextIndexed supported? | Yes (string properties only) |
| StorageName supported? | No, use `JsonSerializerOptions` and `JsonPropertyNameAttribute` instead. [See here for more info.](#data-mapping) |
-| HybridSearch supported? | Yes |
+| HybridSearch supported? | Yes, requires a string data property with `IsFullTextIndexed = true` |
::: zone-end
::: zone pivot="programming-language-python"
@@ -126,6 +120,8 @@ var builder = WebApplication.CreateBuilder(args);
builder.Services.AddAzureAISearchVectorStore(new Uri(azureAISearchUri), new AzureKeyCredential(secret));
```
+Overloads that accept a `TokenCredential` (Entra ID authentication), `AzureAISearchVectorStoreOptions`, a `ServiceLifetime` and keyed registrations (`AddKeyedAzureAISearchVectorStore`) are also provided, as well as `AddAzureAISearchCollection` for registering a collection directly. If an `IEmbeddingGenerator` is registered in the container, the vector store and collections use it automatically. When an embedding generator is used, `IncludeVectors` is not supported. If no generator is configured, passing a `string` to `SearchAsync` or `HybridSearchAsync` sends a text query that Azure AI Search vectorizes on the service side.
+
Extension methods that take no parameters are also provided. These require an instance of the Azure AI Search `SearchIndexClient` to be separately registered with the dependency injection container.
```csharp
@@ -286,7 +282,7 @@ var collection = new AzureAISearchVectorStoreRecordCollection<>(searchClient, "s
## Data mapping
-The default mapper used by the Azure AI Search connector when mapping data from the data model to storage is the one provided by the Azure AI Search SDK.
+The default mapper used by the Azure AI Search connector when mapping data from the data model to storage is a `System.Text.Json`-based mapper provided by the connector.
This mapper does a direct conversion of the list of properties on the data model to the fields in Azure AI Search and uses `System.Text.Json.JsonSerializer`
to convert to the storage schema. This means that usage of the `JsonPropertyNameAttribute` is supported if a different storage name to the
diff --git a/semantic-kernel/concepts/vector-store-connectors/out-of-the-box-connectors/azure-cosmosdb-mongodb-connector.md b/semantic-kernel/concepts/vector-store-connectors/out-of-the-box-connectors/azure-cosmosdb-mongodb-connector.md
index 3b2f30d2..47fa345f 100644
--- a/semantic-kernel/concepts/vector-store-connectors/out-of-the-box-connectors/azure-cosmosdb-mongodb-connector.md
+++ b/semantic-kernel/concepts/vector-store-connectors/out-of-the-box-connectors/azure-cosmosdb-mongodb-connector.md
@@ -10,12 +10,6 @@ ms.service: semantic-kernel
---
# Using the Azure DocumentDB (with MongoDB compatibility) Vector Store connector (Preview)
-::: zone pivot="programming-language-csharp"
-
-> [!WARNING]
-> The Azure DocumentDB Vector Store functionality is in preview, and improvements that require breaking changes may still occur in limited circumstances before release.
-
-::: zone-end
::: zone pivot="programming-language-python"
> [!WARNING]
@@ -31,19 +25,19 @@ ms.service: semantic-kernel
## Overview
-The Azure CosmosDB MongoDB Vector Store connector can be used to access and manage data in Azure DocumentDB. The connector has the following characteristics.
+The Azure DocumentDB Vector Store connector can be used to access and manage data in Azure DocumentDB. The connector has the following characteristics.
::: zone pivot="programming-language-csharp"
| Feature Area | Support |
| ------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Collection maps to | Azure DocumentDB Collection + Index |
-| Supported key property types | string |
-| Supported data property types | - string
- int
- long
- double
- float
- decimal
- bool
- DateTime
- *and enumerables of each of these types*
|
+| Supported key property types | - string
- int
- long
- Guid
- ObjectId
|
+| Supported data property types | - string
- int
- long
- double
- float
- decimal
- bool
- DateTime
- DateTimeOffset
- DateOnly (.NET only)
- *and arrays or `List` of each of these types*
|
| Supported vector property types | - ReadOnlyMemory\
- Embedding\
- float[]
|
-| Supported index types | |
-| Supported distance functions | - CosineDistance
- DotProductSimilarity
- EuclideanDistance
|
-| Supported filter clauses | |
+| Supported index types | |
+| Supported distance functions | - CosineDistance (default)
- DotProductSimilarity
- EuclideanDistance
|
+| Supported filter clauses | LINQ expressions: `==`, `!=`, `<`, `<=`, `>`, `>=`, `&&`, `\|\|`, `!` (on `==`, `!=` and `Contains`), and `Contains` over an inline or captured collection |
| Supports multiple vectors in a record | Yes |
| IsIndexed supported? | Yes |
| IsFullTextIndexed supported? | No |
@@ -79,7 +73,7 @@ This connector is compatible with Azure DocumentDB and is *not* designed to be c
## Getting started
-Add the Azure CosmosDB MongoDB Vector Store connector NuGet package to your project.
+Add the Azure DocumentDB Vector Store connector NuGet package to your project.
```dotnetcli
dotnet add package CommunityToolkit.VectorData.AzureDocumentDB
@@ -103,10 +97,12 @@ using Microsoft.Extensions.DependencyInjection;
// Using IServiceCollection with ASP.NET Core.
var builder = WebApplication.CreateBuilder(args);
-builder.Services.AddCosmosMongoVectorStore(connectionString, databaseName);
+builder.Services.AddDocumentDBVectorStore(connectionString, databaseName);
```
-Extension methods that take no parameters are also provided. These require an instance of `MongoDB.Driver.IMongoDatabase` to be separately registered with the dependency injection container.
+Overloads that accept `DocumentDBVectorStoreOptions`, a `ServiceLifetime` and keyed registrations (`AddKeyedDocumentDBVectorStore`) are also provided, as well as `AddDocumentDBCollection` for registering a collection directly. If an `IEmbeddingGenerator` is registered in the container, the vector store and collections use it automatically. `DocumentDBCollectionOptions` lets you tune the index with `NumLists`, `EfConstruction` and `EfSearch`.
+
+Extension methods that don't take a connection string are also provided. These require an instance of `MongoDB.Driver.IMongoDatabase` to be separately registered with the dependency injection container.
```csharp
using Microsoft.Extensions.DependencyInjection;
@@ -121,7 +117,7 @@ kernelBuilder.Services.AddSingleton(
var mongoClient = new MongoClient(connectionString);
return mongoClient.GetDatabase(databaseName);
});
-kernelBuilder.Services.AddCosmosMongoVectorStore();
+kernelBuilder.Services.AddDocumentDBVectorStore();
```
```csharp
@@ -136,40 +132,40 @@ builder.Services.AddSingleton(
var mongoClient = new MongoClient(connectionString);
return mongoClient.GetDatabase(databaseName);
});
-builder.Services.AddCosmosMongoVectorStore();
+builder.Services.AddDocumentDBVectorStore();
```
-You can construct an Azure CosmosDB MongoDB Vector Store instance directly.
+You can construct an Azure DocumentDB Vector Store instance directly.
```csharp
-using CommunityToolkit.VectorData.CosmosMongoDB;
+using CommunityToolkit.VectorData.AzureDocumentDB;
using MongoDB.Driver;
var mongoClient = new MongoClient(connectionString);
var database = mongoClient.GetDatabase(databaseName);
-var vectorStore = new CosmosMongoVectorStore(database);
+var vectorStore = new DocumentDBVectorStore(database);
```
It is possible to construct a direct reference to a named collection.
```csharp
-using CommunityToolkit.VectorData.CosmosMongoDB;
+using CommunityToolkit.VectorData.AzureDocumentDB;
using MongoDB.Driver;
var mongoClient = new MongoClient(connectionString);
var database = mongoClient.GetDatabase(databaseName);
-var collection = new CosmosMongoCollection(
+var collection = new DocumentDBCollection(
database,
"skhotels");
```
## Data mapping
-The Azure CosmosDB MongoDB Vector Store connector provides a default mapper when mapping data from the data model to storage.
+The Azure DocumentDB Vector Store connector provides a default mapper when mapping data from the data model to storage.
-This mapper does a direct conversion of the list of properties on the data model to the fields in Azure CosmosDB MongoDB and uses `MongoDB.Bson.Serialization`
+This mapper does a direct conversion of the list of properties on the data model to the fields in Azure DocumentDB and uses `MongoDB.Bson.Serialization`
to convert to the storage schema. This means that usage of the `MongoDB.Bson.Serialization.Attributes.BsonElement` is supported if a different storage name to the
-data model property name is required. The only exception is the key of the record which is mapped to a database field named `_id`, since all CosmosDB MongoDB
+data model property name is required. The only exception is the key of the record which is mapped to a database field named `_id`, since all Azure DocumentDB
records must use this name for ids.
### Property name override
@@ -183,18 +179,19 @@ Here is an example of a data model with `BsonElement` set.
```csharp
using Microsoft.Extensions.VectorData;
+using MongoDB.Bson.Serialization.Attributes;
public class Hotel
{
[VectorStoreKey]
- public ulong HotelId { get; set; }
+ public string HotelId { get; set; }
[BsonElement("hotel_name")]
[VectorStoreData(IsIndexed = true)]
public string HotelName { get; set; }
[BsonElement("hotel_description")]
- [VectorStoreData(IsFullTextIndexed = true)]
+ [VectorStoreData]
public string Description { get; set; }
[BsonElement("hotel_description_embedding")]
@@ -208,7 +205,7 @@ public class Hotel
## Getting started
-Add the Azure CosmosDB MongoDB Vector Store dependencies to your environment. Because the Azure CosmosDB MongoDB connector is built on the MongoDB Atlas connector and uses the same client as that one, you need to install with these extras:
+Add the Azure DocumentDB Vector Store dependencies to your environment. Because the Azure DocumentDB connector is built on the MongoDB Atlas connector and uses the same client as that one, you need to install with these extras:
```bash
pip install semantic-kernel[azure, mongo]
@@ -249,7 +246,7 @@ collection = CosmosMongoCollection(
## Serialization
-Since the Azure CosmosDB for MongoDB connector needs a simple dict with the fields corresponding to the index as the input, the serialization is quite easy, it only uses a predetermined key `_id`, so we replace the key of the data model with that if it is not already `_id`.
+Since the Azure DocumentDB connector needs a simple dict with the fields corresponding to the index as the input, the serialization is quite easy, it only uses a predetermined key `_id`, so we replace the key of the data model with that if it is not already `_id`.
For more details on this concept see the [serialization documentation](./../serialization.md).
diff --git a/semantic-kernel/concepts/vector-store-connectors/out-of-the-box-connectors/azure-cosmosdb-nosql-connector.md b/semantic-kernel/concepts/vector-store-connectors/out-of-the-box-connectors/azure-cosmosdb-nosql-connector.md
index 8cf44c8f..b44e9d0c 100644
--- a/semantic-kernel/concepts/vector-store-connectors/out-of-the-box-connectors/azure-cosmosdb-nosql-connector.md
+++ b/semantic-kernel/concepts/vector-store-connectors/out-of-the-box-connectors/azure-cosmosdb-nosql-connector.md
@@ -1,6 +1,6 @@
---
-title: Using the Semantic Kernel Azure CosmosDB NoSQL Vector Store connector (Preview)
-description: Contains information on how to use a Semantic Kernel Vector store connector to access and manipulate data in Azure CosmosDB NoSQL.
+title: Using the Semantic Kernel Azure CosmosDB Vector Store connector (Preview)
+description: Contains information on how to use a Semantic Kernel Vector store connector to access and manipulate data in Azure CosmosDB.
zone_pivot_groups: programming-languages
author: westey-m
ms.topic: article
@@ -8,7 +8,7 @@ ms.author: westey
ms.date: 09/23/2024
ms.service: semantic-kernel
---
-# Using the Azure CosmosDB NoSQL Vector Store connector (Preview)
+# Using the Azure CosmosDB Vector Store connector (Preview)
::: zone pivot="programming-language-python"
@@ -27,17 +27,17 @@ ms.service: semantic-kernel
## Overview
-The Azure CosmosDB NoSQL Vector Store connector can be used to access and manage data in Azure CosmosDB NoSQL. The connector has the following characteristics.
+The Azure CosmosDB Vector Store connector can be used to access and manage data in Azure CosmosDB. The connector has the following characteristics.
| Feature Area | Support |
| ------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
-| Collection maps to | Azure Cosmos DB NoSQL Container |
-| Supported key property types | |
-| Supported data property types | - string
- int
- long
- double
- float
- bool
- DateTimeOffset
- *and enumerables of each of these types*
|
+| Collection maps to | Azure Cosmos DB Container |
+| Supported key property types | |
+| Supported data property types | - string
- int
- long
- double
- float
- bool
- DateTime
- DateTimeOffset
- DateOnly (.NET only)
- *and arrays or `List` of each of these types*
|
| Supported vector property types | - ReadOnlyMemory\
- Embedding\
- float[]
- ReadOnlyMemory\
- Embedding\
- byte[]
- ReadOnlyMemory\
- Embedding\
- sbyte[]
|
-| Supported index types | |
+| Supported index types | - Flat
- QuantizedFlat
- DiskAnn (default)
|
| Supported distance functions | - CosineSimilarity
- DotProductSimilarity
- EuclideanDistance
|
-| Supported filter clauses | |
+| Supported filter clauses | LINQ expressions: `==`, `!=`, `<`, `<=`, `>`, `>=`, `&&`, `\|\|`, `Contains` and `Any` with `Contains` over arrays and lists |
| Supports multiple vectors in a record | Yes |
| IsIndexed supported? | Yes |
| IsFullTextIndexed supported? | Yes |
@@ -46,7 +46,7 @@ The Azure CosmosDB NoSQL Vector Store connector can be used to access and manage
## Limitations
-When initializing `CosmosClient` manually, it is necessary to specify `CosmosClientOptions.UseSystemTextJsonSerializerWithOptions` due to limitations in the default serializer. This option can be set to `JsonSerializerOptions.Default` or customized with other serializer options to meet specific configuration needs.
+When initializing `CosmosClient` manually, it is necessary to specify `CosmosClientOptions.UseSystemTextJsonSerializerWithOptions` due to limitations in the default serializer. This option can be set to `JsonSerializerOptions.Default` or customized with other serializer options to meet specific configuration needs. The connection string based constructors and `AddCosmosVectorStore(connectionString, databaseName)` configure this option automatically.
```csharp
var cosmosClient = new CosmosClient(connectionString, new CosmosClientOptions()
@@ -131,7 +131,7 @@ builder.Services.AddSingleton(
builder.Services.AddCosmosVectorStore();
```
-You can construct an Azure CosmosDB NoSQL Vector Store instance directly.
+You can construct an Azure CosmosDB Vector Store instance directly.
```csharp
using System.Text.Json;
@@ -175,7 +175,7 @@ The Azure CosmosDB Vector Store connector provides a default mapper when mapping
This mapper does a direct conversion of the list of properties on the data model to the fields in Azure CosmosDB and uses `System.Text.Json.JsonSerializer`
to convert to the storage schema. This means that usage of the `JsonPropertyNameAttribute` is supported if a different storage name to the
-data model property name is required. The only exception is the key of the record which is mapped to a database field named `id`, since all CosmosDB NoSQL
+data model property name is required. The only exception is the key of the record which is mapped to a database field named `id`, since all CosmosDB
records must use this name for ids.
It is also possible to use a custom `JsonSerializerOptions` instance with a customized property naming policy. To enable this, the `JsonSerializerOptions`
@@ -230,28 +230,27 @@ public class Hotel
"id": "1",
"HOTEL_NAME": "Hotel Happy",
"DESCRIPTION": "A place where everyone can be happy.",
- "HOTEL_DESCRIPTION_EMBEDDING": [0.9, 0.1, 0.1, 0.1],
+ "HOTEL_DESCRIPTION_EMBEDDING": [0.9, 0.1, 0.1, 0.1]
}
```
## Using partition key
-In the Azure Cosmos DB connector, the partition key property defaults to the key property - `id`. The `PartitionKeyPropertyName` property in `CosmosCollectionOptions` class allows specifying a different property as the partition key.
+In the Azure Cosmos DB connector, the partition key property defaults to the key property - `id`. The `PartitionKeyProperties` property in `CosmosCollectionOptions` class allows specifying a different property (or up to three properties, for hierarchical partition keys) as the partition key. Partition key properties must be of type `string`, `bool`, `double` or `Guid`.
-The `CosmosCollection` class supports two key types: `string` and `CosmosKey`. The `CosmosKey` consists of `RecordKey` and `PartitionKey`.
+The `CosmosCollection` class supports three key types: `string`, `Guid` and `CosmosKey`. The `CosmosKey` consists of `DocumentId` and `PartitionKey`.
-If the partition key property is not set (and the default key property is used), `string` keys can be used for operations with database records. However, if a partition key property is specified, it is recommended to use `CosmosKey` to provide both the key and partition key values.
+If the partition key property is not set (and the default key property is used), `string` or `Guid` keys can be used for operations with database records. However, if a partition key property is specified, you must use `CosmosKey` to provide both the key and partition key values.
Specify partition key property name:
```csharp
var options = new CosmosCollectionOptions
{
- PartitionKeyPropertyName = nameof(Hotel.HotelName)
+ PartitionKeyProperties = [nameof(Hotel.HotelName)]
};
-var collection = new CosmosCollection(database, "collection-name", options)
- as VectorStoreCollection;
+var collection = new CosmosCollection(database, "collection-name", options);
```
Get with partition key:
@@ -265,11 +264,11 @@ var record = await collection.GetAsync(new CosmosKey("hotel-id", "hotel-name"));
## Overview
-The Azure CosmosDB NoSQL Vector Store connector can be used to access and manage data in Azure CosmosDB NoSQL. The connector has the following characteristics.
+The Azure CosmosDB Vector Store connector can be used to access and manage data in Azure CosmosDB. The connector has the following characteristics.
| Feature Area | Support |
| ------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------- |
-| Collection maps to | Azure Cosmos DB NoSQL Container |
+| Collection maps to | Azure Cosmos DB Container |
| Supported key property types | - string
- CosmosNoSqlCompositeKey
|
| Supported data property types | - string
- int
- long
- double
- float
- bool
- DateTimeOffset
- *and iterables of each of these types*
|
| Supported vector property types | - list[float]
- list[int]
- ndarray
|
@@ -289,7 +288,7 @@ Add the Azure extra package to your project.
pip install semantic-kernel[azure]
```
-Next you can create a Azure CosmosDB NoSQL Vector Store instance directly. This reads certain environment variables to configure the connection to Azure CosmosDB NoSQL:
+Next you can create a Azure CosmosDB Vector Store instance directly. This reads certain environment variables to configure the connection to Azure CosmosDB:
- AZURE_COSMOS_DB_NO_SQL_URL
- AZURE_COSMOS_DB_NO_SQL_DATABASE_NAME
@@ -358,7 +357,7 @@ collection = CosmosNoSqlCollection(
## Using partition key
-In the Azure Cosmos DB for NoSQL connector, the partition key property defaults to the key property - `id`. You can also supply a value for the partition key in the constructor.
+In the Azure CosmosDB connector, the partition key property defaults to the key property - `id`. You can also supply a value for the partition key in the constructor.
```python
from semantic_kernel.connectors.azure_cosmos_db import CosmosNoSqlCollection
diff --git a/semantic-kernel/concepts/vector-store-connectors/out-of-the-box-connectors/chroma-connector.md b/semantic-kernel/concepts/vector-store-connectors/out-of-the-box-connectors/chroma-connector.md
index a8ae0cdc..db0def43 100644
--- a/semantic-kernel/concepts/vector-store-connectors/out-of-the-box-connectors/chroma-connector.md
+++ b/semantic-kernel/concepts/vector-store-connectors/out-of-the-box-connectors/chroma-connector.md
@@ -16,9 +16,160 @@ ms.service: semantic-kernel
::: zone pivot="programming-language-csharp"
-## Not supported
+## Overview
-Not supported.
+The Chroma Vector Store connector can be used to access and manage data in Chroma and Chroma Cloud. The connector is provided by the [.NET Community Toolkit](https://github.com/CommunityToolkit/AI) and is built on the [ChromaDotNet.Client](https://www.nuget.org/packages/ChromaDotNet.Client) library. The connector has the following characteristics.
+
+| Feature Area | Support |
+| ------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
+| Collection maps to | Chroma collection |
+| Supported key property types | |
+| Supported data property types | - string
- int
- long
- double
- float
- bool
- DateTime
- DateTimeOffset
- DateOnly
- *and arrays or lists of each of these types*
|
+| Supported vector property types | - ReadOnlyMemory\
- Embedding\
- float[]
|
+| Supported index types | Hnsw (any other index kind throws when the collection is constructed) |
+| Supported distance functions | - CosineSimilarity (default)
- CosineDistance
- DotProductSimilarity
- NegativeDotProductSimilarity
- EuclideanSquaredDistance
- EuclideanDistance
|
+| Supported filter clauses | LINQ expressions: `==`, `!=`, `<`, `<=`, `>`, `>=` (numbers only), `&&`, `\|\|`, `!`, `Contains` over a list and `Any` with `Contains` over array properties. `string.Contains` only works on the full-text indexed document property. Vector properties cannot be filtered. |
+| Supports multiple vectors in a record | No |
+| IsIndexed supported? | Yes (all data properties can be used in filters, so the setting has no effect) |
+| IsFullTextIndexed supported? | Yes (string properties only) |
+| StorageName supported? | Yes |
+| HybridSearch supported? | Yes (Chroma Cloud only, requires a full-text indexed string property) |
+
+## Limitations
+
+Notable Chroma connector functionality limitations.
+
+| Feature Area | Details |
+| --------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- |
+| Empty arrays and lists | Chroma does not store empty lists, so an empty array or list is returned as `null`. |
+| Array and list properties | Require Chroma 1.5.0 or later. |
+| Chroma Cloud search results | A vector search returns at most 300 results (`Skip` included), which is the default Chroma Cloud quota. Requesting more results fails with a quota error. |
+| Ordering | Ordering of results is not supported. |
+
+## Getting started
+
+Add the Chroma Vector Store connector NuGet package to your project.
+
+```dotnetcli
+dotnet add package CommunityToolkit.VectorData.Chroma --prerelease
+```
+
+You can add the vector store to the dependency injection container available on the `KernelBuilder` or to the `IServiceCollection` dependency injection container using extension methods provided by the connector package.
+The connection string is either the URI of the Chroma server, or `Endpoint=...;Token=...;Tenant=...;Database=...` (for example, for Chroma Cloud).
+
+```csharp
+using Microsoft.Extensions.DependencyInjection;
+using Microsoft.SemanticKernel;
+
+// Using Kernel Builder.
+var kernelBuilder = Kernel
+ .CreateBuilder();
+kernelBuilder.Services
+ .AddChromaVectorStore("http://localhost:8000");
+```
+
+```csharp
+using Microsoft.Extensions.DependencyInjection;
+
+// Using IServiceCollection with ASP.NET Core.
+var builder = WebApplication.CreateBuilder(args);
+builder.Services.AddChromaVectorStore("http://localhost:8000");
+```
+
+Extension methods that take no parameters are also provided. These require an instance of the `ChromaDB.Client.ChromaClient` class to be separately registered with the dependency injection container.
+
+```csharp
+using ChromaDB.Client;
+using Microsoft.Extensions.DependencyInjection;
+using Microsoft.SemanticKernel;
+
+// Using Kernel Builder.
+var kernelBuilder = Kernel.CreateBuilder();
+kernelBuilder.Services.AddSingleton(sp =>
+ new ChromaClient(new ChromaConfigurationOptions("http://localhost:8000")));
+kernelBuilder.Services.AddChromaVectorStore();
+```
+
+```csharp
+using ChromaDB.Client;
+using Microsoft.Extensions.DependencyInjection;
+
+// Using IServiceCollection with ASP.NET Core.
+var builder = WebApplication.CreateBuilder(args);
+builder.Services.AddSingleton(sp =>
+ new ChromaClient(new ChromaConfigurationOptions("http://localhost:8000")));
+builder.Services.AddChromaVectorStore();
+```
+
+You can construct a Chroma Vector Store instance directly.
+
+```csharp
+using ChromaDB.Client;
+using CommunityToolkit.VectorData.Chroma;
+
+var vectorStore = new ChromaVectorStore(
+ new ChromaClient(new ChromaConfigurationOptions("http://localhost:8000")),
+ ownsClient: true);
+```
+
+It is possible to construct a direct reference to a named collection.
+
+```csharp
+using ChromaDB.Client;
+using CommunityToolkit.VectorData.Chroma;
+
+var collection = new ChromaCollection(
+ new ChromaClient(new ChromaConfigurationOptions("http://localhost:8000")),
+ "skhotels",
+ ownsClient: true);
+```
+
+## Data mapping
+
+The Chroma connector provides a default mapper when mapping data from the data model to storage.
+Chroma stores each record as an id, an embedding, optional metadata and an optional document.
+The default mapper uses the model annotations or record definition to determine the type of each property and to do this mapping.
+
+- The data model property annotated as a key will be mapped to the Chroma record id.
+- The data model properties annotated as data will be mapped to the Chroma record metadata. If exactly one string data property has `IsFullTextIndexed` set, it is also stored as the Chroma record document.
+- The data model property annotated as a vector will be mapped to the Chroma record embedding.
+
+### Property name override
+
+For data properties, you can provide override field names to use in storage that are different to the property names on the data model.
+This is not supported for keys and vectors, since they have fixed names in Chroma.
+
+The property name override is done by setting the `StorageName` option via the data model attributes or record definition.
+
+Here is an example of a data model with `StorageName` set on its attributes and how that will be represented in Chroma.
+
+```csharp
+using Microsoft.Extensions.VectorData;
+
+public class Hotel
+{
+ [VectorStoreKey]
+ public string HotelId { get; set; }
+
+ [VectorStoreData(IsIndexed = true, StorageName = "hotel_name")]
+ public string HotelName { get; set; }
+
+ [VectorStoreData(IsFullTextIndexed = true, StorageName = "hotel_description")]
+ public string Description { get; set; }
+
+ [VectorStoreVector(4, DistanceFunction = DistanceFunction.CosineSimilarity, IndexKind = IndexKind.Hnsw)]
+ public ReadOnlyMemory? DescriptionEmbedding { get; set; }
+}
+```
+
+```json
+{
+ "id": "1",
+ "metadata": { "hotel_name": "Hotel Happy", "hotel_description": "A place where everyone can be happy." },
+ "document": "A place where everyone can be happy.",
+ "embedding": [0.9, 0.1, 0.1, 0.1]
+}
+```
::: zone-end
::: zone pivot="programming-language-python"
diff --git a/semantic-kernel/concepts/vector-store-connectors/out-of-the-box-connectors/index.md b/semantic-kernel/concepts/vector-store-connectors/out-of-the-box-connectors/index.md
index 58068a46..5e285421 100644
--- a/semantic-kernel/concepts/vector-store-connectors/out-of-the-box-connectors/index.md
+++ b/semantic-kernel/concepts/vector-store-connectors/out-of-the-box-connectors/index.md
@@ -34,25 +34,23 @@ Semantic Kernel provides a number of out-of-the-box Vector Store integrations ma
| Vector Store Connectors | C# | Uses officially supported SDK | Maintainer / Vendor |
| ------------------------------------------------------------------ | :--------------------------: | :----------------------------: | :-------------------------------: |
-| [Azure AI Search](./azure-ai-search-connector.md) | ✅ | ✅ | Microsoft |
-| [Cosmos DB MongoDB (vCore)](./azure-cosmosdb-mongodb-connector.md) | ✅ | ✅ | Microsoft |
-| [Cosmos DB No SQL](./azure-cosmosdb-nosql-connector.md) | ✅ | ✅ | Microsoft |
+| [Azure AI Search](./azure-ai-search-connector.md) | ✅ | ✅ | .NET Community Toolkit |
+| [Azure DocumentDB](./azure-cosmosdb-mongodb-connector.md) | ✅ | ✅ | .NET Community Toolkit |
+| [Azure CosmosDB](./azure-cosmosdb-nosql-connector.md) | ✅ | ✅ | .NET Community Toolkit |
+| [Chroma](./chroma-connector.md) | ✅ | ❌ | .NET Community Toolkit |
| [Couchbase](./couchbase-connector.md) | ✅ | ✅ | Couchbase |
| [Elasticsearch](./elasticsearch-connector.md) | ✅ | ✅ | Elastic |
-| Chroma | Planned | | |
-| [In-Memory](./inmemory-connector.md) | ✅ | N/A | Microsoft |
+| [In-Memory](./inmemory-connector.md) | ✅ | N/A | .NET Community Toolkit |
| Milvus | Planned | | |
| [MongoDB](./mongodb-connector.md) | ✅ | ✅ | Microsoft |
-| [Neon Serverless Postgres](https://neon.com/) |Use [Postgres Connector](./postgres-connector.md) | ✅ | Microsoft |
| [Oracle](./oracle-connector.md) | ✅ | ✅ | Oracle |
-| [Pinecone](./pinecone-connector.md) | ✅ | ❌ | Microsoft |
-| [Postgres](./postgres-connector.md) | ✅ | ✅ | Microsoft |
-| [Qdrant](./qdrant-connector.md) | ✅ | ✅ | Microsoft |
-| [Redis](./redis-connector.md) | ✅ | ✅ | Microsoft |
-| [SQL Server](./sql-connector.md) | ✅ | ✅ | Microsoft |
-| [SQLite](./sqlite-connector.md) | ✅ | ✅ | Microsoft |
+| [Postgres](./postgres-connector.md) | ✅ | ✅ | .NET Community Toolkit |
+| [Qdrant](./qdrant-connector.md) | ✅ | ✅ | .NET Community Toolkit |
+| [Redis](./redis-connector.md) | ✅ | ✅ | .NET Community Toolkit |
+| [SQL Server](./sql-connector.md) | ✅ | ✅ | .NET Community Toolkit |
+| [SQLite](./sqlite-connector.md) | ✅ | ✅ | .NET Community Toolkit |
| [Volatile (In-Memory)](./volatile-connector.md) | Deprecated (use In-Memory) | N/A | Microsoft |
-| [Weaviate](./weaviate-connector.md) | ✅ | ✅ | Microsoft |
+| [Weaviate](./weaviate-connector.md) | ✅ | ✅ | .NET Community Toolkit |
::: zone-end
::: zone pivot="programming-language-python"
@@ -60,8 +58,8 @@ Semantic Kernel provides a number of out-of-the-box Vector Store integrations ma
| Vector Store Connectors | Python | Uses officially supported SDK | Maintainer / Vendor |
| ------------------------------------------------------------------ | :-----: | :----------------------------------------: | :-------------------------------: |
| [Azure AI Search](./azure-ai-search-connector.md) | ✅ | ✅ | Microsoft Semantic Kernel Project |
-| [Cosmos DB MongoDB (vCore)](./azure-cosmosdb-mongodb-connector.md) | ✅ | ✅ | Microsoft Semantic Kernel Project |
-| [Cosmos DB No SQL](./azure-cosmosdb-nosql-connector.md) | ✅ | ✅ | Microsoft Semantic Kernel Project |
+| [Azure DocumentDB](./azure-cosmosdb-mongodb-connector.md) | ✅ | ✅ | Microsoft Semantic Kernel Project |
+| [Azure CosmosDB](./azure-cosmosdb-nosql-connector.md) | ✅ | ✅ | Microsoft Semantic Kernel Project |
| [Chroma](./chroma-connector.md) | ✅ | ✅ | Microsoft Semantic Kernel Project |
| [Elasticsearch](./elasticsearch-connector.md) | Planned | | |
| [Faiss](./faiss-connector.md) | ✅ | ✅ | Microsoft Semantic Kernel Project |
diff --git a/semantic-kernel/concepts/vector-store-connectors/out-of-the-box-connectors/inmemory-connector.md b/semantic-kernel/concepts/vector-store-connectors/out-of-the-box-connectors/inmemory-connector.md
index 742e75b6..a7bae455 100644
--- a/semantic-kernel/concepts/vector-store-connectors/out-of-the-box-connectors/inmemory-connector.md
+++ b/semantic-kernel/concepts/vector-store-connectors/out-of-the-box-connectors/inmemory-connector.md
@@ -10,12 +10,6 @@ ms.service: semantic-kernel
---
# Using the In-Memory connector (Preview)
-::: zone pivot="programming-language-csharp"
-
-> [!WARNING]
-> The In-Memory Vector Store functionality is in preview, and improvements that require breaking changes may still occur in limited circumstances before release.
-
-::: zone-end
::: zone pivot="programming-language-python"
> [!WARNING]
@@ -33,7 +27,7 @@ ms.service: semantic-kernel
## Overview
-The In-Memory Vector Store connector is a Vector Store implementation provided by Semantic Kernel that uses no external database and stores data in memory.
+The In-Memory Vector Store connector is a Vector Store implementation provided by the .NET Community Toolkit that uses no external database and stores data in memory.
This Vector Store is useful for prototyping scenarios or where high-speed in-memory operations are required.
The connector has the following characteristics.
@@ -41,21 +35,21 @@ The connector has the following characteristics.
| Feature Area | Support |
|-----------------------------------|----------------------------------------------------------------------------------------------------------------------------------|
| Collection maps to | In-memory dictionary |
-| Supported key property types | Any type that can be compared |
+| Supported key property types | Any type with sensible equality and hashing (auto-generated keys are supported only for Guid) |
| Supported data property types | Any type |
| Supported vector property types | - ReadOnlyMemory\
- Embedding\
- float[]
|
-| Supported index types | Flat |
-| Supported distance functions | - CosineSimilarity
- CosineDistance
- DotProductSimilarity
- EuclideanDistance
|
-| Supported filter clauses | |
+| Supported index types | Flat (brute-force scan; `IndexKind` is ignored) |
+| Supported distance functions | - CosineSimilarity (default)
- CosineDistance
- DotProductSimilarity
- EuclideanDistance
|
+| Supported filter clauses | Any LINQ expression, evaluated in-process |
| Supports multiple vectors in a record | Yes |
-| IsIndexed supported? | Yes |
-| IsFullTextIndexed supported? | Yes |
+| IsIndexed supported? | Accepted, but has no effect |
+| IsFullTextIndexed supported? | Accepted, but has no effect |
| StorageName supported? | No, since storage is in-memory and data reuse is therefore not possible, custom naming is not applicable. |
| HybridSearch supported? | No |
## Getting started
-Add the Semantic Kernel Core nuget package to your project.
+Add the In-Memory Vector Store connector NuGet package to your project.
```dotnetcli
dotnet add package CommunityToolkit.VectorData.InMemory
@@ -98,6 +92,8 @@ using CommunityToolkit.VectorData.InMemory;
var collection = new InMemoryCollection("skhotels");
```
+A collection constructed directly has its own private storage, unlike a collection obtained with `vectorStore.GetCollection`, which shares storage with the vector store. Collection names must be unique per record type within a store.
+
::: zone-end
::: zone pivot="programming-language-python"
diff --git a/semantic-kernel/concepts/vector-store-connectors/out-of-the-box-connectors/postgres-connector.md b/semantic-kernel/concepts/vector-store-connectors/out-of-the-box-connectors/postgres-connector.md
index 3f14d2df..db95ebac 100644
--- a/semantic-kernel/concepts/vector-store-connectors/out-of-the-box-connectors/postgres-connector.md
+++ b/semantic-kernel/concepts/vector-store-connectors/out-of-the-box-connectors/postgres-connector.md
@@ -10,12 +10,6 @@ ms.service: semantic-kernel
---
# Using the Postgres Vector Store connector (Preview)
-::: zone pivot="programming-language-csharp"
-
-> [!WARNING]
-> The Postgres Vector Store functionality is in preview, and improvements that require breaking changes may still occur in limited circumstances before release.
-
-::: zone-end
::: zone pivot="programming-language-python"
> [!WARNING]
@@ -41,16 +35,16 @@ The connector has the following characteristics.
|-----------------------------------|----------------------------------------------------------------------------------------------------------------------------------|
| Collection maps to | Postgres table |
| Supported key property types | |
-| Supported data property types | - bool
- short
- int
- long
- float
- double
- decimal
- string
- DateTime
- DateTimeOffset
- Guid
- byte[]
- bool Enumerables
- short Enumerables
- int Enumerables
- long Enumerables
- float Enumerables
- double Enumerables
- decimal Enumerables
- string Enumerables
- DateTime Enumerables
- DateTimeOffset Enumerables
- Guid Enumerables
|
-| Supported vector property types | - ReadOnlyMemory\
- Embedding\
- float[]
- ReadOnlyMemory\
- Embedding\
- Half[]
- BitArray
- Pgvector.SparseVector
|
-| Supported index types | Hnsw |
-| Supported distance functions | - CosineDistance
- CosineSimilarity
- DotProductSimilarity
- EuclideanDistance
- ManhattanDistance
|
-| Supported filter clauses | |
+| Supported data property types | - bool
- short
- int
- long
- float
- double
- decimal
- string
- DateTime
- DateTimeOffset
- Guid
- byte[]
- DateOnly (.NET only)
- TimeOnly (.NET only)
- Arrays or `List` of bool, short, int, long, float, double, decimal, string, DateTime, DateTimeOffset, Guid, DateOnly and TimeOnly
|
+| Supported vector property types | - ReadOnlyMemory\
- Embedding\
- float[]
- ReadOnlyMemory\
- Embedding\
- Half[]
- BitArray
- Pgvector.SparseVector
- BinaryEmbedding
|
+| Supported index types | Hnsw (limited to 2000 dimensions). The default is Flat, which creates no index. |
+| Supported distance functions | - CosineDistance (default)
- CosineSimilarity
- DotProductSimilarity
- EuclideanDistance
- ManhattanDistance
- HammingDistance
|
+| Supported filter clauses | LINQ expressions: `==`, `!=`, `<`, `<=`, `>`, `>=`, `&&`, `\|\|`, `!`, null comparisons, `Contains` and `Any` with `Contains` over array properties |
| Supports multiple vectors in a record | Yes |
-| IsIndexed supported? | No |
-| IsFullTextIndexed supported? | No |
+| IsIndexed supported? | Yes (creates a btree index) |
+| IsFullTextIndexed supported? | Yes (creates a GIN index on `to_tsvector`) |
| StorageName supported? | Yes |
-| HybridSearch supported? | No |
+| HybridSearch supported? | Yes, requires a string data property with `IsFullTextIndexed = true` |
## Limitations
@@ -80,21 +74,15 @@ You can add the vector store to the `IServiceCollection` dependency injection co
```csharp
using Microsoft.Extensions.DependencyInjection;
-var kernelBuilder = Kernel.CreateBuilder();
-kernelBuilder.Services.AddPostgresVectorStore("");
+ServiceCollection services = new();
+services.AddPostgresVectorStore("");
```
Where `` is a connection string to the Postgres instance, in the format that [Npgsql](https://www.npgsql.org/) expects, for example `Host=localhost;Port=5432;Database=postgres;Username=postgres;Password=postgres`.
-Extension methods that take no parameters are also provided. These require an instance of [NpgsqlDataSource](https://www.npgsql.org/doc/api/Npgsql.NpgsqlDataSource.html) to be separately registered with the dependency injection container. Note that `UseVector` must be called on the builder to enable vector support via [pgvector-dotnet](https://github.com/pgvector/pgvector-dotnet?tab=readme-ov-file#npgsql-c):
+Overloads that take an optional `PostgresVectorStoreOptions` and a `ServiceLifetime`, and keyed registrations (`AddKeyedPostgresVectorStore`), are also provided. If an `IEmbeddingGenerator` is registered in the container, the vector store and collections use it automatically. To register a collection directly, use `AddPostgresCollection`.
-```csharp
-using Microsoft.Extensions.DependencyInjection;
-
-// Using IServiceCollection with ASP.NET Core.
-var builder = WebApplication.CreateBuilder(args);
-builder.Services.AddPostgresVectorStore("");
-```
+Extension methods that take no connection string are also provided. These require an instance of [NpgsqlDataSource](https://www.npgsql.org/doc/api/Npgsql.NpgsqlDataSource.html) to be separately registered with the dependency injection container. Note that `UseVector` must be called on the builder to enable vector support via [pgvector-dotnet](https://github.com/pgvector/pgvector-dotnet?tab=readme-ov-file#npgsql-c):
```csharp
using Microsoft.Extensions.DependencyInjection;
@@ -139,13 +127,13 @@ NpgsqlDataSourceBuilder dataSourceBuilder = new("");
dataSourceBuilder.UseVector();
var dataSource = dataSourceBuilder.Build();
-var collection = new PostgresCollection(dataSource, "skhotels", ownsDataSource: true);
+var collection = new PostgresCollection(dataSource, "skhotels", ownsDataSource: true);
```
```csharp
using CommunityToolkit.VectorData.PgVector;
-var collection = new PostgresCollection("", "skhotels");
+var collection = new PostgresCollection("", "skhotels");
```
## Data mapping
@@ -183,25 +171,27 @@ public class Hotel
[VectorStoreData(StorageName = "hotel_description")]
public string Description { get; set; }
- [VectorStoreVector(Dimensions: 4, DistanceFunction = DistanceFunction.CosineDistance, IndexKind = IndexKind.Hnsw, StorageName = "hotel_description_embedding")]
+ [VectorStoreVector(4, DistanceFunction = DistanceFunction.CosineDistance, IndexKind = IndexKind.Hnsw, StorageName = "hotel_description_embedding")]
public ReadOnlyMemory? DescriptionEmbedding { get; set; }
}
```
+The following DDL is illustrative; the exact statement generated by the connector quotes all identifiers and may differ slightly.
+
```sql
CREATE TABLE IF NOT EXISTS public."Hotels" (
"hotel_id" INTEGER PRIMARY KEY NOT NULL,
- hotel_name TEXT,
- hotel_description TEXT,
- hotel_description_embedding VECTOR(4)
+ "hotel_name" TEXT,
+ "hotel_description" TEXT,
+ "hotel_description_embedding" VECTOR(4)
);
```
## Vector indexing
-The `hotel_description_embedding` in the above `Hotel` model is a vector property with `IndexKind.HNSW`
+The `hotel_description_embedding` in the above `Hotel` model is a vector property with `IndexKind.Hnsw`
indexing. This index will be created automatically when the collection is created.
-HNSW is the only index type supported for index creation. IVFFlat index building requires that data already
+Hnsw is the only index type supported for index creation, and it is limited to 2000 dimensions. IVFFlat index building requires that data already
exist in the table at index creation time, and so it is not appropriate for the creation of an empty table.
You are free to create and modify indexes on tables outside of the connector, which will
be used by the connector when performing queries.
diff --git a/semantic-kernel/concepts/vector-store-connectors/out-of-the-box-connectors/qdrant-connector.md b/semantic-kernel/concepts/vector-store-connectors/out-of-the-box-connectors/qdrant-connector.md
index 9ceed691..0d8c7bd1 100644
--- a/semantic-kernel/concepts/vector-store-connectors/out-of-the-box-connectors/qdrant-connector.md
+++ b/semantic-kernel/concepts/vector-store-connectors/out-of-the-box-connectors/qdrant-connector.md
@@ -10,12 +10,6 @@ ms.service: semantic-kernel
---
# Using the Qdrant connector (Preview)
-::: zone pivot="programming-language-csharp"
-
-> [!WARNING]
-> The Qdrant Vector Store functionality is in preview, and improvements that require breaking changes may still occur in limited circumstances before release.
-
-::: zone-end
::: zone pivot="programming-language-python"
> [!WARNING]
@@ -39,16 +33,16 @@ The Qdrant Vector Store connector can be used to access and manage data in Qdran
|-----------------------------------|----------------------------------------------------------------------------------------------------------------------------------|
| Collection maps to | Qdrant collection with payload indices for filterable data fields |
| Supported key property types | |
-| Supported data property types | - string
- int
- long
- double
- float
- bool
- *and enumerables of each of these types*
|
+| Supported data property types | - string
- int
- long
- double
- float
- bool
- DateTime
- DateTimeOffset
- DateOnly (.NET only)
- *and arrays or `List` of each of these types*
|
| Supported vector property types | - ReadOnlyMemory\
- Embedding\
- float[]
|
| Supported index types | Hnsw |
-| Supported distance functions | - CosineSimilarity
- DotProductSimilarity
- EuclideanDistance
- ManhattanDistance
|
-| Supported filter clauses | |
+| Supported distance functions | - CosineSimilarity (default)
- DotProductSimilarity
- EuclideanDistance
- ManhattanDistance
|
+| Supported filter clauses | LINQ expressions: `==`, `!=`, `<`, `<=`, `>`, `>=`, `&&`, `\|\|`, `!`, null checks, `Contains` and `Any` with `Contains` over int or string arrays |
| Supports multiple vectors in a record | Yes (configurable) |
| IsIndexed supported? | Yes |
-| IsFullTextIndexed supported? | Yes |
+| IsFullTextIndexed supported? | Yes (string properties only) |
| StorageName supported? | Yes |
-| HybridSearch supported? | Yes |
+| HybridSearch supported? | Yes, requires a string data property with `IsFullTextIndexed = true` |
::: zone-end
::: zone pivot="programming-language-python"
@@ -86,38 +80,26 @@ Add the Qdrant Vector Store connector NuGet package to your project.
dotnet add package CommunityToolkit.VectorData.Qdrant
```
-You can add the vector store to the dependency injection container available on the `KernelBuilder` or to the `IServiceCollection` dependency injection container using extension methods provided by the connector package.
+You can add the vector store to the `IServiceCollection` dependency injection container using extension methods provided by the connector package.
```csharp
using Microsoft.Extensions.DependencyInjection;
-using Microsoft.SemanticKernel;
-// Using Kernel Builder.
-var kernelBuilder = Kernel
- .CreateBuilder();
-kernelBuilder.Services
- .AddQdrantVectorStore("localhost");
+ServiceCollection services = new();
+services.AddQdrantVectorStore("localhost", https: false);
```
-```csharp
-using Microsoft.Extensions.DependencyInjection;
-
-// Using IServiceCollection with ASP.NET Core.
-var builder = WebApplication.CreateBuilder(args);
-builder.Services.AddQdrantVectorStore("localhost");
-```
+The host-only overload defaults to port `6334` and `https: true`. Use `https: false` for a local Qdrant instance that serves plain gRPC. Overloads that accept `port`, `apiKey`, `QdrantVectorStoreOptions`, `ServiceLifetime` and keyed registrations (`AddKeyedQdrantVectorStore`) are also provided, as well as `AddQdrantCollection` for registering a collection directly. If an `IEmbeddingGenerator` is registered in the container, the vector store and collections use it automatically.
Extension methods that take no parameters are also provided. These require an instance of the `Qdrant.Client.QdrantClient` class to be separately registered with the dependency injection container.
```csharp
using Microsoft.Extensions.DependencyInjection;
-using Microsoft.SemanticKernel;
using Qdrant.Client;
-// Using Kernel Builder.
-var kernelBuilder = Kernel.CreateBuilder();
-kernelBuilder.Services.AddSingleton(sp => new QdrantClient("localhost"));
-kernelBuilder.Services.AddQdrantVectorStore();
+ServiceCollection services = new();
+services.AddSingleton(sp => new QdrantClient("localhost"));
+services.AddQdrantVectorStore();
```
```csharp
@@ -169,7 +151,7 @@ unnamed vector* mode, since the vector is stored under a fixed name.
The property name override is done by setting the `StorageName` option via the data model attributes or record definition.
-Here is an example of a data model with `StorageName` set on its attributes and how that will be represented in Qdrant.
+Here is an example of a data model with `StorageName` set on its attributes and how that will be represented in Qdrant, when using named vectors mode (`HasNamedVectors = true` on `QdrantVectorStoreOptions` or `QdrantCollectionOptions`). In the default single unnamed vector mode, the vector `StorageName` is ignored.
```csharp
using Microsoft.Extensions.VectorData;
@@ -329,7 +311,7 @@ new Hotel
HotelId = 1,
HotelName = "Hotel Happy",
Description = "A place where everyone can be happy.",
- HotelNameEmbedding = new float[4] { 0.9f, 0.5f, 0.5f, 0.5f }
+ HotelNameEmbedding = new float[4] { 0.9f, 0.5f, 0.5f, 0.5f },
DescriptionEmbedding = new float[4] { 0.9f, 0.1f, 0.1f, 0.1f }
};
```
diff --git a/semantic-kernel/concepts/vector-store-connectors/out-of-the-box-connectors/redis-connector.md b/semantic-kernel/concepts/vector-store-connectors/out-of-the-box-connectors/redis-connector.md
index 150f3408..934bd35c 100644
--- a/semantic-kernel/concepts/vector-store-connectors/out-of-the-box-connectors/redis-connector.md
+++ b/semantic-kernel/concepts/vector-store-connectors/out-of-the-box-connectors/redis-connector.md
@@ -10,12 +10,6 @@ ms.service: semantic-kernel
---
# Using the Redis connector (Preview)
-::: zone pivot="programming-language-csharp"
-
-> [!WARNING]
-> The Redis Vector Store functionality is in preview, and improvements that require breaking changes may still occur in limited circumstances before release.
-
-::: zone-end
::: zone pivot="programming-language-python"
> [!WARNING]
@@ -38,15 +32,15 @@ The connector has the following characteristics.
| Feature Area | Support |
|-----------------------------------|----------------------------------------------------------------------------------------------------------------------------------|
| Collection maps to | Redis index with prefix set to `:` |
-| Supported key property types | string |
-| Supported data property types | **When using Hashes:**- string
- int
- uint
- long
- ulong
- double
- float
- bool
|
+| Supported key property types | |
+| Supported data property types | **When using Hashes:**- string
- int
- uint
- long
- ulong
- double
- float
**When using JSON:** any type that `System.Text.Json` can serialize. Strings and collections of strings can be indexed as tags.|
| Supported vector property types | - ReadOnlyMemory\
- Embedding\
- float[]
- ReadOnlyMemory\
- Embedding\
- double[]
|
| Supported index types | |
-| Supported distance functions | - CosineSimilarity
- DotProductSimilarity
- EuclideanSquaredDistance
|
-| Supported filter clauses | |
+| Supported distance functions | - CosineSimilarity
- CosineDistance
- DotProductSimilarity
- EuclideanSquaredDistance
|
+| Supported filter clauses | LINQ expressions: `==`, `!=`, `<`, `<=`, `>`, `>=`, `&&`, `\|\|`, `!`, a bool property, `Contains` over a tag field and `Any` with `Contains` |
| Supports multiple vectors in a record | Yes |
-| IsIndexed supported? | Yes |
-| IsFullTextIndexed supported? | Yes |
+| IsIndexed supported? | Yes (not combinable with `IsFullTextIndexed` on the same property) |
+| IsFullTextIndexed supported? | Yes (string and string collection properties only, not combinable with `IsIndexed` on the same property) |
| StorageName supported? | **When using Hashes:** Yes
**When using JSON:** No, use `JsonSerializerOptions` and `JsonPropertyNameAttribute` instead. [See here for more info.](#data-mapping) |
| HybridSearch supported? | No |
@@ -81,7 +75,9 @@ var builder = WebApplication.CreateBuilder(args);
builder.Services.AddRedisVectorStore("localhost:6379");
```
-Extension methods that take no parameters are also provided. These require an instance of the Redis `IDatabase` to be separately registered with the dependency injection container.
+Overloads that accept a connection string, `RedisVectorStoreOptions`, a `ServiceLifetime` and keyed registrations (`AddKeyedRedisVectorStore`) are also provided, as well as `AddRedisJsonCollection` and `AddRedisHashSetCollection` for registering a collection directly. If an `IEmbeddingGenerator` is registered in the container, the vector store and collections use it automatically.
+
+Extension methods that don't take a connection string are also provided. These require an instance of the Redis `IDatabase` to be separately registered with the dependency injection container.
```csharp
using Microsoft.Extensions.DependencyInjection;
diff --git a/semantic-kernel/concepts/vector-store-connectors/out-of-the-box-connectors/sql-connector.md b/semantic-kernel/concepts/vector-store-connectors/out-of-the-box-connectors/sql-connector.md
index 286c9c1e..a7615a97 100644
--- a/semantic-kernel/concepts/vector-store-connectors/out-of-the-box-connectors/sql-connector.md
+++ b/semantic-kernel/concepts/vector-store-connectors/out-of-the-box-connectors/sql-connector.md
@@ -10,12 +10,6 @@ ms.service: semantic-kernel
---
# Using the SQL Server Vector Store connector (Preview)
-::: zone pivot="programming-language-csharp"
-
-> [!WARNING]
-> The Sql Server Vector Store functionality is in preview, and improvements that require breaking changes may still occur in limited circumstances before release.
-
-::: zone-end
::: zone pivot="programming-language-python"
> [!WARNING]
@@ -37,20 +31,23 @@ The SQL Server Vector Store connector can be used to access and manage data in S
| Feature Area | Support |
|-----------------------------------|----------------------------------------------------------------------------------------------------------------------------------|
| Collection maps to | SQL Server table |
-| Supported key property types | - int
- long
- string
- Guid
- DateTime
- byte[]
|
-| Supported data property types | - int
- short
- byte
- long
- Guid
- string
- bool
- float
- double
- decimal
- byte[]
- DateTime
- TimeOnly
|
-| Supported vector property types | - ReadOnlyMemory\
- Embedding\
- float[]
|
-| Supported index types | |
+| Supported key property types | |
+| Supported data property types | - int
- short
- byte
- long
- Guid
- string
- bool
- float
- double
- decimal
- byte[]
- DateTime
- DateTimeOffset
- DateOnly (.NET only)
- TimeOnly (.NET only)
- string[] and `List` (stored as JSON, requires SQL Server 2025 or Azure SQL)
|
+| Supported vector property types | - ReadOnlyMemory\
- Embedding\
- float[]
- SqlVector\
|
+| Supported index types | - Flat
- DiskAnn (Azure SQL Database and Fabric only)
|
| Supported distance functions | - CosineDistance
- NegativeDotProductSimilarity
- EuclideanDistance
|
| Supports multiple vectors in a record | Yes |
| IsIndexed supported? | Yes |
-| IsFullTextIndexed supported? | No |
+| IsFullTextIndexed supported? | Yes (creates a full-text catalog and index) |
| StorageName supported? | Yes |
-| HybridSearch supported? | No |
+| HybridSearch supported? | Yes, requires a string data property with `IsFullTextIndexed = true` |
+
+> [!NOTE]
+> The `VECTOR` data type requires SQL Server 2025 or Azure SQL Database.
## Getting started
-Add the SQL Sever Vector Store connector NuGet package to your project.
+Add the SQL Server Vector Store connector NuGet package to your project.
```dotnetcli
dotnet add package CommunityToolkit.VectorData.SqlServer
@@ -66,15 +63,9 @@ var builder = WebApplication.CreateBuilder(args);
builder.Services.AddSqlServerVectorStore(_ => "");
```
-```csharp
-using Microsoft.Extensions.DependencyInjection;
-
-// Using IServiceCollection with ASP.NET Core.
-var builder = WebApplication.CreateBuilder(args);
-builder.Services.AddSqlServerVectorStore(_ => "")
-```
+Overloads that accept `SqlServerVectorStoreOptions`, a `ServiceLifetime` and keyed registrations are also provided, as well as `AddSqlServerCollection` for registering a collection directly. If an `IEmbeddingGenerator` is registered in the container, the vector store and collections use it automatically.
-You can construct a Sql Server Vector Store instance directly.
+You can construct a SQL Server Vector Store instance directly.
```csharp
using CommunityToolkit.VectorData.SqlServer;
@@ -87,7 +78,7 @@ It is possible to construct a direct reference to a named collection.
```csharp
using CommunityToolkit.VectorData.SqlServer;
-var collection = new SqlServerCollection("", "skhotels");
+var collection = new SqlServerCollection("", "skhotels");
```
## Data mapping
@@ -108,7 +99,7 @@ using Microsoft.Extensions.VectorData;
public class Hotel
{
[VectorStoreKey]
- public ulong HotelId { get; set; }
+ public long HotelId { get; set; }
[VectorStoreData(StorageName = "hotel_name")]
public string? HotelName { get; set; }
@@ -116,7 +107,7 @@ public class Hotel
[VectorStoreData(StorageName = "hotel_description")]
public string? Description { get; set; }
- [VectorStoreVector(Dimensions: 4, DistanceFunction = DistanceFunction.CosineDistance)]
+ [VectorStoreVector(4, DistanceFunction = DistanceFunction.CosineDistance)]
public ReadOnlyMemory? DescriptionEmbedding { get; set; }
}
```
diff --git a/semantic-kernel/concepts/vector-store-connectors/out-of-the-box-connectors/sqlite-connector.md b/semantic-kernel/concepts/vector-store-connectors/out-of-the-box-connectors/sqlite-connector.md
index 962c97c2..be4165fa 100644
--- a/semantic-kernel/concepts/vector-store-connectors/out-of-the-box-connectors/sqlite-connector.md
+++ b/semantic-kernel/concepts/vector-store-connectors/out-of-the-box-connectors/sqlite-connector.md
@@ -38,14 +38,14 @@ The SQLite Vector Store connector can be used to access and manage data in SQLit
| Feature Area | Support |
|-----------------------------------|----------------------------------------------------------------------------------------------------------------------------------|
| Collection maps to | SQLite table |
-| Supported key property types | |
-| Supported data property types | - int
- long
- short
- string
- bool
- float
- double
- byte[]
|
+| Supported key property types | |
+| Supported data property types | - int
- long
- short
- string
- bool
- float
- double
- byte[]
- Guid
- DateTime
- DateTimeOffset
- DateOnly (.NET only)
- TimeOnly (.NET only)
|
| Supported vector property types | - ReadOnlyMemory\
- Embedding\
- float[]
|
| Supported index types | N/A |
-| Supported distance functions | - CosineDistance
- ManhattanDistance
- EuclideanDistance
|
-| Supported filter clauses | |
+| Supported distance functions | - CosineDistance (default)
- ManhattanDistance
- EuclideanDistance
|
+| Supported filter clauses | LINQ expressions: comparisons, `&&`, `\|\|`, `!`, and `Contains` over an inline or captured array. `Contains` over an array property and `Any` are not supported. |
| Supports multiple vectors in a record | Yes |
-| IsIndexed supported? | No |
+| IsIndexed supported? | Yes |
| IsFullTextIndexed supported? | No |
| StorageName supported? | Yes |
| HybridSearch supported? | No |
@@ -68,13 +68,7 @@ var builder = WebApplication.CreateBuilder(args);
builder.Services.AddSqliteVectorStore(_ => "Data Source=:memory:");
```
-```csharp
-using Microsoft.Extensions.DependencyInjection;
-
-// Using IServiceCollection with ASP.NET Core.
-var builder = WebApplication.CreateBuilder(args);
-builder.Services.AddSqliteVectorStore(_ => "Data Source=:memory:")
-```
+Overloads that accept `SqliteVectorStoreOptions`, a `ServiceLifetime` and keyed registrations are also provided, as well as `AddSqliteCollection` for registering a collection directly. If an `IEmbeddingGenerator` is registered in the container, the vector store and collections use it automatically. The sqlite-vec extension is loaded automatically, so no manual loading is needed.
You can construct a SQLite Vector Store instance directly.
@@ -89,7 +83,7 @@ It is possible to construct a direct reference to a named collection.
```csharp
using CommunityToolkit.VectorData.SqliteVec;
-var collection = new SqliteCollection("Data Source=:memory:", "skhotels");
+var collection = new SqliteCollection("Data Source=:memory:", "skhotels");
```
## Data mapping
@@ -98,7 +92,7 @@ The SQLite Vector Store connector provides a default mapper when mapping from th
This mapper does a direct conversion of the list of properties on the data model to the columns in SQLite.
With the vector search extension, vectors are stored in virtual tables, separately from key and data properties.
-By default, the virtual table with vectors will use the same name as the table with key and data properties, but with a `vec_` prefix. For example, if the collection name in `SqliteCollection` is `skhotels`, the name of the virtual table with vectors will be `vec_skhotels`. It's possible to override the virtual table name by using the `SqliteVectorStoreOptions.VectorVirtualTableName` or `SqliteCollectionOptions.VectorVirtualTableName` properties.
+By default, the virtual table with vectors will use the same name as the table with key and data properties, but with a `vec_` prefix. For example, if the collection name in `SqliteCollection` is `skhotels`, the name of the virtual table with vectors will be `vec_skhotels`. It's possible to override the virtual table name by using the `SqliteVectorStoreOptions.VectorVirtualTableName` or `SqliteCollectionOptions.VectorVirtualTableName` properties.
### Property name override
@@ -113,7 +107,7 @@ using Microsoft.Extensions.VectorData;
public class Hotel
{
[VectorStoreKey]
- public ulong HotelId { get; set; }
+ public long HotelId { get; set; }
[VectorStoreData(StorageName = "hotel_name")]
public string? HotelName { get; set; }
@@ -121,21 +115,21 @@ public class Hotel
[VectorStoreData(StorageName = "hotel_description")]
public string? Description { get; set; }
- [VectorStoreVector(Dimensions: 4, DistanceFunction = DistanceFunction.CosineDistance)]
+ [VectorStoreVector(4, DistanceFunction = DistanceFunction.CosineDistance)]
public ReadOnlyMemory? DescriptionEmbedding { get; set; }
}
```
-```
-CREATE TABLE Hotels (
- HotelId INTEGER PRIMARY KEY,
- hotel_name TEXT,
- hotel_description TEXT
+```sql
+CREATE TABLE "Hotels" (
+ "HotelId" INTEGER PRIMARY KEY,
+ "hotel_name" TEXT,
+ "hotel_description" TEXT
);
-CREATE VIRTUAL TABLE vec_Hotels (
- HotelId INTEGER PRIMARY KEY,
- DescriptionEmbedding FLOAT[4] distance_metric=cosine
+CREATE VIRTUAL TABLE "vec_Hotels" USING vec0(
+ "HotelId" INTEGER PRIMARY KEY,
+ "DescriptionEmbedding" FLOAT[4] distance_metric=cosine
);
```
diff --git a/semantic-kernel/concepts/vector-store-connectors/out-of-the-box-connectors/weaviate-connector.md b/semantic-kernel/concepts/vector-store-connectors/out-of-the-box-connectors/weaviate-connector.md
index 67bb0596..7a0074bb 100644
--- a/semantic-kernel/concepts/vector-store-connectors/out-of-the-box-connectors/weaviate-connector.md
+++ b/semantic-kernel/concepts/vector-store-connectors/out-of-the-box-connectors/weaviate-connector.md
@@ -10,12 +10,6 @@ ms.service: semantic-kernel
---
# Using the Weaviate Vector Store connector (Preview)
-::: zone pivot="programming-language-csharp"
-
-> [!WARNING]
-> The Weaviate Vector Store functionality is in preview, and improvements that require breaking changes may still occur in limited circumstances before release.
-
-::: zone-end
::: zone pivot="programming-language-python"
> [!WARNING]
@@ -39,11 +33,11 @@ The Weaviate Vector Store connector can be used to access and manage data in Wea
| ------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Collection maps to | Weaviate Collection |
| Supported key property types | Guid |
-| Supported data property types | - string
- byte
- short
- int
- long
- double
- float
- decimal
- bool
- DateTime
- DateTimeOffset
- Guid
- *and enumerables of each of these types*
|
+| Supported data property types | - string
- byte
- short
- int
- long
- double
- float
- decimal
- bool
- DateTime
- DateTimeOffset
- DateOnly (.NET only)
- Guid
- *and arrays or `List` of each of these types*
|
| Supported vector property types | - ReadOnlyMemory\
- Embedding\
- float[]
|
-| Supported index types | |
-| Supported distance functions | - CosineDistance
- NegativeDotProductSimilarity
- EuclideanSquaredDistance
- HammingDistance
- ManhattanDistance
|
-| Supported filter clauses | |
+| Supported index types | - Hnsw (default)
- Flat
- Dynamic
|
+| Supported distance functions | - CosineDistance (default)
- NegativeDotProductSimilarity
- EuclideanSquaredDistance
- HammingDistance
- ManhattanDistance
|
+| Supported filter clauses | LINQ expressions: `==`, `!=`, `<`, `<=`, `>`, `>=`, `&&`, `\|\|`, `Contains` and `Any` with `Contains`. The `!` operator is not supported. |
| Supports multiple vectors in a record | Yes |
| IsIndexed supported? | Yes |
| IsFullTextIndexed supported? | Yes |
@@ -84,6 +78,13 @@ Notable Weaviate connector functionality limitations.
::: zone pivot="programming-language-csharp"
+> [!NOTE]
+> In .NET, the connector validates the collection name when the collection is constructed and throws an `ArgumentException` if it doesn't start with an upper case ASCII letter or contains characters other than ASCII letters, digits and `_`. By default, the connector uses named vectors (`HasNamedVectors = true` in `WeaviateVectorStoreOptions` and `WeaviateCollectionOptions`). Set `HasNamedVectors = false` to use the single unnamed `vector` layout, which allows exactly one vector property per record.
+
+::: zone-end
+
+::: zone pivot="programming-language-csharp"
+
## Getting started
Add the Weaviate Vector Store connector NuGet package to your project.
@@ -206,7 +207,7 @@ public class Hotel
public string Description { get; set; }
[JsonPropertyName("HOTEL_DESCRIPTION_EMBEDDING")]
- [VectorStoreVector(4, DistanceFunction = DistanceFunction.CosineDistance, IndexKind = IndexKind.QuantizedFlat)]
+ [VectorStoreVector(4, DistanceFunction = DistanceFunction.CosineDistance, IndexKind = IndexKind.Hnsw)]
public ReadOnlyMemory? DescriptionEmbedding { get; set; }
}
```
@@ -214,13 +215,15 @@ public class Hotel
```json
{
"id": "11111111-1111-1111-1111-111111111111",
- "properties": { "HotelName": "Hotel Happy", "Description": "A place where everyone can be happy." },
+ "properties": { "hotelName": "Hotel Happy", "description": "A place where everyone can be happy." },
"vectors": {
- "HOTEL_DESCRIPTION_EMBEDDING": [0.9, 0.1, 0.1, 0.1],
+ "HOTEL_DESCRIPTION_EMBEDDING": [0.9, 0.1, 0.1, 0.1]
}
}
```
+The connector serializes with a camel case naming policy, so property names that don't have a `JsonPropertyNameAttribute` are stored in camel case.
+
::: zone-end
::: zone pivot="programming-language-python"
diff --git a/semantic-kernel/get-started/supported-languages.md b/semantic-kernel/get-started/supported-languages.md
index aa10c12e..6bf9a89b 100644
--- a/semantic-kernel/get-started/supported-languages.md
+++ b/semantic-kernel/get-started/supported-languages.md
@@ -228,7 +228,7 @@ For the list of out of the box vector store connectors and the language support
| Chroma | ✅ | ✅ | ❌ | |
| DuckDB | ✅ | ❌ | ❌ | |
| Milvus | ✅ | ✅ | ❌ | |
-| Pinecone | ✅ | ✅ | ❌ | |
+| Pinecone | ❌ | ✅ | ❌ | |
| Postgres | ✅ | ✅ | ❌ | |
| Qdrant | ✅ | ✅ | ❌ | |
| Redis | ✅ | ✅ | ❌ | |