AI Custom Fields

Configure AI extraction for custom fields

Overview

AI Custom Fields are fields that use AI to automatically extract data from documents. When you create a custom field, you can configure how AI should extract it by providing descriptions and extraction hints.

AI Extraction Configuration

When editing a field, the AI Extraction section allows you to configure how AI extracts the field value from documents.

Description

The Description field provides context to the AI about what the field represents and what kind of data it should extract.

Best practices:

  • Be specific about what the field contains
  • Include examples when helpful
  • Explain the business context if relevant
  • Use clear, concise language

Examples:

Good: "The invoice number is typically found in the header and may be labeled as 'Invoice #', 'INV', or 'Invoice Number'. It's usually a combination of letters and numbers."

Good: "The vendor name is the company or person who issued the invoice. Look for company names, business names, or individual names in the header section."

Bad: "Invoice number" (too vague)
Bad: "The number" (not specific enough)

Extraction Hint

The Extraction Hint provides specific guidance to help AI locate and extract the field value. This is particularly useful for fields that might appear in different formats or locations.

Best practices:

  • Specify where to look (header, footer, specific sections)
  • Describe common formats or patterns
  • Mention alternative labels or synonyms
  • Include format requirements (e.g., date formats, number formats)

Examples:

Good: "Look for 'Due Date' or 'Payment Due' in the header. Format is typically MM/DD/YYYY or DD-MM-YYYY."

Good: "Find the total amount, which may be labeled as 'Total', 'Amount Due', 'Grand Total', or 'Balance'. Usually appears at the bottom of the document in larger font."

Good: "Extract the account number, which is usually 8-12 digits. May be labeled as 'Account #', 'Acct', or 'Account Number'."

AI Extractable Flag

The AI Extractable flag (found in the Flags section) controls whether AI should attempt to extract this field.

  • Enabled (default): AI will attempt to extract this field during document processing
  • Disabled: Field will be skipped during AI extraction (useful for formula fields or manually entered fields)

When to disable:

  • Internal workflow fields (status, approval states)
  • Manual notes and comments fields
  • Formula fields (computed values)
  • Fields populated by code formulas
  • Fields extracted from external systems via formulas

For detailed information about non-AI fields, see Non-AI Fields.

Field Types and AI Extraction

Different field types have different extraction behaviors:

Text Fields

AI extracts text values as-is from the document.

Tips:

  • Provide clear description of what text to look for
  • Use extraction hints to specify location or format
  • Mention common variations or synonyms

Number Fields

AI extracts numeric values, handling various formats.

Tips:

  • Specify if decimals are allowed
  • Mention common separators (commas, periods)
  • Describe expected range if relevant

Currency Fields

AI extracts monetary amounts with currency awareness.

Tips:

  • Link to a currency field if currency varies
  • Specify currency symbol location
  • Mention common formats (with/without decimals)

Date Fields

AI extracts dates in various formats and normalizes to YYYY-MM-DD.

Tips:

  • Specify common date formats in your region
  • Mention alternative labels (Due Date, Payment Date, etc.)
  • Describe where dates typically appear

Boolean Fields

AI extracts true/false values based on presence or specific indicators.

Tips:

  • Describe what indicates "true" (checkbox checked, "Yes", etc.)
  • Specify where to look for the indicator
  • Mention alternative representations

Enum Fields

AI matches extracted values to predefined enum options.

Tips:

  • List all possible enum values in description
  • Provide extraction hints for each value
  • Mention common variations or abbreviations

Examples

Example 1: Invoice Number Field

Field Configuration:

  • Type: Text
  • Description: "The unique invoice number assigned by the vendor. This is typically found in the header section and may be labeled as 'Invoice #', 'INV', 'Invoice Number', or similar. It's usually a combination of letters and numbers."
  • Extraction Hint: "Look in the top section of the document. Common formats include 'INV-2024-001', '2024/001', or just numeric sequences. May be prefixed with vendor initials."
  • AI Extractable: Enabled

Example 2: Due Date Field

Field Configuration:

  • Type: Date
  • Description: "The date by which payment is due. This is typically found near the total amount or in a payment terms section."
  • Extraction Hint: "Look for 'Due Date', 'Payment Due', 'Due By', or 'Pay By'. Common formats are MM/DD/YYYY or DD-MM-YYYY. Usually appears in the header or footer area."
  • AI Extractable: Enabled

Example 3: Payment Status Field

Field Configuration:

  • Type: Enum
  • Enum Values: ["PAID", "UNPAID", "PARTIAL", "OVERDUE"]
  • Description: "The payment status of the invoice. Can be PAID (fully paid), UNPAID (not yet paid), PARTIAL (partially paid), or OVERDUE (past due date)."
  • Extraction Hint: "Look for status indicators like 'Paid', 'Unpaid', checkmarks, stamps, or watermarks. If a due date has passed and status is not 'Paid', it's likely 'OVERDUE'."
  • AI Extractable: Enabled

Example 4: Calculated Total Field

Field Configuration:

  • Type: Currency
  • Description: "The calculated total of all line items. This is computed automatically."
  • Extraction Hint: N/A (not used for formula fields)
  • AI Extractable: Disabled (this is a formula field)

Testing AI Extraction

After configuring your fields:

  1. Upload a sample document that contains the fields you've configured
  2. Review extraction results to see what AI extracted
  3. Check field accuracy - verify values are correct
  4. Refine descriptions and hints if extraction is inaccurate
  5. Test with multiple documents to ensure consistency

Troubleshooting

AI Not Extracting Field

Possible causes:

  • Field description is too vague
  • Extraction hint doesn't match document format
  • Field location varies significantly across documents
  • Field is not clearly visible in the document

Solutions:

  • Improve description with more specific details
  • Add more comprehensive extraction hints
  • Test with multiple document samples
  • Consider if field should be manually entered instead

Incorrect Values Extracted

Possible causes:

  • Description matches multiple fields
  • Extraction hint is too broad
  • Field format varies significantly

Solutions:

  • Make description more specific
  • Narrow extraction hint to specific location or format
  • Add examples of correct values
  • Consider using validation rules

Inconsistent Extraction

Possible causes:

  • Documents have varying formats
  • Field appears in different locations
  • Field labels vary significantly

Solutions:

  • Provide multiple examples in extraction hint
  • Describe all common variations
  • Consider creating separate document types for different formats
  • Use formula fields to normalize extracted values

Best Practices

  1. Be specific: Clear, detailed descriptions improve extraction accuracy
  2. Provide examples: Include examples in extraction hints when possible
  3. Test thoroughly: Test with multiple document samples
  4. Iterate: Refine descriptions and hints based on extraction results
  5. Use formulas: For computed values, use formula fields instead of AI extraction
  6. Document variations: If documents vary significantly, document all variations in hints