NowComment
2-Pane Combined
Comments:
Full Summaries Sorted

Mastering Prompt Engineering or the Art of AI whispering, by Sahbi Chaieb

Author: Sahbi Chaieb

Chaieb, Sahbi. “Mastering Prompt Engineering or the Art of Ai Whispering.” Sahbi Chaieb, 5 Mar. 2023, sahbichaieb.com/prompt-engineering/.


0 General Document comments
0 Sentence and Paragraph comments
0 Image and Video comments


Generative AI systems that respond to plain language inputs are a game-changer. It means anyone can interact with AI without needing programming skills. Users can generate complex outputs like code, images, music, or text just by giving clear instructions. This saves time and effort while also unleashing new possibilities for creative expression and problem-solving.

New Thinking Partner Conversation New Conversation
Paragraph 1 0
No paragraph-level conversations. Start one.
New Thinking Partner Conversation New Conversation
Paragraph 1, Sentence 1 0
No sentence-level conversations. Start one.
New Thinking Partner Conversation New Conversation
Paragraph 1, Sentence 2 0
No sentence-level conversations. Start one.
New Thinking Partner Conversation New Conversation
Paragraph 1, Sentence 3 0
No sentence-level conversations. Start one.
New Thinking Partner Conversation New Conversation
Paragraph 1, Sentence 4 0
No sentence-level conversations. Start one.

In this post we will explore the following topics:

New Thinking Partner Conversation New Conversation
Paragraph 2 0
No paragraph-level conversations. Start one.
New Thinking Partner Conversation New Conversation
Paragraph 2, Sentence 1 0
No sentence-level conversations. Start one.
  1. The importance of prompt engineering
  2. New Thinking Partner Conversation New Conversation
    Paragraph 3 0
    No paragraph-level conversations. Start one.
    New Thinking Partner Conversation New Conversation
    Paragraph 3, Sentence 1 0
    No sentence-level conversations. Start one.
  3. Practical examples of prompt engineering
  4. New Thinking Partner Conversation New Conversation
    Paragraph 4 0
    No paragraph-level conversations. Start one.
    New Thinking Partner Conversation New Conversation
    Paragraph 4, Sentence 1 0
    No sentence-level conversations. Start one.
  5. Resources and tools to get started with prompt engineering
  6. New Thinking Partner Conversation New Conversation
    Paragraph 5 0
    No paragraph-level conversations. Start one.
    New Thinking Partner Conversation New Conversation
    Paragraph 5, Sentence 1 0
    No sentence-level conversations. Start one.

The importance of Prompt Engineering

New Thinking Partner Conversation New Conversation
Paragraph 6 0
No paragraph-level conversations. Start one.
New Thinking Partner Conversation New Conversation
Paragraph 6, Sentence 1 0
No sentence-level conversations. Start one.

Anyone who has used generative AI systems knows that getting the best results for a task requires writing very precise instructions. This process is called prompt engineering, and it’s a crucial skill for effective use of generative AI. Crafting effective prompts involves understanding the AI model’s capabilities and limitations, selecting the appropriate input format, and providing precise instructions.

New Thinking Partner Conversation New Conversation
Paragraph 7 0
No paragraph-level conversations. Start one.
New Thinking Partner Conversation New Conversation
Paragraph 7, Sentence 1 0
No sentence-level conversations. Start one.
New Thinking Partner Conversation New Conversation
Paragraph 7, Sentence 2 0
No sentence-level conversations. Start one.
New Thinking Partner Conversation New Conversation
Paragraph 7, Sentence 3 0
No sentence-level conversations. Start one.

New Thinking Partner Conversation New Conversation
Paragraph 8 (Image 1) 0
No whole image conversations. Start one.
New Thinking Partner Conversation New Conversation
Whole Image 0
No whole image conversations. Start one.

Click on this image of a Twitter post to see the wealth of follow-up!
New Thinking Partner Conversation New Conversation
Paragraph 9 0
No paragraph-level conversations. Start one.
New Thinking Partner Conversation New Conversation
Paragraph 9, Sentence 1 0
No sentence-level conversations. Start one.

Mastering prompt engineering leads to more accurate and relevant outputs from generative AI systems. Tesla’s former chief of AI Andrej Karpathy describes it as a kind of “large language model (LLM) psychologist”.

New Thinking Partner Conversation New Conversation
Paragraph 10 0
No paragraph-level conversations. Start one.
New Thinking Partner Conversation New Conversation
Paragraph 10, Sentence 1 0
No sentence-level conversations. Start one.
New Thinking Partner Conversation New Conversation
Paragraph 10, Sentence 2 0
No sentence-level conversations. Start one.

Jaon Allen won the Colorado State Fair’s annual art competition last year, he used a combination of multiple Midjourney outputs (AI art generator tool) and manual editing on Photoshop to create “Théâtre D’opéra Spatial”

New Thinking Partner Conversation New Conversation
Paragraph 11 0
No paragraph-level conversations. Start one.
New Thinking Partner Conversation New Conversation
Paragraph 11, Sentence 1 0
No sentence-level conversations. Start one.

ThUUtre DUopUra Spatial, Jason Allen
Théâtre D’opéra Spatial, by Jason Allen
New Thinking Partner Conversation New Conversation
Paragraph 13 0
No paragraph-level conversations. Start one.
New Thinking Partner Conversation New Conversation
Paragraph 13, Sentence 1 0
No sentence-level conversations. Start one.
New Thinking Partner Conversation New Conversation
Paragraph 12 0
No paragraph-level conversations. Start one.
New Thinking Partner Conversation New Conversation
Whole Image 0
No whole image conversations. Start one.

In this interview 1, he describes his process and how he spent hours searching for the perfect prompt to create his work.

New Thinking Partner Conversation New Conversation
Paragraph 14 0
No paragraph-level conversations. Start one.
New Thinking Partner Conversation New Conversation
Paragraph 14, Sentence 1 0
No sentence-level conversations. Start one.

“I’m not sharing my prompt ever, it’s because the prompt is valuable. I think that it proves there’s skill and time and creativity involved in creating the prompt.” — Jason Allen

New Thinking Partner Conversation New Conversation
Paragraph 15 0
No paragraph-level conversations. Start one.
New Thinking Partner Conversation New Conversation
Paragraph 15, Sentence 1 0
No sentence-level conversations. Start one.
New Thinking Partner Conversation New Conversation
Paragraph 15, Sentence 2 0
No sentence-level conversations. Start one.

Prompt engineering is starting to be recognized as a valuable skill, the superpower to get AI to generate the outputs you want. Companies are starting to hire Prompt Engineers 2 and new businesses are emerging around it.

New Thinking Partner Conversation New Conversation
Paragraph 16 0
No paragraph-level conversations. Start one.
New Thinking Partner Conversation New Conversation
Paragraph 16, Sentence 1 0
No sentence-level conversations. Start one.
New Thinking Partner Conversation New Conversation
Paragraph 16, Sentence 2 0
No sentence-level conversations. Start one.

Practical examples of Prompt Engineering

New Thinking Partner Conversation New Conversation
Paragraph 17 0
No paragraph-level conversations. Start one.
New Thinking Partner Conversation New Conversation
Paragraph 17, Sentence 1 0
No sentence-level conversations. Start one.

Designing a prompt

New Thinking Partner Conversation New Conversation
Paragraph 18 0
No paragraph-level conversations. Start one.
New Thinking Partner Conversation New Conversation
Paragraph 18, Sentence 1 0
No sentence-level conversations. Start one.

A prompt may consist of one or a combination of the following components 3 :

New Thinking Partner Conversation New Conversation
Paragraph 19 0
No paragraph-level conversations. Start one.
New Thinking Partner Conversation New Conversation
Paragraph 19, Sentence 1 0
No sentence-level conversations. Start one.
  • The instruction
    A specific task you want the model to perform: Summarize, Recommend, Translate, Explain, Generate, etc.
  • New Thinking Partner Conversation New Conversation
    Paragraph 20 0
    No paragraph-level conversations. Start one.
    New Thinking Partner Conversation New Conversation
    Paragraph 20, Sentence 1 0
    No sentence-level conversations. Start one.
    New Thinking Partner Conversation New Conversation
    Paragraph 20, Sentence 2 0
    No sentence-level conversations. Start one.
  • The context
    It allows to add external information or additional context, which guides the model to generate better responses. Example:
  • New Thinking Partner Conversation New Conversation
    Paragraph 21 0
    No paragraph-level conversations. Start one.
    New Thinking Partner Conversation New Conversation
    Paragraph 21, Sentence 1 0
    No sentence-level conversations. Start one.
    New Thinking Partner Conversation New Conversation
    Paragraph 21, Sentence 2 0
    No sentence-level conversations. Start one.
    New Thinking Partner Conversation New Conversation
    Paragraph 21, Sentence 3 0
    No sentence-level conversations. Start one.
    New Thinking Partner Conversation New Conversation
    Whole Image 0
    No whole image conversations. Start one.
  • Input Data
    The input can be the question that we want to answer, examples of answers or an image to edit in the context of image generators.
  • New Thinking Partner Conversation New Conversation
    Paragraph 22 0
    No paragraph-level conversations. Start one.
    New Thinking Partner Conversation New Conversation
    Paragraph 22, Sentence 1 0
    No sentence-level conversations. Start one.
    New Thinking Partner Conversation New Conversation
    Paragraph 22, Sentence 2 0
    No sentence-level conversations. Start one.
  • Output Indicator
    Indicates the desired type or format of the output 4.Examples: Format everything in Markdown, output this in a table
  • New Thinking Partner Conversation New Conversation
    Paragraph 23 0
    No paragraph-level conversations. Start one.
    New Thinking Partner Conversation New Conversation
    Paragraph 23, Sentence 1 0
    No sentence-level conversations. Start one.
    New Thinking Partner Conversation New Conversation
    Paragraph 23, Sentence 2 0
    No sentence-level conversations. Start one.

Examples of prompting strategies

New Thinking Partner Conversation New Conversation
Paragraph 24 0
No paragraph-level conversations. Start one.
New Thinking Partner Conversation New Conversation
Paragraph 24, Sentence 1 0
No sentence-level conversations. Start one.
  • Few-Shot Prompts
    Few-shot prompts are prompts that include a few demonstrations of the task, which improves the performance 5.
  • New Thinking Partner Conversation New Conversation
    Paragraph 25 0
    No paragraph-level conversations. Start one.
    New Thinking Partner Conversation New Conversation
    Paragraph 25, Sentence 1 0
    No sentence-level conversations. Start one.
    New Thinking Partner Conversation New Conversation
    Paragraph 25, Sentence 2 0
    No sentence-level conversations. Start one.
    New Thinking Partner Conversation New Conversation
    Paragraph 0
    No paragraph-level conversations. Start one.
    New Thinking Partner Conversation New Conversation
    Whole Image 0
    No whole image conversations. Start one.
  • Priming Prompt
    An advanced technique to interact with an AI Chatbot is to include a priming prompt. This allows you for example to give a personality to the model. For example if you want it to act as an advertiser 6 :

    You can find some additional examples here
  • New Thinking Partner Conversation New Conversation
    Paragraph 26 0
    No paragraph-level conversations. Start one.
    New Thinking Partner Conversation New Conversation
    Paragraph 26, Sentence 1 0
    No sentence-level conversations. Start one.
    New Thinking Partner Conversation New Conversation
    Paragraph 26, Sentence 2 0
    No sentence-level conversations. Start one.
    New Thinking Partner Conversation New Conversation
    Paragraph 26, Sentence 3 0
    No sentence-level conversations. Start one.
    New Thinking Partner Conversation New Conversation
    Paragraph 26, Sentence 4 0
    No sentence-level conversations. Start one.
    New Thinking Partner Conversation New Conversation
    Whole Image 0
    No whole image conversations. Start one.
    New Thinking Partner Conversation New Conversation
    Paragraph 0
    No paragraph-level conversations. Start one.
    New Thinking Partner Conversation New Conversation
    Paragraph 26, Sentence 7 0
    No sentence-level conversations. Start one.
  • Chain of thought
    This type of prompting tells the model to explain its reasoning before giving the final answer. For instance, using Let's think step by step allows to improve the permormance in reasoning tasks 7.
  • New Thinking Partner Conversation New Conversation
    Paragraph 27 0
    No paragraph-level conversations. Start one.
    New Thinking Partner Conversation New Conversation
    Paragraph 27, Sentence 1 0
    No sentence-level conversations. Start one.
    New Thinking Partner Conversation New Conversation
    Paragraph 27, Sentence 2 0
    No sentence-level conversations. Start one.
    New Thinking Partner Conversation New Conversation
    Paragraph 27, Sentence 3 0
    No sentence-level conversations. Start one.
    New Thinking Partner Conversation New Conversation
    Paragraph 0
    No paragraph-level conversations. Start one.
    New Thinking Partner Conversation New Conversation
    Whole Image 0
    No whole image conversations. Start one.
  • Chained Prompting
    Performing some complex tasks using a single run of a Large Language Model (LLM) can be challenging. To solve this problem, we can chain multiple prompts to achieve better results 8.
  • New Thinking Partner Conversation New Conversation
    Paragraph 28 0
    No paragraph-level conversations. Start one.
    New Thinking Partner Conversation New Conversation
    Paragraph 28, Sentence 1 0
    No sentence-level conversations. Start one.
    New Thinking Partner Conversation New Conversation
    Paragraph 28, Sentence 2 0
    No sentence-level conversations. Start one.
    New Thinking Partner Conversation New Conversation
    Paragraph 28, Sentence 3 0
    No sentence-level conversations. Start one.
    New Thinking Partner Conversation New Conversation
    Paragraph 0
    No paragraph-level conversations. Start one.
    New Thinking Partner Conversation New Conversation
    Whole Image 0
    No whole image conversations. Start one.

Image prompting

New Thinking Partner Conversation New Conversation
Paragraph 29 0
No paragraph-level conversations. Start one.
New Thinking Partner Conversation New Conversation
Paragraph 29, Sentence 1 0
No sentence-level conversations. Start one.

If you have attempted to generate images with DALL-E, Midjourney, or Stable Diffusion, you may have experienced disappointing results. This is likely due to an incomplete or insufficient prompt. Here are some examples of what your prompt may be missing to achieve fabulous art:

New Thinking Partner Conversation New Conversation
Paragraph 30 0
No paragraph-level conversations. Start one.
New Thinking Partner Conversation New Conversation
Paragraph 30, Sentence 1 0
No sentence-level conversations. Start one.
New Thinking Partner Conversation New Conversation
Paragraph 30, Sentence 2 0
No sentence-level conversations. Start one.
New Thinking Partner Conversation New Conversation
Paragraph 30, Sentence 3 0
No sentence-level conversations. Start one.
  • Type: painting, photography, illustration, modelshoot, drawing
  • New Thinking Partner Conversation New Conversation
    Paragraph 31 0
    No paragraph-level conversations. Start one.
    New Thinking Partner Conversation New Conversation
    Paragraph 31, Sentence 1 0
    No sentence-level conversations. Start one.
  • Style: futuristic, unreal engine, pixel art, manga graphics, by [artist]
  • New Thinking Partner Conversation New Conversation
    Paragraph 32 0
    No paragraph-level conversations. Start one.
    New Thinking Partner Conversation New Conversation
    Paragraph 32, Sentence 1 0
    No sentence-level conversations. Start one.
  • Lighting: natural lighting, cinematic lighting, dramatic lighting
  • New Thinking Partner Conversation New Conversation
    Paragraph 33 0
    No paragraph-level conversations. Start one.
    New Thinking Partner Conversation New Conversation
    Paragraph 33, Sentence 1 0
    No sentence-level conversations. Start one.
  • Boosters: awesome, stunning, masterpiece, featured/trending on X
  • New Thinking Partner Conversation New Conversation
    Paragraph 34 0
    No paragraph-level conversations. Start one.
    New Thinking Partner Conversation New Conversation
    Paragraph 34, Sentence 1 0
    No sentence-level conversations. Start one.
  • Resolution: 8K, high definition, best quality, insanely detailed
  • New Thinking Partner Conversation New Conversation
    Paragraph 35 0
    No paragraph-level conversations. Start one.
    New Thinking Partner Conversation New Conversation
    Paragraph 35, Sentence 1 0
    No sentence-level conversations. Start one.

However, creating art with just words can be challenging, but Prompt engineers can now count on ControlNet 9 which is a new flexible method for adding an additional input, such as a sketch or human pose, to guide the generation of new samples in AI models.

New Thinking Partner Conversation New Conversation
Paragraph 36 0
No paragraph-level conversations. Start one.
New Thinking Partner Conversation New Conversation
Paragraph 36, Sentence 1 0
No sentence-level conversations. Start one.

Resources & Tools

New Thinking Partner Conversation New Conversation
Paragraph 37 0
No paragraph-level conversations. Start one.
New Thinking Partner Conversation New Conversation
Paragraph 37, Sentence 1 0
No sentence-level conversations. Start one.

Prompt-Engineering-Guide: This Github repository is a gold mine for AI whisperers, it contains a large list of courses, papers, datasets and tools to get you started with prompt engineering.

New Thinking Partner Conversation New Conversation
Paragraph 38 0
No paragraph-level conversations. Start one.
New Thinking Partner Conversation New Conversation
Paragraph 38, Sentence 1 0
No sentence-level conversations. Start one.

Best practices for prompt engineering by Open AI.

New Thinking Partner Conversation New Conversation
Paragraph 39 0
No paragraph-level conversations. Start one.
New Thinking Partner Conversation New Conversation
Paragraph 39, Sentence 1 0
No sentence-level conversations. Start one.

learnprompting.org: A free, open source and user friendly manual for prompt engineering.

New Thinking Partner Conversation New Conversation
Paragraph 40 0
No paragraph-level conversations. Start one.
New Thinking Partner Conversation New Conversation
Paragraph 40, Sentence 1 0
No sentence-level conversations. Start one.

AIPRM: AIPRM is a prompt template collection for ChatGPT, you can choose your task (SEO, SaaS, Marketing, Art, Programming..) and access a curated list of prompts. I would like to thank my colleague Léo for sharing this.

New Thinking Partner Conversation New Conversation
Paragraph 41 0
No paragraph-level conversations. Start one.
New Thinking Partner Conversation New Conversation
Paragraph 41, Sentence 1 0
No sentence-level conversations. Start one.
New Thinking Partner Conversation New Conversation
Paragraph 41, Sentence 2 0
No sentence-level conversations. Start one.

PromptHero: One of the largest prompt libraries for AI generated art.

New Thinking Partner Conversation New Conversation
Paragraph 42 0
No paragraph-level conversations. Start one.
New Thinking Partner Conversation New Conversation
Paragraph 42, Sentence 1 0
No sentence-level conversations. Start one.

Conclusion

New Thinking Partner Conversation New Conversation
Paragraph 43 0
No paragraph-level conversations. Start one.
New Thinking Partner Conversation New Conversation
Paragraph 43, Sentence 1 0
No sentence-level conversations. Start one.

Generative AI has enormous potential, and as the tools and models improve, they will become more user-friendly and effective, unlocking fresh opportunities for prompt engineering while potentially streamlining the process.

New Thinking Partner Conversation New Conversation
Paragraph 44 0
No paragraph-level conversations. Start one.
New Thinking Partner Conversation New Conversation
Paragraph 44, Sentence 1 0
No sentence-level conversations. Start one.

Prompt engineering will evolve alongside AI tools, leading to a new breed of prompt engineers who specialize in fields like advertising, law, and art, as well as specialized tools. As the practice becomes more widespread, it will transform existing jobs and empower professionals to achieve more.

New Thinking Partner Conversation New Conversation
Paragraph 45 0
No paragraph-level conversations. Start one.
New Thinking Partner Conversation New Conversation
Paragraph 45, Sentence 1 0
No sentence-level conversations. Start one.
New Thinking Partner Conversation New Conversation
Paragraph 45, Sentence 2 0
No sentence-level conversations. Start one.

References

New Thinking Partner Conversation New Conversation
Paragraph 46 0
No paragraph-level conversations. Start one.
New Thinking Partner Conversation New Conversation
Paragraph 46, Sentence 1 0
No sentence-level conversations. Start one.
  1. Artworks and Artificial Intelligence, arte.tv
  2. New Thinking Partner Conversation New Conversation
    Paragraph 47 0
    No paragraph-level conversations. Start one.
    New Thinking Partner Conversation New Conversation
    Paragraph 47, Sentence 1 0
    No sentence-level conversations. Start one.
  3. Tech’s hottest new job: AI whisperer. No coding required.
  4. New Thinking Partner Conversation New Conversation
    Paragraph 48 0
    No paragraph-level conversations. Start one.
    New Thinking Partner Conversation New Conversation
    Paragraph 48, Sentence 1 0
    No sentence-level conversations. Start one.
    New Thinking Partner Conversation New Conversation
    Paragraph 48, Sentence 2 0
    No sentence-level conversations. Start one.
  5. dair-ai/Prompt-Engineering-Guide
  6. New Thinking Partner Conversation New Conversation
    Paragraph 49 0
    No paragraph-level conversations. Start one.
    New Thinking Partner Conversation New Conversation
    Paragraph 49, Sentence 1 0
    No sentence-level conversations. Start one.
  7. ChatGPT Guide: 7 prompting strategies for better output
  8. New Thinking Partner Conversation New Conversation
    Paragraph 50 0
    No paragraph-level conversations. Start one.
    New Thinking Partner Conversation New Conversation
    Paragraph 50, Sentence 1 0
    No sentence-level conversations. Start one.
  9. Language Models are Few-Shot Learners
  10. New Thinking Partner Conversation New Conversation
    Paragraph 51 0
    No paragraph-level conversations. Start one.
    New Thinking Partner Conversation New Conversation
    Paragraph 51, Sentence 1 0
    No sentence-level conversations. Start one.
  11. Awesome ChatGPT Prompts
  12. New Thinking Partner Conversation New Conversation
    Paragraph 52 0
    No paragraph-level conversations. Start one.
    New Thinking Partner Conversation New Conversation
    Paragraph 52, Sentence 1 0
    No sentence-level conversations. Start one.
  13. Large Language Models are Zero-Shot Reasoners
  14. New Thinking Partner Conversation New Conversation
    Paragraph 53 0
    No paragraph-level conversations. Start one.
    New Thinking Partner Conversation New Conversation
    Paragraph 53, Sentence 1 0
    No sentence-level conversations. Start one.
  15. Generative AI with Cohere: Part 5 – Chaining Prompts
  16. New Thinking Partner Conversation New Conversation
    Paragraph 54 0
    No paragraph-level conversations. Start one.
    New Thinking Partner Conversation New Conversation
    Paragraph 54, Sentence 1 0
    No sentence-level conversations. Start one.
  17. Adding Conditional Control to Text-to-Image Diffusion Models
  18. New Thinking Partner Conversation New Conversation
    Paragraph 55 0
    No paragraph-level conversations. Start one.
    New Thinking Partner Conversation New Conversation
    Paragraph 55, Sentence 1 0
    No sentence-level conversations. Start one.

Sahbi Chaieb

New Thinking Partner Conversation New Conversation
Paragraph 56 (Image 8) 0
No whole image conversations. Start one.
New Thinking Partner Conversation New Conversation
Whole Image 0
No whole image conversations. Start one.

Written by Sahbi Chaieb, who is a Data Scientist Consultant living in Paris. You should follow him on Twitter

New Thinking Partner Conversation New Conversation
Paragraph 57 0
No paragraph-level conversations. Start one.
New Thinking Partner Conversation New Conversation
Paragraph 57, Sentence 1 0
No sentence-level conversations. Start one.
New Thinking Partner Conversation New Conversation
Paragraph 57, Sentence 2 0
No sentence-level conversations. Start one.

DMU Timestamp: May 12, 2023 14:09

General Document Comments 0
New Thinking Partner Conversation Start a new Document-level conversation

Image
0 comments, 0 areas
add area
add comment
change display
Video
add comment

Quickstart: Commenting and Sharing

How to Comment
  • Click icons on the left to see existing comments.
  • Desktop/Laptop: double-click any text, highlight a section of an image, or add a comment while a video is playing to start a new conversation.
    Tablet/Phone: single click then click on the "Start One" link (look right or below).
  • Click "Reply" on a comment to join the conversation.
How to Share Documents
  1. "Upload" a new document.
  2. "Invite" others to it.

Logging in, please wait... Blue_on_grey_spinner