Skip to content

Additions to the batch processing assistant - #1199

Open
j-erler wants to merge 8 commits into
MindWorkAI:mainfrom
j-erler:worktree-batch-mode-additions
Open

j-erler wants to merge 8 commits into
MindWorkAI:mainfrom
j-erler:worktree-batch-mode-additions

Conversation

@j-erler

@j-erler j-erler commented Nov 13, 2026

Copy link
Copy Markdown
Contributor

Summary

This pull request extends the batch processing assistant and fixes LLM chain-of-thought that leaked into answers.

Subfolders as documents

  • The switch "Include subfolders?" becomes "Subfolders as documents". When it is on, each subfolder of the selected folder counts as one document.
  • All matching files of a subfolder, including those in deeper subfolders, are merged and sent to the AI in one request, which gives one answer per subfolder, e.g., one per case or per project.
  • Files directly in the selected folder are still processed one by one.
  • Images inside a subfolder count against the number of images the model takes at once. A subfolder whose files cannot all be read is marked as failed and names the file in question.

Attachments to the instructions

  • You can attach documents such as a template, a glossary, or reference material to the instructions.
  • AI Studio reads them once per run and appends their content to the system prompt, so they apply to every document of the batch run.

Excel for the results table

  • The output mode "results table" now writes either a CSV file or an Excel workbook (.xlsx), built with the Open XML SDK, which the app already uses.
  • An interrupted run can be continued with either format, also after the workbook was saved in Excel. Cells longer than Excel's limit of 32,767 characters are shortened, and characters which XML does not allow are removed.
  • The CSV separator is only shown for CSV.
  • When the input folder is also the output folder, the results table of the other format is not processed as a document.

Thinking in answers

  • RemoveThinkTags now also handles the following:
    • <think> blocks after leading whitespace or blank lines.
    • An orphan </think> without an opening tag, as Qwen 3.5 and newer write it.
    • The markers of Magistral ([THINK]), Command A (<|START_THINKING|>), older Kimi versions (◁think▷), and Gemma 4 (<|channel>thought…<channel|>).
    • The Harmony format of gpt-oss, of which only the final channel is kept.
  • An answer which merely quotes such a marker in its text stays untouched.

Related proposal or issue

none

How did you test it?

  • New unit tests for grouping folders into documents, Excel writing and reading (including invalid XML characters, long cells, shared strings, and missing cells), outputs of the other table format in the output folder, and RemoveThinkTags with all formats above.
  • dotnet test in app/Tests: 6,304 passed, 3 skipped.
  • dotnet run build: all five quality checks passed (.NET tests, trim smoke test, Rust tests, Clippy, model sources).
  • Ran the app locally with Gemma 4 and checked the batch processing assistant: the new switch texts, Word as the preselected format, and the pause slider starting at 3 seconds.

Wiki

Batch processing assistant (user guide)

  • The switch "Include subfolders?" is now called "Subfolders as documents". When it is on, each subfolder of the selected folder is one document: its files, including those in deeper subfolders, are sent to the AI together, and there is one answer per subfolder. Files directly in the selected folder are still processed one by one.
  • New field "Attachments to the instructions": attached documents are appended to the instructions and apply to every document of the run.
  • New choice of the format of the results table: CSV file or Microsoft Excel workbook (.xlsx). The CSV separator only applies to CSV.

Configuration plugins (Enterprise IT)

  • New setting DataBatchProcessing.TableFormat with the values CSV and EXCEL, plus DataBatchProcessing.TableFormat.AllowUserOverride.

Required statements

  • Review: I have reviewed every change in this pull request and can explain it when asked.
  • License: I license my contribution in this pull request, including all commits I add to it later, under the MIT License, and I agree that it is distributed as part of MindWork AI Studio under the project license or under the MIT License.
  • Right to contribute: The contribution is my own work, or I have permission to submit it, including the consent of my employer or client where needed. To the best of my knowledge, it does not infringe the rights of others, and AI-generated parts do not reproduce third-party code under incompatible terms.
  • Changes by maintainers: I understand that the maintainers will change this pull request to fit the product, and that they may close it.

Credits (optional)

  • Credit me with my GitHub username only.
  • Do not credit me.

j-erler and others added 7 commits November 13, 2026 00:33
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…stant

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… batch processing assistant

Renamed the subfolder switch to "Subfolders as documents", lowered the
shortest pause between files to 3 seconds, and preselected Microsoft Word
for the result files and Excel for the results table.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@j-erler
j-erler requested a review from a team as a code owner November 13, 2026 06:35
@j-erler j-erler changed the title Worktree batch mode additions Additions to the batch processing assistant Nov 13, 2026
The batch processing assistant now goes through the rows or columns of a
CSV file, an Excel workbook, or an OpenDocument spreadsheet instead of a
folder, with the sheet chosen by the user. The runtime now quotes
spreadsheet cells which contain a comma, a quote, or a line break, so
they stay one cell for every reader.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@j-erler
j-erler requested a review from a team as a code owner November 19, 2026 23:38

This branch has not been deployed

No deployments
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.

1 participant