From 0608aaedce1c54131b47ce60915d678d6e7e794f Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Wed, 22 Jul 2026 13:17:50 +0000 Subject: [PATCH 1/3] Migrate Microsoft.SemanticKernel.Connectors.* to CommunityToolkit.VectorData.* --- docs/ai/vector-stores/define-your-data-model.md | 8 ++++---- .../vector-stores/how-to/build-vector-search-app.md | 8 ++++---- docs/ai/vector-stores/how-to/use-vector-stores.md | 4 ++-- .../how-to/vector-store-data-ingestion.md | 4 ++-- docs/ai/vector-stores/manage-data.md | 2 +- docs/ai/vector-stores/overview.md | 11 ++++------- .../chat-with-data/azure-openai/CloudService.cs | 2 +- .../snippets/chat-with-data/azure-openai/Program.cs | 2 +- .../chat-with-data/azure-openai/VectorDataAI.csproj | 2 +- .../snippets/chat-with-data/openai/CloudService.cs | 2 +- .../snippets/chat-with-data/openai/Program.cs | 2 +- .../chat-with-data/openai/VectorDataAI.csproj | 2 +- .../snippets/conceptual/VectorStoreSnippets.csproj | 6 +++--- .../snippets/conceptual/defining-your-data-model.cs | 2 +- .../snippets/conceptual/dynamic-data-model.cs | 2 +- docs/ai/vector-stores/snippets/how-to/Hotel.cs | 2 +- .../snippets/how-to/HowToSnippets.csproj | 4 ++-- docs/ai/vector-stores/snippets/how-to/Program.cs | 2 +- .../ai/vector-stores/snippets/how-to/PutItTogether.cs | 2 +- 19 files changed, 33 insertions(+), 36 deletions(-) diff --git a/docs/ai/vector-stores/define-your-data-model.md b/docs/ai/vector-stores/define-your-data-model.md index b15e63d5e594d..79389a89f49ad 100644 --- a/docs/ai/vector-stores/define-your-data-model.md +++ b/docs/ai/vector-stores/define-your-data-model.md @@ -127,7 +127,7 @@ Use the attrib It's also possible to use on properties that don't have a vector type, for example, a property of type `string`. When a property is decorated in this way, you need to provide an instance to the vector store. When upserting the record, the text that's in the `string` property is automatically converted and stored as a vector in the database. (It's not possible to retrieve a vector using this mechanism.) ```csharp -[VectorStoreVector(Dimensions: 4, DistanceFunction = DistanceFunction.CosineSimilarity, IndexKind = IndexKind.Hnsw)] +[VectorStoreVector(dimensions: 4, DistanceFunction = DistanceFunction.CosineSimilarity, IndexKind = IndexKind.Hnsw)] public string DescriptionEmbedding { get; set; } ``` @@ -138,7 +138,7 @@ The following table shows the parameters for `VectorStoreVectorAttribute`. | Parameter | Required | Description | |------------------------------------------------------------------------------------|:--------:|-------------| -| | Yes | The number of dimensions that the vector has. This is required when creating a vector index for a collection. | +| `dimensions` | Yes | The number of dimensions that the vector has. This is required when creating a vector index for a collection. Pass as a constructor argument: `[VectorStoreVector(dimensions: 1536)]`. | | | No | The type of index to index the vector with. Default varies by vector store type. | | | No | The type of function to use when doing vector comparison during vector search over this vector. Default varies by vector store type. | | | No | Can be used to supply an alternative name for the property in the database. This parameter is not supported by all providers, for example, where alternatives like `JsonPropertyNameAttribute` is supported. | @@ -174,7 +174,7 @@ Vector databases are all about storing *embeddings* - or numerical representatio You can define your vector property as `float[]` or `ReadOnlyMemory`, representing the embedding directly, and generate embeddings yourself before each operation: ```csharp -[VectorStoreVector(Dimensions: 1536)] +[VectorStoreVector(dimensions: 1536)] public ReadOnlyMemory? DescriptionEmbedding { get; set; } ``` @@ -196,7 +196,7 @@ The recommended approach is to configure an > embeddingGenerator = ...; @@ -85,22 +85,19 @@ class Movie [VectorStoreData] public string Title { get; set; } - [VectorStoreVector(Dimensions: 1536)] + [VectorStoreVector(dimensions: 1536)] public string Description { get; set; } } ``` ## Vector store providers -The `Microsoft.Extensions.VectorData.Abstractions` package defines the abstractions, and separate [provider packages](/semantic-kernel/concepts/vector-store-connectors/out-of-the-box-connectors/) provide implementations for specific vector databases. Choose the provider that matches your vector database, for example, [Microsoft.SemanticKernel.Connectors.AzureAISearch](https://www.nuget.org/packages/Microsoft.SemanticKernel.Connectors.AzureAISearch). - -> [!NOTE] -> Despite the inclusion of "SemanticKernel" in the package names, these providers have nothing to do with Semantic Kernel and are usable anywhere in .NET, including Agent Framework. +The `Microsoft.Extensions.VectorData.Abstractions` package defines the abstractions, and separate provider packages provide implementations for specific vector databases. Choose the provider that matches your vector database, for example, [CommunityToolkit.VectorData.AzureAISearch](https://www.nuget.org/packages/CommunityToolkit.VectorData.AzureAISearch). All providers implement the same and abstract classes, so you can switch between them without changing your application logic. > [!TIP] -> Use the in-memory provider ([Microsoft.SemanticKernel.Connectors.InMemory](https://www.nuget.org/packages/Microsoft.SemanticKernel.Connectors.InMemory)) during initial development/prototyping - it doesn't require any external service or configuration, and you can swap it out for a production provider later. Avoid using the InMemory provider for testing, as there can be important differences between this provider and your production database. Consider using [testcontainers](https://dotnet.testcontainers.org/) to run tests against your production database system. +> Use the in-memory provider ([CommunityToolkit.VectorData.InMemory](https://www.nuget.org/packages/CommunityToolkit.VectorData.InMemory)) during initial development/prototyping - it doesn't require any external service or configuration, and you can swap it out for a production provider later. Avoid using the InMemory provider for testing, as there can be important differences between this provider and your production database. Consider using [testcontainers](https://dotnet.testcontainers.org/) to run tests against your production database system. ## Related content diff --git a/docs/ai/vector-stores/snippets/chat-with-data/azure-openai/CloudService.cs b/docs/ai/vector-stores/snippets/chat-with-data/azure-openai/CloudService.cs index 44b3d72a86c83..8bba97b150ad3 100644 --- a/docs/ai/vector-stores/snippets/chat-with-data/azure-openai/CloudService.cs +++ b/docs/ai/vector-stores/snippets/chat-with-data/azure-openai/CloudService.cs @@ -14,7 +14,7 @@ internal class CloudService public string Description { get; set; } [VectorStoreVector( - Dimensions: 384, + dimensions: 384, DistanceFunction = DistanceFunction.CosineSimilarity)] public ReadOnlyMemory Vector { get; set; } } diff --git a/docs/ai/vector-stores/snippets/chat-with-data/azure-openai/Program.cs b/docs/ai/vector-stores/snippets/chat-with-data/azure-openai/Program.cs index 426e977d37e64..cb5b65de6005b 100644 --- a/docs/ai/vector-stores/snippets/chat-with-data/azure-openai/Program.cs +++ b/docs/ai/vector-stores/snippets/chat-with-data/azure-openai/Program.cs @@ -3,7 +3,7 @@ using Microsoft.Extensions.AI; using Microsoft.Extensions.Configuration; using Microsoft.Extensions.VectorData; -using Microsoft.SemanticKernel.Connectors.InMemory; +using CommunityToolkit.VectorData.InMemory; using System.Linq; using VectorDataAI; diff --git a/docs/ai/vector-stores/snippets/chat-with-data/azure-openai/VectorDataAI.csproj b/docs/ai/vector-stores/snippets/chat-with-data/azure-openai/VectorDataAI.csproj index d2a9c4b4cfc60..fd9ce3938535a 100644 --- a/docs/ai/vector-stores/snippets/chat-with-data/azure-openai/VectorDataAI.csproj +++ b/docs/ai/vector-stores/snippets/chat-with-data/azure-openai/VectorDataAI.csproj @@ -14,7 +14,7 @@ - + diff --git a/docs/ai/vector-stores/snippets/chat-with-data/openai/CloudService.cs b/docs/ai/vector-stores/snippets/chat-with-data/openai/CloudService.cs index 44b3d72a86c83..8bba97b150ad3 100644 --- a/docs/ai/vector-stores/snippets/chat-with-data/openai/CloudService.cs +++ b/docs/ai/vector-stores/snippets/chat-with-data/openai/CloudService.cs @@ -14,7 +14,7 @@ internal class CloudService public string Description { get; set; } [VectorStoreVector( - Dimensions: 384, + dimensions: 384, DistanceFunction = DistanceFunction.CosineSimilarity)] public ReadOnlyMemory Vector { get; set; } } diff --git a/docs/ai/vector-stores/snippets/chat-with-data/openai/Program.cs b/docs/ai/vector-stores/snippets/chat-with-data/openai/Program.cs index c43fe9f6781e0..d2d6a8ab864b4 100644 --- a/docs/ai/vector-stores/snippets/chat-with-data/openai/Program.cs +++ b/docs/ai/vector-stores/snippets/chat-with-data/openai/Program.cs @@ -1,7 +1,7 @@ using Microsoft.Extensions.AI; using Microsoft.Extensions.Configuration; using Microsoft.Extensions.VectorData; -using Microsoft.SemanticKernel.Connectors.InMemory; +using CommunityToolkit.VectorData.InMemory; using OpenAI; using System.ClientModel; using VectorDataAI; diff --git a/docs/ai/vector-stores/snippets/chat-with-data/openai/VectorDataAI.csproj b/docs/ai/vector-stores/snippets/chat-with-data/openai/VectorDataAI.csproj index 9d1ab9069f6c2..c8fe66faf31b2 100644 --- a/docs/ai/vector-stores/snippets/chat-with-data/openai/VectorDataAI.csproj +++ b/docs/ai/vector-stores/snippets/chat-with-data/openai/VectorDataAI.csproj @@ -12,7 +12,7 @@ - + diff --git a/docs/ai/vector-stores/snippets/conceptual/VectorStoreSnippets.csproj b/docs/ai/vector-stores/snippets/conceptual/VectorStoreSnippets.csproj index fcb52214d0132..8063143100689 100644 --- a/docs/ai/vector-stores/snippets/conceptual/VectorStoreSnippets.csproj +++ b/docs/ai/vector-stores/snippets/conceptual/VectorStoreSnippets.csproj @@ -11,9 +11,9 @@ - - - + + + diff --git a/docs/ai/vector-stores/snippets/conceptual/defining-your-data-model.cs b/docs/ai/vector-stores/snippets/conceptual/defining-your-data-model.cs index f1a03abf786ca..ca017fcb563b6 100644 --- a/docs/ai/vector-stores/snippets/conceptual/defining-your-data-model.cs +++ b/docs/ai/vector-stores/snippets/conceptual/defining-your-data-model.cs @@ -17,7 +17,7 @@ public class Hotel public required string Description { get; set; } // - [VectorStoreVector(Dimensions: 4, DistanceFunction = DistanceFunction.CosineSimilarity, IndexKind = IndexKind.Hnsw)] + [VectorStoreVector(dimensions: 4, DistanceFunction = DistanceFunction.CosineSimilarity, IndexKind = IndexKind.Hnsw)] public ReadOnlyMemory? DescriptionEmbedding { get; set; } // diff --git a/docs/ai/vector-stores/snippets/conceptual/dynamic-data-model.cs b/docs/ai/vector-stores/snippets/conceptual/dynamic-data-model.cs index c4c8f4fc499fd..3388dd6b5745d 100644 --- a/docs/ai/vector-stores/snippets/conceptual/dynamic-data-model.cs +++ b/docs/ai/vector-stores/snippets/conceptual/dynamic-data-model.cs @@ -1,5 +1,5 @@ using Microsoft.Extensions.VectorData; -using Microsoft.SemanticKernel.Connectors.Qdrant; +using CommunityToolkit.VectorData.Qdrant; using Qdrant.Client; public class DynamicDataModel diff --git a/docs/ai/vector-stores/snippets/how-to/Hotel.cs b/docs/ai/vector-stores/snippets/how-to/Hotel.cs index 632bffd5fe3ca..53e11824d2380 100644 --- a/docs/ai/vector-stores/snippets/how-to/Hotel.cs +++ b/docs/ai/vector-stores/snippets/how-to/Hotel.cs @@ -12,7 +12,7 @@ public record class Hotel [VectorStoreData(IsFullTextIndexed = true)] public string? Description { get; set; } - [VectorStoreVector(Dimensions: 1536, DistanceFunction = DistanceFunction.CosineSimilarity)] + [VectorStoreVector(dimensions: 1536, DistanceFunction = DistanceFunction.CosineSimilarity)] public ReadOnlyMemory? DescriptionEmbedding { get; set; } [VectorStoreData(IsIndexed = true)] diff --git a/docs/ai/vector-stores/snippets/how-to/HowToSnippets.csproj b/docs/ai/vector-stores/snippets/how-to/HowToSnippets.csproj index 96d5a548b0bb1..2f91c65a9cfbd 100644 --- a/docs/ai/vector-stores/snippets/how-to/HowToSnippets.csproj +++ b/docs/ai/vector-stores/snippets/how-to/HowToSnippets.csproj @@ -14,8 +14,8 @@ - - + + diff --git a/docs/ai/vector-stores/snippets/how-to/Program.cs b/docs/ai/vector-stores/snippets/how-to/Program.cs index 9031980080dcc..72c53333d4f84 100644 --- a/docs/ai/vector-stores/snippets/how-to/Program.cs +++ b/docs/ai/vector-stores/snippets/how-to/Program.cs @@ -1,5 +1,5 @@ using Microsoft.Extensions.VectorData; -using Microsoft.SemanticKernel.Connectors.InMemory; +using CommunityToolkit.VectorData.InMemory; // // Create an in-memory vector store (no external service required). diff --git a/docs/ai/vector-stores/snippets/how-to/PutItTogether.cs b/docs/ai/vector-stores/snippets/how-to/PutItTogether.cs index 82546657127b9..301fb77c75c0c 100644 --- a/docs/ai/vector-stores/snippets/how-to/PutItTogether.cs +++ b/docs/ai/vector-stores/snippets/how-to/PutItTogether.cs @@ -3,7 +3,7 @@ using Microsoft.Extensions.AI; using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.VectorData; -using Microsoft.SemanticKernel.Connectors.Redis; +using CommunityToolkit.VectorData.Redis; using VectorIngest; public class PutItAllTogether From 6a6d0dff09b0e24693e07d874dd155b40c118498 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Wed, 22 Jul 2026 13:43:58 +0000 Subject: [PATCH 2/3] Address PR feedback: remove --prerelease flags and pin package versions to 1.0.0 --- docs/ai/vector-stores/how-to/build-vector-search-app.md | 4 ++-- docs/ai/vector-stores/how-to/use-vector-stores.md | 2 +- .../ai/vector-stores/how-to/vector-store-data-ingestion.md | 2 +- .../snippets/conceptual/VectorStoreSnippets.csproj | 7 +++---- docs/ai/vector-stores/snippets/how-to/HowToSnippets.csproj | 4 ++-- 5 files changed, 9 insertions(+), 10 deletions(-) diff --git a/docs/ai/vector-stores/how-to/build-vector-search-app.md b/docs/ai/vector-stores/how-to/build-vector-search-app.md index 099a0b925a411..587e588b89aeb 100644 --- a/docs/ai/vector-stores/how-to/build-vector-search-app.md +++ b/docs/ai/vector-stores/how-to/build-vector-search-app.md @@ -65,7 +65,7 @@ Complete the following steps to create a .NET console app that can: dotnet add package Azure.Identity dotnet add package Azure.AI.OpenAI dotnet add package Microsoft.Extensions.AI.OpenAI - dotnet add package CommunityToolkit.VectorData.InMemory --prerelease + dotnet add package CommunityToolkit.VectorData.InMemory dotnet add package Microsoft.Extensions.Configuration dotnet add package Microsoft.Extensions.Configuration.UserSecrets dotnet add package System.Linq.AsyncEnumerable @@ -85,7 +85,7 @@ Complete the following steps to create a .NET console app that can: ```bash dotnet package add Microsoft.Extensions.AI.OpenAI --prerelease - dotnet package add CommunityToolkit.VectorData.InMemory --prerelease + dotnet package add CommunityToolkit.VectorData.InMemory dotnet package add Microsoft.Extensions.Configuration dotnet package add Microsoft.Extensions.Configuration.UserSecrets dotnet package add System.Linq.AsyncEnumerable diff --git a/docs/ai/vector-stores/how-to/use-vector-stores.md b/docs/ai/vector-stores/how-to/use-vector-stores.md index 73fca2ded78cf..ef9a0c28e4503 100644 --- a/docs/ai/vector-stores/how-to/use-vector-stores.md +++ b/docs/ai/vector-stores/how-to/use-vector-stores.md @@ -22,7 +22,7 @@ This article shows you how to use the key features of the library. Install a provider package for your vector database. The `Microsoft.Extensions.VectorData.Abstractions` package is brought in automatically as a transitive dependency. The following example uses the in-memory provider for development and testing: ```dotnetcli -dotnet package add CommunityToolkit.VectorData.InMemory --prerelease +dotnet package add CommunityToolkit.VectorData.InMemory ``` For production scenarios, replace `CommunityToolkit.VectorData.InMemory` with the provider for your database. diff --git a/docs/ai/vector-stores/how-to/vector-store-data-ingestion.md b/docs/ai/vector-stores/how-to/vector-store-data-ingestion.md index 3501b66b217b6..16dd0f924df39 100644 --- a/docs/ai/vector-stores/how-to/vector-store-data-ingestion.md +++ b/docs/ai/vector-stores/how-to/vector-store-data-ingestion.md @@ -43,7 +43,7 @@ dotnet new console --framework net8.0 --name VectorIngest cd VectorIngest dotnet package add Azure.AI.OpenAI dotnet package add Microsoft.Extensions.AI.OpenAI -dotnet package add CommunityToolkit.VectorData.Redis --prerelease +dotnet package add CommunityToolkit.VectorData.Redis dotnet package add DocumentFormat.OpenXml ``` diff --git a/docs/ai/vector-stores/snippets/conceptual/VectorStoreSnippets.csproj b/docs/ai/vector-stores/snippets/conceptual/VectorStoreSnippets.csproj index 8063143100689..fc4da01253496 100644 --- a/docs/ai/vector-stores/snippets/conceptual/VectorStoreSnippets.csproj +++ b/docs/ai/vector-stores/snippets/conceptual/VectorStoreSnippets.csproj @@ -11,11 +11,10 @@ - - - + + + - diff --git a/docs/ai/vector-stores/snippets/how-to/HowToSnippets.csproj b/docs/ai/vector-stores/snippets/how-to/HowToSnippets.csproj index 2f91c65a9cfbd..745167d1f4298 100644 --- a/docs/ai/vector-stores/snippets/how-to/HowToSnippets.csproj +++ b/docs/ai/vector-stores/snippets/how-to/HowToSnippets.csproj @@ -14,8 +14,8 @@ - - + + From 8ebfb2063a229508a715e0cc0b69c050aac5c86e Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Wed, 22 Jul 2026 13:50:20 +0000 Subject: [PATCH 3/3] Restore out-of-the-box providers link in use-vector-stores.md --- docs/ai/vector-stores/how-to/use-vector-stores.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/ai/vector-stores/how-to/use-vector-stores.md b/docs/ai/vector-stores/how-to/use-vector-stores.md index ef9a0c28e4503..8a0c8d97d6cd5 100644 --- a/docs/ai/vector-stores/how-to/use-vector-stores.md +++ b/docs/ai/vector-stores/how-to/use-vector-stores.md @@ -25,7 +25,7 @@ Install a provider package for your vector database. The `Microsoft.Extensions.V dotnet package add CommunityToolkit.VectorData.InMemory ``` -For production scenarios, replace `CommunityToolkit.VectorData.InMemory` with the provider for your database. +For production scenarios, replace `CommunityToolkit.VectorData.InMemory` with the provider for your database. For available providers, see [Out-of-the-box Vector Store providers](/semantic-kernel/concepts/vector-store-connectors/out-of-the-box-connectors/). ## Define a data model