Skip to content

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

  1. In the Templates tab, click New template.
  2. Enter a name and an optional description.
  3. Click Upload file and select a .docx or .xlsx file from your computer.
  4. 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, and object.
  • Placeholder classfact for normal value filling, or whole_block_text for 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:

  1. The AI produces a value for each placeholder, constrained by your schema and the selected source material.
  2. The validator checks each value against the retrieved source blocks.
  3. For whole_block_text placeholders, VeraFrame uses the selected source block verbatim.
  4. If the top candidate blocks are too close in score, the placeholder is flagged needs_review and left to a human.
  5. The rendered .docx or .xlsx is 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.