How To Write ChatGPT Prompts in 2023? (9 Topmost Methods)

How to write better ChatGPT prompts

Launched on November 30th, 2022, ChatGPT has truly revolutionized how we perform various tasks for the better.

ChatGPT Timeline
Source: Demand Sage

However, as the saying goes, the effectiveness of a technology (in this case, ChatGPT) ultimately depends on the individuals (you and me) using it.

According to a Pew survey, approximately 58% of American adults are familiar with ChatGPT, but only 14% of them have actually used it.

Percent of Americans who have heard of ChatGPT, as per Pew Research
Source: Pew Research Center

Furthermore, the survey reveals that among those who have used ChatGPT, opinions on its usefulness are mixed.

Roughly one-third of users find it extremely or very useful, while a quarter find it not very or completely nuts.

Some concerns raised include ChatGPT engaging in:

  • Hallucinations
  • And fabricating information (especially factual numbers).

The hard truth: ChatGPT is neither inherently good nor bad (It’s an LLM, remember?).

Its effectiveness heavily relies on the prompts we provide, which steer it towards delivering either useful or entirely useless outputs.

If you can relate to this and often find yourself thinking, “Hmm, ChatGPT gives me shitty responses and more often than not, generates nonsensical content,” then you might find this guide helpful.

My objective with this blog post?

To help you get better AI outputs than a dismissive response like “As an AI language model, hell no, dude…”.

How To Write ChatGPT Prompts?

TL;DR:

1. Use PromptPerfect: An automatic prompt optimization tool that can improve prompts with just a few clicks.

2. Use prompt engineering techniques: Like zero-shot, few-shot, chain of thought prompting to provide context.

3. Benefit from different perspectives: Frame the prompt from a specific viewpoint.

4. Provide context and instructions: Give examples, constraints to guide ChatGPT.

5. Assign a role: Ask ChatGPT to respond as a particular persona.

6. Ask follow-ups: Have a conversation with back-and-forth clarification.

7. Adjust tone: Use language fitting for the topic, audience, and purpose.

8. Use keywords: Include keywords and phrases that identify the intent.

9. Format output in Markdown: Use Markdown syntax in prompts to structure ChatGPT’s response.

To get what you want out of ChatGPT, you have to give it better inputs (it starts with us). It’s that simple.

Here are 12 best methods you can use right now to write and optimize your ChatGPT prompts to perfection:

1. Use PromptPerfect

If you’re looking for the simplest, most effortless, and fastest way to optimize your prompts, consider using PromptPerfect.

PromptPerfect is an automatic multimodal prompt optimizer tool that can optimize your existing prompt with just a few clicks and seconds.

PromptPerfect

As an automatic prompt engineer, PromptPerfect is compatible with most popular Large Language Models, whether text-based or image-based.

PromptPerfect supports multiple text-based.and diffusion-based LLMs

Here’s an example:

Once you log in to PromptPerfect, go to the basic prompt optimization page called “Prompts”.

PromptPerfect prompt optimization dashboard

Next, enter your original prompt, regardless of its size or quality. Don’t forget to select your desired LLM, and don’t worry about Add-ons.

Add original Prompt in PromptPerfect

That’s it. Press enter and witness the magic.

Optimized prompt

Now you have a prompt that will hopefully yield better results than your original prompt.

PromptPerfect, developed by Jina AI, is by far the most promising and quickest tool I have come across for becoming a prompt engineer without having to go through extensive technical courses.

And the best part? It offers a free plan.

To learn more about PromptPerfect and everything it has to offer, I suggest you take a look at the detailed guide I published earlier.

FURTHER READING: PromptPerfect: Effective Multimodal Prompt Engineering on Autopilot

2. Use Prompt Engineering Techniques

Prompt Engineering techniques are the iterative process of developing prompts that can effectively leverage the capabilities of existing generative AI models to accomplish specific objectives.

In fact, having some prompt engineering skills can help us understand the capabilities and limitations of a large language model.

Here are some effective prompt engineering techniques that I suggest you utilize:

Zero Shot and Few Shot Prompting

Zero-shot prompting entails providing a prompt to the model that is not part of its training data, yet the model can generate the desired output.

Large language models like GPT-3 are capable of performing some tasks in a “zero-shot” manner.

To put it simply, zero-shot means that ChatGPT will use its pre-existing knowledge to provide you with the desired results without explicitly being asked.

For example, asking ChatGPT a general closed-ended question about a well-known topic would be a zero-shot prompt. However, if more context is needed, ChatGPT may ask for clarification before providing an answer.

For instance, a prompt: “What is the capital of India?” is a zero-shot prompt and ChatGPT would have no problem asking for more context before answering it.

Zero-shot prompting example

Few-shot prompting, on the other hand, involves providing examples to ChatGPT without explicit instructions, allowing it to figure out how to respond based on the examples.

Let’s consider an example where you want to use ChatGPT to proofread an article. In this case, you can use the following prompt designed for few-shot prompting:

Your task is to proofread the content that I provide you. Here is an example of how you should proofread the content:

Original content: My name is Dhruvir Zala, and I am 21 years old.

Proofread content: I am Dhruvir Zala, aged 21.

Do you understand?

This prompt will keep in mind the example that I provided and will proofread content accordingly.

Few-shot prompting example

Depending on your goal, you can give ChatGPT more than one example to train it effectively and give more context.

According to this research paper focussing on designing translation prompts for ChatGPT, it was seen that few-shot prompts, with 1 or 5 examples, led to substantial performance improvements in ChatGPT for translation tasks.

Not bad!

Zero-shot Chain of Thought (CoT) Prompting

It involves appending the words “Let’s think step by step.” to the end of the prompt to encourage the LLM to generate a chain of thought.

Here’s an example:

Zero-shot chain of thought prompting example

This method fosters further conversation between the user and AI, promoting deeper exploration of ideas.

It is based on a mental model commonly used by high-achievers such as Elon Musk. By breaking down complex concepts into simple steps, it helps elicit higher-quality outputs from the model.

SIDENOTE: The beauty of this technique is that it doesn’t require additional training or fine-tuning of the model.

These are some of the most widely used prompting techniques in training language models.

However, there are other techniques you can experiment with to compare the quality of results. Here are a few more you can try:

  • Self-consistency: Using ChatGPT’s own output as input to guide its future output.
  • General Knowledge prompting: Providing ChatGPT with a set of general knowledge facts or concepts.
  • N-shot prompting: Providing ChatGPT with multiple prompts and labels.
  • ReAct: Using reinforcement learning (positive & negative feedback) to train a model.

3. Benefit from Different Perspectives

The responses provided by ChatGPT can greatly vary based on the perspective you provide.

For instance, if you want answers on topics related to business development or entrepreneurship in general, it would be beneficial to request ChatGPT to answer the question from the viewpoint of someone who has experience in that field, such as Steve Jobs or Elon Musk.

By adding a specific perspective instead of asking for generic business advice, you can give the conversation a personalized touch, resulting in more nuanced and actionable outputs.

Perspective prompting

SIDENOTE: The perspective can be based on individuals, locations, or professions.

Here are a few examples:

  • Individuals: Provide me with a list of the top 10 investment lessons from the perspective of Warren Buffett.
  • Locations: Share with me the most commonly consumed cuisines from the perspective of Monaco.
  • Professions: Give me a list of the best places in the world to live from the perspective of an investment banker.

4. Provide Context and Specific Instructions

More often than not, being specific leads to better results, and the same is true for ChatGPT outputs.

To help guide ChatGPT’s response, you can provide specific examples or information related to the topic or task at hand.

For example, if you would like ChatGPT to generate a book review, you can provide an example book review as a prompt.

This approach is similar to few-shot prompting, where you provide one example and provide detailed information to avoid confusion in terms of which example to prioritize.

5. Assign A Role

Don’t get me wrong here, but we humans are not the only ones who love roleplay. Machines are going bonkers over it too.

On a serious note, by assigning a specific role or setting a scenario, ChatGPT can generate more precise and relevant answers to your prompts.

For example, if your target audience is a class full of five-year-olds, you can assign ChatGPT the role of a primary school teacher to receive a more suitable response.

So, in this case, your prompt can be something like this:

As a primary school teacher, your task is to provide a clear and concise summary of [topic name] that is appropriate for young students to understand. Your summary should include key information about the topic, such as its definition, purpose, and relevance to their lives. Your summary should also be engaging and easy to follow, using language and examples that are appropriate for young children.
Assigning a role to ChatGPt

Similarly, for instance, you can assign ChatGPT the role of a lawyer or a poet, and then ask a question related to that role.

I recommend you check out this invaluable GitHub resource of awesome ChatGPT prompts, where you will get prompts for almost any role you are looking for.

Awesome ChatGPT prompts

6. Ask Follow-up Questions

This is simple, and I presume all of us already do it. Right? Wrong! (We are lazier than you think).

Sometimes people ask a question, get an answer, and then move on. But it’s often more helpful to ask follow-up questions to get even more information.

By asking follow-up questions, you can get more specific and detailed answers from ChatGPT that better meet your needs.

This method involves asking additional questions to clarify or expand on the initial response provided by ChatGPT.

So just like you go through a series of conversation with your friend or a job interviewer, you can have a night-long conversation with your AI amigo to get more specific outputs you are looking for.

Best thing to do?

If you’re not sure what ChatGPT means or if its response is unclear, ask for clarification.

SIDENOTE: Avoid asking questions that can be answered with a simple “yes” or “no”. Instead, ask open-ended questions that encourage ChatGPT to provide more detailed responses.

7. Adjust The Tone Of The Questions

Just like trying to be funny at a funeral get get you slapped harder, the tone used in communicating certain topics should be carefully chosen.

In other words, different topics call for different tones.

For example, a more formal or professional tone might be more appropriate for certain topics, while a more casual or conversational tone might be more appropriate for other topics.

The tone of voice is one of the most important pieces of information you can feed to ChatGPT in your prompts.

Let’s say you are a writing a blog post on dating advice. In this case, your audience will expect and enjoy if your writing style and tone is funny, irreverent, etc.

Conversely, if you are writing on health-related topic, it would be necessary for you to take a serious stance by writing professionally and avoiding banters.

Pro Tip: You can also ask ChatGPT to write like someone famous or someone you adore (Author Mark Manson for me in this case).

8. Use Specific Keywords and Phrases

ChatGPT is trained on a lot of text data, and it uses keywords and phrases to identify topics and understand the intent of questions.

For example, if you want to ask ChatGPT about the best ways to improve your writing skills, you could use specific keywords and phrases like:

  • Writing tips
  • Improve writing
  • Writing techniques
  • And writing strategies.

Using specific keywords and phrases can also help you avoid open-ended questions that have no clear answer, which can lead to irrelevant or confusing responses from ChatGPT.

You can include power words, keywords, and phrases that create a sense of urgency and make the prompt more effective.

SIDENOTE: It is also important to define the scope or range of the topic, specify constraints, such as word or character count, and provide examples of desired style, structure, or content.

9. Format Your Output in Markdown

This is a visual tip that will help format the outputs in a structured way, especially when requesting headings, bold and italic text, bullet lists, and more.

Markdown is a lightweight markup language that allows you to format text using simple syntax.

ChatGPT can handle formatting in Markdown, such as headings, bold or italic text, ordered (numbered) or unordered lists, and even tables. You can use these features in your text generation.

For example, you can use headings to separate different sections of your prompt, or use bullet points to list out different ideas or options.

Markdown format in ChatGPt

To ensure that ChatGPT incorporates headings, subheadings, and bullet points in its response, please include them explicitly in your prompt instructions.

Here are some ways you can use Markdown to format your ChatGPT output:

  1. Headings: You can create headings by using one or more hash symbols (#) followed by a space and the heading text.
  2. Lists: Use bullet points or numbered lists to break down your prompt into smaller, more manageable sections. To create a bullet point list, use a hyphen (-) or an asterisk (*) followed by a space. To create a numbered list, use a number followed by a period (1., 2., etc.) and a space.
  3. Emphasis: You can make text italic by surrounding it with one asterisk () or underscore () on each side. For example, *italic* or _italic_. You can make text bold by surrounding it with two asterisks (*) or underscores (_). For example, **bold** or __bold__.

Now that you have all these tips at your fingertips, you know how to write ChatGPT prompts that don’t suck.

You know the “HOW,” but what about the “WHY”? Why even bother to write and optimize to make your AI prompts better?

Here’s why.

Why Is Prompt Optimization Important?

As mentioned earlier, ChatGPT is only as good as you enable it to be.

Optimizing prompts can help you avoid having to conduct a wide range of editing tasks, from correcting spelling and grammar to conducting a tone analysis and revising.

By crafting effective prompts, you can streamline the editing process and save time.

When it comes with an output quality of an LLM, I tend to think in terms of Accuracy, Consistency and Efficiency.

  • Accuracy: Proper prompt engineering helps to improve the accuracy of the AI-generated responses. Clear and specific prompts provide the necessary information and instructions for ChatGPT to understand the desired output.
  • Consistency: Well-optimized prompts help to achieve consistent output from ChatGPT. By providing clear instructions and formatting guidelines in the prompts, you can ensure that the AI model consistently generates responses that align with your desired formatting and style.
  • Efficiency: Optimized prompts can help to improve the efficiency of using ChatGPT. By providing clear instructions and specific information in the prompts, you can reduce the need for additional iterations or corrections in the generated responses, saving time and effort.

In fact, there was this study conducted on Improving ChatGPT Prompt for Code Generation. They used chain of thought prompting and giving specific and clear instructions.

End results?

The generation performance can be improved by carefully designing prompts to guide ChatGPT.

FAQs

To make ChatGPT prompts better, you can use automatic prompt optimization tools like PromptPerfect, employ prompt engineering techniques like zero-shot and few-shot prompting, benefit from different perspectives, etc.

You can structure ChatGPT prompts by including specific instructions, examples, or information related to the topic. You can also provide context and constraints such as word or character count. Moreover, use headings, bullet points, and Markdown formatting to organize the prompt.

Optimizing ChatGPT prompts is important because it helps improve the accuracy of AI-generated responses and achieve consistency in the output.

If your prompt doesn’t give you the desired results, you can try:

  • Clarifying or providing more specific instructions in the prompt.
  • Experimenting with different prompt engineering techniques.
  • Using different perspectives or role assignments.
  • Asking follow-up questions to provide additional context.
  • Checking if there are any biases or limitations in the training data or model that may affect the responses.

Yes, there are resources and tools available to assist in optimizing ChatGPT prompts. One example is PromptPerfect, an automatic multimodal prompt optimizer tool developed by Jina AI. It can help optimize prompts with just a few clicks. Additionally, there are GitHub repositories and research papers that provide guidance and examples for effective prompt engineering.


Hopefully, this article provided you with better methods to write phenomenal ChatGPT prompts.

So, the next time you interact with ChatGPT, remember the power you hold in crafting better prompts.

Dhruvir Zala

Article by
Dhruvir Zala

I started this blog to provide brutally honest reviews of useful Generative AI tools and business productivity software. My objective is to help businesses choose exceptional products.

Leave a Reply

Your email address will not be published. Required fields are marked *