---
schema_version: "1"
id: 4276303a7d054e92dc081e8e3d0ba442be8edab1f9db51d0010121c2085571d1
title: Example Einstein Prompts
collection: mulesoft
version: current
locale: en-us
portal_url: https://docs.salesforce.com/mulesoft/current/en-us/idp/example-einstein-prompts.md
canonical_url: https://docs.mulesoft.com/idp/example-einstein-prompts
source_site: docs.mulesoft.com
content_type: documentation
content_hash: 9326d4484912743a8000980f898ed81378de98a64298d607d6bba4a00a0095b3
description: MuleSoft Documentation Site
latest: true
---
---
product: IDP
---

# Example Einstein Prompts

> For the full documentation index, see: https://docs.mulesoft.com/llms.txt

Following are some use cases and example Einstein prompts for each situation. These prompts are
based on the sample data used during each test and provide insight about creating prompts to analyze
and format your custom documents.

You can use these examples as starting points, test them against your documents, and modify them
until you obtain the expected result.

## Extract details from a US Driver’s License

The following Einstein prompt extracts data from a driver’s license ID document and outputs the
information in JSON format.

- Example document

  ![50%](/mulesoft/current/en-us/idp/_images/driver-license-example.png)

- Example Prompt

  ```none
  Identify key elements from the specified document and return them in JSON format.
  Do not create new information, provide answers only from the text provided. The JSON format is as follows:

  {
      "id_data": {
          "doc_number":<replace with value found for License ID or document ID>,
          "first_name": <replace with the first name of the person in the text>,
          "last_name": <replace with the last name of the person in the text>,
          "issue_date": <replace with the date of issue of this document>,
          "dob": <replace with date of birth found in the text also represented as dob>,
          "exp_date": <replace with expiration date, sometimes written as EXP>,
          "state_region": <replace with state or region where this document was issued>,
          "height": <replace with height specified if not found, say "not found">,
          "class": <replace with vehicle classification if found">,
          "eye_color": <replace with eye color if found">,
          "sex": <sex as specified>,
          "weight": <replace with the weight found>,
          "restrictions":<replace with any restrictions listed in the document>,
          "address": {
              "street": <replace with the street line of the address including any apartment numbers>,
              "city":<replace with the city in the address found>,
              "state": <replace with the state found in the address>,
              "zip": <replace with the zipcode found in the address>
          }
      }
  }
  ```

- Output

  { "id\_data": { "doc\_number": "12345678", "first\_name": "The Genius", "last\_name": "Einstein",
  "issue\_date": "10/30/2024", "dob": "03/14/1879", "exp\_date": "10/31/2031", "state\_region":
  "California", "height": "5'5\\"", "class": "D", "eye\_color": "BROWN", "sex": "M", "weight": "150
  lb", "restrictions": "None", "address": { "street": "707 South Oakland Avenue", "city":
  "Pasadena", "state": "CA", "zip": "91106" } } }

## Classify a Document With Multiple Pages

In this example, the source document is a PDF with multiple pages containing a timesheet summary
document with multiple entries. The goal is to classify the content by identifying the name of the
person in each page. For such a case, the following prompt returns a list in JSON format containing
the name of the person and the corresponding page number.

- Example document

  ![50%](/mulesoft/current/en-us/idp/_images/timesheet-examples.png)

- Example Prompt

  ```none
  Classify each page of the following timesheet summary as a unique document type and also identify whether the page continues from the previous document type or it is a new one.
  Summarize all the employee's names in the timesheet summary document and the pages where their timesheet entry is found.
  Structure the output as a JSON where the employee name is the key and the page number is the value.
  ```

- Output

  { "Jane Almeida": 1, "Charles Montes": 2, "Albert Vignoli": 3, "Max the Mule": 4 }

## Extract Form Data as Key/Value Pairs Including Handwritten Values

The following example is a prompt that analyzes a medical certificate to extract key/value pairs and
considers handwriting during the extraction.

- Example document

  ![50%](/mulesoft/current/en-us/idp/_images/medical-license-handwriting-example.png)

- Example Prompt

  ```none
  Analyze this form for a medical leave and extract its values. Don't extract document's title.
  Present the data as key-value pairs in a JSON formatted response.

  If you find a date, format it as YYYY/MM/DD.
  If you find a list of handwritten symptoms, return them as an array and label them "Reason for Absence".

  Do not create any facts of information, interpret only the information in the document.

  An example output JSON is:

      "Patient_Name": {
          "value": "Paul Grant"
      }
  ```

- Output

{ "Patient\_Name": { "value": "Paul Grant" }, "Date\_of\_Birth": { "value": "1988/11/02" },
"Case\_Number": { "value": "12345678" }, "1st\_Diagnosed\_Date": { "value": "2021/04/12" },
"Last\_Office\_Visit": { "value": "2024/09/01" }, "1st\_Exam\_Date\_for\_this\_Condition": {
"value": "2021/01/23" }, "Next\_Office\_Visit": { "value": "2024/10/23" }, "Reason\_for\_Absence": {
"value": \[ "Unable to complete the TPS reports on Saturday", "Hyperventilation during the session"
\] } }

## See Also

- [Analyzing Documents Using Pre-Built Schemas](https://docs.mulesoft.com/idp/creating-document-actions)

- [Enhancing Data Extraction with Einstein](https://docs.mulesoft.com/idp/enhancing-data-extraction-with-einstein)
