From 5d173b04b20f9a3deed34460ea56b1929d53801e Mon Sep 17 00:00:00 2001 From: Thorsten Sommer Date: Thu, 25 Sep 2025 19:19:48 +0200 Subject: [PATCH] Fix ERI data source name handling during augmentation phase --- .../Settings/DataModel/DataSourceERI_V1.cs | 4 ++-- app/MindWork AI Studio/Tools/RAG/IRetrievalContext.cs | 6 +++--- app/MindWork AI Studio/wwwroot/changelog/v0.9.52.md | 3 ++- 3 files changed, 7 insertions(+), 6 deletions(-) diff --git a/app/MindWork AI Studio/Settings/DataModel/DataSourceERI_V1.cs b/app/MindWork AI Studio/Settings/DataModel/DataSourceERI_V1.cs index cd9ec972..cc836bcf 100644 --- a/app/MindWork AI Studio/Settings/DataModel/DataSourceERI_V1.cs +++ b/app/MindWork AI Studio/Settings/DataModel/DataSourceERI_V1.cs @@ -103,7 +103,7 @@ public readonly record struct DataSourceERI_V1 : IERIDataSource Links = eriContext.Links, Category = eriContext.Type.ToRetrievalContentCategory(), MatchedText = eriContext.MatchedContent, - DataSourceName = this.Name, + DataSourceName = eriContext.Name, SurroundingContent = eriContext.SurroundingContent, }); break; @@ -117,7 +117,7 @@ public readonly record struct DataSourceERI_V1 : IERIDataSource Source = eriContext.MatchedContent, Category = eriContext.Type.ToRetrievalContentCategory(), SourceType = ContentImageSource.BASE64, - DataSourceName = this.Name, + DataSourceName = eriContext.Name, }); break; diff --git a/app/MindWork AI Studio/Tools/RAG/IRetrievalContext.cs b/app/MindWork AI Studio/Tools/RAG/IRetrievalContext.cs index 27a03dfd..750b3b7d 100644 --- a/app/MindWork AI Studio/Tools/RAG/IRetrievalContext.cs +++ b/app/MindWork AI Studio/Tools/RAG/IRetrievalContext.cs @@ -9,9 +9,9 @@ public interface IRetrievalContext /// The name of the data source. /// /// - /// Depending on the configuration, the AI is selecting the appropriate data source. - /// In order to inform the user about where the information is coming from, the data - /// source name is necessary. + /// This is not the name the user chooses but the name of the source where + /// the match was found. This could be a document or database name, a website + /// or a directory on a remote server, etc. /// public string DataSourceName { get; init; } diff --git a/app/MindWork AI Studio/wwwroot/changelog/v0.9.52.md b/app/MindWork AI Studio/wwwroot/changelog/v0.9.52.md index 6d1857f5..3cdc06d9 100644 --- a/app/MindWork AI Studio/wwwroot/changelog/v0.9.52.md +++ b/app/MindWork AI Studio/wwwroot/changelog/v0.9.52.md @@ -1,2 +1,3 @@ # v0.9.52, build 227 (2025-09-xx xx:xx UTC) -- Improved developer experience by detecting development environments and disabling update prompts in those environments. \ No newline at end of file +- Improved developer experience by detecting development environments and disabling update prompts in those environments. +- Fixed an issue where external data sources using the ERI interface weren't using the correct source names during the augmentation phase. \ No newline at end of file