Skip to content

.Net MEVD: Consider obsoleting VectorSearchOptions.VectorPropertyName in favor of a strongly-typed lambda VectorPropertySelector #10420

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

Closed
roji opened this issue Feb 5, 2025 · 1 comment
Assignees
Labels
Build Features planned for next Build conference memory connector memory msft.ext.vectordata Related to Microsoft.Extensions.VectorData .NET Issue or Pull requests regarding .NET code sk team issue A tag to denote issues that where created by the Semantic Kernel team (i.e., not the community)

Comments

@roji
Copy link
Member

roji commented Feb 5, 2025

VectorSearchOptions currently has VectorPropertyName, allowing the user to specify which vector property is to be searched (for cases where there are multiple vector properties). The property is a string representing the storage name.

However, in most (ideally all) APIs on MEVD, the interaction with the record is via strongly-typed property accesses on the user .NET type, rather than weakly-typed storage property names. For example, we're moving away from the current filter mechanism - which relies on storage string properties - to using LINQ expressions, which allow referencing .NET properties; this proposes that we do the same for selecting the vector property:

// Current API:
var results = await fixture.Collection.VectorizedSearchAsync(
    new ReadOnlyMemory<float>([1, 2, 3]),
    new() { VectorPropertyName = "some_vector_prop" });

// New API:
var results = await fixture.Collection.VectorizedSearchAsync(
    new ReadOnlyMemory<float>([1, 2, 3]),
    new() { VectorProperty = r => r.SomeVectorProp });

/cc @westey-m

@roji roji added .NET Issue or Pull requests regarding .NET code memory memory connector msft.ext.vectordata Related to Microsoft.Extensions.VectorData labels Feb 5, 2025
@roji roji self-assigned this Feb 5, 2025
@markwallace-microsoft markwallace-microsoft moved this to Sprint: Planned in Semantic Kernel Feb 6, 2025
@markwallace-microsoft markwallace-microsoft added the Build Features planned for next Build conference label Feb 7, 2025
@evchaki evchaki added the sk team issue A tag to denote issues that where created by the Semantic Kernel team (i.e., not the community) label Feb 10, 2025
@roji roji assigned adamsitnik and unassigned roji Mar 4, 2025
adamsitnik added a commit that referenced this issue Mar 7, 2025
@adamsitnik
Copy link
Member

Implemented in #10850

@roji roji moved this from Sprint: Planned to Sprint: Done in Semantic Kernel Mar 13, 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 memory connector memory msft.ext.vectordata Related to Microsoft.Extensions.VectorData .NET Issue or Pull requests regarding .NET code sk team issue A tag to denote issues that where created by the Semantic Kernel team (i.e., not the community)
Projects
Archived in project
Development

No branches or pull requests

4 participants