Skip to main content

Overview

DocuTrust integrates with Google Gemini to provide intelligent document analysis. The AI can detect signature fields, extract form data, suggest field placements, and respond to natural-language instructions for template configuration.

Detection Pipeline v2

DocuTrust’s AI field detection runs through a staged pipeline that produces materially more accurate templates than the earlier single-pass approach: stricter field-type discrimination, PDF text-layer position anchoring, canonical key matching for cross-document consistency, per-field confidence scores, and a gated self-review pass on uncertain extractions.
Pipeline v2 rolls out per-account and is backward compatible — existing consumers continue to receive the same response shape, plus a new pipeline metadata block and richer preferences fields per detected field. No action required on your side.

What’s new in responses

Accounts on v2 see these additions on smart_setup and smart_create:
  • pipeline — top-level metadata with version, request_id, latency_ms, anchor_hits, anchor_misses, corrections_applied, critic_ran.
  • preferences.key — canonical snake_case identifier (e.g. full_name, signature, signed_date). Stable across documents with the same semantic field, making downstream field mapping trivial.
  • preferences.confidence — float 0–1 indicating the model’s certainty on both field type AND placement.
  • preferences.anchor_text — verbatim label text from the PDF (e.g. "Printed Name:").
  • preferences.anchor_method — one of snapped_to_blank, snapped_to_label, llm_only, no_text_layer — describes how the field’s position was determined.
See the AI Field Detection Pipeline guide for the full pipeline architecture, confidence score interpretation, and tips for working with the new response shape.

Check AI Configuration Status

Verify that the AI backend is properly configured before making analysis requests.

Analyze Document

Run a targeted analysis pass on a template’s uploaded document. Use type=detect_rotations to identify page orientations, or type=extract_fields to detect fillable areas.

Smart Create

Automatically generate a complete set of fields for a template in a single call. The AI scans the document and returns every detected field with position data.

Smart Setup

Perform a comprehensive analysis that returns a document summary, per-page breakdown, and a complete field schema with explanations for each detected field.

Chat

Send natural-language instructions to modify the template schema. The AI interprets your message and returns structured actions to apply.

Available Chat Actions

Key Assignment

Assign external reference keys to fields using either plain text or a base64-encoded image of a key mapping document.

Detectable Field Types

The AI recognizes and creates the following field types, each with a default size (expressed as percentage of page dimensions):

Error Handling