Skip to main content

Adding rest of the prompts for our quick start project

Now that we know how to add new prompts and run them, let's add a few more prompts to extract more fields from credit card statements.

Customer name

  • Field name: customer_name
  • Field type: Text
  • Field prompt: What is the name of the customer to whom this credit card statement belongs to? Format the name of the customer well with the fist letter of each name capitalized.

img Customer Address

Customer address

  • Field name: customer_address
  • Field type: json
  • Field prompt:
Since there might be multiple addresses in the context provided to you, first gather all addresses. Try to understand whom this credit card statement is being addressed to or in other words, the name of the customer. Find the address that matches that person's. Be sure to return the customer's address, for whom this credit card statement is for. Do not respond with any other address.

For the customer's address, form a simple JSON object with the following fields:
- full_address: should have the customer's full address
-city: should hold's the city name from the address
- zip: should contain the zip alone

img Customer Address

Payment Info

  • Field name: payment_info
  • Field type: json
  • Field prompt:
Payment information is important part of any credit card statement and it consists of the new balance or the full amount due for the current statement, the minimum payment due and the payment due date.
Respond with a JSON object with the following fields:
new_balance: the total new balance amount that can be paid
minimum_payment: the minimum amount that is due
due_date: the payment due date in yyyy-mm-dd format

img Payment Info

Spend line items

  • Field name: spend_line_items
  • Field type: json
  • Field prompt:
This credit card statement contains spending details line items. Spend details can be split across the provided context. Respond with details of all the spend items by looking at the whole context always.

For each of these spend details line items, form a simple JSON object with the following fields:
- spend_date: date of the spend in yyyy-mm-dd format. If the year part isn't mentioned in the line item explicitly, pick up the year from the statement date and use it instead.
- spend_description: description of the spend
- amount: amount of the spend without the dollar sign formatted to 2 decimal points

Put all of these items into a JSON array and return that.

img Spend Line Items