Free cookie consent management tool by TermsFeed Sample Prompt Patterns [AI Capabilities]
Sample Prompt Patterns

Overview

Generative artificial intelligence (AI) is highly adaptable to many use cases in your business processes. With such a vast set of possibilities, it can be hard to know where to start.

This page provides some sample prompt patterns you can use with the prompt builder AI skill. As you experiment with customizing the prompt, you'll learn more about what to include to get just what you need from the skill.

Tip:  When executed in a process, any input text is appended to the prompt you created with the prompt builder AI skill. This means that the prompt text is the first thing the model begins to analyze and interpret. Keep this in mind as you phrase the prompt.

For example, the model can make sense of "Summarize the following text," in the prompt when it's followed by the input text. Alternate phrasing, like "Summarize the previous text" might confuse the model and lead to low-quality results.

What makes a good prompt?

First, let's recap what a prompt is. In the context of AI, a prompt is how we communicate with the large language model (LLM) about what we want it to do. A well crafted prompt can help you communicate with the model more effectively, and reduce the amount of time you spend tweaking or troubleshooting.

Crafting a good prompt can improve:

  • precision and relevance of the model output,
  • efficiency by getting the desired response in one question,
  • safety by excluding undesired output, and
  • customization with our own relevant data.

If you're looking to build a prompt from scratch, you might want to consider the following aspects:

  • Define your use case: What do you want the model to do?
  • Tell the model what input to expect (defining the input data): If the prompt will always include content for a certain type or format, it may be helpful to tell the model this in the prompt. For example, "I want you to summarize this email text and provide a suggested response."
  • Tell the model what output you want (defining the output data): LLMs are not deterministic, so it is possible that the model won't always return data in the structure you specify. However, you can be specific about what you want the model to return. For example, you can tell the model you want the response to be in JSON, HTML, a bulleted list, or any other format. You can also tell the model to include its response between tags, to help keep the answer more focused.
  • Gather examples: You'll want to provide examples to help the model produce the answers you're looking for. Examples help provide the model with context, so it will produce output that's more specific to your request.
  • Consider length, tone, and audience: Another thing to consider when specifying the output is how it will be used and who will see it. Does it need to be a certain length, perhaps 3 paragraphs? Should it be written for a certain audience, such as customers? If you help define the context for the model, you'll get results that are more in-line with what you need.
  • Remember token limits: The model can process a set number of tokens, or units of analysis. The model will process your prompt and the input data. Keep this in mind when you craft the prompt, because the longer the prompt is, the smaller the input can be.

Tip:  Put the most important part of your prompt (such as output format or a specific question to answer) at the end of your prompt so the model is clear on what your ultimate request is.

What is a token?

In the context of machine learning, a token is a unit of analysis. A model breaks down data into meaningful parts—tokens—before it begins processing that data. Language processing models break down paragraphs of text into their smallest units, but these units aren't always equivalent to words. Instead, a token could be part of a word. Therefore, the number of tokens won't always equal the number of words in the text analyzed.

As a rough estimate, six characters = one token.

Summarize long or complex content

If your business uses Appian for case management, it is often essential to surface crucial information in the form of summary updates. A single case could include hundreds of updates, which would be difficult and time-consuming for a person to read and understand the key information. Instead, you can ask an AI model to do this for you.

Prompt

Summarize the recent and important updates for this customer's case. This information will be presented on a dashboard, so keep it brief (3 bullet points at most), but prioritize information that an analyst or case worker would need to know. Start the list with "Recent updates:"

Example inputs

In this example, you can use data from a record field as input text for the Execute Prompt smart service. An automated process model can routinely summarize recent updates to the records you choose, eliminating the need for a person to manually ask the AI model for a summary.

Example outputs

Recent updates:
- Mr. Jones began working with their new adjustor, Ms. Brown. The customer said that Ms. Brown has been helpful and responsive resolving his claim.
- Ms. Brown spoke with Mr. Jones in April 2023 to clarify which expenses of his would be covered by the policy, and he understands.
- Mr. Jones visited an orthopedic surgeon in August 2023 to address back pain from the accident and submitted his expenses as requested.

To promote a product or service, your business needs to create a lot of written materials. Maybe you want to interact with your customers by posting on social media, writing blog posts, drafting catchy taglines, or assembling a list of frequently asked questions. Because this information is based on what the product can do for your intended customers, you can use the prompt builder AI skill to help generate additional content about your new product or service.

Prompt

In this scenario, the input text will be a description of your product and a request for a certain type of marketing collateral, such as a blog post. As a starting point, you'll formulate a prompt that sets the scene for the model:

My company wants to promote a product or service through posts on social media and our corporate website. I'll provide you with a description of the product or service, as well as a description of what type of content I want you to create.

No matter what I ask you to create for me, I want you to use exciting language and keep in mind that the goal is to encourage someone to sign up for this service after they read what you write. However, don't be pushy about it.

This prompt is open-ended enough that your business could also use it to generate content for social media, blog posts, and more.

Example inputs

The product is called FeedMe, an app that lets a user sign up for a subscription to a meal kit based on their lifestyle. We cater to any and all diets: vegetarian/vegan, keto, low-carb, Whole30, you name it. Our product not only caters to their diets, but their lifestyles. Busy families, students, working professionals, and social media influencers can all find something that fits their daily needs with our service.

Write a sample blog post about the five benefits of our meal subscription service.

Example outputs

Because this prompt is generating creative content, you may want to experiment with adjusting the temperature to see the variety of language the model returns.

Here is a draft blog post highlighting 5 benefits of the FeedMe meal subscription service:

5 Reasons FeedMe Is the Perfect Meal Solution For Your Lifestyle

Juggling a busy schedule while trying to eat healthy and balanced meals can feel impossible. Between work, family, and all of life's other demands on your time - who has the energy to grocery shop, meal plan and cook every night? That's where FeedMe comes in. As the one-stop-shop for convenient, customized meals, FeedMe makes eating well effortless. 

1. Save Time with Meal Kits Delivered to Your Door
Say goodbye to spending your evenings in the grocery store or slaving over a hot stove. With FeedMe, all the ingredients and instructions for delicious, diet-friendly meals are delivered right to your door each week. No more stressful meal prep - just relax and enjoy home-cooked dinners without the hassle.

2. Eat According to Your Lifestyle and Dietary Needs  
Whether you follow keto, Paleo, vegan or have food allergies, FeedMe has options for every eater. Choose from recipes tailored for various diets and lifestyles like gluten-free, low-carb or Whole30. You're sure to find meals you'll love that also fit your individual wellness goals.

3. Conveniently Portioned Ingredients 
With FeedMe, there's no waste and no guessing game about quantities. Ingredients are precisely measured out for each recipe, taking the guesswork out of cooking. Save money while avoiding food going uneaten in your fridge.  

4. Satisfy Your Taste Buds with New Recipes 
Spice up your weekly routine with exciting new flavors from FeedMe. Discover international cuisines and gourmet recipes you never thought possible with your diet. Broaden your culinary horizons without leaving your kitchen.

5. Support from Real People, Not Robots
Unlike other services, FeedMe is backed by a team of real people - from registered dietitians to chefs. Get personalized assistance whenever you need recipe advice or dietary substitutions. Feel good knowing knowledgeable humans are here to help you succeed.

Ready to make home-cooked, diet-friendly meals a breeze? Sign up for your FeedMe subscription today and see how simple healthy eating can be!

Identifying personally identifiable information (PII)

Suppose your business intakes and manages form submissions with sensitive information, like a person's social security number or medical history. Before you route those forms to the right person or group, it's important to verify if the form contains information that those people are privileged to see.

Tip:  Remember that generative AI models sometimes produce responses that are inaccurate, inappropriate, or undesirable. Users should verify information in these responses for accuracy.

Prompt

You can craft a prompt that asks the AI model to provide a list of potentially sensitive information within any document. For example:

I need you to determine what personally identifiable information exists in this form submission. I want you to provide the information in JSON format, including keys for the type and value.

Example inputs

My wife, Jane Doe, fell and broke her arm while we were traveling in California last month. She was treated at the California Medical Center, where, as out-of-state visitors, we were required to pay for her care at the time treatment was received. The total came to $1200. I did contact our Primary Care Physician, Doctor Smith, within 24 hours of the accident, as required by the terms of our policy.

Our policy number is 12345. I have enclosed the statements and receipts from the California Medical Center. Please reimburse me as soon as possible. You can contact me at me@example.com or 800-867-5309.

Example outputs

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
[
  {
    "type": "name",
    "value": "Jane Doe"
  },
  {
    "type": "policyNumber",
    "value": "12345"
  },
  {
    "type": "email",
    "value": "me@example.com"
  },
  {
    "type": "phone", 
    "value": "800-867-5309"
  }
]

Classify and route unstructured text, such as a customer support request submitted through a Portal

Your business might use portals to present information to and interact with your customers. Say a customer submits a support request via your portal. If the form submission is left to be reviewed manually, a person might not see it for a day or two, leading to slower response time and a poor customer experience. You can use generative AI to analyze these form submissions, determine the type, extract key information, and route it to the appropriate team for triage and response.

Prompt

You can ask the model to return answers to a standard set of questions:

From the content of this form submission, please answer the following questions:
What type of submission is this?
What information is important in this submission?
What team would be responsible for responding to this submission?

Example inputs

Urgent: Electric Bike Battery Issue - Request for Assistance

I'm writing to seek assistance regarding a persistent issue with my Electric Cruiser (Order #XYZ789). Since Jan 1, the bike's battery has been consistently malfunctioning, affecting its reliability for daily use.

Despite diligently following the troubleshooting steps outlined in the manual, the problem persists. I have attached images displaying the error messages shown on the bike's console. As a valued customer, I urgently need your guidance to resolve this matter. Could you please provide clear instructions or steps to address the battery malfunction promptly?

Your swift attention to this issue would be greatly appreciated.

Best regards,
Alex Johnson

Example outputs

This is a customer support submission.

The important information in this submission includes:
- The customer is reporting a persistent issue with their electric bike battery malfunctioning since January 1st
- The customer has followed troubleshooting steps in the manual but the problem persists 
- The customer has attached images of error messages shown on the bike's console
- The customer is seeking guidance and clear instructions to resolve the battery malfunction promptly

The team responsible for responding to this submission would be the electric bikes customer support/service team, as the customer is reporting an issue with their electric bike battery and is seeking assistance from the company.

Extracting data from unstructured text, such as emails or long Records fields

An unstructured document, such as an email, might contain important information that you'll use elsewhere in Appian. For example, if you're an insurance adjuster and receive many emails from customers with information about new or existing claims, it can be time-consuming to review and extract the relevant details from each one. You can use AI to help you get started.

Prompt

Tell the model you want specific information from the emails you receive:

I'm an insurance adjuster and get a lot of emails from customers asking to file a claim. I need you to give me the essential information from this email. Please format the output as a list.

Example inputs

Subject: Claim for Recent Property Damage - Policy #ABC123

Dear Ms. Johnson,

I trust this email finds you in good health. My name is Sarah Thompson, and I am reaching out to bring to your attention an incident that has occurred at my residence, covered under policy #ABC123. On the evening of January 25th, my area experienced an unexpected hailstorm, resulting in significant damage to the roof of my house. The impact has caused leaks in multiple rooms, damaging the ceiling, walls, and flooring.

I have attached several photographs illustrating the extent of the damage. The situation is becoming increasingly urgent as the recent rain exacerbates the issue. To prevent further harm, I've engaged a local restoration service, and they have provided an estimate for the necessary repairs. The cost of the restoration work is estimated at $8,500, inclusive of materials and labor. Should you require any additional documentation or information, please do not hesitate to let me know.

I greatly appreciate your prompt attention to this matter and kindly ask for your support in expediting the processing of my claim. If an inspection is necessary or if there are specific steps I need to follow, please advise accordingly. Your assistance in resolving this unfortunate situation is highly valued.

Thank you for your understanding and cooperation.

Best regards,

Sarah Thompson

Example outputs

Here is the essential information from the email formatted as a list:

- Date of incident: January 25th
- Type of damage: Hail damage to roof, resulting in leaks in multiple rooms and damage to ceiling, walls, and flooring  
- Estimate for repairs: $8,500

Alternatively, if you asked the model to output the data as a CSV instead of a list, you'd get:

1
2
3
4
5
Policy #,ABC123
Name,Sarah Thompson
Date of Incident,January 25th
Type of Damage,Hail damage to roof causing leaks in multiple rooms, damaging ceiling, walls, and flooring
Estimated Cost,$8,500
Open in Github Built: Wed, Apr 10, 2024 (06:57:10 PM)

Sample Prompt Patterns

FEEDBACK