May 21st, 2025
0 reactions

Vector Data Extensions are now Generally Available (GA)

We’re excited to announce the release of Microsoft.Extensions.VectorData.Abstractions, a foundational library providing exchange types and abstractions for vector stores when working with vector data in AI-powered applications. This release is the result of a close collaboration between the Semantic Kernel and .NET teams, combining expertise in AI and developer tooling to deliver a robust, extensible solution for developers.

What is Microsoft.Extensions.VectorData.Abstractions?

Microsoft.Extensions.VectorData.Abstractions provides shared abstractions and utilities for working with vector data, enabling developers to build scalable, maintainable, and interoperable AI solutions. These abstractions are now generally available (GA) and serve as the foundation for integrating vector databases into AI workflows.

Key features include:
  • Interoperability – Libraries can work together more easily by targeting the same abstractions.
  • Extensibility – Developers can build on top of shared types to add new capabilities.
  • Consistency – A unified programming model across different implementations reduces integration complexity.

Usage with Microsoft.Extensions.AI.Abstractions

Microsoft.Extensions.VectorData.Abstractions is designed to seamlessly integrate with the embedding generation abstractions exposed by Microsoft.Extensions.AI.Abstractions.  Both IEmbeddingGenerator and the Embedding type from Microsoft.Extensions.AI.Abstractions is fully supported by Microsoft.Extensions.VectorData.Abstractions and the Microsoft.Extension.AI packages are now also Generally Available.

Microsoft.Extensions.AI and Semantic Kernel provide various implementations for Microsoft.Extensions.AI.Abstractions that can be used to connect to services for embedding generation.

Why target these abstractions?

If you’re building a library, it’s critical to remain agnostic to specific AI or vector systems. By depending only on these shared abstractions, you avoid locking your consumers into particular providers and ensure your library can interoperate with others. This promotes flexibility and broad compatibility across the ecosystem.

If you’re building an application, you have more freedom to choose concrete implementations.

What does this mean in practice?

  • Providers can implement these abstractions to integrate smoothly with the ecosystem.
  • Library authors should build on the abstractions to enable composability and avoid forcing provider choices on consumers.
  • Application developers benefit from a consistent API, making it easier to switch or combine providers without major code changes.

Available Implementations

The Semantic Kernel and .NET teams have worked closely together to build a wide range of vector store connectors that implement the abstractions provided by Microsoft.Extensions.VectorData.Abstractions. These connectors make it easy to integrate popular vector databases like Azure AI Search, Qdrant, PostgreSQL, and more into your AI applications.

You can find a full list of available connectors in the Semantic Kernel out of the box connectors documentation.

Usage

First add the required packages to your application


dotnet add package Azure.Identity
dotnet add package Azure.AI.OpenAI --prerelease
dotnet add package Microsoft.Extensions.AI.OpenAI --prerelease
dotnet add package Microsoft.SemanticKernel.Connectors.SqliteVec --prerelease
    

Then create an embedding generator and a vector store collection.  Make sure to pass your embedding generator to the vector store collection, so that embedding generation is seamlessly handled for you by the collection class.  You can then start upserting records and doing vector searches.


using Azure.AI.OpenAI;
using Azure.Identity;
using Microsoft.Extensions.AI;
using Microsoft.Extensions.VectorData;
using Microsoft.SemanticKernel.Connectors.SqliteVec;

// Create embedding generator
IEmbeddingGenerator<string, Embedding<float>> embeddingGenerator =
    new AzureOpenAIClient(new Uri(Settings.EmbeddingEndpoint), new DefaultAzureCredential())
        .GetEmbeddingClient("text-embedding-3-large")
        .AsIEmbeddingGenerator(1536);

// Create vector store collection object
VectorStoreCollection<int, Product> collection = new SqliteCollection<int, Product>(
    connectionString: "Data Source=products.db",
    name: "products",
    new SqliteCollectionOptions
    {
        // Pass embedding generator to collection.
        EmbeddingGenerator = embeddingGenerator,
    });

// Create the collection if it does not exist
await collection.EnsureCollectionExistsAsync();

// Start upserting records.
// The Description text will automatically be converted to a vector on upsert and
// stored in the Embedding field.
await collection.UpsertAsync(new Product
{
    Id = 1,
    Name = "Kettle",
    TenantId = 5,
    Description = "This kettle is great for making tea, it heats up quickly and has a large capacity."
});

// Do a vector search.  The collection will automatically generate a search vector, from
// the search string, to use for the similarity search.
var query = "Find me kettles that can hold a lot of water";
await foreach (var result in collection.SearchAsync(query, top: 5, new() { Filter = r => r.TenantId == 5 }))
{
    Console.WriteLine(result.Record.Description);
}

class Product
{
    [VectorStoreKey]
    public int Id { get; set; }

    [VectorStoreData]
    public string Name { get; set; }

    [VectorStoreData]
    public int TenantId { get; set; }

    [VectorStoreData]
    public string Description { get; set; }

    // The value of this property will automatically be converted to a vector on upsert.
    [VectorStoreVector(Dimensions: 1536)]
    public string? Embedding => this.Description;
}
    

GA for Abstractions, Preview for Implementations

While the Microsoft.Extensions.VectorData.Abstractions abstractions are now generally available, the Semantic Kernel implementations are still in preview. Over the coming weeks, we will work to make these implementations generally available.

There may still be small breaking changes to the implementations before they become generally available as we ensure that these are all release ready, use the latest drivers and are of the highest quality and stability for the future.

Why the Delay for Some Connectors?

Some vector store connectors depend on drivers or SDKs that are not yet generally available. For example, certain connectors rely on database drivers that are still in preview or undergoing final testing. To ensure that we provide developers with a consistent experience, we’ve chosen to delay the GA release of these connectors until their dependencies are fully ready.

Get Started Today

To get started with Microsoft.Extensions.VectorData.Abstractions:

  1. Check out the documentation for detailed guides and tutorials.
  2. Explore the Semantic Kernel GitHub repository to find vector store connectors and examples.
  3. Also check out this post on the .NET blog for even more information on the Microsoft.Extensions.VectorData.Abstractions and Microsoft.Extensions.AI releases.

We’re excited to see what you build with Microsoft.Extensions.VectorData.Abstractions and the Semantic Kernel connectors. Stay tuned for updates as we roll out GA implementations in the coming weeks!

Author

Wes Steyn
Principal Software Engineer

0 comments