13 Prompt Engineering Tips

As we continue to explore the capabilities of artificial intelligence, particularly in natural language processing, an important aspect arises: how we communicate with these models. Specifically, with OpenAI’s GPT-4 and similar AI models, the approach to crafting prompts can significantly influence the quality and relevance of generated responses.

This article delves into various strategies for prompt engineering, with the aim of helping users to optimize their interactions with AI, whether the goal is to seek information, create engaging content, or simply to foster an interesting dialogue. The strategies discussed in this article range from being specific in your instructions to setting a specific format for the AI’s responses. It also explores the use of multi-step prompts for complex queries, instructing the AI on the perspective to use, and even the incorporation of emojis and text manipulation for more engaging content.

Additionally, the use of dialogue and storytelling, headings and subheadings, lists and tables are discussed, alongside the importance of providing context and handling potential ambiguity in prompts. Finally, the article touches on specifying emotion or tone, setting content boundaries, and requesting content moderation. All these methods contribute to a more effective and nuanced engagement with AI models like ChatGPT.

13 Prompt Engineering Tips

Here are our 13 tips for engineering improved and optimal prompts.

1. Be specific

Clear and specific instructions help the model generate accurate and relevant responses.

For example:

  • Instead of asking “Tell me about AI”, you can ask “Explain the difference between artificial intelligence and machine learning”.
  • Instead of “Tell me about climate change,” use “Explain the main causes of climate change and its impact on global ecosystems.”

2. Set a format

Defining the format for the output can help guide the response. You can specify if you want a list, paragraph, bullet points, etc.

For example:

  • “Please output 3 key differences between between AI and machine learning in a bullet list, and then write one descriptive paragraph about each point”.
  • “Please list the top 5 renewable energy sources and provide a brief description of each.”

3. Use multi-step prompts

For complex queries, breaking down the question into smaller parts can help provide more comprehensive answers.

For example:

  • “First, explain supervised learning. Second, describe unsupervised learning. Lastly, discuss reinforcement learning and its applications”.
  • “First, explain what a black hole is. Second, describe how black holes are formed. Finally, discuss the effects of a black hole on nearby celestial objects.”

4. Instruct the perspective

You can control the perspective of the generated text by specifying whether you want the response in the first, second, or third person.

For example:

  • “Write a short story about a day in the life of an astronaut in the first person perspective.”

5. Emojis and text manipulation

ChatGPT can incorporate emojis and other text manipulations into its responses to create more engaging content.

For example:

  • “Compose a fun tweet about the importance of recycling, and include at least three relevant emojis.”

6. Dialogue and storytelling

Crafting prompts that encourage ChatGPT to generate dialogues or stories can allow for more creative and engaging outputs.

For example:

  • “Create a dialogue between a climate change skeptic and a climate scientist.”

7. Headings and subheadings

You can use headings and subheadings to organize the content and make it more reader-friendly.

For example:

  • “Write a short article on the history of space exploration, with headings for ‘Early Years’, ‘Moon Landing’, and ‘Modern Exploration’, and appropriate subheadings for each.”

8. Lists and tables

Ask ChatGPT to create lists or tables to display information in a structured format.

For example:

  • “Create a table comparing the characteristics of comets, asteroids, and meteors, including their composition, origin, and size.”

9. Provide context

Adding relevant context to your prompts can help ChatGPT generate more accurate and relevant responses.

For example:

  • “Assuming I am a beginner in the field of AI, explain the concept of deep learning and its applications”.
  • “Assuming I am a high school student with no prior knowledge in physics, explain the concept of quantum mechanics and its significance.”

10. Handle ambiguity

Address potential ambiguity in your prompts by specifying the context or domain in which the AI should generate its response.

For example:

  • “In the context of environmental science, explain what the term ‘greenhouse effect’ means.”

11. Prompting for different content types

ChatGPT can generate various content types, from informative articles to creative stories. You can craft prompts that guide ChatGPT to generate these different types of content.

For example:

  • “Compose an engaging blog post about the advantages and disadvantages of electric cars, making sure to include real-world examples and statistics.”

12. Specify the emotion or tone

Clearly state the emotion or tone you want ChatGPT to convey in its response. You can also incorporate emotionally charged words in your prompt to guide ChatGPT towards generating a response with the desired emotional tone.

For example:

  • “Write a motivational paragraph encouraging individuals to take action on climate change.”

13. Set content boundaries and request content moderation

Establish clear boundaries for the content you want ChatGPT to generate, specifying what should and should not be included. You can also ask ChatGPT to moderate its own content and generate a response that is suitable for a general audience.

For example:

  • “Write a light-hearted, family-friendly short story about a group of animals working together to clean up their forest home, ensuring the content is suitable for children under 10.”