Skip to content

[MEDI] Use MEVD AutoGenerated Guid key feature; update MEVD/SK to latest versions#7423

Merged
adamsitnik merged 22 commits intodata-ingestion-preview2from
copilot/remove-key-setting-requirement
Mar 27, 2026
Merged

[MEDI] Use MEVD AutoGenerated Guid key feature; update MEVD/SK to latest versions#7423
adamsitnik merged 22 commits intodata-ingestion-preview2from
copilot/remove-key-setting-requirement

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Mar 23, 2026

VectorStoreWriter was manually assigning Key = Guid.NewGuid() on each record before upsert. MEVD 10.1.0 added IsAutoGenerated support on key properties, making this unnecessary.

Changes

  • VectorStoreWriter.cs: Remove manual Key = Guid.NewGuid() assignment
  • VectorStoreExtensions.cs: Add VectorStoreKeyProperty with IsAutoGenerated = true to the GetIngestionRecordCollection collection definition — the SK connector now auto-generates the Guid on upsert
  • VectorStoreWriterTests.cs: Add IsAutoGenerated = true to the key property in the custom-definition test so key generation still works for user-supplied schemas

Note: VectorStoreKeyAttribute.IsAutoGenerated is bool? and therefore not usable as a C# named attribute argument. Auto-generation is configured via VectorStoreKeyProperty in the VectorStoreCollectionDefinition instead.

Dependency updates

Property Old New
MicrosoftExtensionsVectorDataAbstractionsVersion 9.7.0 10.1.0
MicrosoftSemanticKernelConnectorsVersion 1.67.0-preview 1.74.0-preview
SK connector versions in ProjectTemplates.props 1.67.1-preview 1.74.0-preview
System.Linq.AsyncEnumerable 10.0.0 10.0.5

NuGet.config adds nuget.org as a source scoped exclusively to Microsoft.SemanticKernel.* packages because 1.74.0-preview is not yet mirrored to the internal dotnet-public feed.

System.Linq.AsyncEnumerable is bumped to 10.0.5 because Microsoft.SemanticKernel.Connectors.AzureAISearch 1.74.0-preview requires >= 10.0.4; the previous pin of 10.0.0 caused a NU1605 package downgrade error in Microsoft.Extensions.AI.Templates.Tests.

Original prompt

This section details on the original issue you should resolve

<issue_title>[MEDI] Use the AutoGenerated Guid key feature added recently by MEVD</issue_title>
<issue_description>We don't need to do this anymore:

cc @roji</issue_description>

<agent_instructions>1. Remove the need of setting the key here
2. Run all tests from the test/Libraries/Microsoft.Extensions.DataIngestion.Tests/Microsoft.Extensions.DataIngestion.Tests.csproj project, if any test fails, you need to update Microsoft.Extensions.VectorData (MEVD) version to latest
3. The MEVD version needs to be updated here and here
4. Update to latest version (10.1.0 for MicrosoftExtensionsVectorDataAbstractionsVersion) and 1.74.0-preview for MicrosoftSemanticKernelConnectorsVersion)
5. Ensure all tests are passing before sending a PR</agent_instructions>

Comments on the Issue (you are @copilot in this section)


📱 Kick off Copilot coding agent tasks wherever you are with GitHub Mobile, available on iOS and Android.

Microsoft Reviewers: Open in CodeFlow

Copilot AI and others added 17 commits March 14, 2026 20:50
…tedChunkRecord base type

Co-authored-by: adamsitnik <6011991+adamsitnik@users.noreply.github.com>
…toreWriter refactoring

Co-authored-by: adamsitnik <6011991+adamsitnik@users.noreply.github.com>
…ion property names

Co-authored-by: adamsitnik <6011991+adamsitnik@users.noreply.github.com>
Co-authored-by: adamsitnik <6011991+adamsitnik@users.noreply.github.com>
…al, throw in SetMetadata, make consts protected, remove JSON attributes

Co-authored-by: adamsitnik <6011991+adamsitnik@users.noreply.github.com>
…oc reference, remove JsonPropertyName, add custom schema test

Co-authored-by: adamsitnik <6011991+adamsitnik@users.noreply.github.com>
… custom storage names in test

Co-authored-by: adamsitnik <6011991+adamsitnik@users.noreply.github.com>
… for consistency

Co-authored-by: adamsitnik <6011991+adamsitnik@users.noreply.github.com>
Co-authored-by: Adam Sitnik <adam.sitnik@gmail.com>
Co-authored-by: adamsitnik <6011991+adamsitnik@users.noreply.github.com>
…ot IngestedChunk.cs files

Co-authored-by: adamsitnik <6011991+adamsitnik@users.noreply.github.com>
…n, move SetMetadata to non-sealed VectorStoreWriter

Co-authored-by: adamsitnik <6011991+adamsitnik@users.noreply.github.com>
…ied overload, fix typo, update README

- Renamed IngestedChunkRecord<TChunk> to IngestionChunkVectorRecord<TChunk> across all
  source, test, template, and snapshot files
- Fixed typo 'additiveDefintion' -> 'additiveDefinition' in VectorStoreExtensions.cs
- Added simplified non-generic GetIngestionRecordCollection overload for the common
  IngestionChunkVectorRecord<string> case
- Added XML remarks to generic GetIngestionRecordCollection method documenting usage
  patterns (simple, custom metadata, custom schema)
- Extended README.md with code samples for basic usage, custom metadata, and custom
  collection schema

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
… to latest

Co-authored-by: adamsitnik <6011991+adamsitnik@users.noreply.github.com>
Agent-Logs-Url: https://github.com/dotnet/extensions/sessions/45713a5e-1067-42e6-a6e2-a172b8bef7ee
Copilot AI changed the title [WIP] Remove key setting requirement for auto-generated Guid feature [MEDI] Use MEVD AutoGenerated Guid key feature; update MEVD/SK to latest versions Mar 23, 2026
Copilot AI requested a review from adamsitnik March 23, 2026 11:28
Copy link
Copy Markdown
Member

@adamsitnik adamsitnik left a comment

Choose a reason for hiding this comment

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

@copilot address my feedback

Copy link
Copy Markdown
Contributor Author

Copilot AI commented Mar 23, 2026

Just as a heads up, I was blocked by some firewall rules while working on your feedback. Expand below for details.

Warning

Firewall rules blocked me from connecting to one or more addresses (expand for details)

I tried to connect to the following addresses, but was blocked by firewall rules:

  • https://api.github.com/repos/microsoft/semantic-kernel/git/trees/main
    • Triggering command: /usr/bin/curl curl -s REDACTED (http block)

If you need me to access, download, or install something from one of these locations, you can either:

Copilot AI requested a review from adamsitnik March 23, 2026 11:56
Base automatically changed from copilot/fix-vectorstorewriter-injection to data-ingestion-preview2 March 25, 2026 16:12
…pilot/remove-key-setting-requirement

# Conflicts:
#	src/Libraries/Microsoft.Extensions.DataIngestion/README.md
#	src/Libraries/Microsoft.Extensions.DataIngestion/Writers/IngestionChunkVectorRecord.cs
#	src/Libraries/Microsoft.Extensions.DataIngestion/Writers/VectorStoreExtensions.cs
#	src/Libraries/Microsoft.Extensions.DataIngestion/Writers/VectorStoreWriter.cs
#	test/Libraries/Microsoft.Extensions.DataIngestion.Tests/Writers/VectorStoreWriterTests.cs
@adamsitnik adamsitnik marked this pull request as ready for review March 25, 2026 16:28
@adamsitnik adamsitnik requested a review from a team as a code owner March 25, 2026 16:28
{
new VectorStoreKeyProperty(nameof(IngestionChunkVectorRecord<>.Key), typeof(Guid))
{
IsAutoGenerated = true,
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Technically this should not be needed, as all providers are expected to support Guid auto-generation. But it's a good idea to have it (a) for clarity, and (b) in case some provider out there decides to not support this, setting to true here should cause it to throw.

Copy link
Copy Markdown
Member

@adamsitnik adamsitnik left a comment

Choose a reason for hiding this comment

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

@copilot run the Microsoft.Extensions.AI.Templates.Tests tests and fix them.

The log output from CI looks like this:

D:\a_work\1\s\artifacts\ProjectTemplates\Microsoft.Extensions.AI.Templates\Sandbox\aichatweb\projects\AIChatWeb_gh_aais_A_T_ID_F_net9\AIChatWeb_gh_aais_A_T_ID_F_net9.Web\AIChatWeb_gh_aais_A_T_ID_F_net9.Web.csproj : error NU1605: Warning As Error: Detected package downgrade: System.Linq.AsyncEnumerable from 10.0.4 to 10.0.0. Reference the package directly from the project to select a different version.  [D:\a_work\1\s\artifacts\ProjectTemplates\Microsoft.Extensions.AI.Templates\Sandbox\aichatweb\projects\AIChatWeb_gh_aais_A_T_ID_F_net9\AIChatWeb_gh_aais_A_T_ID_F_net9.AppHost\AIChatWeb_gh_aais_A_T_ID_F_net9.AppHost.csproj]
D:\a_work\1\s\artifacts\ProjectTemplates\Microsoft.Extensions.AI.Templates\Sandbox\aichatweb\projects\AIChatWeb_gh_aais_A_T_ID_F_net9\AIChatWeb_gh_aais_A_T_ID_F_net9.Web\AIChatWeb_gh_aais_A_T_ID_F_net9.Web.csproj : error NU1605:  AIChatWeb_gh_aais_A_T_ID_F_net9.Web -> Microsoft.SemanticKernel.Connectors.AzureAISearch 1.74.0-preview -> System.Linq.AsyncEnumerable (>= 10.0.4)  [D:\a_work\1\s\artifacts\ProjectTemplates\Microsoft.Extensions.AI.Templates\Sandbox\aichatweb\projects\AIChatWeb_gh_aais_A_T_ID_F_net9\AIChatWeb_gh_aais_A_T_ID_F_net9.AppHost\AIChatWeb_gh_aais_A_T_ID_F_net9.AppHost.csproj]
D:\a_work\1\s\artifacts\ProjectTemplates\Microsoft.Extensions.AI.Templates\Sandbox\aichatweb\projects\AIChatWeb_gh_aais_A_T_ID_F_net9\AIChatWeb_gh_aais_A_T_ID_F_net9.Web\AIChatWeb_gh_aais_A_T_ID_F_net9.Web.csproj : error NU1605:  AIChatWeb_gh_aais_A_T_ID_F_net9.Web -> System.Linq.AsyncEnumerable (>= 10.0.0) [D:\a_work\1\s\artifacts\ProjectTemplates\Microsoft.Extensions.AI.Templates\Sandbox\aichatweb\projects\AIChatWeb_gh_aais_A_T_ID_F_net9\AIChatWeb_gh_aais_A_T_ID_F_net9.AppHost\AIChatWeb_gh_aais_A_T_ID_F_net9.AppHost.csproj]
Restored D:\a_work\1\s\artifacts\ProjectTemplates\Microsoft.Extensions.AI.Templates\Sandbox\aichatweb\projects\AIChatWeb_gh_aais_A_T_ID_F_net9\AIChatWeb_gh_aais_A_T_ID_F_net9.ServiceDefaults\AIChatWeb_gh_aais_A_T_ID_F_net9.ServiceDefaults.csproj (in 5.33 sec).
Failed to restore D:\a_work\1\s\artifacts\ProjectTemplates\Microsoft.Extensions.AI.Templates\Sandbox\aichatweb\projects\AIChatWeb_gh_aais_A_T_ID_F_net9\AIChatWeb_gh_aais_A_T_ID_F_net9.Web\AIChatWeb_gh_aais_A_T_ID_F_net9.Web.csproj (in 5.31 sec).
Restored D:\a_work\1\s\artifacts\ProjectTemplates\Microsoft.Extensions.AI.Templates\Sandbox\aichatweb\projects\AIChatWeb_gh_aais_A_T_ID_F_net9\AIChatWeb_gh_aais_A_T_ID_F_net9.AppHost\AIChatWeb_gh_aais_A_T_ID_F_net9.AppHost.csproj (in 14.27 sec).

…e package downgrade

Agent-Logs-Url: https://github.com/dotnet/extensions/sessions/4e693755-3924-4edd-a93d-7f7a5c05738e

Co-authored-by: adamsitnik <6011991+adamsitnik@users.noreply.github.com>
Copy link
Copy Markdown
Contributor Author

Copilot AI commented Mar 27, 2026

@copilot run the Microsoft.Extensions.AI.Templates.Tests tests and fix them.

The log output from CI looks like this:...

Fixed in f26a231. System.Linq.AsyncEnumerable was pinned to 10.0.0 in eng/packages/General.props, but Microsoft.SemanticKernel.Connectors.AzureAISearch 1.74.0-preview requires >= 10.0.4. Bumped to 10.0.5 (the latest stable version available in the internal dotnet-public feed).

Copilot AI requested a review from adamsitnik March 27, 2026 09:40
@adamsitnik adamsitnik merged commit 605d5c3 into data-ingestion-preview2 Mar 27, 2026
6 checks passed
@adamsitnik adamsitnik deleted the copilot/remove-key-setting-requirement branch March 27, 2026 10:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants