{"versionId":"3ad388e6-357f-43d0-bb6e-08ded7e89460","articleId":"01556f6e-cbc0-47d8-5731-08de8b941e33","title":"Batch Processing Tools | Guide","tags":[],"content":"<html><head></head><body><p>Batch processing tools let you run the same AI task across many files, rows, or records at once. Use them to summarise documents, extract structured data, classify records, or review content in bulk.</p>\n<p>This guide explains the 3 batch processing tools available in Theta Assist, how jobs run, and common ways to set them up.</p>\n<div class=\"mce-toc\">\n<h2>Quick links</h2>\n<ul>\n<li><a href=\"#what-batch-processing-does\">What batch processing does</a></li>\n<li><a href=\"#before-you-start\">Before you start</a></li>\n<li><a href=\"#choose-a-batch-tool\">Choose a batch tool</a>\n<ul>\n<li><a href=\"#async_start_process_files--batch-process-files\">async_start_process_files — Batch process files</a></li>\n<li><a href=\"#async_start_process_data_file--batch-process-data-file\">async_start_process_data_file — Batch process data file</a></li>\n<li><a href=\"#async_start_process_tool_results--batch-process-tool-results\">async_start_process_tool_results — Batch process tool results</a></li>\n</ul>\n</li>\n<li><a href=\"#settings-used-across-batch-tools\">Settings used across batch tools</a></li>\n<li><a href=\"#choose-an-output-format\">Choose an output format</a></li>\n<li><a href=\"#what-happens-when-a-batch-job-runs\">What happens when a batch job runs</a></li>\n<li><a href=\"#use-list_assistants-when-you-need-a-specific-assistant\">Use list_assistants when you need a specific assistant</a></li>\n<li><a href=\"#common-examples\">Common examples</a>\n<ul>\n<li><a href=\"#summarise-all-pdfs-in-a-knowledge-base\">Summarise all PDFs in a knowledge base</a></li>\n<li><a href=\"#extract-structured-data-from-a-csv-of-contacts\">Extract structured data from a CSV of contacts</a></li>\n<li><a href=\"#analyse-onedrive-or-sharepoint-files\">Analyse OneDrive or SharePoint files</a></li>\n<li><a href=\"#process-a-code-interpreter-generated-dataset\">Process a code-interpreter-generated dataset</a></li>\n</ul>\n</li>\n<li><a href=\"#worked-example-review-procedure-documents\">Worked example: review procedure documents</a>\n<ul>\n<li><a href=\"#example-a--documents-in-sharepoint\">Example A — Documents in SharePoint</a></li>\n<li><a href=\"#example-b--documents-uploaded-to-the-assistant\">Example B — Documents uploaded to the assistant</a></li>\n<li><a href=\"#choosing-between-the-two-approaches\">Choosing between the two approaches</a></li>\n</ul>\n</li>\n</ul>\n</div>\n<h2 id=\"what-batch-processing-does\" dir=\"auto\">What batch processing does</h2>\n<p dir=\"auto\">Batch processing tools let an assistant run the same AI task across many items — such as files, rows, or records returned by another tool — and collect the results into one downloadable file.</p>\n<p dir=\"auto\">Instead of processing one document or spreadsheet row at a time, you can run the task once across the full set. Each item is processed independently by its own AI agent, and the job runs in the background while you continue other work.</p>\n<hr dir=\"auto\">\n<h2 id=\"before-you-start\" dir=\"auto\">Before you start</h2>\n<ul dir=\"auto\">\n<li dir=\"auto\"><strong>Jobs</strong> must be enabled in Theta Assist. See the <a href=\"https://help.thetaassist.ai/article/jobs-admin-guide\" target=\"_blank\" rel=\"noopener\">Jobs admin guide</a>.</li>\n<li dir=\"auto\">A system administrator must enable each batch tool in <strong>Admin &gt; Tools &gt; Built-in</strong>.</li>\n<li dir=\"auto\">The tool you want to use must be enabled in the assistant you are working with. See <a href=\"https://help.thetaassist.ai/article/adding-connectors-to-your-assistant\" target=\"_blank\" rel=\"noopener\">Adding tools and connectors to your assistant</a></li>\n<li dir=\"auto\">If the tool is restricted by an <a href=\"https://help.thetaassist.ai/article/access-profiles-admin-guide\" target=\"_blank\" rel=\"noopener\">Access Profile</a>, you must be included in that profile.</li>\n</ul>\n<p dir=\"auto\">If a batch tool appears in assistant configuration but fails when you run it, ask your administrator to check the Jobs setting and tool access.</p>\n<hr dir=\"auto\">\n<h2 id=\"choose-a-batch-tool\" dir=\"auto\">Choose a batch tool</h2>\n<p dir=\"auto\">Theta Assist currently supports 3 batch processing tools.</p>\n<table dir=\"auto\" style=\"border-collapse: collapse; border-spacing: 2px;\" border=\"1\">\n<thead>\n<tr>\n<th>If you want to...</th>\n<th>Use this tool</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>Process files already uploaded to the assistant</td>\n<td><code>async_start_process_files</code></td>\n</tr>\n<tr>\n<td>Process rows in a CSV, JSON, or XML file</td>\n<td><code>async_start_process_data_file</code></td>\n</tr>\n<tr>\n<td>Process a list returned by an MCP tool</td>\n<td><code>async_start_process_tool_results</code></td>\n</tr>\n</tbody>\n</table>\n<h3 id=\"async_start_process_files--batch-process-files\" dir=\"auto\">async_start_process_files — Batch process files</h3>\n<p dir=\"auto\">Processes files from an assistant's attached file library. Each file becomes one item in the batch.</p>\n<p dir=\"auto\"><strong>Key parameters:</strong></p>\n<ul dir=\"auto\">\n<li dir=\"auto\"><code>instructions</code> — What the AI should do with each file.</li>\n<li dir=\"auto\"><code>filterByName</code> — Optional wildcard pattern to limit which files are included (for example, <code>*.pdf</code> or <code>report_*</code>). Without a filter, all files in the file library are processed.</li>\n</ul>\n<p dir=\"auto\"><strong>Typical uses:</strong></p>\n<ul dir=\"auto\">\n<li dir=\"auto\">Summarise all PDFs in a knowledge base.</li>\n<li dir=\"auto\">Extract key data points from a set of Word or Excel documents.</li>\n<li dir=\"auto\">Classify or tag a library of files.</li>\n</ul>\n<hr dir=\"auto\">\n<h3 id=\"async_start_process_data_file--batch-process-data-file\" dir=\"auto\">async_start_process_data_file — Batch process data file</h3>\n<p dir=\"auto\">Processes rows or records from a structured data file — CSV, JSON, or XML. The file must already be uploaded as a thread attachment or stored in the assistant's file library.</p>\n<p dir=\"auto\"><strong>Key parameters:</strong></p>\n<ul dir=\"auto\">\n<li dir=\"auto\"><code>fileId</code> — The ID of the uploaded file.</li>\n<li dir=\"auto\"><code>format</code> — <code>csv</code>, <code>json</code>, or <code>xml</code>.</li>\n<li dir=\"auto\"><code>identifierColumn</code> — The column or property to use as a unique identifier per row. If omitted, the row index is used.</li>\n<li dir=\"auto\"><code>displayNameColumn</code> — Optional column to use as the human-readable label in results.</li>\n<li dir=\"auto\"><code>path</code> — For JSON, a JSONPath expression to locate the array (for example, <code>$.records</code>). For XML, use an XPath expression. Defaults to the root.</li>\n<li dir=\"auto\"><code>instructions</code> — What the AI should do with each row.</li>\n</ul>\n<p dir=\"auto\"><strong>Typical uses:</strong></p>\n<ul dir=\"auto\">\n<li dir=\"auto\">Generate a personalised email or message for each contact in a CSV.</li>\n<li dir=\"auto\">Categorise or score each row in a dataset.</li>\n<li dir=\"auto\">Enrich records by applying AI analysis to each one.</li>\n</ul>\n<hr dir=\"auto\">\n<h3 id=\"async_start_process_tool_results--batch-process-tool-results\" dir=\"auto\">async_start_process_tool_results — Batch process tool results</h3>\n<p dir=\"auto\">Processes the list returned by the most recent MCP tool call. Use this after an M365 or other connected tool returns a list of records — for example, files from OneDrive or SharePoint, emails, calendar items, or records from another business system.</p>\n<p dir=\"auto\"><strong>Key parameters:</strong></p>\n<ul dir=\"auto\">\n<li dir=\"auto\"><code>jsonPath</code> — JSONPath expression to locate the array in the tool result (for example, <code>$.value</code> or <code>$.data</code>). Defaults to <code>$</code> (root).</li>\n<li dir=\"auto\"><code>identifierPath</code> — JSONPath to extract a unique ID from each element (for example, <code>$.id</code>).</li>\n<li dir=\"auto\"><code>displayNamePath</code> — JSONPath to extract a display name from each element (for example, <code>$.name</code> or <code>$.title</code>).</li>\n<li dir=\"auto\"><code>instructions</code> — What the AI should do with <strong>one</strong> item. Write this as a single-item instruction, not a loop. For example, write <em>\"Fetch the full file content using the driveId and id, then summarise it\"</em>, not <em>\"For each file, do X\"</em>.</li>\n</ul>\n<p dir=\"auto\"><strong>Why this tool exists:</strong> MCP tools often return large lists. Passing the full list into context wastes tokens and can hit limits. This tool stores the result and processes each element with its own dedicated agent. Each per-item agent can use the same MCP tools, so it can make follow-up calls for that item, such as fetching full document content by ID.</p>\n<p dir=\"auto\"><strong>Truncation handling:</strong> If the original MCP tool result was too large and was truncated, the system automatically re-fetches the full result in the background before processing begins.</p>\n<p dir=\"auto\"><strong>Typical uses:</strong></p>\n<ul dir=\"auto\">\n<li dir=\"auto\">List files from OneDrive or SharePoint, then have each item's agent fetch and summarise the full file content.</li>\n<li dir=\"auto\">Retrieve emails from a mailbox, then classify or extract key data from each one.</li>\n<li dir=\"auto\">List records from another connected system, then analyse each record individually.</li>\n</ul>\n<h4>List files &amp; summarise example</h4>\n<p><strong>Step 1: List the files or records you want to process using an MCP tool.</strong></p>\n<div><img src=\"https://storage.faqbot.nz/prod/0d5220bc9ad14992d05108dccd460f35/files/pasted_image_article_batch-processing-tools-guide_af88e52e-cc46-43ed-af73-471acf69bae1.png\" alt=\"Example of listing SharePoint files before starting batch processing\" width=\"1000\"></div>\n<p><strong>Step 2: Start a batch job using the most recent tool result.</strong></p>\n<div><img src=\"https://storage.faqbot.nz/prod/0d5220bc9ad14992d05108dccd460f35/files/pasted_image_article_batch-processing-tools-guide_81901d8d-9c32-4998-b0fa-363579c5a694.png\" alt=\"Example of starting async_start_process_tool_results with JSONPath and instructions\" width=\"1000\"></div>\n<p><strong>Check progress in the conversation or in the Jobs tab.</strong></p>\n<div><img src=\"https://storage.faqbot.nz/prod/0d5220bc9ad14992d05108dccd460f35/files/pasted_image_article_batch-processing-tools-guide_725f4bd2-57ff-4b84-aded-d613bf9fe7e6.png\" alt=\"Jobs view showing batch processing progress and downloadable results\" width=\"1000\"></div>\n<hr dir=\"auto\">\n<h2 id=\"settings-used-across-batch-tools\" dir=\"auto\">Settings used across batch tools</h2>\n<p dir=\"auto\">All three batch tools share the following optional parameters:</p>\n<table dir=\"auto\" style=\"width: 100%; border-collapse: collapse; border-spacing: 2px;\" border=\"1\">\n<thead>\n<tr>\n<th>Parameter</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><code>output_format</code></td>\n<td>How results are formatted: <code>text</code>, <code>structured</code>, or <code>csv</code>. Defaults to <code>text</code>. See the output format section below.</td>\n</tr>\n<tr>\n<td><code>output_schema</code></td>\n<td>Plain-English description of the fields to extract when using <code>structured</code> or <code>csv</code> output. Example: <code>title: document title, summary: 2-3 sentence summary, score: confidence score 0-1</code>.</td>\n</tr>\n<tr>\n<td><code>model</code></td>\n<td>The AI model to use for processing. If not specified by the user, the platform's default is used.</td>\n</tr>\n<tr>\n<td><code>execute_as_assistant_id</code></td>\n<td>Run each item using a different assistant's configuration. This is useful when a specialised assistant, with its own instructions, tools, and MCP servers, should handle the processing. See the section on <code>list_assistants</code> below.</td>\n</tr>\n</tbody>\n</table>\n<hr dir=\"auto\">\n<h2 id=\"choose-an-output-format\" dir=\"auto\">Choose an output format</h2>\n<p dir=\"auto\"><strong>text</strong> (default)</p>\n<p dir=\"auto\">Results are unstructured Markdown. The AI writes whatever is appropriate for each item. The final file is a <code>.md</code> file. This is best for summaries, narratives, or outputs where the structure varies by item.</p>\n<p dir=\"auto\"><strong>structured</strong></p>\n<p dir=\"auto\">Results are written as JSON, with fields defined by <code>output_schema</code>. The final file is a <code>.json</code> file. This is best when you need machine-readable output for downstream processing.</p>\n<p dir=\"auto\"><strong>csv</strong></p>\n<p dir=\"auto\">Results are written as a CSV with column headers defined by <code>output_schema</code>. The final file is a <code>.csv</code> file. This is best for tabular data that will be opened in Excel or imported into another system. Multi-line values are replaced with a pipe (<code>|</code>) delimiter to preserve CSV integrity.</p>\n<p dir=\"auto\">When using <code>structured</code> or <code>csv</code>, the <code>output_schema</code> parameter is required. Write it as a simple comma-separated list of <code>field: description</code> pairs:</p>\n<pre><code dir=\"auto\">name: full name of the person, email: email address, score: relevance score from 0 to 1\n</code></pre>\n<hr dir=\"auto\">\n<h2 id=\"what-happens-when-a-batch-job-runs\" dir=\"auto\">What happens when a batch job runs</h2>\n<p dir=\"auto\">When a batch tool is called, the assistant responds immediately. It does not wait for all items to finish processing. The response contains a job reference, and the UI shows a progress widget in the conversation.</p>\n<p dir=\"auto\"><strong>During processing:</strong></p>\n<ul dir=\"auto\">\n<li dir=\"auto\">Items are processed one at a time in the background.</li>\n<li dir=\"auto\">The progress widget shows the current count, total, and percentage complete.</li>\n<li dir=\"auto\">You can continue using the assistant or navigate away — the job runs independently.</li>\n</ul>\n<p dir=\"auto\"><strong>When complete:</strong></p>\n<ul dir=\"auto\">\n<li dir=\"auto\">The widget shows the final counts, including how many items succeeded and how many failed.</li>\n<li dir=\"auto\">A <strong>Download</strong> button appears so you can save the results file in CSV, JSON, or Markdown format.</li>\n<li dir=\"auto\">An <strong>Attach</strong> button adds the results file to the current conversation thread, making it available to the assistant for follow-up questions.</li>\n</ul>\n<p dir=\"auto\"><strong>If an item fails:</strong></p>\n<ul dir=\"auto\">\n<li dir=\"auto\">The job continues processing the remaining items.</li>\n<li dir=\"auto\">Failed items are shown separately with an error message.</li>\n<li dir=\"auto\">The downloaded results file includes successfully processed items.</li>\n</ul>\n<hr dir=\"auto\">\n<h2 id=\"use-list_assistants-when-you-need-a-specific-assistant\" dir=\"auto\">Use <code>list_assistants</code> when you need a specific assistant</h2>\n<p dir=\"auto\">The <code>list_assistants</code> tool returns the assistants the current user has access to, with their IDs and names. It is mainly used to resolve an assistant name to an ID for the <code>execute_as_assistant_id</code> parameter.</p>\n<p dir=\"auto\"><strong>When to use it:</strong></p>\n<p dir=\"auto\">If a user refers to a specific assistant by name — <em>\"use the Timesheet Analyser\"</em> or <em>\"run this with the Budget Forecaster assistant\"</em> — the assistant should call <code>list_assistants</code> to find the correct ID, then pass that ID as <code>execute_as_assistant_id</code> to the batch tool.</p>\n<p dir=\"auto\">If the user says <em>\"summarise these files\"</em> without naming an assistant, omit <code>execute_as_assistant_id</code> and use the current configuration.</p>\n<p dir=\"auto\"><strong>Parameters:</strong></p>\n<ul dir=\"auto\">\n<li dir=\"auto\"><code>filter</code> — Optional text to search assistant names, case-insensitive.</li>\n</ul>\n<p dir=\"auto\"><strong>Example flow:</strong></p>\n<ol dir=\"auto\">\n<li dir=\"auto\">User: <em>\"Process these files using the Finance Reports assistant.\"</em></li>\n<li dir=\"auto\">Assistant calls <code>list_assistants</code> with <code>filter: \"Finance Reports\"</code>.</li>\n<li dir=\"auto\">Result: <code>{ \"id\": \"asst_abc123\", \"name\": \"Finance Reports\" }</code>.</li>\n<li dir=\"auto\">Assistant calls <code>async_start_process_files</code> with <code>execute_as_assistant_id: \"asst_abc123\"</code>.</li>\n<li dir=\"auto\">Each item is processed using the Finance Reports assistant's instructions, tools, and MCP server connections.</li>\n</ol>\n<hr dir=\"auto\">\n<h2 id=\"common-examples\" dir=\"auto\">Common examples</h2>\n<h3 id=\"summarise-all-pdfs-in-a-knowledge-base\" dir=\"auto\">Summarise all PDFs in a knowledge base</h3>\n<pre><code dir=\"auto\">Instructions: \"Summarise this document in 3-5 bullet points, then list the top 3 action items.\"\nTool: async_start_process_files\nfilterByName: *.pdf\noutput_format: text\n</code></pre>\n<h3 id=\"extract-structured-data-from-a-csv-of-contacts\" dir=\"auto\">Extract structured data from a CSV of contacts</h3>\n<pre><code dir=\"auto\">Tool: async_start_process_data_file\nfileId: &lt;uploaded contacts.csv&gt;\nformat: csv\nidentifierColumn: email\ndisplayNameColumn: full_name\ninstructions: \"Write a short personalised intro paragraph for this person based on their role and company.\"\noutput_format: csv\noutput_schema: \"email: email address, intro: personalised intro paragraph\"\n</code></pre>\n<h3 id=\"analyse-onedrive-or-sharepoint-files\" dir=\"auto\">Analyse OneDrive or SharePoint files</h3>\n<pre><code dir=\"auto\">Step 1: Ask the assistant to list files from a SharePoint library or OneDrive folder using the M365 tools.\n        The result contains a $.value array with file metadata (id, driveId, name, etc.).\n\nStep 2:\nTool: async_start_process_tool_results\njsonPath: $.value\nidentifierPath: $.id\ndisplayNamePath: $.name\ninstructions: \"Using the driveId and id, fetch the full file content, then write a 2-sentence summary.\"\noutput_format: csv\noutput_schema: \"file_name: file name, summary: 2-sentence summary\"\n</code></pre>\n<h3 id=\"process-a-code-interpreter-generated-dataset\" dir=\"auto\">Process a code-interpreter-generated dataset</h3>\n<pre><code dir=\"auto\">Step 1: Ask the assistant to run Python (via code interpreter) to generate or process data -&gt; produces output.csv.\n\nStep 2:\nTool: async_start_process_data_file\nfileId: &lt;uploaded or generated output.csv&gt;\nformat: csv\nidentifierColumn: id\ninstructions: \"Classify this record as High, Medium, or Low priority based on the values provided. Explain your reasoning in one sentence.\"\noutput_format: csv\noutput_schema: \"id: record id, priority: High/Medium/Low, reason: one-sentence explanation\"\n</code></pre>\n<hr dir=\"auto\">\n<h2 id=\"worked-example-review-procedure-documents\" dir=\"auto\">Worked example: review procedure documents</h2>\n<p dir=\"auto\">Choose <strong>Example A</strong> if your source documents live in SharePoint and should always be reviewed from the current live version.</p>\n<p dir=\"auto\">Choose <strong>Example B</strong> if you want to review a one-off set of uploaded files without connecting to SharePoint.</p>\n<p dir=\"auto\">The following two examples show how to configure a full document review assistant — one where source documents live in <strong>SharePoint</strong>, and one where they are <strong>uploaded directly to the assistant</strong>. Both produce the same structured output. The main difference is how the documents are sourced.</p>\n<p dir=\"auto\">The scenario is a quality review of a library of procedure or policy documents. Each document is checked for errors, inconsistencies, and completeness, and the results are collected into a structured dataset for triage.</p>\n<hr dir=\"auto\">\n<h3 id=\"example-a--documents-in-sharepoint\" dir=\"auto\">Example A — Documents in SharePoint</h3>\n<p dir=\"auto\"><strong>When to use this approach:</strong> The documents are maintained in a SharePoint document library and should not need to be re-uploaded each time a review is run. The assistant fetches the current versions at the time of each run.</p>\n<h4 id=\"assistant-configuration\" dir=\"auto\">Assistant configuration</h4>\n<table dir=\"auto\" style=\"border-collapse: collapse; border-spacing: 2px;\" border=\"1\">\n<thead>\n<tr>\n<th>Field</th>\n<th>Value</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><strong>Name</strong></td>\n<td>Procedure Document Reviewer (SharePoint)</td>\n</tr>\n<tr>\n<td><strong>Description</strong></td>\n<td>Reviews procedure and policy documents stored in SharePoint for errors, inconsistencies, and quality issues.</td>\n</tr>\n<tr>\n<td><strong>Tools enabled</strong></td>\n<td><code>async_start_process_tool_results</code></td>\n</tr>\n<tr>\n<td><strong>MCP server</strong></td>\n<td>M365 Tools</td>\n</tr>\n</tbody>\n</table>\n<h4 id=\"suggested-prompt-button\" dir=\"auto\">Suggested prompt button</h4>\n<blockquote dir=\"auto\">\n<p dir=\"auto\"><strong>Button label:</strong> Review procedure documents</p>\n<p dir=\"auto\"><strong>Prompt text:</strong></p>\n<pre><code dir=\"auto\">Review the procedure documents in SharePoint using the following location:\n{\n  \"driveId\": \"&lt;your-sharepoint-drive-id&gt;\",\n  \"folderPath\": \"Documents/Procedure Library\",\n  \"recursive\": false,\n  \"maxItems\": 100\n}\n</code></pre>\n<p dir=\"auto\"><em>Enable Auto-submit so clicking the button starts the review immediately.</em></p>\n</blockquote>\n<p dir=\"auto\">Replace <code>&lt;your-sharepoint-drive-id&gt;</code> and <code>folderPath</code> with the values for your library. The drive ID can be found using the M365 tools or obtained from a SharePoint administrator.</p>\n<h4 id=\"system-prompt\" dir=\"auto\">System prompt</h4>\n<pre><code dir=\"auto\"># Document Review Orchestrator\n\n## Role\n\nYou are a Document Review Orchestrator. Your goal is to systematically review a library of procedure or policy documents and produce a structured quality report for each one.\n\n## Workflow\n\n### Phase 1: List documents\n\nWhen the user asks you to review documents and provides a SharePoint location, call `ta_m365_sharepoint_list` using the supplied `driveId` and `folderPath`. This returns an array of file objects in `$.value`.\n\n### Phase 2: Start batch review\n\nImmediately after the list call, invoke `async_start_process_tool_results` with:\n- **jsonPath**: `$.value`\n- **output_format**: `structured`\n- **instructions**: (use the Sub-Agent Instruction Set below)\n\n### Phase 3: Summarise results (user-initiated)\n\nWhen the user uploads the results file and asks for a summary:\n1. Display a Markdown table with all 8 fields for every document reviewed.\n2. Below the table, provide a brief analysis covering:\n   - Documents that require immediate attention (critical errors or Fail status)\n   - Common issues found across the library\n   - Documents with missing metadata (version, date)\n\n---\n\n## Sub-Agent Instruction Set\n\nContext: You are a Document Review Agent. You have been assigned ONE file from a SharePoint document library.\n\n### Step 1: Download\n\nUse the `itemId` and `driveId` from your input to call `ta_m365_sharepoint_download` with `outputFormat: text`.\n\n### Step 2: Review and extract\n\nAnalyse the document content and extract the following 8 fields:\n\n1. **document_title** — The official title from the document header.\n2. **document_version** — Version number (e.g., v1.2). Use \"Not found\" if absent.\n3. **effective_date** — The date the document came into effect. Use \"Not found\" if absent.\n4. **overall_status** — Your overall assessment: `Pass`, `Needs Revision`, or `Fail`.\n5. **critical_errors** — Any factual inconsistencies, contradictions, or calculation errors. Use \"None found\" if clean.\n6. **formatting_issues** — Inconsistent headings, numbering, date formats, or missing sections. Use \"None found\" if clean.\n7. **language_issues** — Grammar, spelling, ambiguous phrasing, or inconsistent terminology. Use \"None found\" if clean.\n8. **recommendations** — The top 1-3 suggested actions, or \"No action required\" if the document passes.\n\n### Step 3: Sanitise output\n\nBefore returning output, apply these rules to all strings:\n- Replace smart quotes (\") and curly apostrophes (') with standard equivalents.\n- Replace em-dashes (—) and en-dashes (–) with hyphens (-).\n- Remove non-breaking spaces, tabs, and control characters.\n- Escape any double quotes inside strings as \\\".\n\n### Step 4: Return JSON only\n\nReturn ONLY a raw JSON object with no markdown, code blocks, or explanation.\n\nSchema:\n{\n  \"document_title\": \"string\",\n  \"document_version\": \"string\",\n  \"effective_date\": \"string\",\n  \"overall_status\": \"Pass | Needs Revision | Fail\",\n  \"critical_errors\": \"string\",\n  \"formatting_issues\": \"string\",\n  \"language_issues\": \"string\",\n  \"recommendations\": \"string\"\n}\n</code></pre>\n<hr dir=\"auto\">\n<h3 id=\"example-b--documents-uploaded-to-the-assistant\" dir=\"auto\">Example B — Documents uploaded to the assistant</h3>\n<p dir=\"auto\"><strong>When to use this approach:</strong> The documents are provided as a one-off batch — uploaded directly to the assistant's file library. This is simpler to set up and requires no SharePoint connection.</p>\n<h4 id=\"assistant-configuration-1\" dir=\"auto\">Assistant configuration</h4>\n<table dir=\"auto\" style=\"width: 54.041721%; border-collapse: collapse; border-spacing: 2px;\" border=\"1\">\n<thead>\n<tr>\n<th>Field</th>\n<th>Value</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><strong>Name</strong></td>\n<td>Procedure Document Reviewer (Uploaded Files)</td>\n</tr>\n<tr>\n<td><strong>Description</strong></td>\n<td>Reviews procedure and policy documents uploaded to this assistant for errors, inconsistencies, and quality issues.</td>\n</tr>\n<tr>\n<td><strong>Tools enabled</strong></td>\n<td><code>async_start_process_files</code></td>\n</tr>\n<tr>\n<td><strong>MCP server</strong></td>\n<td>None required</td>\n</tr>\n</tbody>\n</table>\n<p dir=\"auto\">Upload the documents to the assistant's files before running a review.</p>\n<h4 id=\"suggested-prompt-button-1\" dir=\"auto\">Suggested prompt button</h4>\n<blockquote dir=\"auto\">\n<p dir=\"auto\"><strong>Button label:</strong> Review procedure documents</p>\n<p dir=\"auto\"><strong>Prompt text:</strong></p>\n<pre><code dir=\"auto\">Review all procedure documents uploaded to this assistant using batch processing.\n</code></pre>\n<p dir=\"auto\"><em>Enable Auto-submit so clicking the button starts immediately.</em></p>\n</blockquote>\n<h4 id=\"system-prompt-1\" dir=\"auto\">System prompt</h4>\n<pre><code dir=\"auto\"># Document Review Orchestrator\n\n## Role\n\nYou are a Document Review Orchestrator. Your goal is to review all documents uploaded to this assistant and produce a structured quality report for each one.\n\n## Workflow\n\n### Phase 1: Start batch review\n\nWhen the user asks you to review documents, immediately call `async_start_process_files` with:\n- **output_format**: `structured`\n- **instructions**: (use the Sub-Agent Instruction Set below)\n\nYou do not need to list files first — `async_start_process_files` works across all files in the assistant's file library automatically.\n\n### Phase 2: Summarise results (user-initiated)\n\nWhen the user uploads the results file and asks for a summary:\n1. Display a Markdown table with all 8 fields for every document reviewed.\n2. Below the table, provide a brief analysis covering:\n   - Documents that require immediate attention (critical errors or Fail status)\n   - Common issues found across the set\n   - Documents with missing metadata (version, date)\n\n---\n\n## Sub-Agent Instruction Set\n\nContext: You are a Document Review Agent. You have been given the content of ONE document from the assistant's file library.\n\n### Step 1: Review and extract\n\nAnalyse the document content and extract the following 8 fields:\n\n1. **document_title** — The official title from the document header.\n2. **document_version** — Version number (e.g., v1.2). Use \"Not found\" if absent.\n3. **effective_date** — The date the document came into effect. Use \"Not found\" if absent.\n4. **overall_status** — Your overall assessment: `Pass`, `Needs Revision`, or `Fail`.\n5. **critical_errors** — Any factual inconsistencies, contradictions, or calculation errors. Use \"None found\" if clean.\n6. **formatting_issues** — Inconsistent headings, numbering, date formats, or missing sections. Use \"None found\" if clean.\n7. **language_issues** — Grammar, spelling, ambiguous phrasing, or inconsistent terminology. Use \"None found\" if clean.\n8. **recommendations** — The top 1-3 suggested actions, or \"No action required\" if the document passes.\n\n### Step 2: Sanitise output\n\nBefore returning output, apply these rules to all strings:\n- Replace smart quotes (\") and curly apostrophes (') with standard equivalents.\n- Replace em-dashes (—) and en-dashes (–) with hyphens (-).\n- Remove non-breaking spaces, tabs, and control characters.\n- Escape any double quotes inside strings as \\\".\n\n### Step 3: Return JSON only\n\nReturn ONLY a raw JSON object with no markdown, code blocks, or explanation.\n\nSchema:\n{\n  \"document_title\": \"string\",\n  \"document_version\": \"string\",\n  \"effective_date\": \"string\",\n  \"overall_status\": \"Pass | Needs Revision | Fail\",\n  \"critical_errors\": \"string\",\n  \"formatting_issues\": \"string\",\n  \"language_issues\": \"string\",\n  \"recommendations\": \"string\"\n}\n</code></pre>\n<hr dir=\"auto\">\n<h3 id=\"choosing-between-the-two-approaches\" dir=\"auto\">Choosing between the two approaches</h3>\n<table dir=\"auto\" style=\"border-collapse: collapse; border-spacing: 2px;\" border=\"1\">\n<thead>\n<tr>\n<th>&nbsp;</th>\n<th>SharePoint (Example A)</th>\n<th>Uploaded Files (Example B)</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><strong>Source</strong></td>\n<td>SharePoint document library</td>\n<td>Files uploaded to the assistant</td>\n</tr>\n<tr>\n<td><strong>Always current</strong></td>\n<td>Yes — fetches live versions</td>\n<td>No — files must be re-uploaded when updated</td>\n</tr>\n<tr>\n<td><strong>Setup complexity</strong></td>\n<td>Requires M365 tools and a drive ID</td>\n<td>No external connections needed</td>\n</tr>\n<tr>\n<td><strong>Best for</strong></td>\n<td>Ongoing, repeatable reviews of a maintained library</td>\n<td>One-off reviews of a fixed document set</td>\n</tr>\n<tr>\n<td><strong>Batch tool used</strong></td>\n<td><code>async_start_process_tool_results</code></td>\n<td><code>async_start_process_files</code></td>\n</tr>\n</tbody>\n</table>\n<p>&nbsp;</p></body></html>","description":"Learn how to use Theta Assist batch processing tools to analyse files, data, and tool results at scale. This guide explains the three batch tools, common parameters, output formats, job behaviour, and practical examples for working with uploaded files, SharePoint, OneDrive, and structured datasets.","isMarkdown":false,"publishedOnUtc":"2026-07-02T04:55:27.7856237","modifiedOnUtc":"2026-03-27T01:57:49.7448181"}