dotnet / dotnet/extensions

Modifying documents in vector store

Open
#6,665 3 comments 0 reactions 0 assignees View on GitHub
area-ai-templates bug
Dominant language
C#
Stars
3.2k
Forks
894
Avg merge
1d 12h
Merged PRs (30d)
23

Description

### Type of issue

Code doesn't work

### Description

PDFDirectorySource

GetNewOrModifiedDocumentsAsync

var existingDocumentsById = existingDocuments.ToDictionary(d => d.DocumentId);

should be changed to

var existingDocumentsById = existingDocuments.ToDictionary(d => d.Key);

Collection of files in vector store builds with filename as DocumentId, which is not specific and unique. After two iterations of modifying file dictionary can not be build

### Page URL

https://learn.microsoft.com/en-us/dotnet/ai/quickstarts/ai-templates?tabs=visual-studio%2Cconfigure-visual-studio

### Content source URL

https://github.com/dotnet/docs/blob/main/docs/ai/quickstarts/ai-templates.md

### Document Version Independent Id

fd993daa-ad67-5a5d-873e-96e70b4256c9

### Platform Id

0689a818-6031-ad99-46f1-044d1ce482aa

### Article author

@alexwolfmsft

### Metadata

* ID: 9ccd0c8e-4044-19de-f19d-f4478b34e00e
* PlatformId: 0689a818-6031-ad99-46f1-044d1ce482aa
* Service: **dotnet**
* Sub-service: **intelligent-apps**

[Related Issues](https://github.com/dotnet/docs/issues?q=is%3Aissue+is%3Aopen+fd993daa-ad67-5a5d-873e-96e70b4256c9)

---
[Associated WorkItem - 476121](https://dev.azure.com/msft-skilling/Content/_workitems/edit/476121)

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.