Skip to content

.Net: [MEVD] Shorten IVectorStoreRecordCollection (and related) names #11230

Description

@roji

In an effort to make MEVD's APIs easier to use, I'd like to propose removing Record from many of the type names in MEVD, so have IVectorStoreCollection instead of IVectorStoreRecordCollection. This also cascades to lots of other types (VectorStoreKeyProperty and friends, [VectorStoreKey] instead of [VectorStoreRecordKey]).

I think one of the original motivators for the current naming is that the store itself can be considered a collection of collections (e.g. IVectorStore has the ListCollectionsAsync API). However, we haven't seen any other actual collection-like operations appear on IVectorStore, and there seems to be very little ambiguity at this point that IVectorStoreCollection just refers to a collection within the vector database; so IMHO we may as well make the dev experience better here and remove that word.

It's worth noting that we sometimes have quite long names, e.g. AzureCosmosDBMongoDBVectorStoreRecordCollection. If we remove Record and also apply the simplifications proposed in #10631, we end up with CosmosMongoVectorStoreCollection, which starts to be a bit more manageable!

  • The old type names can stay with an [Obsolete("...", error=true], meaning that users will get a very clear build error on the rename and a note telling them exactly what they need to do.
  • We're already implementing more impactful breaking changes which users would have to react to anyway... We're adding a mandatory Top parameter to the search API (.Net MEVD: Consider making Top a mandatory parameter #10193), we're about to obsolete/remove VectorizedSearchAsync with SearchEmbeddingAsync and SearchAsync, and some other stuff. In other words, given the breaking changes being done, removing Record from the type names seems really minor-impact.

/cc westey (@westey-m) Dmytro Struk (@dmytrostruk) Adam Sitnik (@adamsitnik)

Activity

  1. added
    .NETIssue or Pull requests regarding .NET code
    BuildFeatures planned for next Build conference
    msft.ext.vectordataRelated to Microsoft.Extensions.VectorData
    on Mar 27, 2025
  2. changed the title [-][MEVD] Consider renaming IVectorStoreRecordCollection to IVectorStoreCollection (and related types)[/-] [+].Net: [MEVD] Consider renaming IVectorStoreRecordCollection to IVectorStoreCollection (and related types)[/+] on Mar 27, 2025
  3. changed the title [-].Net: [MEVD] Consider renaming IVectorStoreRecordCollection to IVectorStoreCollection (and related types)[/-] [+].Net: [MEVD] Consider renaming IVectorStoreRecordCollection (and related) to make it shorter[/+] on Mar 27, 2025
  4. roji commented on Mar 27, 2025

    @roji
    MemberAuthor

    For background, M.E.VectorData has two main abstractions, currently named as follows::

    • IVectorStore: represents a database in which vector data is kept. Contains multiple collections, each of which has a schema and contains records (which is where the vectors and related metadata is kept.
    • IVectorStoreRecordCollection: Contained within an IVectorStore, contains records (like database rows), each of which has a vector (or multiple) and some metadata.

    Options:

    • IVectorStoreRecordCollection (current)
      • It's long. The implementation type names get even longer (e.g. SqlServerVectorStoreRecordCollection)
      • If we interpret SomethingCollection as a collection of Something, this looks like it's either a collection of IVectorStoreRecords, or an interface collection of VectorStoreRecords. This isn't the case: there's neither a IVectorStoreRecord nor a VectorStoreRecord type anywhere; the "record" in question here is either the user's arbitrary .NET type which we're mapping (like an ORM), or a Dictionary<string, object> for dynamic/weakly-typed mapping. So the name here (and probably any other name ending with Collection) will be weird in that sense.
    • IVectorStoreCollection
      • Looks like a collection of vector stores (vector store = vector database), which it is not. It's a collection inside a vector store, and contains records.
    • IRecordCollection
      • Nice because very short.
      • Very generic/vague name, which doesn't in any way indicate that it's about vector databases (aside from the namespace). Could be very confusing to someone looking at the code without context etc.
    • IVectorRecordCollection
      • My (new) favorite; it's shorter, conveys that it's a vector thing, and is conceptually accurate as it really is a collection of records (like the current/original naming).
    • IVectorStoreRecords
      • Not sure we use plural type names in this way in .NET... Feels very weird.
    • Other ideas??
  5. roji commented on Apr 1, 2025

    @roji
    MemberAuthor

    Design decision: we're in principle all good with IVectorRecordCollection. However, we'll wait until the API review (end of April) before making any changes, to discuss this there and avoid doing two changes.

  6. moved this from Backlog: Planned to Sprint: In Progress in Semantic Kernelon May 1, 2025
  7. changed the title [-].Net: [MEVD] Consider renaming IVectorStoreRecordCollection (and related) to make it shorter[/-] [+].Net: [MEVD] Shorten IVectorStoreRecordCollection (and related) names[/+] on May 4, 2025
  8. moved this from Sprint: In Progress to Sprint: In Review in Semantic Kernelon May 4, 2025
  9. added a commit that references this issue on May 5, 2025
    1d82e6c
  10. adamsitnik commented on May 5, 2025

    @adamsitnik
    Member

    Fixed by #11879

  11. moved this from Sprint: In Review to Sprint: Done in Semantic Kernelon May 5, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

.NETIssue or Pull requests regarding .NET codeBuildFeatures planned for next Build conferencemsft.ext.vectordataRelated to Microsoft.Extensions.VectorData

Type

No type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions