Loading
Loading
  • Home

  • Productivity

  • App tips

App tips

8 min read

How to write an effective AI prompt

By Jessica Lau · June 19, 2024
Hero image with an icon representing an AI agent

The appeal of AI productivity tools is their promise to help you work faster and better. But if you don't know how to write a clear AI prompt, you may never get the results you're looking for. Instead, you'll spend your entire afternoon regenerating the response, hoping the 89th refresh of your original prompt will do the trick (it won't). 

The Zapier team has spent countless hours tweaking our AI prompts for all sorts of AI productivity tools powered by every kind of model—from AI chatbots and image generators to large language models (LLMs) and large multimodal models (LMMs). Here's a roundup of our top tips for writing an effective AI prompt. 

Table of contents

  • How to write an effective AI prompt for generating text 

  • How to write an effective AI prompt for generating art 

How to write an effective AI prompt for generating text 

If you're using AI to generate text—whether that's drafting a sales email, summarizing lengthy research papers, or brainstorming a list of names for your rec Pickleball team—use these tips to help you write a clear AI prompt so you can get the results you want faster. 

For more detailed information with examples of prompts for text generators, check out how to write an effective GPT prompt.

1. Tell it the writing style you want

If you're using AI to generate human-sounding text, you need to train it to sound like a human. In your prompt, include details about the voice, tone, style, and structure you want the AI to output. For example, "Write a silly children's story about the adventures of a missing sock. Tell the story in a linear format (this happened and then this happened)." 

If there's a well-known person whose writing style aligns with your desired output—for example, a comedian or playwright—you can skip detailing the writing style and simply use the phrase "in the style of [famous person]" followed by your instructions. 

Not sure how to describe your writing style? Check out these tips to help you identify a writing style and train ChatGPT (or any AI chatbot) to write like you.

2. Include helpful information up front

Let's say you want your AI tool to write a cold email to a sales prospect you found on LinkedIn. The AI has no idea who this person is, so you have to give it the information it needs so it can reference it directly. For example: 

Prospect's LinkedIn summary: [paste LinkedIn summary] 

As [your name and company/industry], write a 100-word cold email to [prospect name], who I just found on LinkedIn. 

Here are 50 ChatGPT prompts to support your entire customer experience lifestyle. (You can use these prompts with any AI chatbot.)

3. Give examples

Providing examples of the kind of output you're looking for can help guide the AI to deliver similar results. For example, if you want it to format a piece of data, you might enter something like this: 

Example:

Input: 2024-06-02

Add 3 days and convert the following timestamp into MMM/DD/YYYY format 

Output: Jun/04/2024 

Input: 2024-07-11

Output:

You can also tell the AI what to avoid by showing it negative examples—or even previous results it generated for you that you didn't like.

4. Provide feedback

Chances are, the AI tool you're working with can't read your facial expressions (yet). So it can't tell, based on your furrowed brows alone, that its last response didn't quite nail it. You have to explicitly tell the AI it's on the right path or if it's fallen off entirely. 

For example, I uploaded a screengrab from the movie Good Will Hunting and asked ChatGPT to tell me what was happening in the photo. 

ChatGPT conversation.

ChatGPT's response was technically accurate, but it was too vague for my liking. So I gave it that feedback and added a quick description of the exact moment captured in the photo. From there, ChatGPT automatically generated a new response with a more specific description of the scene, building on the feedback I fed it. 

Portion of a ChatGPT conversation.

You don't always have to give the AI feedback via a text prompt. Some AI chatbots also offer quick-action buttons that you can click to give it feedback. For example, Gemini lets you like or dislike a response, while ChatGPT lets you only dislike a response.

Gemini conversation with quick-action like and dislike response buttons highlighted.
Quick-action buttons in Gemini allow you to like or dislike a response. 

5. Build upon your existing prompts 

AI chatbots and writing generators have the ability to "remember" previous AI prompts and conversations. (That's an oversimplification of how these tools work, but you get the idea.) This means you can enter your directives once, and it'll remember your instructions for the entirety of that conversation. 

Some AI chatbots like ChatGPT have a memory that automatically picks up on your preferences and details from previous conversations. Other tools, like Jasper, require you to explicitly feed it with memories. 

If you use ChatGPT, you can control what ChatGPT remembers. Here's how to manage your data in ChatGPT

6. Specify the length

When entering your AI prompt, provide a word count or a range of acceptable lengths for the response—for example, if you want a 100-word summary, you could enter, "Write a 100- to 250-word summary of this article." A range gives the AI the flexibility to generate a response that's within your specified range. You can also use less precise terms like "short" or "long." 

7. Define the expected formats 

If you're working with an AI model that can output various formats, tell it the format of both your input and desired output in your AI prompt. 

For example, ChatGPT (powered by GPT) can output code languages like Python and HTML, as well as visual styles like charts and CSVs. This means you can do things like upload a CSV file of survey data and tell ChatGPT to output a bar graph of that same data. 

ChatGPT's data-related functionality goes beyond visualizing data. Here's what else you can do with the ChatGPT data analysis chatbot

8. Ask it to think step-by-step or think backward

For more complex tasks—like a math problem or something that requires deductive reasoning—it's helpful to include specific phrases in your AI prompt. Here are a couple of examples. 

  • "Let's think step by step." This makes the AI think logically and can be specifically helpful with math problems. 

  • "Thinking backward..." This can help if the AI keeps arriving at inaccurate conclusions.

9. Give it a role

Assigning your AI a role helps frame the bot's knowledge. This way, it knows what it knows—and what it doesn't. 

A simple way to give it a role is by including this phrase in your AI prompt: "As a [insert profession/role]" and then adding your instructions or request. 

10. Have it come up with the prompt

You can also use your AI as a brainstorming tool, leveraging its knowledge base and pattern recognition capabilities to generate AI prompt ideas that you may not have considered. 

To do this, frame your request as clearly and specifically as possible—and detail the parameters of your needs. For example, say you want GPT to help you understand error messages when something goes wrong on your computer. You could enter something like this: 

I'm looking to create a prompt for error messages. I have a few needs: I need to understand the error, I need the main components of the error broken down, and I need to know what's happened sequentially leading up to the error, its possible root causes, and recommended next steps—and I need all this info formatted in bullet points.

Your AI will take those requirements into consideration and return a prompt that you can then use on itself.  

How to write effective an effective AI prompt for generating art 

While AI chatbots and writing generators provide pretty decent responses even with basic prompts, AI art generators tend to require more attention to detail—more finessing. But with these AI prompt tips, you'll have a head start. 

It's worth mentioning that these tips build on the general structure of a basic AI art prompt (listed in order of writing): 

[image content/subject, description of action, state, and mood], [art form, style, and artist references], [additional settings, such as lighting, colors, and framing]

1. Use commas 

Separate each element of your prompt with commas. This helps the AI model interpret your prompt and makes it easier for you to remember what you've asked for. For example, "Illustration of dinosaurs drawn by a child, the illustrations are cute and heartwarming." 

Four AI-generated illustrations created by Midjourney.
Illustrations generated with Midjourney.

2. Enter concise prompts 

There's no hard-and-fast rule on how long or short an AI art prompt should be. But in our experience, Midjourney works well with 60-word prompts, while Stable Diffusion does best if you stay below 380 characters. AI image generators can get confused if you give them too much to work with.

3. Use context-specific language 

If you want your AI art generator to produce more predictable results, include vivid details and concrete language in your AI prompt. If you want to be surprised by how creative AI can get with your instructions, use poetic or abstract wording. You can also mix and match depending on your goals. 

4. Include style words 

Style words help the AI understand the desired aesthetic, transforming your outputs from average to amazing. Here's a broad overview of the different types of AI art styles

  • Medium refers to the appearance and characteristics of traditional art methods. For example, stencil, watercolor, graffiti, and charcoal. 

  • Material is one of the most fun ways to enhance your AI images. You can use traditional materials like porcelain or wood. Or you can venture into impossible materials like bubbles or light. It also helps to add the phrase "made of [material]" in your prompt so that AI can recognize it as a material instead of a component of the image.  

  • Lighting allows you to play with light and shadows so you can create a specific atmosphere in your AI-generated images. For example, you can opt for natural, studio, or neon lighting. 

  • Photography style is particularly helpful when you're generating portraits, but they can be used for any kind of image. You might specify details like the angle (high or low), view (bird's-eye or worm's-eye), and shutter speed. 

  • Color and palette gives you finer control over your images. You can specify color tones or to set the overall mood. Or you might use specific colors to match your branding. 

5. Use extra parameters 

Midjourney is one AI image generator that accepts a few extra parameters. Type an em dash or two hyphens at the end of the prompt, followed by the parameter name and value. Here are a few useful ones to try: 

  • --chaos changes how varied the results will be, with 0 being the least varied and 100 the maximum. For example,--chaos 80 would be highly varied.

  • --no handles negative prompts, meaning you can write what you don't want to see in the image. For example,--no buildings will prevent the model from drawing buildings.

  • --ar changes the aspect ratio of the image. For example, --ar 16:9 would render the image in the 16:9 aspect ratio.

Here's the full list of parameters, but keep in mind that these are specific to Midjourney. Other tools will use a different set of parameters (and present it differently, too). 

6. Reverse engineer real images to find new prompts

If you're stumped on how else to prompt your image generator, use another AI tool to help you brainstorm new prompts. CLIP Interrogator is an AI model hosted at Hugging Face that takes an image and gives you a text prompt based on its content. You can then use that result to build more detailed prompts and enter them into text-to-image models like DALL·E 3, and Adobe Firefly.

For its part, DALL·E (via ChatGPT Plus) will expand any prompt you give it to make it more effective; you can see the adjusted prompt, which might also give you some ideas for future AI prompts.

The prompt DALL-E 3 created based on the original text prompt

Automate your AI prompts with Zapier

Most of the examples shared above focus on chatbots and text and image generators. But you can apply these new AI prompt engineering skills to any app powered by AI models.

Take Zapier Central, for example. It's an AI workspace where you can use your new AI prompt-writing skills to create bots to automatically help you with specific tasks, like analyzing data, searching the web, or drafting responses to customers.

Zapier also connects with thousands of apps, so you can connect your favorite AI productivity tools to the rest of your tech stack. For example, you can automate ChatGPT, DALL·E (OpenAI), Claude, or Hugging Face, among dozens of other AI-powered apps. Here are a few pre-made workflows to get you started.

Create email copy with OpenAI from new Gmail emails and save as drafts in Gmail

Create email copy with OpenAI from new Gmail emails and save as drafts in Gmail
  • Gmail logo
  • OpenAI (GPT-4, DALL-E, Whisper) logo
  • Gmail logo
Gmail + OpenAI (GPT-4, DALL-E, Whisper)

Instantly organize Typeform entries in Google Sheets with Hugging Face

Instantly organize Typeform entries in Google Sheets with Hugging Face
  • Typeform logo
  • Hugging Face logo
  • Google Sheets logo
Typeform + Hugging Face + Google Sheets

Start a conversation with ChatGPT when a prompt is posted in a particular Slack channel

Start a conversation with ChatGPT when a prompt is posted in a particular Slack channel
  • Slack logo
  • ChatGPT logo
  • Slack logo
Slack + ChatGPT

Write AI-generated email responses with Claude and store in Gmail

Write AI-generated email responses with Claude and store in Gmail
  • Gmail logo
  • Anthropic (Claude) logo
  • Gmail logo
Gmail + Anthropic (Claude)

Zapier is the leader in workflow automation—integrating with 6,000+ apps from partners like Google, Salesforce, and Microsoft. Use interfaces, data tables, and logic to build secure, automated systems for your business-critical workflows across your organization's technology stack. Learn more.

Related reading

  • The best ChatGPT alternatives

  • Perplexity vs. ChatGPT: Which AI tool is better?

  • What is GPT-4o? OpenAI's new multimodal AI model

  • Enterprise AI: How companies can use AI across the organization

Get productivity tips delivered straight to your inbox

We’ll email you 1-3 times per week—and never share your information.

tags
mentioned apps

Related articles

Improve your productivity automatically. Use Zapier to get your apps working together.

Sign up
A Zap with the trigger 'When I get a new lead from Facebook,' and the action 'Notify my team in Slack'