Draft
Reimplement ToolDescriptionEvaluator VectorDB on Microsoft.Extensions.VectorData#3057
Conversation
|
Azure Pipelines: Successfully started running 1 pipeline(s). There may be pipelines that require an authorized user to comment /azp run to run. |
Copilot
AI
changed the title
[WIP] Make VectorDB an implementation of Microsoft.Extensions.VectorData
Reimplement ToolDescriptionEvaluator VectorDB on Microsoft.Extensions.VectorData
Jul 16, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The
ToolDescriptionEvaluator'sVectorDBwas a bespoke in-memory store with a custom API. Building it on theMicrosoft.Extensions.VectorDataabstractions lets it be swapped for any provider (Azure AI Search, Cosmos DB, Redis, …) with little to no consumer changes, and unblocksMicrosoft.Extensions.DataIngestionfor chunking/processing.Changes
Abstractions: Derived
VectorDBfromVectorStoreand addedInMemoryVectorStoreCollection : VectorStoreCollection<string, Entry>. The original brute-force cosine-similarity search, sorted-key storage, and parallel divide-and-conquer query path are preserved behind the standardUpsertAsync/SearchAsync/GetAsync/DeleteAsyncsurface.Record schema:
Entryis now annotated for vector data:Pluggable metric retained:
IDistanceMetric/CosineSimilarity/DotProductkept, now span-based for zero-allocTensorPrimitivescalls.Consumer (
Program.cs): Resolves the collection from the store and uses the async API; search results are read asVectorSearchResult<Entry>(.Record/.Score).Packaging: Added
Microsoft.Extensions.VectorData.Abstractions10.0.1via central package management (aligned with the repo's pinnedMicrosoft.Extensions.AI.Abstractions 10.3.0).Notes
GetAsync(Expression<...>)intentionally throwsNotSupportedException— implementing it requiresExpression.Compile(), which is AOT-incompatible; the tool never calls it.top(previously up to2*TopK); consumers only ever read the first N ≤ top, so ranking is unchanged.