Ocriva Logo

Documents

Overview & Presets

What is a template and how to get started with preset templates.

templatesoverviewpresets

Published: 3/31/2026

Overview & Presets

Templates are the core building blocks of Ocriva. A template defines exactly how the AI reads your documents and what data it should return. This guide walks you through every aspect of template creation and configuration.


What is a Template?

A Template is a reusable blueprint that instructs the AI on:

  • What to extract — the specific fields or information to pull from a document
  • How to extract it — which AI model to use and what instructions to follow
  • What to return — the output format (JSON, CSV, PDF, DOCX, Text, XML, HTML, or Image)

Every document you process is run through a template. This makes extraction consistent and repeatable across hundreds or thousands of documents.

Template Components

ComponentDescription
Name & DescriptionHuman-readable label and explanation
ProjectThe project this template belongs to
SchemaJSON Schema defining the fields to extract
Assistant ConfigAI provider, model, instructions, temperature
Result FormatOutput format and format-specific options
Data FilesReference documents for RAG (Retrieval-Augmented Generation)

Template Lifecycle

A template becomes active automatically once you have configured both a model and instructions in the Assistant Config. Until then, it stays in draft state and cannot be used for processing.

NOTE

A template becomes active automatically once you configure both a model and instructions in the Assistant Config. Until then, it stays in draft state.

NOTE

A template will not appear as a processing option until it is active. If you do not see your template in the upload selector, check that both the AI model and instructions are filled in under Assistant Config.


Creating a Template

Step 1 — Navigate to Templates

Go to your Project dashboard and select the Templates tab in the left navigation. Click the Create Template button in the top-right corner.

Step 2 — Name and Description

Fill in the basic information:

  • Name (required) — Use a descriptive name that identifies what documents this template processes. Examples:
    • Thai Tax Invoice 2024
    • Employee Expense Receipt
    • Product Specification Sheet
  • Description (optional but recommended) — Explain the purpose and the type of documents it handles. This helps team members pick the correct template when uploading.

Step 3 — Project Assignment

Templates always belong to a specific project. The project context is set automatically when you create a template from within a project. If you have access to multiple projects, you can reassign the template from the template settings.

Step 4 — Choose a Result Format

This is the first configuration decision. The result format determines what form the AI returns extracted data in and which configuration options are available.

FormatBest ForField Definition Required
JSONAPI integrations, structured data, databasesJSON Schema (19 presets available)
CSVSpreadsheets, Excel, data analysisColumn names
TextPlain text summaries, simple extractionNot required
PDFReports, printable documentsNot required
DOCXWord documents, editing, sharingNot required
XMLLegacy systems, data exchangeNot required
HTMLWeb display, email contentNot required
ImageAI image generation from documentsImage options

Step 5 — Use a Preset (JSON only, optional)

If you selected JSON, you can optionally pick from 19 preset template examples that come with pre-configured extraction fields for common document types. See the Preset Templates section below for the full list of presets.

If no preset fits your use case, you can define a custom schema from scratch.

Step 6 — Define Fields (JSON and CSV)

  • JSON: Define a JSON Schema with field names, types, and descriptions.
  • CSV: Define column names and ordering.
  • Text / PDF / DOCX / XML / HTML: No field definition needed — the AI returns free-text output.
  • Image: Configure image generation options.

Step 7 — Set Up the AI Model

Choose an AI provider and model, write the extraction instructions, and set any advanced parameters.

Step 8 — Save and Test

Click Save. The template is now active. Use the Test button to run it against a sample document and verify the output before processing real files.


Preset Templates (JSON Quick Start)

When you select JSON as your result format, Ocriva offers 19 preset template examples with pre-configured extraction fields. These presets let you get started quickly without manually defining every field.

How to Use Presets

  1. Create a new template and select JSON as the result format
  2. Click Use Preset or Template Examples
  3. Browse the available presets by category
  4. Select a preset — its fields and schema will be auto-filled
  5. Customize the fields as needed (add, remove, or modify)
  6. Save your template

Tip: Presets are starting points — you can always add, remove, or modify fields after selecting a preset.

Available Presets

CategoryPresetDescription
FinancialInvoiceInvoice number, vendor, customer, line items, amounts, tax
FinancialReceiptStore name, items, total, payment method, date
FinancialQuotationQuote number, items, pricing, validity, terms
FinancialBank StatementAccount info, transactions, balance, period
LegalContractParties, terms, effective dates, signatures
LegalPower of AttorneyGrantor, agent, powers granted, scope, expiration
LegalCompany CertificateCompany name, registration number, directors, address
GovernmentIdentity DocumentName, ID number, date of birth, address, photo
GovernmentCivil RegistrationRegistration type, persons involved, dates, location
HRJob ApplicationApplicant info, education, work experience, skills
EducationExam DocumentStudent name, exam details, scores, grades
EducationTranscriptStudent info, courses, grades, GPA, credits
EducationAcademic PublicationTitle, authors, abstract, keywords, references
MedicalMedical CertificatePatient info, diagnosis, doctor, hospital, dates
MedicalMedical RecordsPatient history, vitals, diagnosis, treatment
MedicalPrescriptionPatient, medications, dosage, doctor, pharmacy
HandwritingHandwritten FormForm fields extracted from handwritten documents
RetailFood Menu / Product LabelItems, prices, ingredients, nutrition, allergens
LogisticsPackage TrackingTracking number, sender, receiver, status, dates

TIP

Presets are starting points — select one that's closest to your document type, then add, remove, or modify fields to match your exact requirements.

TIP

Presets are fully customizable starting points — not locked configurations. After selecting a preset, you can add, remove, or rename any field to match your exact document requirements before saving the template.