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. Field instructions Field instructions are the primary way to guide the AI model's extraction behavior. Good 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 (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. 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. Define valid options Use an Options Rule when: The source document has a fixed set of choices (radio buttons, checkboxes, dropdown menus) You want to enforce a controlled vocabulary (for example, "Approved" / "Denied" / "Pending") The field represents a category or status with known valid values 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 techniques Scratchpad technique The scratchpad technique instructs the AI to "think step by step" within <scratchpad> tags before producing output. This 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 Handling bilingual documents For documents containing multiple languages, include both language variants of field labels in descriptions. 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 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 if text-based detection is unreliable. Configuration options Advanced Layout vs. Vision Understanding when to use each extraction option is critical for optimal results. Use Advanced Layout when: Documents have complex tables, checkboxes, or nonstandard page layouts Structured forms where precise field location matters Text-only extraction isn't achieving sufficient accuracy Document language is supported by the Advanced IDP Tools AI skill Vision is not accurate on certain fields, like checkboxes and signatures Note: Advanced Layout consumes both pages and AI actions (unlike text-only which only consumes AI actions). Bounding boxes are processed by the Advanced IDP Tools AI skill, so unsupported languages should use Vision instead. Use Vision when: Interpreting images, charts, tables, or visual elements Processing handwritten or low-resolution documents Working with languages that are more challenging for AI Detecting visual annotations: circles, strikethroughs, stamps Note: Visual extraction requires an LLM that supports multimodal input. Auto-rotate documents DocCenter supports automatic document rotation to correct orientation before extraction. This 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. Handling complex scenarios Multi-page tables Tables that span multiple pages require special handling: Add instruction: "Table can span across multiple pages" Use Sections to target specific page ranges Use Advanced Layout as the primary extraction method Large documents If your documents exceed the DocCenter size or page limits, we recommend: Split or compress the documents before ingestion Use Sections with specific page ranges to target relevant parts 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 it on the AI Skill smart services in the AIA Generic Prompt process model. Handwriting and visual elements Handwriting and Signatures: Supported via Vision and Advanced Layout. 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 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." LLM selection guidance 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, you choose a provider and model 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 Follow a three-step iterative process. Start with the simplest configuration and gradually work toward the expected output. Establish baseline: Create model Run extraction with sample documents Manually reconcile all fields Set instances as test cases Publish if accuracy is acceptable Test and validate: Create test suites with a subset of test cases. Run multiple extractions Reconcile fields in all extractions Evaluate accuracy across all instances. Repeat with different instructions and configurations in this order until high accuracy is reached: Text-only Vision Advanced Layout Improve with versioning: Create new version Re-run all test cases Compare accuracy Revert if new version is worse When to create a new version Create a new 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. We also recommend that you 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. When a newer processing version is available for your model, upgrading also creates a new model version. Use test suites to compare accuracy and token usage before publishing the upgraded version. Note: This iteration strategy is written for extraction and classification prompts. To validate rule changes on a verification model, see Test a verification model, which uses the same test suite framework applied to verification rules instead of prompts. Feedback Was this page helpful? SHARE FEEDBACK Loading...