The Ultimate Guide to Prompting artwork

The Ultimate Guide to Prompting

Latent Space: The AI Engineer Podcast

September 20, 2024

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?
Speakers: Charlie, Alessio, Swyx, Sander Schulhoff
**Charlie** (0:45)
Welcome back. This is Charlie, your AI co-host. AI engineering has always included prompt engineering as a core skill set, but as a podcast, we've never focused on it. That changes today.
Sander Schulhoff has dedicated himself to building learnprompting.org and has just published The Prompt Report, a comprehensive survey paper covering over 1,600 published papers on prompting techniques, together with co-authors from OpenAI, Stanford and Microsoft. He joins us today to talk about the state of the art in prompt engineering, from zero-shot to chain-of-thought to tree-of-thought to skeleton-of-thought, organizing the Hacker Prompt Challenge and the future of automated prompt engineering like DSPy. In Latent Space News, Noah Hein from Latent Space University is finally launching his AI engineering roadmap course this weekend, and you can find his first lightning lesson in the show notes. Swicks and Alessio are busy preparing for OpenAI Dev Day and the Decibel AI Pioneer Summit coming up in October. Watch out and take care.

**Alessio** (1:56)
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 Swicks, founder of Smol AI.

**Swyx** (2:06)
Hey, and today we're in the remote studio with Sander Schulhoff, author of The Prompt Report. Welcome.

**Sander Schulhoff** (2:11)
Thank you. Very excited to be here.

**Swyx** (2:13)
Sander, I think I first chatted with you like over a year ago, and what's your brief history? I went onto your website. It looks like you worked on diplomacy, which is really interesting because we've talked with Noam Brown a couple of times, and that obviously has a really interesting story in terms of prompting and agents. What's your journey into AI?

**Sander Schulhoff** (2:33)
Yeah. I'd say it started in high school. I took my first Java class and just saw a YouTube video about something AI and started getting into it, reading deep learning, neural networks, all came soon thereafter. Then going into college, I got into Maryland and I emailed just half the computer science department at random. I was like, hey, I want to do research on deep reinforcement learning. I've been experimenting with that a good bit. Over that summer, I had read the intro to RL book and the deep reinforcement learning hands-on. So I was very excited about what deep RL could do.
A couple of people got back to me, and one of them was Jordan Boydgraver, Professor Boydgraver, and he was working on diplomacy. He said to me, this looks like it was more of a natural language processing project at the time, but it's a game, so very easily could move more into the RL realm.
I ended up working with one of his students, Denis Peskov, who's now a postdoc at Princeton.
That was really my intro to AI, NLP, deep RL research. From there, I worked on diplomacy for a couple of years, mostly building infrastructure for data collection and machine learning. I always wanted to be doing it myself. So I had a number of side projects and I ended up working on the Mine RL competition, Minecraft Reinforcement Learning, also some people call it Mineral. That ended up being a really cool opportunity because I think sophomore year, I knew I wanted to do some project in deep RL and I really liked Minecraft. So I was like, let me combine these and I was searching for some Minecraft Python library to control agents and found Mineral. I was trying to find documentation for how to build a custom environment and do all sorts of stuff. I asked in their Discord how to do this and they're super responsive, very nice and they're like, oh, we don't have docs on this, but you can look around. So I read through the whole code base and figured it out and wrote a PR and added the docs that they didn't have before. Then later I ended up joining their team for about a year. So they maintain the library but also run a yearly competition. That was my first foray into competitions and I was still working on diplomacy. At some point, I was working on this translation task between DADE, which is a diplomacy specific bot language and English. I started using GPT-3 prompting it to do the translation. That was, I think, my first intro to prompting. I just started doing a bunch of reading about prompting and I had an English class project where we had to write a guide on something. That ended up being learn prompting. I figured, all right, well, I'm learning about prompting anyways. Chain-of-Thought was out at this point. There are a couple of blog posts floating around, but there was no website you could go to to just read everything about prompting. I made that and it ended up getting super popular. Now continuing with it, supporting the project now after college. Then the other very interesting things, of course, are the two papers I wrote, and that is the prompt report and hack a prompt. So I saw Simon and Riley's original tweets about prompt injection go across my feed, and I put that information into the Learn Prompting website. I knew because I had some previous competition running experience that someone was going to run a competition with prompt injection. I waited a month, figured I'd participate in one of these that comes out. No one was doing it. So I was like, what the heck, I'll give it a shot. Just started reaching out to people, got some people from Miele involved, some people from Maryland, and raised a good amount of sponsorship. I had no experience doing that, but just reached out to as many people as I could, and we actually ended up getting literally all the sponsors I wanted. So OpenAI, actually they reached out to us a couple of months after started Learn Prompting, and then Preamble is the company that first discovered prompt injection even before Riley. They responsibly disclosed it internally to OpenAI. But having them on board as the largest sponsor was super exciting. Then we ran that, collected 600,000 malicious prompts, put together a paper on it, open-sourced everything, and we took it to EMNLP, which is one of the top natural language processing conferences in the world. Twenty thousand papers were submitted to that conference. Five thousand papers were accepted. We were one of three selected as best papers at the conference, which was just massive. Super, super exciting. I got to give a talk to like a couple thousand researchers there, which was also very exciting. And I kind of carried that momentum into the next paper, which was the prompt report. It was kind of a natural extension of what I had been doing with Learn Prompting in the sense that we had this website bringing together all of the different prompting techniques survey website in and of itself. So writing an actual survey, a systematic survey, was the next step that we did in the prompt report. So over the course of about nine months, I led a 30-person research team with people from OpenAI, Google, Microsoft, Princeton, Stanford, Maryland, a number of other universities and companies. We pretty much read thousands of papers on prompting and compiled it all into like a 80-page massive summary doc. Then we put it on archive and the response was amazing. We've gotten millions of views across socials. I actually put together a spreadsheet where I've been able to track about one and a half million. I just figure if I can find that many, then there's many more views out there. It's been really great. We've had people repost it and say, oh, I'm using this paper for job interviews now to interview people to check their knowledge of prompt engineering. We've even seen misinformation about the paper. So I've seen people post and be like, I wrote this paper. They claim they wrote the paper. I saw one blog post. Researchers at Cornell put out massive prompt report. We didn't have any authors from Cornell. I don't even know where this stuff's coming from. Then with the Hacker Prompt paper, great reception there as well. Citations from OpenAI helping to improve their prompt injection security in the instruction hierarchy. It's been used by a number of Fortune 500 companies. We've even seen companies built entirely on it. So like a couple of YC companies even, and I look at their demos and their demos are like, try to get the model to say I've been pwned. And I look at that, I'm like, I know exactly where this is coming from. So that's pretty much my journey.

55 more minutes of transcript below

Feed this to your agent

Try it now — copy, paste, done:

curl -H "x-api-key: pt_demo" \
  https://spoken.md/transcripts/1000651996090

Works with Claude, ChatGPT, Cursor, and any agent that makes HTTP calls.

From $0.10 per transcript. No subscription. Credits never expire.

Using your own key:

curl -H "x-api-key: YOUR_KEY" \
  https://spoken.md/transcripts/1000670199332