Skip to content

Background service for chunking and embedding data - #756

Open
PaulKoudelka wants to merge 68 commits into
MindWorkAI:mainfrom
PaulKoudelka:chunk-data
Open

Background service for chunking and embedding data#756
PaulKoudelka wants to merge 68 commits into
MindWorkAI:mainfrom
PaulKoudelka:chunk-data

Conversation

@PaulKoudelka

Copy link
Copy Markdown
Contributor

No description provided.

@PaulKoudelka

Copy link
Copy Markdown
Contributor Author

Still in progress

@SommerEngineering SommerEngineering left a comment

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.

Thanks 🙂

Comment thread app/MindWork AI Studio/Settings/DataModel/DataSourceERI_V1.cs Outdated
Comment thread app/MindWork AI Studio/Settings/DataModel/Data.cs Outdated
Comment thread app/MindWork AI Studio/Pages/Information.razor Outdated
Comment thread app/MindWork AI Studio/MindWork AI Studio.csproj Outdated
Comment thread app/MindWork AI Studio/MindWork AI Studio.csproj Outdated
Comment thread app/MindWork AI Studio/Tools/Databases/DatabaseRole.cs Outdated
Comment thread app/MindWork AI Studio/Tools/Databases/EmbeddingState/EmbeddingStateClient.cs Outdated
Comment thread app/MindWork AI Studio/Tools/Databases/IndexStore/IndexStoreClient.cs Outdated
Comment on lines 42 to 44
@@ -44,6 +44,14 @@ public static class ContentStreamSseHandler
return sseEvent.Content;

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.

We are rejecting all metadata, which we could use for RAG, e.g., page numbers. We should change this!

Resolved 29 conflicting files. The notable decisions:

Confidence: main's tool-calling gate (RequiredProviderConfidence) and this
branch's local-RAG gate (DataConfidenceLevel) turned out to be the same rule
on the same axis, so they are now one field. Both tool results and data
sources raise it through RequireProviderConfidence(). The gate checks the
level strictly and no longer exempts providers trusted by configuration:
TrustedProviderIds is documented as applying to data-source security checks
only, and organizations set confidence through DataConfidence
.CustomConfidenceScheme instead. The security axis (DataSecurity, ERI,
IsTrustedForDataSourceSecurityChecks) is unchanged.

Provider creation: main's CreateProvider signature won (hfEndpointKind,
capabilityOverrides, no model parameter); tokenizerPath was added to it and
is set for every provider, including the new Hetzner, IONOS and LiteLLM.
Provider and EmbeddingProvider combine the record parameters, Lua parsing and
Lua serialization of both sides.

File types: main's hierarchy (ODT leaf, WORD parent, PowerPoint without the
legacy .ppt, TABULAR instead of DELIMITED_TABLE) plus this branch's
SPREADSHEET parent with ODS and the xlsm/xlsb/xla/xlam extensions, which the
runtime already reads. Both sides had added a conflicting HTML filter; the
reading family keeps the name, and the export path uses a narrow
HTML_DOCUMENT, following the existing LATEX/TEX split.

Runtime: main's file_data.rs is the base, including the prompt-injection
sanitizer and the extraction routes. Token counting and chunk segmentation
moved into take_released, so they act on the text the filter has released
rather than on text it is still holding. A failed count is logged and left
out instead of ending the extraction, because the app counts such a segment
itself.

Data sources: the participating-provider checks of this branch are kept, and
main's GetAllowedDataSources overload now builds on them. DirectChatService
resolves the launched chat's data source options before the check, so filter
and chat see the same options.

.NET and Rust both build clean; I18N regenerated to 4060 keys.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants