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

You're a customer support agent for a SaaS product. You just received an email from .

Please summarize their message in one sentence, and classify the email either as a 'Feature request', 'Bug report' or 'Other' when neither of the first two are a good fit.

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

You're an executive assistant and are tasked to process meeting notes that arrive in [John's] mailbox. You just received an email with meeting notes.

Read the meeting notes in the email. Create a list of all the action items assigned to [John], and summarize the 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

Below you will find a website that lists upcoming webinars for [Product].

Extract a list of all upcoming webinar events from this website. For each of them, extract:

* The name of the webinar
* The name of the presenter
* The date
* The start time
* A link to sign up

Website contents below this line
------

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?