microsoft / microsoft/semantic-kernel

.Net: [MEVD] Throw for non-nullable embedding-generated vector properties without a setter

Open
#11,740 1 comment 0 reactions 1 assignee View on GitHub

@roji is already working on this.

Since Apr 25, 2025.

.NET Build msft.ext.vectordata
Dominant language
C#
Stars
28.6k
Forks
4.8k
Avg merge
14h 13m
Merged PRs (30d)
18

Description

In https://github.com/microsoft/semantic-kernel/issues/10492, we're adding the ability to map arbitrary properties to a data store vector property, via an IEmbeddingGenerator:

[VectorStoreRecordVector(Dimensions: 3)]
public string Description { get; set; }

Such properties aren't read back from the database (embeddings can't be converted back to their source input) - we through if Include Vectors is set to true.

To tighten things a bit, we could validate that such properties are nullable. However, these properties can also be getter-only, as follows:

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

[VectorStoreRecordVector(Dimensions: 3)]
public string DescriptionEmbedding => Description;

So we should do this only when there's a setter.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.