View this page in the latest version of Appian. DocCenter Prompt Engineering Best Practices Share Share via LinkedIn Reddit Email Copy Link Print On This Page The capabilities described on this page are included in Appian's advanced and premium capability tiers. Usage limits may apply. Tip: For general prompt engineering principles and techniques applicable to all AI skills in Appian, see AI Skills Best Practices & Recipes. Any time you test and refine AI models, remember to use a data set that represents the data you expect to encounter in production. Read more about what makes a good data set. Write effective field instructions Field instructions are the primary way to guide a large language model's (LLM) extraction behavior in DocCenter. Good field instructions are the single biggest lever for improving extraction accuracy. Each extraction field has several important properties: Label: The display name shown in the reconciliation task. Use clear, business-friendly names that match how the field most often appears in your documents (for example, "Policy Number" not "pol_num"). Data Type: Defaults to Text. Change to Number, Date, or Boolean when the field value is always that type. Correct data types improve downstream processing and validation. For high-variability fields such as policy numbers or IDs that may contain non-numeric characters, keep the default Text type to prevent extraction errors. Similarly, using Text for dates can provide flexibility to capture diverse formats that might fail under a strict date type. Instructions: Free-text guidance for the LLM on how to find and extract this field. Be specific: reference the field's location on the page, nearby labels, or formatting cues. Options: Use when the field has a fixed set of valid values (like radio buttons, checkboxes, or dropdown selections on the source document). An Options Rule constrains the LLM output and prevents hallucinated values. Good field instructions typically include three types of context: Description: Define the semantic meaning and context of the field. For example, "Unique identifier of the project. For example, PT_07243" for a "Project Id" field. Location: Tell the model where to find the field on the page. For example, "in the header section" or "near the line items table." Format: Specify structural rules or text refinement guidelines. For example, "Select the text after the checkmark or X mark" for a checkbox field, or "Return only the 5-digit ZIP code, not the full ZIP+4." Note: Adding instructions increases AI action consumption. Add them where they measurably improve accuracy rather than applying them to every field by default. Leverage AI to generate initial fields To speed up field creation, use the Describe Fields or Extract from Document options in the creation wizard to auto-generate an initial set of fields. After the AI suggests fields, add, remove, or modify them during the configuration step based on your business requirements and the guidelines above. Define valid options Use an Options Rule when: Fixed choices: The source document has a fixed set of choices (radio buttons, checkboxes, dropdown menus). Controlled vocabulary: You want to enforce a controlled vocabulary (for example, "Approved" / "Denied" / "Pending"). Known valid values: The field represents a category or status with known valid values. Normalization: You want to prevent the LLM from returning free-text variations (for example, "Yes", "yes", "Y", "TRUE" all normalized to "Yes"). Do not use value options when the field is truly free-text (names, addresses, descriptions) or when the set of valid values is too large or unpredictable. Advanced extraction prompt techniques DocCenter supports several advanced prompting techniques for complex extraction scenarios. These techniques help the large language model (LLM) reason through ambiguous fields, handle multilingual content, and detect visual elements. Scratchpad technique The scratchpad technique instructs the LLM to "think step by step" within <scratchpad> tags before producing output. The scratchpad technique is recommended for complex form fields and bilingual documents. Use the scratchpad technique with value_options to enforce valid outputs and provide output_schema examples. For example, for a field that determines claim eligibility from a complex insurance form: 1 2 3 4 5 6 7 8 9 10 11 Use <scratchpad> tags to think step by step before answering. In the scratchpad, identify the claimant's plan type, check whether the service date falls within the coverage period, and determine if the procedure code is covered under that plan. Then return only the final value outside the scratchpad tags. value_options: ["Eligible", "Not Eligible", "Requires Review"] output_schema: <scratchpad>[your reasoning here]</scratchpad> Eligible Extract from bilingual documents For documents containing multiple languages, include both language variants of field labels in the extraction instructions. For example, for an English/French form: 1 Is the field 'Change of Option' or 'Changement d'option' checked? For non-Germanic languages (Chinese, Japanese, Korean, Greek), disable bounding boxes and Advanced Layout. Enable Vision instead, as multimodal LLMs handle those characters more effectively. Related recipe: Prompting in English for Multilingual AI Applications Checkbox detection DocCenter can detect checkboxes using LLM-based extraction. Be explicit about what constitutes "checked" (for example, "checked with 'x' mark"). Use value_options to constrain to "True"/"False" (never null). Enable Vision for visual inspection. Configure Vision and Advanced Layout for extraction DocCenter provides three extraction modes—text-only, Vision, and Advanced Layout—that control how the large language model (LLM) reads your documents. Understanding when to use each extraction option is critical for optimal results. Note: In DocCenter 4.5, Advanced Layout is no longer available for extraction models. The option remains available for extraction models that use processing version 4.4 and earlier. Understanding when to use each extraction option is critical for optimal results. Recommended approach Follow this progression when refining DocCenter extraction accuracy: Start with text-only extraction and refine field instructions. If any field requires visual context, enable Vision on all fields. Tip: Do not mix Vision and text-only fields—this causes multiple LLM calls and doubles AI action consumption. Learn more about factors that affect AI action consumption. In most cases, text-only and Vision extraction meet accuracy needs. Reserve Advanced Layout for the rare cases where Vision does not achieve adequate accuracy, and enable it only when absolutely necessary. The progressive approach helps control AI action consumption, since Advanced Layout consumes both pages and AI actions while text-only extraction consumes only AI actions. For detailed consumption guidance, see Design Considerations. Auto-rotate documents DocCenter supports automatic document rotation to correct orientation before extraction. Auto-rotation improves both extraction accuracy and the reconciliation UX (reviewers see correctly oriented documents). Enable Auto Rotation in the model configuration for scanned documents that may arrive in mixed orientations. Note: Auto Rotation adds processing time and may occasionally get stuck in "Initiated" status. If this occurs, cancel the stuck extraction and resubmit, or try processing the document with Auto Rotation disabled. Extract from complex document types DocCenter extraction can handle multi-page tables, large documents, handwriting, and visual elements with the right configuration. This section covers the recommended settings for each complex scenario. Multi-page tables Tables that span multiple pages in DocCenter require special handling: Instruction hint: Add the instruction: "Table can span across multiple pages." Sections: Use Sections to target specific page ranges. Extraction method: Use Vision as the primary extraction method for multi-page tables. Large documents If your documents exceed the DocCenter size or page limits, use one of the following approaches: Split or compress: Split or compress the documents before ingestion. Sections with page ranges: Use Sections with specific page ranges to target relevant parts of the document. Note: The AI Skill smart service has a Long Running Mode starting in Appian 25.3 which allows the LLM to process outputs for up to 60 minutes instead of the standard 4.5 minutes. As of DocCenter 4.1, Long Running Mode is the default. For earlier versions, you may need to manually enable Long Running Mode on the AI Skill smart services in the AIA Generic Prompt process model. Handwriting and visual elements DocCenter can extract handwriting and detect visual elements using Vision: Handwriting and signatures: Supported via Vision. Accuracy depends on scan quality. Always test with actual document samples. Strikethroughs: Supported with additional prompting in instructions. Use Vision with the latest LLMs available and style-based instructions about the type of strikethroughs for the LLM to use as context. For example, "normal", "crossed-out", "strikethrough". Circled text: Use Vision with instructions about "circle/oval/parenthesis." Choose an LLM for DocCenter extraction and classification Tip: Appian administrators control which models are available in your environment. To add more providers, see AI Services. When configuring the prompt for an extraction or classification model in DocCenter, you choose a provider and large language model (LLM) combination from the Large Language Model dropdown. The dropdown includes all preconfigured providers in your environment, so you may see the same model offered by different providers (for example, "Appian - Claude Sonnet 4.6 (Reasoning)" and "AWS - Claude Sonnet 4.6 (Reasoning)"). The model you choose affects both performance and where your data is processed. Choose a model based on your needs: Model category Speed Accuracy profile Consumption Best for Fast (Haiku, Nova 2 Lite) High Strong for structured, moderate for complex Lower per document High-volume structured documents, simple key-value extraction Reasoning (Sonnet) Moderate Strong for complex, handwritten, reasoning-heavy Higher per document; may consume more AI actions Unstructured documents, handwritten text, multi-step reasoning Tip: Test the latest versions of all available LLMs for your use case. Newer model versions frequently offer accuracy improvements that may let you use a faster model where you previously needed a reasoning model. Because performance varies depending on document size, layout, and complexity, iterate over different LLMs and configurations to find the optimal setup. A faster model that meets your accuracy threshold provides better overall value than a reasoning model that slightly exceeds it. Note: Accuracy of reasoning models is not necessarily superior to fast models in all cases—always test with your specific documents. If a specific provider experiences downtime, DocCenter does not automatically fail over to another provider. The provider assignment is fixed per model. Model iteration strategy Building a production-ready model requires iterating from the simplest configuration toward your accuracy target. For the complete end-to-end workflow—from establishing a baseline through testing, enabling advanced features, and validating for production—see Extraction Model Development Strategy. When to create a new version Create a new DocCenter extraction model version for major improvements. Creating a new version provides traceability, enables A/B testing, and allows you to easily revert changes. Update the existing version only for minor changes like fixing a typo or minor instruction adjustments. Create a new version when the previously selected LLM is scheduled for deprecation. After you create a new version, run any applicable test suites to assess the new LLM's performance and deploy to higher environments if desired. Feedback Was this page helpful? SHARE FEEDBACK Loading...