How to write effective prompts for data extraction in Cradl AI

In this guide, we’ll explore best practices and techniques for crafting effective prompts to enhance your AI model’s performance in Cradl AI. We’ll also dive into how few-shot learning can further boost accuracy, helping you get the most out of your models.

Start simple

Prompt design is an iterative process that requires experimentation to achieve optimal results. Begin with simple prompts and gradually refine them by adding more context and elements as needed. As you progress through this guide, you'll see how specificity, simplicity, and conciseness often lead to better outcomes.

For complex tasks with multiple subtasks, consider breaking them down into smaller, more manageable steps. This approach helps streamline the prompt design process and prevents unnecessary complexity early on.

1. Be clear and concise 

AI models perform best when given clear, direct instructions. Do not use conversational language. 

Instead of:

Try: 

2. Give examples

Providing examples helps the model better detect relevant information. 

Instead of:


Try:

3. Provide alternative wordings 

Provide keywords and aliases for the fields, especially if your documents are written in a non-English language. 

Instead of:


Try:

This improves recognition across languages.

4. Avoid formatting Instructions

Refrain from specifying output formatting, such as "return the invoice date as an ISO-formatted date." Instead, use the pre-configured formatters available in our formatter library to handle this.

Beyond Prompt Engineering: Instant Learning

While good prompt engineering is essential for optimizing AI performance, you can further enhance your model by training it on your specific data. This approach, is what we call instant learning, allows the AI to learn from a small set of labeled examples to improve performance. In Cradl AI, this means training the model on a handful of annotated documents.

Unlike generic AI models, your training data and adjustments are exclusive to your model—ensuring privacy and customization without being shared across users.

Instant learning is enabled by default in Cradl AI, meaning the model begins adapting as soon as you review and confirm extracted data. If you're using Cradl AI for the first time, follow these steps to get the best results:

1. Import 5–10 representative documents

  • Upload a small batch of documents that reflect the data you want to extract.
  • The AI will analyze these samples to establish patterns and improve accuracy.

2. Review and confirm AI predictions

  • Open the processed documents and verify the extracted data.
  • If the output is correct, confirm the predictions to reinforce learning.
  • If needed, make adjustments to guide the AI toward better accuracy.

3. Test with new documents

  • Upload new documents to evaluate how well the AI has learned from your input.
  • Keep in mind that past predictions on previously processed documents will remain unchanged—only newly uploaded documents will reflect the updated learning.

By following these guidelines and best practices, you can expect to experience better AI performance. If you have any questions or need assistance, our team is ready to help — just reach out to us via chat.

You might also be interested in

Try for free today

We’ll help get you started with your document automation journey.

Schedule a free demo with our team today!