How To Write ChatGPT Prompts: Your 2024 Guide

Written by Coursera Staff • Updated on

Discover foundational and advanced prompting strategies to unlock ChatGPT’s power.

[Featured Image] A woman in a white t-shirt sits on the floor at her coffee table and types prompts into ChatGPT for a project.

ChatGPT prompts: What to know in 2024

Writing effective prompts for ChatGPT involves implementing several key strategies to get the text-to-text generative AI tool to produce the desired outputs. You can use ChatGPT prompts, also called ChatGPT commands, to enhance your work or improve your performance in various industries. For example, marketers can prompt ChatGPT to generate ideas for social media posts or content for an email marketing campaign. At the same time, someone in the culinary arts could have ChatGPT compose a sample recipe for a complex dish. 

As generative AI technology evolves, practicing the latest ChatGPT prompting strategies is crucial to learn more about how this tool responds to human input and leverage its full capabilities for your projects. 

Interested in becoming a prompt engineer?

In your research into ChatGPT prompts, you may notice that prompt engineering—the act of crafting inputs to optimize generative AI outputs—is emerging as a career field with jobs opening across industries. Employers are hiring people with skills in writing, data science, machine learning, and more to fine-tune interactions with AI tools and achieve their business goals. Try out Prompt Engineering for ChatGPT from Vanderbilt University to advance your skills today.

Read more: How to Become a Prompt Engineer: Skills You Need + Steps to Take

Placeholder

Take this course to start advancing your prompt engineering skills:

ChatGPT prompt guide

In this guide, we’ll go over key ChatGPT prompting strategies, including foundational processes you need for any project and advanced strategies for optimizing the outputs. 

Effective ChatGPT prompts include a few core components that provide the generative AI tool with the information it needs to produce your desired output. Starting with a project in mind, compose each of the following prompt components and then compile them into a single set of instructions (up to around 3,000 words) that ChatGPT will use to generate an output. 

1. Project description

Write one or two sentences that describe your project, its purpose, your intended audience or end users for the final product, and the individual outputs you need ChatGPT to generate in order to complete the project. 

Example: Develop a content marketing strategy for a tech startup for the purpose of increasing brand awareness and engaging a niche market of tech enthusiasts. ChatGPT will assist in drafting blog post ideas, captions for social media posts, and email newsletter concepts.

2. ChatGPT’s role 

Assign ChatGPT a role—as in an identity, point-of-view, or profession—to help guide the tool’s responses. ChatGPT can generate outputs based on the area of expertise related to the role you assign it. 

Example: ChatGPT will act as a content generator and strategist, helping to generate captivating headlines and viral post ideas, as well as identify opportunities to fill content gaps in this niche.

Build effective prompts and think through the lifecycle of a generative AI Project:

Read more: What Is Competitor Analysis? Definition + Step-by-Step Guide

3. Project context

As with an assigned role, providing context for a project can help ChatGPT generate appropriate responses. Context might include background information on why you’re completing a given project or important facts and statistics. 

Example: The content strategy will support a tech start-up prioritizing building a strong online presence over sales in its early phases of growth, so the content strategy needs to reflect this focus. 

4. Output specifications

Your prompt should specify details of the output you want ChatGPT to generate and how it should be generated, including the tone, length, style, structure, as well as research that needs to be conducted.  

Example: The content strategy should use accessible terms and avoid jargon while still sounding professional so that all project stakeholders can easily understand it. It should start with the strategy objectives and provide specific ideas for content that will appear on multiple marketing channels, along with a short rationale for each suggestion. It should be informed by the content marketing of popular tech brands: Company A, Company B, and Company C. 

5. Rules and constraints

Including rules and constraints, alongside the output specifications, can further aid ChatGPT in producing your desired output. These might include certain types of content, examples, or even words you want ChatGPT to exclude.

Example: The content marketing strategy should not include any ideas for email, blog, or social media content that would mention our competitors in the content itself. 

6. Output examples

Giving ChatGPT some examples of the kind of output you are looking for can reduce the risk of it misinterpreting your prompt. You can include examples of writing styles and tones you’ve specified in the instructions, examples of the kind of content you want, and even examples from your previous work. 

Example: Generate a list of email subject lines for the tech start-up brand awareness campaign that mimics the upbeat and inviting style of this example: “Your Gateway to Tech Excellence: [Tech Startup's Name]."

Remember that ChatGPT can understand and respond to human language because of a technology called natural language processing. When prompting, you can be conversational with ChatGPT. The prompt doesn’t need to be overly formal; it just needs to be clear and specific.

Placeholder

Now that we’ve gone over the individual components of effective ChatGPT prompts, let’s put the entire sample prompt together into a cohesive set of instructions:

Acting as a content strategist, develop a 200-word content marketing strategy for a tech start-up to increase brand awareness among tech enthusiasts. The strategy should start with the objectives and then provide specific ideas for blog posts with captivating headlines, captions for viral social media posts, and concepts for email newsletter blasts. Provide a short rationale for each suggestion. Use this email subject line as an example of an upbeat and inviting style for the whole strategy: “Your Gateway to Tech Excellence: [tech start-up’s name].” The strategy should identify opportunities to fill content gaps in this niche without including sales-focused content. It should be informed by the content marketing of popular tech brands such as Google, Apple, and Amazon. At the same time, do not mention these brands in the content itself. The content strategy should avoid jargon while still being professional. 

Here’s the resulting output that ChatGPT generated based on the above prompt: 

Alt Text: Screenshot of ChatGPT prompt and response.

Advanced ChatGPT prompting strategies 

As you gain proficiency in composing thorough and explicit prompts like the example above, start using more advanced prompting strategies to get even more out of ChatGPT. In addition, this will contribute to the advancement and improvement of the generative AI tool. 

Here are six strategies to try. 

1. Set custom instructions.

As of August 2023, all users—including free tier and Plus subscribers—can set custom instructions from their ChatGPT accounts as a way to personalize their interactions with the tool, filter content, and control the context. For example, your custom instructions can tell ChatGPT to adopt a particular tone when generating outputs or to focus its outputs on a specific field like dentistry or creative writing.

Unlike providing these kinds of instructions in an individual conversation, setting custom instructions for your account might be useful if the majority of your conversations with ChatGPT adhere to specific parameters. If your projects, tasks, and reasons for using ChatGPT to generate content are diverse, then custom instructions may not be necessary or advantageous for you. 

Note that once you set custom instructions, they will apply to new conversations with ChatGPT going forward until you edit or delete the instructions. 

2. Ask ChatGPT to generate prompts. 

While writing your own prompts from scratch is the best way to hone your skills, you might find it helpful to ask ChatGPT on occasion to generate prompts for you. In so doing, you can observe the tool in action and learn more about what makes a prompt effective and the kinds of outputs to expect. 

Related methods of prompt research include: 

  • Reverse engineering responses by giving ChatGPT a sample output and asking it to create a prompt that could lead to that output. 

  • Searching the internet for industry-specific examples of effective prompts, then experimenting with different versions of those prompts. 

With each of these methods, be sure to evaluate the suitability of the outputs, as well as what qualities the prompts have that lead to desired outputs. 

Watch this video to understand how ChatGPT can help you refine your questions:

3. Create your own prompt library. 

Each time you create and use a ChatGPT prompt, consider saving it, along with the output, in your own files for later use. This strategy offers several benefits: 

  • Sharing effective prompts with others 

  • Being able to review and improve your own prompts for future projects 

  • Maintaining a knowledge base for your own work

  • Scaling your interactions with ChatGPT

  • Creating multiple versions of an effective prompt for different uses 

4. Ask ChatGPT to generate summaries of long conversations. 

After chatting with ChatGPT over a series of prompts and follow-up prompts, you might find it useful to ask for a summary to retrieve important points rather than manually scrolling through the chat and reviewing it in its entirety. You can use the summary to collaborate with others, make decisions, recall information, and learn. 

5. Request outputs that represent multiple perspectives.

For some prompts, try asking ChatGPT to provide information and examples from different viewpoints on the given subject. Doing so can lead to a greater understanding of the subject, as well as reduced bias, informed decision-making, and more creativity. 

For example, in product development, you could ask ChatGPT to generate an output that reflects the knowledge and mindset of different stakeholders in the project you’re completing, such as a customer, a CEO, or a product manager. An output could be a detailed description of the product development process and could cover what a customer wants, the CEO’s vision, and the product manager’s responsibility. 

6. Review and rate ChatGPT’s responses. 

All of your interactions with ChatGPT can contribute to the tool’s continual improvement, as users’ chat histories can be used to train the model. Taking time to review and rate ChatGPT’s responses for quality and accuracy can lead to more significant upgrades. When users point out errors or provide suggestions, AI developers can collect more data to guide improvements and support accurate responses. To provide feedback, click one of the feedback indicators—the thumbs up or thumbs down icons in the upper right corner of the output—and add your suggestions.

Start advancing your prompt engineering skills today

Taking online courses can be a great way to discover ChatGPT career opportunities, whether they be bringing prompt engineering into your current career, using ChatGPT conversations to build your own business, or finding employment as a prompt engineer. 

Learn more intricate prompting strategies and how to create prompt-based applications in Vanderbilt University’s popular Prompt Engineering for ChatGPT course:

Keep reading

Updated on
Written by:

Editorial Team

Coursera’s editorial team is comprised of highly experienced professional editors, writers, and fact...

This content has been made available for informational purposes only. Learners are advised to conduct additional research to ensure that courses and other credentials pursued meet their personal, professional, and financial goals.