Skip to content

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

Open
Copilot wants to merge 20 commits intodata-ingestion-preview2from
copilot/remove-key-setting-requirement
Open

[MEDI] Use MEVD AutoGenerated Guid key feature; update MEVD/SK to latest versions#7423
Copilot wants to merge 20 commits intodata-ingestion-preview2from
copilot/remove-key-setting-requirement

Conversation

Copy link
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

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.

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
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

Comment on lines +88 to +92
new VectorStoreKeyProperty(nameof(IngestionChunkVectorRecord<>.Key), typeof(Guid))
{
IsAutoGenerated = true,
},

Copy link
Member

Choose a reason for hiding this comment

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

We don't need it here, it should be set using the attribute here

Suggested change
new VectorStoreKeyProperty(nameof(IngestionChunkVectorRecord<>.Key), typeof(Guid))
{
IsAutoGenerated = true,
},

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Unfortunately VectorStoreKeyAttribute.IsAutoGenerated is of type Nullable<bool> in MEVD 10.1.0, which cannot be used as a C# named attribute argument — the compiler rejects it with CS0655: 'IsAutoGenerated' is not a valid named attribute argument because it is not a valid attribute parameter type.

Because of this constraint, IsAutoGenerated = true must be set via VectorStoreKeyProperty in the collection definition (the current approach). Once MEVD changes IsAutoGenerated from bool? to bool, we can move this to the attribute.

Copy link
Member

Choose a reason for hiding this comment

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

I've provided a fix in the SK repo (microsoft/semantic-kernel#13698). For now, let's stick with what we have here.

Copy link
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
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.

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