Chaieb, Sahbi. “Mastering Prompt Engineering or the Art of Ai Whispering.” Sahbi Chaieb, 5 Mar. 2023, sahbichaieb.com/prompt-engineering/.
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.
In this post we will explore the following topics:
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.
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”.
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”
In this interview 1, he describes his process and how he spent hours searching for the perfect prompt to create his work.
“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
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.
A prompt may consist of one or a combination of the following components 3 :
Summarize
, Recommend
, Translate
, Explain
, Generate
, etc.
Format everything in Markdown
, output this in a table
Let's think step by step
allows to improve the permormance in reasoning tasks 7.
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:
painting
, photography
, illustration
, modelshoot
, drawing
futuristic
, unreal engine
, pixel art
, manga graphics
, by [artist]
natural lighting
, cinematic lighting
, dramatic lighting
awesome
, stunning
, masterpiece
, featured/trending on X
8K
, high definition
, best quality
, insanely detailed
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.
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.
Best practices for prompt engineering by Open AI.
learnprompting.org: A free, open source and user friendly manual for prompt engineering.
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.
PromptHero: One of the largest prompt libraries for AI generated art.
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.
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.
Written by Sahbi Chaieb, who is a Data Scientist Consultant living in Paris. You should follow him on Twitter
Logging in, please wait...
0 General Document comments
0 Sentence and Paragraph comments
0 Image and Video comments
General Document Comments 0