ChatGPT Prompts Best Practices: Examples

ChatGPT Prompts Best Practices Examples

In this blog, you will learn the best practices you can adopt when writing prompts for ChatGPT. Here is the list:

Direct Communication and Efficiency

  1. No need to be polite with LLM so there is no need to add phrases like “please”, “if you don’t mind”, “thank you”.
  2. Employ affirmative directives such as ‘do’, while steering clear of negative language like ‘don’t’.
  3. Incorporate the phrase: “Your task is”.
  4. Incorporate the phrase: “You will be penalized”.

Audience Awareness and Contextual Understanding

  1. Integrate the intended audience in the prompt, e.g., the audience is an expert in the field.
    • Explain [insert specific topic] in simple terms.
    • Explain to me like I’m 11 years old.
    • Explain to me as if I’m a beginner in [field].
    • Write the [essay/text/paragraph] using simple English like you’re explaining something to a 5-year-old.

Interactive and Engaging Prompting

  1. Break down complex tasks into a sequence of simpler prompts in an interactive conversation.
  2. Allow the model to elicit precise details and requirements from you by asking you questions until he has enough information to provide the needed output.
  3. Teach me the [Any theorem/topic/rule name] and include a test at the end, but don’t give me the answers and then tell me if I got the answer right when I respond.

Prompt Structure and Instructional Design

  1. Add “I’m going to tip $xxx for a better solution!”
  2. Implement example-driven prompting (Use few-shot prompting).
  3. When formatting your prompt, start with “###Instruction###”, followed by either “###Example###” or “###Question###” if relevant.
  4. Use Delimiters.
  5. Repeat a specific word or phrase multiple times within a prompt.
  6. Combine Chain-of-thought (CoT) with few-Shot prompts.
  7. Use output primers, which involve concluding your prompt with the beginning of the desired output.

Natural and Unbiased Interaction

  1. Use the phrase “Answer a question given in a natural, human-like manner” in your prompts.
  2. Use leading words like writing “think step by step”.
  3. Add to your prompt the following phrase “Ensure that your answer is unbiased and does not rely on stereotypes”.

Content Creation and Revision

  1. To write an essay /text /paragraph /article or any type of text that should be detailed: “Write a detailed [essay/text /paragraph] for me on [topic] in detail by adding all the information necessary”.
  2. To correct/change specific text without changing its style: “Try to revise every paragraph sent by users. You should only improve the user’s grammar and vocabulary and make sure it sounds natural. You should not change the writing style, such as making a formal paragraph casual”.
  3. When you want to initiate or continue a text using specific words, phrases, or sentences, utilize the following prompt:
    • I’m providing you with the beginning [song lyrics/story/paragraph/essay…]: [Insert lyrics/words/sentence]’. Finish it based on the words provided. Keep the flow consistent.

Role-Assigning and Scripting

  1. Assign a role to the large language models.
  2. When you have a complex coding prompt that may be in different files: “From now on and whenever you generate code that spans more than one file, generate a [programming language ] script that can be run to automatically create the specified files or make changes to existing files to insert the generated code. [your question]”.

Explicit Requirements and Mimicry

  1. Clearly state the requirements that the model must follow in order to produce content, in the form of the keywords, regulations, hint, or instructions
  2. To write any text, such as an essay or paragraph, that is intended to be similar to a provided sample, include the following instructions:
    • Please use the language based on the provided paragraph/[title/text /essay/answer].
Ajitesh Kumar
Follow me
Latest posts by Ajitesh Kumar (see all)

Ajitesh Kumar

I have been recently working in the area of Data analytics including Data Science and Machine Learning / Deep Learning. I am also passionate about different technologies including programming languages such as Java/JEE, Javascript, Python, R, Julia, etc, and technologies such as Blockchain, mobile computing, cloud-native technologies, application security, cloud computing platforms, big data, etc. For latest updates and blogs, follow us on Twitter. I would love to connect with you on Linkedin. Check out my latest book titled as First Principles Thinking: Building winning products using first principles thinking. Check out my other blog, Revive-n-Thrive.com
Posted in ChatGPT. Tagged with .

Leave a Reply

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