Custom Templates

Create reusable processing templates with custom instructions and JSON schemas for consistent document extraction results.

Reusable templates for consistent document extraction

Features

Powerful Template System

Create reusable processing configurations with comprehensive organization and analytics.

Three Output Formats

Choose from Markdown, Structured JSON, or Per-Page Structured formats to match your specific document processing needs.

Smart Instructions

Provide custom AI processing instructions (up to 100 words) to guide extraction with field requirements and formatting rules.

Comprehensive Organization

Organize templates with tags, color coding, favorites, and search functionality. Track usage with built-in analytics.

Duplicate Prevention

Automatic checksum-based duplicate detection prevents redundant templates and maintains project consistency.

Robust Validation

Format-specific validation ensures structured templates have valid JSON schemas while markdown templates remain schema-free.

Usage Analytics

Track template performance with comprehensive usage statistics, success rates, and processing time analytics.

Examples

Real Template Examples

Practical templates built with LeapOCR's three output formats for common business use cases.

Structured Finance

Invoice Processing Template

Extract structured financial data from invoices including vendor details, line items, totals, and payment terms with JSON schema validation.

Template Configuration:
{
  "name": "Invoice Processing",
  "format": "structured",
  "instructions": "Extract invoice data including vendor information, line items with quantities and prices, subtotal, tax, and total amounts. Format dates as YYYY-MM-DD.",
  "schema": {
    "type": "object",
    "properties": {
      "invoice_number": {"type": "string"},
      "date": {"type": "string", "format": "date"},
      "vendor": {
        "type": "object",
        "properties": {
          "name": {"type": "string"},
          "address": {"type": "string"},
          "tax_id": {"type": "string"}
        }
      },
      "line_items": {
        "type": "array",
        "items": {
          "type": "object",
          "properties": {
            "description": {"type": "string"},
            "quantity": {"type": "number"},
            "unit_price": {"type": "number"},
            "total": {"type": "number"}
          },
          "required": ["description", "quantity", "unit_price"]
        }
      },
      "subtotal": {"type": "number"},
      "tax_rate": {"type": "number"},
      "tax_amount": {"type": "number"},
      "total": {"type": "number"}
    },
    "required": ["invoice_number", "date", "vendor", "line_items", "total"]
  }
}
Per-Page Structured Legal

Contract Analysis Template

Analyze multi-page legal documents with per-page structured extraction of parties, clauses, dates, and obligations for comprehensive contract review.

Template Configuration:
{
  "name": "Contract Analysis",
  "format": "per_page_structured",
  "instructions": "Extract contract terms, parties, dates, obligations, and key clauses from each page. Identify page numbers and section headers.",
  "schema": {
    "type": "object",
    "properties": {
      "page_number": {"type": "integer"},
      "section_title": {"type": "string"},
      "parties": {
        "type": "array",
        "items": {
          "type": "object",
          "properties": {
            "name": {"type": "string"},
            "role": {"type": "string"},
            "address": {"type": "string"}
          }
        }
      },
      "effective_date": {"type": "string"},
      "termination_date": {"type": "string"},
      "obligations": {
        "type": "array",
        "items": {
          "type": "object",
          "properties": {
            "party": {"type": "string"},
            "description": {"type": "string"},
            "deadline": {"type": "string"}
          }
        }
      },
      "key_clauses": {
        "type": "array",
        "items": {
          "type": "object",
          "properties": {
            "clause_type": {"type": "string"},
            "content": {"type": "string"},
            "page_reference": {"type": "integer"}
          }
        }
      }
    },
    "required": ["page_number", "section_title"]
  }
}
Markdown Expense

Expense Receipt Template

Process expense receipts with clean markdown output, merchant details, itemized expenses, and automatic categorization for reimbursement workflows.

Template Configuration:
{
  "name": "Expense Receipt Processing",
  "format": "markdown",
  "instructions": "Extract receipt information in clean markdown format. Include merchant details, date, total amount, and itemized expenses. Categorize expenses automatically (Meals, Travel, Office Supplies, etc.). Format currency values clearly.",
  "tags": ["expenses", "receipts", "accounting"],
  "color": "#10B981"
}
Example Output:
# Expense Receipt

**Merchant:** Starbucks Coffee  
**Date:** 2024-01-15  
**Total:** $24.75  
**Category:** Meals & Entertainment  

## Items

- Caffe Latte (Grande) - $4.75
- Blueberry Muffin - $3.25
- Turkey & Cheese Sandwich - $8.50
- Iced Coffee (Venti) - $3.95
- Banana - $1.25

**Payment Method:** Credit Card ending in 4242  
**Receipt ID:** SB-2024-001523
Structured Healthcare

Medical Form Template

Extract patient information, medical history, vitals, and treatment details from healthcare forms with HIPAA-compliant structured data.

Template Configuration:
{
  "name": "Medical Form Processing",
  "format": "structured",
  "instructions": "Extract patient demographics, medical history, vital signs, and treatment information. Ensure HIPAA compliance by focusing on medical data only.",
  "schema": {
    "type": "object",
    "properties": {
      "patient_id": {"type": "string"},
      "visit_date": {"type": "string", "format": "date"},
      "vital_signs": {
        "type": "object",
        "properties": {
          "blood_pressure": {"type": "string"},
          "heart_rate": {"type": "number"},
          "temperature": {"type": "number"},
          "weight": {"type": "number"},
          "height": {"type": "number"}
        }
      },
      "medications": {
        "type": "array",
        "items": {
          "type": "object",
          "properties": {
            "name": {"type": "string"},
            "dosage": {"type": "string"},
            "frequency": {"type": "string"}
          }
        }
      },
      "diagnoses": {
        "type": "array",
        "items": {
          "type": "object",
          "properties": {
            "code": {"type": "string"},
            "description": {"type": "string"},
            "severity": {"type": "string"}
          }
        }
      }
    },
    "required": ["patient_id", "visit_date"]
  }
}
Structured HR

Resume Parsing Template

Extract candidate information, work experience, education, skills, and qualifications from resumes with structured data for ATS integration.

Template Configuration:
{
  "name": "Resume Parsing",
  "format": "structured",
  "instructions": "Extract candidate contact information, work experience, education, skills, and certifications. Focus on relevant experience and quantifiable achievements.",
  "schema": {
    "type": "object",
    "properties": {
      "candidate": {
        "type": "object",
        "properties": {
          "name": {"type": "string"},
          "email": {"type": "string"},
          "phone": {"type": "string"},
          "location": {"type": "string"},
          "linkedin": {"type": "string"}
        }
      },
      "experience": {
        "type": "array",
        "items": {
          "type": "object",
          "properties": {
            "title": {"type": "string"},
            "company": {"type": "string"},
            "duration": {"type": "string"},
            "description": {"type": "string"}
          }
        }
      },
      "education": {
        "type": "array",
        "items": {
          "type": "object",
          "properties": {
            "degree": {"type": "string"},
            "institution": {"type": "string"},
            "year": {"type": "string"}
          }
        }
      },
      "skills": {
        "type": "array",
        "items": {"type": "string"}
      }
    },
    "required": ["candidate", "experience", "education"]
  }
}
Per-Page Structured Research

Survey Response Template

Analyze survey responses with per-page extraction of questions, answers, ratings, and comments for comprehensive data analysis.

Template Configuration:
{
  "name": "Survey Response Analysis",
  "format": "per_page_structured",
  "instructions": "Extract survey questions, responses, ratings, and comments from each page. Identify question types and response formats.",
  "schema": {
    "type": "object",
    "properties": {
      "page_number": {"type": "integer"},
      "survey_section": {"type": "string"},
      "responses": {
        "type": "array",
        "items": {
          "type": "object",
          "properties": {
            "question_id": {"type": "string"},
            "question_text": {"type": "string"},
            "question_type": {"type": "string"},
            "response_value": {"type": "string"},
            "rating": {"type": "number"},
            "comments": {"type": "string"}
          }
        }
      },
      "respondent_info": {
        "type": "object",
        "properties": {
          "age_group": {"type": "string"},
          "gender": {"type": "string"},
          "location": {"type": "string"}
        }
      }
    },
    "required": ["page_number", "survey_section", "responses"]
  }
}
Markdown Business

Meeting Notes Template

Convert meeting notes and minutes into organized markdown format with action items, decisions, and participant information.

Template Configuration:
{
  "name": "Meeting Notes Processing",
  "format": "markdown",
  "instructions": "Convert meeting notes into organized markdown format. Include meeting details, attendees, agenda items, decisions made, and action items with assignees and deadlines.",
  "tags": ["meetings", "notes", "business"],
  "color": "#3B82F6"
}
Example Output:
# Meeting Notes

**Date:** March 15, 2024  
**Time:** 2:00 PM - 3:30 PM  
**Location:** Conference Room A  
**Meeting Type:** Product Review  

## Attendees

- Sarah Johnson (Product Manager)
- Mike Chen (Lead Developer)
- Lisa Wang (UX Designer)
- David Brown (QA Engineer)

## Agenda Items

### 1. Q1 Product Roadmap Review
- **Decision:** Approved feature prioritization
- **Action Item:** Mike to provide technical feasibility assessment by March 20

### 2. User Feedback Analysis
- **Discussion:** Reviewed NPS scores and common pain points
- **Decision:** Implement top 3 requested features in next sprint

## Action Items

- [ ] Sarah: Schedule user interviews for new feature validation (Due: March 22)
- [ ] Mike: Create technical specification for new features (Due: March 25)
- [ ] Lisa: Update mockups based on feedback (Due: March 21)
- [ ] David: Prepare test plan for new features (Due: March 28)

## Next Meeting

**Date:** March 29, 2024 at 2:00 PM  
**Topic:** Sprint Planning Meeting
Structured Insurance

Insurance Claim Template

Process insurance claim forms with structured extraction of policy details, incident information, damages, and supporting documentation.

Template Configuration:
{
  "name": "Insurance Claim Processing",
  "format": "structured",
  "instructions": "Extract policy information, claim details, incident description, damage assessment, and supporting documentation. Ensure accurate data extraction for claims processing.",
  "schema": {
    "type": "object",
    "properties": {
      "claim_number": {"type": "string"},
      "policy_number": {"type": "string"},
      "claim_date": {"type": "string", "format": "date"},
      "incident_date": {"type": "string", "format": "date"},
      "claim_type": {"type": "string"},
      "policyholder": {
        "type": "object",
        "properties": {
          "name": {"type": "string"},
          "address": {"type": "string"},
          "contact": {"type": "string"}
        }
      },
      "incident_details": {
        "type": "object",
        "properties": {
          "description": {"type": "string"},
          "location": {"type": "string"},
          "police_report_number": {"type": "string"}
        }
      },
      "damages": {
        "type": "array",
        "items": {
          "type": "object",
          "properties": {
            "item": {"type": "string"},
            "description": {"type": "string"},
            "estimated_cost": {"type": "number"}
          }
        }
      },
      "estimated_total": {"type": "number"}
    },
    "required": ["claim_number", "policy_number", "claim_date", "claim_type"]
  }
}

Ready to Build Custom Templates?

Create reusable processing templates with custom instructions and schemas for consistent document extraction.

Ready to transform your documents with AI?