Sander Schulhoff is the OG prompt engineer. He created the very first prompt engineering guide on the internet (two months before ChatGPT’s release) and recently wrote the most comprehensive study of prompt engineering ever conducted (co-authored with OpenAI, Microsoft, Google, Princeton, and Stanford), analyzing over 1,500 academic papers and covering more than 200 prompting techniques. He also partners with OpenAI to run what was the first and is the largest AI red teaming competition, HackAPrompt, which helps discover the most state-of-the-art prompt injection techniques (i.e. ways to get LLMS to do things it shouldn’t). Sander teaches AI red teaming on Maven, advises AI companies on security, and has educated millions of people on the most state-of-the-art prompt engineering techniques.
In this episode, you’ll learn:
1. The 5 most effective prompt engineering techniques
2. Why “role prompting” and threatening the AI no longer works—and what to do instead
3. The two types of prompt engineering: conversational and product/system prompts
4. A primer on prompt injection and AI red teaming—including real jailbreak tactics that are still fooling top models
5. Why AI agents and robots will be the next major security threat
6. How to get started in AI red teaming and prompt engineering
7. Practical defense to put in place for your AI products
—
Brought to you by:
Eppo—Run reliable, impactful experiments
Stripe—Helping companies of all sizes grow revenue
Vanta—Automate compliance. Simplify security
—
Where to find Sander Schulhoff:
• X: https://x.com/sanderschulhoff
• LinkedIn: https://www.linkedin.com/in/sander-schulhoff/
• Website: https://sanderschulhoff.com/
• AI Red Teaming and AI Security Masterclass on Maven: https://bit.ly/44lLSbC
• Free Lightning Lesson “How to Secure Your AI System” on 6/24: https://bit.ly/4ld9vZL
—
Where to find Lenny:
• Newsletter: https://www.lennysnewsletter.com
• X: https://twitter.com/lennysan
• LinkedIn: https://www.linkedin.com/in/lennyrachitsky/
—
In this episode, we cover:
(00:00) Introduction to Sander Schulhoff
(04:29) The importance of prompt engineering
(06:30) Real-world applications and examples
(10:54) Basic prompt engineering techniques
(23:46) Advanced prompt engineering techniques
(29:00) The role of context and additional information
(39:24) Ensembling techniques and thought generation
(49:48) Conversational techniques for better results
(50:46) Introduction to prompt injection
(52:27) AI red teaming and competitions
(54:23) The growing importance of AI security
(01:02:45) Techniques to bypass AI safeguards
(01:05:21) Challenges in AI security and future outlook
(01:18:33) Misalignment and AI's potential risks
(01:25:03) Final thoughts and lightning round
—
Referenced:
• Reid Hoffman’s tweet about using AI agents: https://x.com/reidhoffman/status/1930416063616884822
• AI Engineer World’s Fair: https://www.ai.engineer/
• What Is Artificial Social Intelligence?: https://learnprompting.org/blog/asi
• Devin: https://devin.ai/
• Cursor: https://www.cursor.com/
• Inside Devin: The world’s first autonomous AI engineer that’s set to write 50% of its company’s code by end of year | Scott Wu (CEO and co-founder of Cognition): https://www.lennysnewsletter.com/p/inside-devin-scott-wu
• The rise of Cursor: The $300M ARR AI tool that engineers can’t stop using | Michael Truell (co-founder and CEO): .css-j9qmi7{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-flex-direction:row;-ms-flex-direction:row;flex-direction:row;font-weight:700;margin-bottom:1rem;margin-top:2.8rem;width:100%;-webkit-box-pack:start;-ms-flex-pack:start;-webkit-justify-content:start;justify-content:start;padding-left:5rem;}@media only screen and (max-width: 599px){.css-j9qmi7{padding-left:0;-webkit-box-pack:center;-ms-flex-pack:center;-webkit-justify-content:center;justify-content:center;}}.css-j9qmi7 svg{fill:#27292D;}.css-j9qmi7 .eagfbvw0{-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;color:#27292D;}
Stuff You Should Know
If you've ever wanted to know about champagne, satanism, the Stonewall Uprising, chaos theory, LSD, El Nino, true crime and Rosa Parks, then look no further. Josh and Chuck have you covered.
Dateline NBC
Current and classic episodes, featuring compelling true-crime mysteries, powerful documentaries and in-depth investigations. Follow now to get the latest episodes of Dateline NBC completely free, or subscribe to Dateline Premium for ad-free listening and exclusive bonus content: DatelinePremium.com
The Bobby Bones Show
Listen to 'The Bobby Bones Show' by downloading the daily full replay.