Skip to content

.Net: [MEVD] Added GetService and Metadata for vector store abstractions #11055

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

Conversation

dmytrostruk
Copy link
Member

@dmytrostruk dmytrostruk commented Mar 19, 2025

Motivation and Context

Related: #11013

This PR marks IVectorStoreRecordCollection.CollectionName property as obsolete in favor of Metadata classes and GetService method (the approach which is also used in MEAI).

GetService method is added to each vector store interface and each implementation is updated to return Metadata classes or underlying services used for breaking-glass scenarios. (Note: this is a breaking change for already existing implementations, since new GetService method should be implemented).

The changes allow to:

  • Extend vector store related metadata by exposing not only CollectionName, but other properties like VectorStoreName, DatabaseName and any other potential properties in the future. These properties are going to be used in telemetry decorators, which will be implemented in separate PR.
  • Get access to underlying services used by vector store implementations for breaking-glass scenarios (when functionality from abstraction is not enough to handle a specific use case).

@westey-m @roji

Contribution Checklist

@dmytrostruk dmytrostruk self-assigned this Mar 19, 2025
@dmytrostruk dmytrostruk requested a review from a team as a code owner March 19, 2025 00:29
@markwallace-microsoft markwallace-microsoft added .NET Issue or Pull requests regarding .NET code kernel Issues or pull requests impacting the core kernel memory labels Mar 19, 2025
@dmytrostruk dmytrostruk added the PR: breaking change Pull requests that introduce breaking changes label Mar 19, 2025
@dmytrostruk dmytrostruk changed the base branch from main to feature-vector-data-preb2 March 20, 2025 14:18
Copy link
Member

@roji roji left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM after comments are addressed, thanks @dmytrostruk!

@dmytrostruk dmytrostruk merged commit f77e266 into microsoft:feature-vector-data-preb2 Apr 7, 2025
11 checks passed
@roji
Copy link
Member

roji commented Apr 10, 2025

@dmytrostruk I think we're missing extensions over the new GetService(), as in MEAI. This can be added later without breaking, but I do want to at least make sure you have it tracked somewhere? It's also pretty trivial in case you just want to submit a PR and fix it.


Assert.NotNull(collectionMetadata);
Assert.NotNull(collectionMetadata.VectorStoreSystemName);
Assert.NotNull(collectionMetadata.VectorStoreName);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This fails for e.g. Weaviate, where there's no VectorStoreName (I guess we're not running these integration tests in CI?).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kernel Issues or pull requests impacting the core kernel memory .NET Issue or Pull requests regarding .NET code PR: breaking change Pull requests that introduce breaking changes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants