Prompts

Prompts guide AI models to extract data

Write clear instructions that tell the AI what information to extract from your documents.

Get started in 3 steps

1

Create a prompt

Write clear instructions describing what data to extract from your documents.

2

Associate to tags and schemas

Configure your prompt with tags for automatic processing and optionally to a schema for structured output.

3

Upload documents

When documents with matching tags are uploaded, the prompt runs automatically and extracts data.


What are Prompts?

Prompts are text instructions that guide AI language models to extract specific information from documents. They tell the AI what to look for and how to format the results.

  • Clear instructions: Describe exactly what data to extract
  • Schema integration: Optionally link to a schema for structured JSON output
  • Tag-based routing: Connect to tags so prompts run automatically
  • Model selection: Choose from OpenAI, Claude, Gemini, and more

Managing Prompts

Creating Prompts

Go to Prompts in the sidebar, click Create Prompt, write your instructions, and link to tags and schemas.

Choosing Models

Select from gpt-4o-mini (default), Claude, Gemini, or others based on your needs for speed, cost, or complexity.


Best Practices

Be Specific — Clearly describe each field to extract, include format requirements, and mention edge cases.

Give Examples and Counter-Examples — Provide examples of what to extract and clear counter-examples of what to ignore to resolve ambiguity.

Reference Schemas — When using a schema, mention it in your prompt and highlight important fields.

Use Tags Strategically — Link prompts to document type tags (e.g., "invoice", "receipt") for automatic processing.

Monitor and Iterate — Review extraction results in Operations, identify corner cases, and update prompts to handle them.


Iteration and Monitoring

To achieve high extraction accuracy, treat prompt engineering as an iterative process.

Using Examples and Counter-Examples

AI models perform significantly better when they know both what to look for and what to skip.

  • Positive Example: “Extract the ‘Total Amount’ which is the final sum at the bottom of the invoice.”
  • Counter-Example: “Ignore ‘Subtotal’ or ‘Balance Forward’ amounts. Do not extract tax-only line items as the total.”

Handling Corner Cases

As you process more documents, you will encounter edge cases that require specific instructions.

  1. Monitor Operations: Regularly check the Operations logs to see extraction results for diverse documents.
  2. Identify Failures: Look for patterns where the AI misidentified a field or missed information.
  3. Update Prompts: Add specific “IF/THEN” logic to handle these cases.
    • Example: “If the document is a credit memo instead of an invoice, extract the total as a negative number.”
    • Example: “When multiple addresses are present, use the ‘Remit To’ address for the vendor location.”
  4. Bulk Re-run: Use the Actions menu in the document list to re-run your updated prompt on existing documents to verify the fix.

Learn More

  • Schemas — Define structured output formats
  • Tags — Organize documents and trigger prompts automatically
  • REST API — Create and manage prompts programmatically

Ready to create your first prompt?

Open Dashboard