General
Prompt Engineering
System prompt:
- Start with a system prompt to set the desired output language, version, syntax etc
- “Act as a…”
- Add as many details as you can about exactly how you’d like ChatGPT to reply/not reply
- If you’re generating content, add adjectives that describe the writing style you want (witty? for beginners?)
Output format:
- Specify the output structure you want
- e.g. “explain step-by-step”
- e.g. “structure output as an array of objects with the following keys: …”)
- Few shot standard prompts = providing a few question + answer examples to clarify what answer you want and how you want it presented
Conditions:
- Specify any conditions that must be met while/before completing task
- e.g. “Please ask any questions you may have before generating a response.”
Prompt text formatting:
- Use delimiters (e.g. `````,
"""
,---
) to clearly indicate distinct parts of the input - Wrap code blocks in
```
Iterating:
- When generating code, start simple, repair as needed, add next functionality, repair as needed, etc
- When writing, consider first promoting for facts, then prompting for a write up (including the type, length, style etc)
- At the end of a prompt, ask “Does that make sense?”
Sources:
- brexhq/prompt-engineering • Tips and tricks for working with Large Language Models like OpenAI’s GPT-4. 📖
- You’re Using ChatGPT Wrong! Here’s How to Be Ahead of 99% of ChatGPT Users • The PyCoach 📖
- Prompt engineering is shaping • “As I started learning about prompt engineering, I was surprised that the biggest improvements seem to come from humanizing the AI, such as telling them who they are, requesting that they ask for clarification, or asking if they understand” • David Luhr 📖
Preparing for an interview
- Act as a technical interviewer and ask me five questions about X
- What is the answer to question 1?
- 🧠 How ChatGPT changed my approach to learning • Use voice mode to simulate a real conversation with an interviewer • Frank Andrade 📖
Using on macOS via Raycast AI
- Raycast AI (beta) is the best ChatGPT integration I’ve used on the Mac • A Better Computer 📺
Inbox
- Learn Prompting: Your Guide to Communicating with AI • Learn Prompting 📖
- Pairing with GPT-4 • Fly.io 📖
- I just learned the best ChatGPT hack for travel planning: ChatGPT tables! • @smartworkai 📺
- ChatGPT & AI How To (@smartworkai) • @smartworkai 📺
- Simply explained: how does GPT work? • Confused bit 📖
- ChatGPT Prompt Engineering for Developers • DeepLearning.AI 🎓
- Prompt engineering techniques with Azure OpenAI • Microsoft Learn 📖
- Best practices for prompt engineering with OpenAI API • OpenAI Help Center 📖
- Techiniques to improve reliability • OpenAI Cookbook 📖
- Examples • OpenAI Cookbook 📖
- Prompt Engineering Mastery Series • Hasan Aboul Hasan 📺
- ChatGPT Tutorial for Developers - 38 Ways to 10x Your Productivity • Mosh Hamedani 📺
- ChatGPT For Programming: 100 Coding Prompts For ChatGPT • Great AI Prompts 📖
- The Art of ChatGPT Prompting: A Guide to Crafting Clear and Effective Prompts • Fatih Kadir Akın 📕
- Awesome ChatGPT Prompts • Fatih Kadir Akın 📖
- Masterclass: AI-driven Development for Programmers • Fireship 📺
- 50+ ChatGPT Prompts for Web Developers • Builder.io 📖
- ChatGPT Changed How I Write Code… • Tech with Tim 📺
- Asking ChatGPT to build a multi-style Button components • Simon Vrachliotis 📺
- ChatGPT wrote me an AppleScript. Imagine this but for Shortcuts • A Better Computer 📺
- Prompt Engineering Guide | Learn Prompting: Your Guide to Communicating with AI
- Images:
- gpts: https://www.youtube.com/watch?v=KRDtI5PFasM - video demo of creating a custom “GPT” to automate a particular workflow (in this case, writing alt text for images)
- prompt for a yearly review: “You are a productivity coach, you will help me align my life with what’s most important to me. I am doing a yearly review and I will be reflecting on the last year and thinking about the year ahead. Give me a group of questions that will help me with each area of my life. Wait until I give you an area then give me the questions as bullet points in markdown.”
- prompt formula:
{role} {purpose} {context} {instructions} {conditions}
- Make your own ChatGPT bot - by Jeremy Caplan
- Less annoying ChatGPT with custom instructions – Mike Crittenden
- How to make the most of ChatGPT in 2024 - by Jeremy Caplan
- 120+ Best ChatGPT Prompts for Data Science