QDocs
Verified against source (23)
Extensions/AttachmentExtensions.csqbo4.Document.Aspose.Bridge/PdfSplitterBatchEngine.csqbo4.Document.Aspose.Bridge/PdfSplitterBatchEngineOptions.csqbo4.Document.AsposePDF/AsposePdfSplitter.csqbo4.Document.AsposePDF/AsposePdfSplitterOptions.csqbo4.Document.AsposePDF/AiSplitter.csqbo4.Document.AsposePDF/AiSplitterOptions.csqbo4.Document.AsposePDF/OutlineSplitterOptions.csqbo4.Document.AsposePDF/SizeSplitterOptions.csqbo4.Document.AsposePDF/SemanticSplitter.csExtensions/AttachmentExtensions.csExtensions/AttachmentExtensions.csExtensions/LabelExtensions.csqbo4.AI.Bridge/AIScoreEngine.csqbo4.AI.Bridge/AiModalEngine.csqbo4.AI.Bridge/AiBatchEngine.csqbo4.AI.Bridge/AiBatchEngineOptions.csqbo4.AI.Bridge/ClassificationBatchEngine.csqbo4.AI.Bridge/ClassificationBatchEngineOptions.csUsage/LedgerUsageHandler.csqbo4.AI.Google/GeminiChatClient.csattachment/Attachment.csAttachment/Attachment.Search.xslt
Power users decide what QDocs recognizes, what it reads, which model does each job, and what happens to the results. All of it is configuration: document templates, labels, score templates, import templates, agents, rules, and worklists. This page shows how they fit together for document processing and links to the platform pages for the details of each.
Checklist
Section titled “Checklist”- Agents. Define the AI agents QDocs will use, for example one for splitting and one for extraction. See Agents.
- Document types. Give every document template you want recognized a clear description. See Document types for classification.
- Splitting. Decide how packages are split and, for AI splitting, what the model should return. See Splitting.
- Fields. Create a score template for each kind of document you extract data from. See Extraction.
- Review. Route low-confidence results to a worklist. See Review routing.
- Workflow. Add the stages as steps in the workflow that receives documents, or schedule them as batch jobs for volume. See Batch processing.
- Cost. Turn on ledger usage if you want token costs on a ledger. See Cost control.
Document types for classification
Section titled “Document types for classification”Classification chooses among your document templates that have a description. The description is the model’s only guide, so write it the way you’d brief a new colleague: what the document is, what’s on it, and how to tell it apart from similar documents.
- Templates without a description are never chosen, so internal or generated-only templates stay out of the way.
- Set a default template in the workflow step or call for documents that match nothing, so they can be routed for review instead of left unclassified.
- Classification reads the document’s text. If a document has no text yet, QBO runs OCR first when OCR is configured.
Labels work the same way: QDocs applies every label for documents whose description fits, and doesn’t duplicate labels a document already has. See Where instructions come from.
Splitting
Section titled “Splitting”| Method | Splits on | Notes |
|---|---|---|
| Bookmarks (outline) | The PDF’s bookmarks | Used first by default when the PDF has bookmarks. The nest level (default 2) chooses how deep in the outline to split. |
| AI | Document boundaries the model finds | Used by default when the PDF has no bookmarks. See AI splitting. |
| Page ranges | Start pages you supply | For packages with a known, fixed layout. |
| Size | File size (default 10 MB) or a page count | For systems that limit file size. |
| Semantic | Structural boundaries between pages, packed up to a size limit | Keeps related pages together while staying under the size limit. |
Each new document is saved on the same record as the package (or on a target record you choose), named by the destination path (by default the package name plus the segment’s title), and linked to the package as its Document Package Source. If a PDF turns out to hold only one document, the original document is updated in place instead of being duplicated.
The Split PDF option on the Documents panel requires the AttachmentPdfSplit permission and queues one split job per selected document.
AI splitting
Section titled “AI splitting”The AI splitter sends the PDF to a multimodal agent (named PdfAnalysis unless you configure another) and asks for a list of segments. For each segment the model returns its start and end pages, a file name, a document type, and any important values it finds, each with a confidence.
- Instructions. The built-in instructions ask for segments and common document dates. Replace them by naming an import template whose description holds your own instructions, so changing what the model looks for is a template edit.
- Classify and extract in one pass. Instead of free-form instructions, you can supply a list of document definitions: your document templates, and for each one the fields to extract and their value types. The model then matches each segment to a template and returns those fields, each with a confidence.
- Where values land. Values whose names match document fields are set on the new document; everything else is kept in the document’s XML data, where rules and reports can read it. For typed, scored values with weighted confidence, use extraction after the split.
- Large files. Before sending, QDocs makes a downsampled copy of the PDF (72 DPI by default) to reduce the tokens the model reads; page numbers don’t change. PDFs over 500 pages or about 40 MB are cut into smaller chunks and sent together, with a map of which pages each chunk holds, so the model still returns page numbers for the whole package.
- Cost. Name a ledger in the call to post the split’s token usage to it.
Extraction
Section titled “Extraction”Extraction is a score template whose engine is an AI engine, with one score item template per field:
| Engine | Reads | Use it when |
|---|---|---|
| AI score engine | The document’s text | The text is clean, or you already OCR documents |
| AI modal engine | The original PDF or image | Layout, tables, handwriting, or images matter |
For each item, write a prompt (what to extract, in plain English), choose a value type (yes/no, number, date, money, or text), and optionally a weight. Each item gets a confidence, and the score gets a weighted confidence across its items. See Scoring with AI for engine parameters and how weights work.
To turn a document into records instead of a score (for example, line items from an invoice), use an import template with the AI import engine. See Importing with AI.
Review routing
Section titled “Review routing”Confidence is ordinary score data, so review is built from the usual workforce tools:
- Query-based worklists. Point a worklist at a search for documents or scores below your threshold, using a filter you define. Recalculating the worklist adds new matches and cancels items whose values have since been corrected.
- Exception forms. Have a workflow step create an exception form on the record when a check fails; the form’s worklist picks it up, and completing the form clears it.
- Matrix routing. Use a team matrix to send items to a team or a named worklist, for example by document type or client.
See Exception queues and Rules matrices.
Batch processing
Section titled “Batch processing”For backlogs and high volume, QDocs submits documents to the provider’s batch service instead of one call at a time. Each batch job is an import template whose engine is a batch engine:
| Batch engine | Does | Result |
|---|---|---|
| PDF splitter batch | AI splitting for many PDFs | Each package is split as above when its result arrives |
| Classification batch | Classification and extraction for many documents of any type | Values that match document fields are set on the document; the full response is kept in its XML data |
| AI batch | Any instructions, for any documents | A result method you name runs once per document |
Set up the import template like this:
- Description: the instructions sent with every document.
- Import statement: the search that selects the documents to process. The splitter and classification engines fall back to a document search with the parameters you pass when it is blank.
- Parameters:
Agent(which agent to use; it must support batch jobs),PollIntervalMinutes(how often to check on the job; default 60), and optionallyProcessPartialResultsandQueueResults(both on by default).
When the job completes, results are queued and applied document by document, and errors are written to the import log. Claude, Gemini, and OpenAI agents support batch jobs, as do Amazon Bedrock agents with batch enabled.
Cost control
Section titled “Cost control”- Choose the model per job. Use a fast, inexpensive model where it’s good enough, and fall back to a more capable one with a cascade. See Fallback agents.
- Batch work that isn’t urgent; providers typically price batch jobs lower.
- Context caching (Gemini). Long instructions, such as a full set of document definitions, are cached by Gemini and reused across requests.
- Smaller inputs. AI splitting sends a downsampled copy of each PDF, and the AI modal engine can keep an uploaded file with the provider for a set time so scoring it again doesn’t upload it again.
- Track it. Post token usage to a ledger at per-model rates. See Track token costs in a ledger.
Permissions
Section titled “Permissions”| Option | Permission |
|---|---|
| Split PDF | AttachmentPdfSplit |
| Classify | AttachmentAiClassify |
| Transcribe | AttachmentAiTranscribe |