Skip to main content

Document Generation

Document generation in Artos is an automated process that transforms source documents into professionally formatted regulatory documents using templates.

Overview

The document generation process:
  1. Extract - Extract content from source documents
  2. Classify - Classify extracted content by document type
  3. Ingest - Organize classified content for processing
  4. Outline - Create document outline from template
  5. Orchestrate - Apply extraction rules and processing
  6. Generate - Produce final formatted document

The Generation Pipeline

Step 1: Request Generation

Submit a generation request with source documents and template:
Returns: 202 Accepted with task ID

Step 2: Extract Content

The system extracts content from source documents:

Step 3: Classify Content

Content is automatically classified based on:
  • Document structure
  • Section headers
  • Content type indicators
  • Extraction rules

Step 4: Create Outline

The outline is generated from the template:

Step 5: Apply Extraction Rules

For each section, extraction rules are applied to find and process content:

Step 6: Populate Outline

Extracted content is populated into the outline:

Step 7: Generate Document

The outline is converted to a formatted DOCX document:

Step 8: Return Result

Document is saved and retrieval information returned:

Status Tracking

Monitor generation progress using the status endpoint:
Status values:
  • Pending - Accepted but not yet picked up by a worker
  • Ingesting - Source documents are being ingested
  • Generating - Document content is being generated
  • Ready - Successfully finished
  • Failed - Error occurred

Retrieval

Once complete, retrieve the document:

Generation Configuration

Document Selection

Optionally specify which sections to include:
This generates only the specified sections, omitting others.

Document Instructions

Provide document-level instructions:
Instructions are passed to extraction rules and formatting engine.

Style Guides

Apply a specific style guide:
Style guides control:
  • Font and font sizes
  • Colors and formatting
  • Section numbering style
  • Citation format
  • Table formatting

Quality Assurance

Confidence Scores

Each extraction includes a confidence score (0-1):
High confidence (>0.9) indicates reliable extraction. Lower confidence may require manual review.

Content Validation

Rules are applied to validate extracted content:
  • Completeness - All required sections present
  • Consistency - Data consistent across document
  • Compliance - Meets regulatory requirements
  • Format - Proper structure and formatting

Error Handling

If generation fails:
Common causes:
  • Missing source documents
  • Template not found
  • Invalid extraction rules
  • Insufficient data in sources
  • Processing timeout
Troubleshooting:
  1. Verify all source files were uploaded
  2. Confirm template ID is correct
  3. Check that source documents contain required data
  4. Review extraction rule configuration
  5. Try with smaller documents first

Typical Workflow

Performance Considerations

Processing Time

Typical processing times:
  • Simple documents (single source): 2-5 minutes
  • Complex documents (multiple sources): 5-15 minutes
  • Large datasets: 15-30+ minutes
Time depends on:
  • Source document size
  • Number of sections
  • Complexity of extraction rules
  • Available processing resources

Limits

  • Max file size: 100 MB per document
  • Max sections: 100 per template
  • Max extraction rules: 500 per template
  • Max concurrent generations: 10 per organization

Best Practices

  1. Organize Sources - Ensure source documents are well-structured
  2. Test Rules - Validate extraction rules on small samples first
  3. Monitor Progress - Use status polling to track generation
  4. Handle Errors - Implement error handling and retry logic
  5. Archive Results - Keep generated documents for compliance
  6. Version Control - Track template versions and changes