Skip to content

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

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
roji opened this issue Apr 25, 2025 · 0 comments
Assignees
Labels
Build Features planned for next Build conference msft.ext.vectordata Related to Microsoft.Extensions.VectorData .NET Issue or Pull requests regarding .NET code

Comments

@roji
Copy link
Member

roji commented Apr 25, 2025

In #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.

@roji roji added .NET Issue or Pull requests regarding .NET code Build Features planned for next Build conference msft.ext.vectordata Related to Microsoft.Extensions.VectorData labels Apr 25, 2025
@roji roji self-assigned this Apr 25, 2025
@roji roji moved this to Backlog: Planned in Semantic Kernel Apr 25, 2025
@github-actions github-actions bot changed the title [MEVD] Throw for non-nullable embedding-generated vector properties without a setter .Net: [MEVD] Throw for non-nullable embedding-generated vector properties without a setter Apr 25, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Build Features planned for next Build conference msft.ext.vectordata Related to Microsoft.Extensions.VectorData .NET Issue or Pull requests regarding .NET code
Projects
Status: Backlog: Planned
Development

No branches or pull requests

2 participants