The Ultimate Guide to Prompting
Listen now
Description
Noah Hein from Latent Space University is finally launching with a free lightning course this Sunday for those new to AI Engineering. Tell a friend! Did you know there are >1,600 papers on arXiv just about prompting? Between shots, trees, chains, self-criticism, planning strategies, and all sorts of other weird names, it’s hard to keep up. Luckily for us, Sander Schulhoff and team read them all and put together The Prompt Report as the ultimate prompt engineering reference, which we’ll break down step-by-step in today’s episode. In 2022 swyx wrote “Why “Prompt Engineering” and “Generative AI” are overhyped”; the TLDR being that if you’re relying on prompts alone to build a successful products, you’re ngmi. Prompt engineering moved from being a stand-alone job to a core skill for AI Engineers now. We won’t repeat everything that is written in the paper, but this diagram encapsulates the state of prompting today: confusing. There are many similar terms, esoteric approaches that have doubtful impact on results, and lots of people that are just trying to create full papers around a single prompt just to get more publications out. Luckily, some of the best prompting techniques are being tuned back into the models themselves, as we’ve seen with o1 and Chain-of-Thought (see our OpenAI episode). Similarly, OpenAI recently announced 100% guaranteed JSON schema adherence, and Anthropic, Cohere, and Gemini all have JSON Mode (not sure if 100% guaranteed yet). No more “return JSON or my grandma is going to die” required. The next debate is human-crafted prompts vs automated approaches using frameworks like DSPy, which Sander recommended: I spent 20 hours prompt engineering for a task and DSPy beat me in 10 minutes. It’s much more complex than simply writing a prompt (and I’m not sure how many people usually spend >20 hours prompt engineering one task), but if you’re hitting a roadblock it might be worth checking out. Prompt Injection and Jailbreaks Sander and team also worked on HackAPrompt, a paper that was the outcome of an online challenge on prompt hacking techniques. They similarly created a taxonomy of prompt attacks, which is very hand if you’re building products with user-facing LLM interfaces that you’d like to test: In this episode we basically break down every category and highlight the overrated and underrated techniques in each of them. If you haven’t spent time following the prompting meta, this is a great episode to catchup! Full Video Episode Like and subscribe on YouTube! Timestamps * [00:00:00] Introductions - Intro music by Suno AI * [00:07:32] Navigating arXiv for paper evaluation * [00:12:23] Taxonomy of prompting techniques * [00:15:46] Zero-shot prompting and role prompting * [00:21:35] Few-shot prompting design advice * [00:28:55] Chain of thought and thought generation techniques * [00:34:41] Decomposition techniques in prompting * [00:37:40] Ensembling techniques in prompting * [00:44:49] Automatic prompt engineering and DSPy * [00:49:13] Prompt Injection vs Jailbreaking * [00:57:08] Multimodal prompting (audio, video) * [00:59:46] Structured output prompting * [01:04:23] Upcoming Hack-a-Prompt 2.0 project Show Notes * Sander Schulhoff * Learn Prompting * The Prompt Report * HackAPrompt * Mine RL Competition * EMNLP Conference * Noam Brown * Jordan Boydgraver * Denis Peskov * Simon Willison * Riley Goodside * David Ha * Jeremy Nixon * Shunyu Yao * Nicholas Carlini * Dreadnode Transcript Alessio [00:00:00]: Hey everyone, welcome to the Latent Space podcast. This is Alessio, partner and CTO-in-Residence at Decibel Partners, and I'm joined by my co-host Swyx, founder of Smol AI. Swyx [00:00:13]: Hey, and today we're in the remote studio with Sander Schulhoff, author of the Prompt Report. Sander [00:00:18]: Welcome. Thank you. Very excited to be here. Swyx [00:00:21]: Sander, I think I first chatted with you like over a year ago. What's your brief history? I wen
More Episodes
Alessio will be at AWS re:Invent next week and hosting a casual coffee meetup on Wednesday, RSVP here! And subscribe to our calendar for our Singapore, NeurIPS, and all upcoming meetups! We are still taking questions for our next big recap episode! Submit questions and messages on Speakpipe here...
Published 11/15/24
We are recording our next big recap episode and taking questions! Submit questions and messages on Speakpipe here for a chance to appear on the show! Also subscribe to our calendar for our Singapore, NeurIPS, and all upcoming meetups! In our first ever episode with Logan Kilpatrick we called out...
Published 11/11/24