How to Write a Good Gen AI Prompt

Generative artificial intelligence (Gen AI) “tools” – like OpenAI ChatGPT, Google Gemini, or Backplain – have made it easy to write and polish emails or presentations, summarize reports, write code, create social media campaigns, and accelerate customer service interactions. To use these to their fullest potential comes down to the prompt — the questions and statements — you type or speak into the generative AI tool. The better your prompts, the better the responses. 

After you enter a prompt, the AI model analyzes your input and generates a response based on the patterns it has learned through its training. More descriptive prompts can improve the quality of the outputs.

There is both a science and an art to refining prompts to effectively communicate with a generative AI model to achieve desired outputs. You’re essentially “guiding” the generative AI tool to give you an accurate response to your prompt.

Write like you’re having a conversation and use specific language and descriptions.

The generative AI tools will work to your advantage the clearer you are in your prompt, so get detailed. You can have a back-and-forth discussion with generative AI tools and go deeper into what you’re looking for. Consider these tips when writing generative AI prompts:

  • Write clearly and concisely so the generative AI tool knows your specific request.
  • Compose full sentences with descriptive words, active verbs, and text that describes what you’re looking for.
  • Ask specific questions, avoiding closed-ended questions that offer yes/no answers.
  • Add context, explaining what you’re trying to achieve or what audience you’re targeting.
  • Follow up after the initial response to go deeper and get even more explicit responses.

Writing a good Gen AI prompt involves clarity, specificity, and context to ensure that the model understands exactly what you require. Here’s a guide to help you craft effective prompts:

Be Clear and Specific 

Clearly state what you want the model to do. More specificity limits the chances of inaccurate responses.

  • Use specific terms and language pertaining to the subject matter.
  • Avoid jargon, slang, or complex phrases.

For instance, instead of saying, “Create a social media campaign,” you can write, “Create a social media campaign for an ecommerce website that sells graphic T-shirts for fans of movies and comics like Star Wars, Harry Potter, and the Marvel Cinematic Universe.”

Provide Context

Include necessary background information to help the AI understand your request. For example, if you’re asking for a summary, indicate what document it should be based on.

“Act as if…”

Asking the AI to behave as if were a type of person, process, or object can be an easy way to start generating better prompts. The AI will attempt to emulate that role and tailor its answers accordingly.

For example, imagine you wanted help creating a recipe based on ingredients you have in your kitchen. If you ask, “create a recipe using these ingredients,” followed by a list, you’ll get some general recipe suggestions. But if you added “act as if you are my personal trainer” first, the AI will consider this context in its response, perhaps suggesting a healthier recipe or a meal designed to refuel after a workout.

Define the Format or Structure of the Output You Desire

After describing what you want, try adding “Present this in the form of…” and your preferred output. Or start your prompt with, “Create a [format of output] about / that contains…” etc.

  • Specify the desired format, such as bullet points, paragraphs, dialogue, etc.
  • If you need a certain length, indicate this in your prompt.

Use Constraints and Examples 

   – Include constraints like tone (e.g., formal, humorous) or style (e.g., concise, detailed).

   – Provide examples if you want the AI to replicate a certain style or structure.

Use “Do” and “Don’t” 

Telling AI what you do and don’t want in your response can save time and improve your result. For example: Do include tomatoes, chicken, and some type of carb. Don’t include chili peppers or any ingredients containing wheat.”

Build on Previous Prompts and Use Sequential Steps

  • You don’t have to get everything into your first prompt. Try starting with a basic question and adding to it over time.
  • For complex tasks, break the request into parts or steps. This can help in guiding the model through a multi-step process.

Iterate and Refine 

   – Experiment with multiple iterations of your prompt to see which yields the best results.

   – Revise based on the outcomes to tighten the prompt further.

Correct Mistakes and Give Feedback 

Chat with the AI as if it’s a colleague or teammate and you’re working on a project together. Give feedback.

  • Tell it which parts of the output were useful, and which parts could be improved. 
  • If you notice it got something wrong, tell it so it can correct its mistake.

Test and Learn

Use trial and error to understand how the model interprets your prompts. 

For example, instead of requesting, “Tell me about climate change,” you can ask, “Explain the primary causes and effects of climate change in the past decade in a concise report format, focusing on recent scientific discoveries.”

Generative AI tools are not perfect and they’re definitely not human. It may feel like you’re having a conversation, but in reality, it’s a back-and-forth with a machine that has been fed and accumulated loads of data. Keep these ideas in mind during your generative AI writing or design process:

  • Generative AI is not always factual. It sometimes makes up answers, called hallucinations, so be sure you verify what it gives you.
  • Be careful of any copyright concerns and confirm that what generative AI products give you isn’t plagiarized from another source.

By following these guidelines, you can improve the quality of the responses you receive from a generative AI system.

Note This article was generated with the help of Backplain 1.0.3. October 31, 2024.  https//dashboard.backplain.com

Bendersky, Ari. AI Prompts: 6 Tips for Writing Generative AI Prompts. Artificial Intelligence. Salesforce. https://www.salesforce.com/artificial-intelligence/generative-ai-prompts.

Getting started with prompts for text-based Generative AI tools. Information Technology. Harvard. August 30, 2023. https://huit.harvard.edu/news/ai-prompts