View this page in the latest version of Appian. Combine Classification and Extraction Share Share via LinkedIn Reddit Email Copy Link Print On This Page This approach is useful when: Different document types require extracting different sets of fields. Automating document processing improves efficiency and reduces manual intervention. Adding manual review or default extraction when classification is inconclusive. Implementation Create AI skills Create AI skill objects: In the first AI skill you create, select Classification > Documents. Create additional skills for each type of document you want to extract data from and select Extraction > Documents > Unstructured. As you edit the prompt, use the example prompts below and adapt them for your document type and field. Example extraction prompts The following examples show how you might structure a prompt to extract fields from different document types. Tip: The prompts below only reflect the fields to extract and are only part of the entire prompt. Invoice extraction prompt 1 2 3 4 5 <fields> --invoiceTotalCost (decimal) --invoiceNumber (text) --invoiceDate (date) </fields> Contract extraction prompt 1 2 3 4 5 6 <fields> --contractId (text) --contractStartDate (date) --contractEndDate (date) --contractingParties (text) </fields> Insurance claim extraction prompt 1 2 3 4 5 6 <fields> --claimId (text) --claimAmount (decimal) --policyNumber (text) --incidentDate (date) </fields> Create your process To implement this recipe: Create a process model and add the following flows and gateways: Add and configure a Classify Documents smart service to your process model. Remember to save the classified document type and confidence to process variables, so you can use them in the XOR node. Add an XOR gateway after the Classify Document smart service to route based on AI classification result. Add and configure an Execute Generative AI Skill smart service for each of the extraction AI skills you created. Configure the XOR gateway to route invoices, contracts, and claims to their respective extraction AI skills based on the classified type. If classification fails or confidence is low, route to a user input task for manual review or general extraction. Test it out User uploads document, which is stored in Appian. AI classifies document type and stores the result in a process variable. XOR Gateway directs document to extraction based on classification: Document type Extraction AI skill Invoice Invoice Extraction Contract Contract Extraction Insurance Claim Claim Extraction Extracted data is stored and used for further processing. By combining classification and extraction in a single process model, organizations can build a flexible, scalable document processing system that optimizes efficiency while maintaining robustness. Feedback Was this page helpful? SHARE FEEDBACK Loading...