Prompt Templates

Here are a few example prompts to give you an idea of what a good prompt can look like in Relay.app.


1. Extract invoice details from an email

The email we just received contains an invoice. Extract the following information from the invoice:

* Name of the vendor
* Amount
* Due date

Additional context

AI step output configuration showing fields for vendor, amount, and dueDate with their respective data types

2. Classify & summarize incoming customer support emails

Output & Context

AI step output configuration displaying summary and emailClassification fields, with emailClassification configured as a single select field
The Output is generated via the Auto-generate from prompt button
Single select field configuration showing choices for Feature request, Bug report, and Other options in the emailClassification field
The Choices as defined for the emailClassification single select output

3. Extract action items & summarize meeting notes

Output & Context

AI step output configuration showing actionItemsAssignedToJohn as a list field and meetingSummary as a text field
The Output is generated via the Auto-generate from prompt button
List field configuration showing actionItemsAssignedToJohn configured as a List with Text as the nested type
The actionItemsAssignedToJohn list is defined as a List of text variables

4. Extract event details from a website with upcoming webinars

Output

AI step output configuration showing webinarEvents as a List of JSON Objects with nested fields for webinar details
The Output section as generated via Auto-generate from prompt.

Note 1: The AI model doesn't have access to the Internet directly. You'll first need to scrape content from a website via the built-in Scrape Text from Website action. Afterwards, you will be able to insert this as a variable in the prompt ([$ Scraped Content] in the example above).

Note 2: if you were to construct this output yourself without the 'Auto-generate' button, you will have to do the following:

  • Add one top-level output

    • Variant: List

    • Type: JSON Array

    • Nested type: JSON Object

  • For the definition of the JSON Object inside the list, you will then add individual fields of (of the Single variant) for each piece of information that you want to extract, e.g. the date of the webinar

Animated demonstration of configuring a list of JSON objects output, showing the creation of nested fields within the object structure
Specifying a "list of objects" as a desired output in AI steps

Last updated

Was this helpful?