Managing document templates
The Templates tab in the Admin dashboard lets you manage the Word (.docx) and Excel (.xlsx) templates your team uses to produce documents. Once a template is uploaded and activated, users with template access can select it from Generate mode.
The Templates tab appears when the document_templates feature is enabled on your tenant.
For the concept and the block-based trust pipeline behind template filling, see Document templates.
Upload a template
- In the Templates tab, click New template.
- Enter a name and an optional description.
- Click Upload file and select a
.docxor.xlsxfile from your computer. - Save the template.
The file is stored in your tenant’s S3 bucket. The template is created but not yet scannable by the tool — the next step, scanning, detects the placeholders.
Scan for placeholders
After upload, click Scan. VeraFrame reads the file and extracts every {{placeholder_name}} it finds in:
- Body paragraphs
- Table cells
- Headers and footers
- Excel worksheet cells
The scan produces an initial schema: one entry per detected placeholder. If you included a metadata table in the template, the scan also reads description, type, placeholder_class, and required from that table.
Define or edit the schema
For each placeholder you can set:
- Description — a short explanation of what should go here. This is read by the retrieval-and-scoring pipeline, so descriptions should be specific: “Base annual premium for fleet vehicles” beats “Price.”
- Type — the current schema builder supports
string,number,integer,boolean,array, andobject. - Placeholder class —
factfor normal value filling, orwhole_block_textfor fields that must come verbatim from a single source block, such as legal clauses. - Required — whether this field is mandatory for a valid output.
You can also include these settings directly in the Word/Excel template as a metadata table with columns placeholder, description, type, placeholder_class, required. This is convenient when subject-matter experts own the templates and prefer to stay in Office tools.
Activate the template
When the schema is complete, toggle Active. Active templates appear in the Generate mode’s template selector for users with the document_templates feature.
You can deactivate a template at any time without deleting it; deactivated templates stop appearing in the user UI but remain in the Admin dashboard.
Delete a template
From the template detail view, click Delete and confirm. The stored template file, schema, and metadata are removed. Past generations that used the template remain in validation history, but the template itself is no longer available for new generations.
The rendered output
When a user runs Generate with an active template:
- The AI produces a value for each placeholder, constrained by your schema and the selected source material.
- The validator checks each value against the retrieved source blocks.
- For
whole_block_textplaceholders, VeraFrame uses the selected source block verbatim. - If the top candidate blocks are too close in score, the placeholder is flagged
needs_reviewand left to a human. - The rendered
.docxor.xlsxis generated and returned to the user together with the trust report.
Current limitation:
- Excel templates support single-cell placeholder filling only. Multi-row or table-shaped output is not rendered into
.xlsx; VeraFrame returns a clear render error instead.
Template versions
The current implementation stores one active template file per template_id. Re-uploading replaces that file; there is no user-facing template version history yet.
Related
- Document templates — concept and block-based pipeline
- Scored context — how the best block is picked per placeholder
- Generate mode — the user side