dotnet / dotnet/extensions

[MEVD] Conformance tests create the vector index before seeding data

Open
#7,698 2 comments 0 reactions 1 assignee Claimed by @adamsitnik View on GitHub
area-mevd untriaged
Dominant language
C#
Stars
3.2k
Forks
894
Avg merge
1d 12h
Merged PRs (30d)
23

Description

`VectorStoreCollectionFixtureBase.InitializeAsync()` calls `EnsureCollectionExistsAsync()` before `SeedAsync()`:

`await Collection.EnsureCollectionExistsAsync(...);`
`await SeedAsync();`

[VectorStoreCollectionFixtureBase.cs](https://github.com/dotnet/extensions/blob/main/src/Libraries/Microsoft.Extensions.VectorData.ConformanceTests/Support/VectorStoreCollectionFixtureBase.cs)

This means any index creation performed inside `EnsureCollectionExistsAsync` always runs against an empty collection.

IVF-based vector indexes can't be built that way — centroids are trained from the vectors already present, so the data has to exist before the index is created. For providers whose index types are IVF-based, index creation fails during fixture setup, which means the conformance tests fail before any test logic runs.

Is there a recommended approach for providers in this situation, or is support for this planned?

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.