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
| Component | Description |
|---|---|
| Name & Description | Human-readable label and explanation |
| Project | The project this template belongs to |
| Schema | JSON Schema defining the fields to extract |
| Assistant Config | AI provider, model, instructions, temperature |
| Result Format | Output format and format-specific options |
| Data Files | Reference 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 2024Employee Expense ReceiptProduct 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.
| Format | Best For | Field Definition Required |
|---|---|---|
| JSON | API integrations, structured data, databases | JSON Schema (19 presets available) |
| CSV | Spreadsheets, Excel, data analysis | Column names |
| Text | Plain text summaries, simple extraction | Not required |
| Reports, printable documents | Not required | |
| DOCX | Word documents, editing, sharing | Not required |
| XML | Legacy systems, data exchange | Not required |
| HTML | Web display, email content | Not required |
| Image | AI image generation from documents | Image 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
- Create a new template and select JSON as the result format
- Click Use Preset or Template Examples
- Browse the available presets by category
- Select a preset — its fields and schema will be auto-filled
- Customize the fields as needed (add, remove, or modify)
- Save your template
Tip: Presets are starting points — you can always add, remove, or modify fields after selecting a preset.
Available Presets
| Category | Preset | Description |
|---|---|---|
| Financial | Invoice | Invoice number, vendor, customer, line items, amounts, tax |
| Financial | Receipt | Store name, items, total, payment method, date |
| Financial | Quotation | Quote number, items, pricing, validity, terms |
| Financial | Bank Statement | Account info, transactions, balance, period |
| Legal | Contract | Parties, terms, effective dates, signatures |
| Legal | Power of Attorney | Grantor, agent, powers granted, scope, expiration |
| Legal | Company Certificate | Company name, registration number, directors, address |
| Government | Identity Document | Name, ID number, date of birth, address, photo |
| Government | Civil Registration | Registration type, persons involved, dates, location |
| HR | Job Application | Applicant info, education, work experience, skills |
| Education | Exam Document | Student name, exam details, scores, grades |
| Education | Transcript | Student info, courses, grades, GPA, credits |
| Education | Academic Publication | Title, authors, abstract, keywords, references |
| Medical | Medical Certificate | Patient info, diagnosis, doctor, hospital, dates |
| Medical | Medical Records | Patient history, vitals, diagnosis, treatment |
| Medical | Prescription | Patient, medications, dosage, doctor, pharmacy |
| Handwriting | Handwritten Form | Form fields extracted from handwritten documents |
| Retail | Food Menu / Product Label | Items, prices, ingredients, nutrition, allergens |
| Logistics | Package Tracking | Tracking 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.
