Prompt Engineering
“The hottest new programming language is English.” – Andrej Karpathy
Why It Matters
The number of programmers just increased from 26 million to 8 billion
Problem
You need to learn how to direct AI.
Solution
Prompt engineering helps you get accurate and reliable results.
Players
Prompt Engineers
- Elvis Saravia • Builds Prompt Engineering Guide
- Anna Bernstein • Prompt engineer and generative AI specialist at Copy.ai
- Kristian Fagerlie • Runs a blog and a YouTube channel on prompt engineering
- Sander Schulhoff • Runs Learn Prompting course and invented 2 prompt hacks
- Ethan Mollick • Wrote a Guide to Prompting AI
- Nick St. Pierre • Built Additive Prompting Framework for generating characters, models and more
Prompt Engineering Tools
- AutoGPT • Turn GPT-4 into an autonomous AI agent
- ShareGPT • Showcase prompt engineering use cases by sharing your ChatGPT chats
- AgentGPT • Build AI agents for various tasks
- LangChain • Prompt management, optimization and more
- DreamStudio • Build image prompts for Stable Diffusion
- ProductPrompts.fm • Daily prompt hacks and music to write prompts to
Prompt Engineering Use Cases
- Programming • Write, test and debug code
- Writing • Find writing prompts, generate stories and perfect your writing style
- Research • Find, analyze and cite scientific papers
- Image Generation • Generate abstract and real-life objects and settings
- Search Engine Optimization • Research keywords and write SEO-optimized articles
- Marketing • Build marketing strategies
Predictions
- We’ll use text-to-audio models to create music. We’ll prompt the style, tempo, instrumentation and more.
- Text-to-video will democratize animation and filmmaking. People will craft the story, lines, characters and locations. AI will take care of the visuals.
- Victor Mustar made a Star Wars clip.
- Corridor Crew made a Rock, Paper, Scissors anime.
- Nick St. Pierre made a Sci-Fi movie trailer with his audience.
- Jon Finger made an action film based on an AI-inspired plot.
- Prompt hackathons will help to find new prompt writing techniques. This will boost creativity, innovation and adoption of prompt engineering.
- Prompt Hackathon explores creativity with $5,000 in prizes.
- PromptHacks promotes prompt writing with $10,000 in prizes.
- Hack A Prompt boosts AI safety research with $37,500 in prizes.
Opportunities
- Use role-playing to get more accurate results for complex tasks. Pretending to be an expert at “topic” helps AI give you relevant, focused advice.
- Kristian Fagerlie says ChatGPT can act like a financial, career or relationship expert.
- Alejandro Lopez-Lira and Yuehua Tang asked ChatGPT to act like a financial expert. It correctly interpreted financial news.
- Andrew Han built GPT3 Auditor which scans code for vulnerabilities. He asked AI to pretend it was the “world’s best cybersecurity expert”.
- Use advanced prompting. Help AI understand the context and perform better at complex tasks.
- Chain-of-Thought Prompting helps to come to complex conclusions.
- Few-Shot Prompting helps to adapt to examples and the context of the task.
- Zero-Shot Prompting helps to make predictions about unseen data without extra training.
- Use constraints to get more targeted results. Prevent AI from going beyond the context of your tasks.
- Jackson Fall set a budget of $100 to start a business.
- Matt Mic set the target location and citation rules for articles.
- Zain Kahn set the number of words, days and ideas for AI-generated answers.
- Riley Goodside asked a ”fast-talking wise guy from a 1940s gangster movie” to explain the bubble sort algorithm.
- Hasan Toor asked ChatGPT to “explain JavaScript like he’s 10 years old” and “curate ReactJS resources based on his skill level”.
Risks
- Hallucinations • ChatGPT lies. It accused a law professor of harassment and cited a fake article as evidence. You may miss inaccuracies or inconsistencies if you don’t know what a quality answer looks like.
- Platform Risk • OpenAI’s rate limits can block you in the middle of solving problems.
Key Lessons
- A prompt consists of the task, instructions, context and parameters. “Task” is an action. “Instructions” are the steps needed to do the “task”. “Context” helps to understand the background and the end goal of a “task”. “Parameters” are settings that directly affect the result.
- Use detailed prompts to do complex tasks. Share specific context, format and style that the result should have. Justin Fineberg says if your prompt is only one sentence long, your output is never going to be good.
Hot Takes
- AI is no longer narrow. We’re using AI to write Excel formulas, build meal plans and save lives.
- Text-to-video will turn animators into film directors. Instead of drawing, they will control the artistic and dramatic aspects of a video.
- Most storytelling work will be assisted by AI. We will use AI to produce songs, books, stories and movies.
- The future of programming is writing prompts. These papers say that you can use prompts to build logic, test expressions, handle events and more.
Haters
“Prompt engineering is not programming.”
Backend-GPT is a language model that handles database and backend business logic. Similar to programming languages, you can prompt functions to work with data. Anyway, it’s too early to say that prompt engineering is programming. That’s why it’s a hot take.
“Prompt engineering will become obsolete once AI learns how to build its own prompts.”
We’re on track to this. AI can perfect itself without relying on human guidance. Tools like AutoGPT turn AI into an autonomous prompt building and execution robot.
“Tools built on top of APIs are just wrappers. They have no moat and can’t form a sustainable business.”
This critique has been around since the release of GPT-3. Danny Postma says if you can generate years of revenue in weeks or months, seize the opportunity.
“Marketplaces are winner-take-most markets. Why would we need more prompt marketplaces?”
These are micro-marketplaces which can optimize for niche use cases and audiences. While a micro-marketplace might not be the best option for most users, it's best for some. That's what matters.
Links
- Introduction to Prompt Engineering • Learn how prompts work.
- Framework for Reusable AI Prompts • Build reusable prompt templates.
- Awesome ChatGPT Prompts • 100+ role-playing prompts for ChatGPT.
Related Reports
- ChatGPT • This tool showed the world the true power of AI
- No-Code • Many AI tools are no-code tools
- AI-Generated Content • Explore music, videos, images and text generated by AI
- AI Image Generators • Turn your ideas into high-quality images without drawing skills
- Data as a Service • Quality of data defines the quality of AI models