A well-crafted prompt is magic.
At least a little bit.
Not the abracadabra kind that makes software glitches disappear, mind you.
But with just a subtle tweak of the words in the textual tapestry you can:
- drastically increase the rate of correct responses
- turn a bland robot into an entertaining party animal
- keep the dragon of hallucinations at bay
- deal cleverly with edge cases like toxic language
This, my friend, is prompt engineering.
What’s the spell? Can you read up and learn it?
There are a plethora of paid courses, degrees, tutorials, and even complete university programs. The internet is an enchanted forest from a 90s video game – full of hidden treasures but it’s very easy to get lost. I ventured there to find the best free resources for prompt engineering. There I found incantation instructions for beginners to sophisticated spells for text, code, and AI art. My goal? To make the magic of prompt engineering accessible to all.
Let’s dive in! 🪄✨
1. OpenAI’s Prompt Engineering Best Practices
Straight from the ivory tower of ChatGPT developers, this prompting tutorial helps beginners lay a solid foundation for prompt design. Step-by-step, it guides novices through techniques such as:
- Separating instructions from content
- Learning to use specific, descriptive language
- Defining the desired output format
- Zero-shot vs. one-shot, few-shot prompting
- Say what to DO instead of what NOT to do
- Using leading words
My 50-token take: This prompt course offers a good start covering the absolute basics. Many of you will already know quite a few of these best practices.
🎓: Beginner
⏰: About 10–15 min
📙: Text, examples
2. Maximilian Vogel: (Fast &) Free Prompt Engineering Course
This course is my humble little personal contribution to democratize the art of prompting. It squeezes in the most critical prompt techniques into a 45-minute lesson. I’ve included two cheat sheets to help design your own prompts.
You’ll learn the 10 most important techniques for crafting effective prompts, such as:
- Clear instructions
- Defining the output format
- Prompt templates
- Data context
- Few-shot examples
- How to deal with “don’t know” / “won’t answer” cases (i.e. controlling hallucination / critical topics)
- Chain-of-thought prompting
- Conversation history
- Formatting the prompt: Headlines, labels, delimiters
- The anatomy of a professional prompt
🎓: Beginner, Intermediate
⏰: 15 min reading, 30 min studying the examples
📙: Text, cheat sheets, examples
3. Learnprompting.org: Your Guide to Communicating with Artificial Intelligence
Here you can find a lot and more. From various prompting techniques to numerous examples, including an introduction to generative AI, ChatGPT and prompt engineering.
The beginner section alone covers:
- Basics
- Introduction to AI
- Prompting With ChatGPT
- Prompt Engineering
- Learning Prompting Embeds
- Giving Instructions
- Role Prompting
- Few-Shot Prompting
- Combining Techniques
- Formalizing Prompts
- Priming Chatbots
- OpenAI Playground
🎓: Beginner, Intermediate, Advanced
⏰: 1–2 days for the beginner section, while the rest is better used as reference or source of inspiration.
📙: Text, examples, interactive prompting (bring your own API key)
My 50-token take: This is a great, comprehensive resource compiled with love and many inspirations for your own prompting.
4. Vanderbilt University: Prompt Engineering for ChatGPT
This comprehensive 3-week course led by Jules White starts from scratch and methodically builds expertise in prompt engineering.
Some topics highlights include:
- What is a prompt?
- Prompt patterns
- The Persona pattern
- Root prompts
- Question refinement patterns
- Cognitive verifier patterns
- Audience persona patterns
- ReAct prompting
🎓: Beginner, Intermediate, Advanced
⏰: 3 weeks with 6 hours each
📙: Video, examples in the ChatGPT Playground, scripts, references to research papers
My 50-token take: If you often need to skip a video after 20 words or are a fan of setting play speed to 200%, this may not be the course for you. These are real university-style lectures with examples that demand focus but provide deep and thorough coverage ranging from fundamentals to esoteric. I personally really liked the advanced topics where I discovered several exciting approaches. Note: The three-week course is free, tests and certificates cost 49 USD.
5. Elvis Saravia: Prompt Engineering Guide
This comprehensive guide dives deep into prompt engineering and draws on research papers and tests with OpenAI’s text-davinci-003 models.
It covers a wide range of techniques, including:
- Prompt basics & elements
- Techniques such as zero-shot, few-shot, chain-of-thought, self-consistency, tree-of-thoughts
- Applications: program-aided LLMs, generating data & code
- Model lists and discussions
- Risks in prompt engineering
- Relevant research papers
🎓: Intermediate, Advanced
⏰: A few hours for the intro. Weeks for the rest – best used as a reference.
📙: Text, examples
My 50-token take: This prompting guide is super interesting, and I got a lot of inspiration from it. Be careful though because it is not really structured and therefore not suitable for beginners. Read it quickly while it’s still free because paid courses are already in the works. 😁
This was a short detour into the enchanted forest of prompt engineering. If you still haven’t had enough or found the right spell, you might still find it here, because I’ve tried out and summarized a few more courses and guides.