Skip to main content

How to Use Instructions to Improve AI Data Extraction

Tips, Best Practices and Examples using Instructions

Updated this week

Instructions are guidelines you provide to clarify the specific data that should be extracted or how the AI should interpret the file. These instructions help the AI better understand your requirements, leading to more accurate data extraction.

Instructions also open exciting new use cases beyond simple data extraction. Using instructions, you can use Parseur for things like:

  • Advanced data analysis

  • Document classification

  • Sentiment analysis

How to Add New Instructions or Update Field Instructions

  1. Go to the Fields Section: Navigate to the Fields section in your mailbox, or open the Fields tab when viewing a specific document.

  2. Select the Field to Edit: Click on the Edit button next to the field name where you want to add or modify instructions.

  3. Enter Clear Instructions: In the Instructions input box, provide specific details that will help the AI process or extract the correct data for that field.

Example of a field with instructions

How to Add General Instructions

  1. Go to the Fields Section: Navigate to the Fields section in your mailbox, or open the Fields tab when viewing a specific document.

  2. Enter Clear Instructions: In the Instructions input box, provide specific details that will help the AI process or extract the correct data for that field.

Using General Instructions for AI Data Extraction

Alongside field-specific instructions, Parseur now allows you to add general instructions for AI extraction. This is a text box at the top of the Fields page where you can provide overall guidance that applies to all fields in the mailbox or template.

This is particularly useful if you want to set the “tone” or context of how Parseur AI should process the entire document, rather than just individual fields.

When to Use General Instructions

Use general instructions when you want to:

  • Provide high-level document context, i.e. "These are invoices from suppliers, prioritize extracting financial data.”

  • Set rules that apply to multiple fields, i.e. "Always normalize dates to YYYY-MM-DD format.”

  • Clarify document-wide patterns, i.e. “Client names always appear under the text ‘Ordered by’.”

  • Guide AI on overall handling, i.e. “Ignore headers and footers when looking for field values.”

These instructions help Parseur AI better understand your documents before applying the field-level extraction rules.

When Not to Use General Instructions

You should avoid using the general instructions text box when your guidance is specific to a single field.

Do not list out all of the data you wish to capture in this box. You must create Fields for each individual point of data you are looking to extract below the General Instructions text box.

When to Use Field Instructions

Scenario 1. Add Context to Clarify Data Extraction

When a field name could have multiple interpretations, provide instructions to specify exactly what information is needed.

  • Field Name: Vaccination

    • Instructions if you want the date: “Date of vaccination”

    • Instructions if you want the vaccine name: “Name of the vaccine”

Scenario 2. Restrict Extracted Values to a Fixed List of Choices (Document Classification)

If you need to categorize documents by specific types and want the AI to use only predefined values, provide a list of acceptable options.

  • Field Name: DocumentType

    • Instructions: “Possible values are Invoice, CreditNote, PurchaseOrder, Receipt, Other”

Scenario 3. Summarize a Document or a Section

If you receive lengthy documents and want to extract a concise summary for your database, use instructions to guide the summarization process.

  • Field Name: Summary

    • Instructions: “Summarize the content of this document in 2 sentences”

Scenario 4. Ask Specific Questions About Your Documents

For tasks like comparing insurance policies where details may vary significantly, use instructions to frame specific questions.

  • Field Name: building_structure_covered

    • Instructions: “Does this policy cover the building structure? Answer Yes or No.”

  • Field Name: building_structure_limit

    • Instructions: “What is the coverage limit for the building structures? Answer with the USD amount.”

  • Field Name: building_structure_exclusions

    • Instructions: “What are the exclusions for the building structure coverage?”

Scenario 5. Translate a Field into Another Language

If you receive input in multiple languages and want a consistent English version, provide translation instructions.

  • Field Name: lead_message_en

    • Instructions: “Lead Message (translated into English if required)”

Scenario 6: Perform Advanced Data Analysis, such as Sentiment Analysis

Leverage specific instructions to perform advanced Natural Language Processing (NLP) tasks, including sentiment analysis.

  • Field Name: message_sentiment

    • Instructions: “What is the overall sentiment of the user’s message? Respond with one of the following: HAPPY, NEUTRAL, or ANGRY.

  • Field Name: python_proficiency

    • Instructions: “Assess the candidate’s proficiency in Python. Respond with:

      • NONE for no experience

      • JUNIOR for 1-3 years of professional experience

      • SENIOR for 4-6 years of full-time experience

      • EXPERT for more than 6 years of dedicated, full-time experience.””

... and many more! By using field instructions strategically, you can significantly enhance the AI’s data extraction accuracy and open exciting new data analysis use cases.

When Not to Use Field Instructions

The AI often understands what data to extract based on field names alone. If you are already getting accurate results without instructions, additional guidance may not be necessary.

⚠️ Important nuance: Overly detailed instructions can sometimes confuse the AI and reduce the quality of data parsing. Use instructions only when needed to clarify or refine the output.

Did this answer your question?