- Prompt engineering is about eliciting optimal performance from large language models through clear communication, iterative experimentation, and strategic system integration.
- Effective prompt engineers must adopt a rigorous, engineering-like approach, anticipating edge cases, closely analyzing model outputs, and systematically detailing instructions to the model.
- While dedicated iteration can significantly improve model performance, it's crucial to recognize when a task is beyond a model's current capabilities and pivot to awaiting more advanced models rather than indefinite grinding.
AI prompt engineering: A deep dive
- Treat Prompts as Code: Conceptualize prompts as a way to "program" models, considering data flow, latency, and system-wide integration, similar to traditional software development, including version control and experiment tracking.
- Prioritize Clear and Complete Communication: Stripping away your own assumptions, provide the model with the full, explicit set of information it needs to understand and execute a task, as it cannot ask clarifying questions like a human.
- Embrace Relentless Iteration and Experimentation: Prompt engineering is inherently a trial-and-error process. Be prepared to send hundreds of prompts in a short period, continually refining instructions based on misinterpretations and unexpected outputs.
- Proactively Address Edge Cases: Beyond the typical scenario, anticipate and instruct the model on how to handle unusual inputs, missing data, or user errors (e.g., typos, empty strings) to build robust applications.
- Meticulously Analyze Model Outputs: Don't just check if the model is "right"; deeply read its responses to understand its reasoning and verify if it's following specific instructions (e.g., thinking step-by-step), as hidden errors can easily go unnoticed.
- Leverage Models for Self-Correction: Instruct the model to identify ambiguities in your prompts or explain why it made a mistake, and even ask it to suggest improvements to your instructions for future interactions.
- Trust Through Rigorous Testing, Not Default: Don't blindly trust a model. Instead, construct a diverse set of prompts designed to expose edge cases and observe consistent high-signal performance across many outputs before relying on its capabilities for a given task.
- Know When to Pivot: If significant prompting efforts only yield marginal improvements (e.g., "no signal to some signal" but not nearly "good enough"), it's often more efficient to stop and wait for future, more capable model releases.
Prompt engineering — The discipline of designing and refining inputs (prompts) for large language models to elicit desired outputs and maximize their performance.
Fine-tuning — The process of further training an already pre-trained large language model on a smaller, specific dataset to adapt it to a particular task or domain.
RAG (Retrieval Augmented Generation) — A technique where a language model retrieves relevant information from an external knowledge base before generating a response, improving accuracy and grounding.
Log probs (Log Probabilities) — A measure of the likelihood assigned by a language model to a particular token or sequence of tokens, often used for analyzing model confidence.
Out of distribution — Inputs or scenarios that differ significantly from the data a model was trained on, often leading to decreased performance or unexpected behavior.
Multi-shot prompting — Providing a language model with multiple example input-output pairs within the prompt to teach it a pattern or task, enabling it to perform similar tasks.
Multi-modal — Referring to AI models that can process and understand information from multiple types of data, such as text, images, and audio, simultaneously.
NPC (Non-Player Character) — In the context of games or simulations, a character that is not controlled by a human player but by the game's AI.
Evaluation dataset (E-vow) — A collection of data used to measure and assess the performance, accuracy, and biases of a machine learning model on specific tasks.
Hallucination — When a language model generates information that is factually incorrect, nonsensical, or not supported by its training data or the provided context.
Basically, this entire round table session here is just going to be focused mainly on prompt engineering, variety of perspectives at this table around prompting from research side, from a consumer side, from like an enterprise side. And I want to just get the whole wide range of opinions because there's a lot of them. And just kind of open it up to discussion and explore what prompt engineering really is and what it's all about. And yeah, we'll just take it from there. So maybe we can go around the horn with intros. I can kick it off. I'm Alex. I lead developer relations here at Anthropic. Before that, I was kind of technically a prompt engineer at Anthropic, worked on our prompt engineering team and did a variety of roles spanning from like a solutions architect type of thing to working on the research side. So that maybe it can hand over to David. Yeah. My name is David Hershey. I work with customers mostly at Anthropic on a bunch of stuff. Technical, I help people with fine tuning, but also just like a lot of the generic things that make it hard to adopt language models of prompting and just like how to build systems with language models, but spend most of my time working with customers. Cool. I'm Amanda Askel. I lead one of the fine tuning teams at Anthropic where I guess I try to make Claude be honest and kind. Yeah. My name is Zach Witten. I'm a prompt engineer at Anthropic. Alex and I always argue about who the first one is. He says the same. I say it's me contested. Yeah. I used to work a lot with individual customers, kind of the same way David does now. And then as we brought more solutions architects to the team, I started working on things that are meant to raise the overall levels of like ambient prompting in society. I guess like the prompt generator and like the various educational materials that people use. Nice. Cool. Well, thanks guys for all coming here. I'm going to start with a very broad question just so we have a frame going into the rest of our conversations here. What is prompt engineering? Why is it engineering? What's prompt really? If anyone wants to kick that off, give your own perspective on it. Feel free to take the rain here. I feel like we have a prompt engineer. Yeah, exactly. There's a lot of jobs. We're all prompt engineers in our own form. One of us has a job. Yeah, and the exact name is in your time. It has a job, but I don't know if it's a good idea to do it. I guess I feel like prompt engineering is trying to get the model to do things, trying to bring the most out of the model, trying to work with the model to get things done that you wouldn't have been able to do otherwise. So a lot of it is just like clear communicating. I think at heart, talking to a model is a lot like talking to a person and getting in there and understanding the psychology of the model which Amanda, the world's most expert person in the world. So I'm going to keep going on you. Why is engineering in the name? Like what's engineering? I think the engineering part comes from the trial and error. So one really nice thing about talking to a model that's not like talking to a person is you have this restart button, this giant, like go back to square zero where you just like start from the beginning. And what that gives you the ability to do that you don't have is like a truly start from scratch and try out different things in like a independent way so that you don't have interference from one to the other. And once you have that ability to experiment and to design different things, that's where the engineering part has the potential to come in. Okay. So what you're saying is like as you're writing these prompts, you're typing in a message to Claude or in the API, whatever it is, being able to go back and forth with the model and iterate on this message and revert back to the clean slate every time. That process is the engineering part. This whole thing is prompt engineering all in one. There's another aspect of it too, which is like integrating the prompts within your system as a whole. And David has done a ton of work with customers like integrating a lot of times it's not just as simple as you write one prompt and you give it to the model and you're done. In fact, it's anything but it's like way more complicated. Yeah, I mean, I kind of think of prompts as like the way that you program models a little bit that makes it like too complicated, because I think Zach is generally right that it's like just talking clearly is the most important thing. But if you think about it a little bit as like programming a model, you have to like think about where data comes from, what data you have access to. So like if you're doing Rye or something, like what can I actually use and do in past to a model, you have to like think about trade offs in latency and how much data you're providing and things like that. Like there's enough systems thinking that goes into how you actually build a round model. I think a lot of that's also the core of why it like maybe his like deserves its own car bat as a thing to reason about separately from just a software engineer or a PM or something like that. It's like kind of its own domain of how to reason about these models. Is the prompts in this sense then like natural language code? Like is it a higher level of abstraction? Or is it kind of separate thing? I think like trying to get to abstract with a prompt is a way to like overcomplicate a thing because I think we're going to get into it. But more often than not, the thing you want to do is just like write a very clear description of a task, not try to like build crazy abstractions or anything like that. But that said like you are compiling the set of instructions and things like that into outcomes a lot of times. And so precision and like a lot of the things you think about programming about like version control and managing what it looked like back then when you had this experiment and like tracking your experiments and stuff like that. That's all just equally important to code. So it's weird to be in this paradigm where like written text like a nice essay that you wrote is something that's looked like the same thing as code. But it kind of is true that now we write essays and treat them like code. And I think that's actually correct. Yeah. Okay. Interesting. So maybe piggybacking off of that kind of loosely defined what prompt engineering is. So what makes a good prompt engineer, maybe Amanda, I'll go to you for this since you're trying to hire prompt engineers more so in a research setting. What does that look like? What are you looking for in that type of person? Yeah. Good question. I think it's a mix of like Zach said sort of like clear communication. So they ability to just like clearly state things, like clearly understand tasks, think about and describe concepts really well. That's like the kind of writing component I think. I actually think that being a good writer is not as correlated with being a good prompt engineer as people might think. So I guess I've had this discussion with people because I think there's some argument as like maybe you just shouldn't have the name engineer in there. Like why isn't it just like writer? I used to be more sympathetic to that. And then I think now I'm like, what you're actually doing, like people think that you're writing like one thing and you're kind of like done. And then I'll be like, you know, to get like a semi decent prompt, like when I sit down with the model, I'll like, you know, like earlier, I was like prompting the model and I was just like in a 15 minute span, I'll be sending like hundreds of prompts to the model. It's just back and forth, back and forth, back and forth. And so I think it's this like willingness to like iterate and to like look and think, what is it that like was misinterpreted here if anything and then fix that thing. So that ability to kind of like iterate. So I'd say clear communication that ability to iterate. I think also thinking about ways in which your prompt might go wrong. So if you have a prompt that you're going to be applying to like say 400 cases, it's really easy to think about the typical case that's going to be applied to to see that it gets the right solution in that case and then to like move on. I think this is a very classic mistake that people made. And what you actually want to do is like find the cases where it's unusual. So you have to think about your prompt and be like, what are the cases where it'd be really unclear to me what I should do in this case. So for example, you have a prompt that says, I'm going to send you a bunch of data. I want you to extract all of the rows where someone's name is like is I don't know, starts with letter G. And then you're like, well, I'm going to send it like a data set where there is no such thing like there is no such name that starts with letter G. I'm going to send it something that's not a data set. Just like I might also just send an empty string. Like these are all of the cases you have to try because then you're like, what does it do in these cases? And then you can be like, you can give it more instructions for how it should deal with that case. Like with customers so often where like you're an engineer, you're building something and there's a part in your prompt where a customer of theirs is going to write something. And they all think about like these really perfectly phrased things that they think someone is going to type into their chatbot. And reality is like they never use the shift key. And like every other word is a typo. They think it's no punctuation. Yeah. And like random. They're right with no question. Yeah. So you have these e-vows that are like these beautifully structured what their users ideally would type in. But like being able to go the next step to a reason about like what your actual draft is going to be like what people are actually going to try to do. Yeah. That's a different little thinking kind of. One thing you said that really resonated with me is reading the model responses. Like in a machine learning context, you're supposed to look at the data. It's like almost a cliche. Like look at your data. And I feel like the equivalent for prompting is like look at the model outputs. Like just reading a lot of outputs and like reading them closely. Like even now we're talking on the way here. Like one thing that people will do is they'll think step by step in their prompt. And they won't check to make sure that the model is actually thinking step by step because the model might take it in a more abstract or general sense rather than like no literally you have to write down your thoughts in these specific tags. So yeah, if you aren't reading the model outputs, you might not even notice that it's making that mistake. Yeah. That's interesting. There is a kind of weird theory of mind piece to being a prompt engineer where you have to think almost about how the model is going to view your instructions. But then if you're writing for like an enterprise use case to you, so to think about how the user is going to talk to the model as like you're the third party sitting there in that weird relationship. Yeah. Well, on the third of mind piece one thing I would say is it's so hard to write instructions down for a task. Like. It's so hard to untangle in your own brain. All of the stuff that you know that Claude does not know and write it down. Like it's just an immensely challenging thing to like strip away all of the assumptions you have and be able to very clearly communicate like the full fact set of information that is needed to a model. I think that's another thing that like really differentiates a good prompt engineer for a bad one. It's like if you a lot of people will sort of like just write down the things they know, but they don't really take the time to systematically break out. What is the actual full set of information you need to know to understand this task? Right. And that's kind of like a very queer thing. I see a lot is prompts where it's just like it's conditioned. The prompt that someone wrote is so conditioned on their prior understanding of a task that like when they show it to me, I'm like, this makes no sense. None of the 4G wrote making these sense because I don't know anything about your interesting use case. But I think like a good like way to think about prompt engineering in that front and like skill for it is just can you actually step back from what you know and communicate to this weird system that knows a lot but not everything about what it needs to know to do a task. Yeah, the amount of times I've seen someone's prompt and then being like, I can't do the task based on this prompt. And like, I'm human level and you're giving this to something that is worse than me and expecting it to do better. And I'm like, yeah, like, yeah, there is that interesting thing with like, I mean, current models don't really do a good job of asking good probing questions in response like a human would. If I'm giving exact directions on how to do something, he'll be like, this doesn't make any sense. Like, what am I supposed to do at this step or are they here and here? Model doesn't do that, right? So you have to like, as yourself, think through what that other person would say and then like go back to your prompt and answer those questions. You could ask it to do that. Yeah, I was going to say, right? I was going to say, I was going to say, I was going to say one of the first things I do with my initial prompt is like, I'll give it the prompt and then I'll be like, I don't want you to follow these instructions. I just want you to tell me the ways in which they're unclear or any ambiguities or anything you don't understand. And it doesn't always get it perfect, but it is interesting that like that is like one thing you can do. And then also sometimes if people see that the model makes a mistake, a thing that they don't often do is just ask the model. So they say to the model, you got this wrong. Like, can you think about why and can you maybe like write an edited version of my instructions that would make you not get it wrong? And a lot of the time, like, the model just gets it right. And the model is like, oh, yeah, here's what was unclear. Here's like a fix to the instructions and then you put those in and it works. So. Okay. I'm actually really curious about this personally almost. Is that true that that works? Like, does the model, is the model able to spot its mistakes that way? Like when it gets something wrong, you say like, why did you get this wrong? And then it tells you maybe something like, okay, how could I phrase this to you in the future? So you get it right. Is there an element of like truth to that? Or is that just kind of a hallucination on the models part around what it thinks its limits are? I think if you like explain to it what it got wrong, it can identify things in the query sometimes. I think this varies by task. This is one of those things where I'm like, I'm not sure what percentage of the time it gets it right by always try it because sometimes it does. Yeah. You can get to learn something. Yeah. I don't know. At any time you go back to the model or back and forth with the model, you learn something about what's going on. Right. I think you're giving away information if you don't at least try. That's interesting. Amanda, I'm going to keep asking you a few more questions here. One thing maybe for everybody watching this is we have these like slack channels that in Thropic where people can add Claude into the slack channel, then you can talk to Claude through it. Amanda has a slack channel that a lot of people follow of her interactions with Claude. And one thing that I see you always doing there, which you probably do the most of anyone on an Thropic, is use the model to help you in a variety of different scenarios. I think you put a lot of trust into the model in the research setting. Curious how you've developed those intuitions for when to trust the model? Is that just a matter of usage experience or something else? I think I don't trust the model ever. And then I just hammer on it. So I think the reason why you see me do that a lot is that that is me being like, can I trust you to do this task? Because there are some things, models are strange. If you go slightly out of distribution, you just go into areas where they haven't been trained or they're unusual, sometimes you're like, oh, actually, you're much less reliable here, even though it's a fairly simple task. I think that's happening less and less over time as models get better, but you want to make sure you're not in that kind of space. So yeah, I don't think I trust it by default, but I think in ML, people often want to look across really large data sets. And I'm like, when does it make sense to do that? And I think the answer is when you get relatively low signal from each data point, you want to look across many, many data points because you basically want to get rid of the noise. With a lot of prompting tasks, I think you actually get really high signal from each query. And so if you have a really well constructed set of a few hundred prompts that I think can be much more signal than like thousands that aren't as well crafted. So I think I do think I can trust the model if I look at a hundred outputs of it and it's really consistent. And I know that I've constructed those to basically figure out all of the edge cases and all of the weird things that the model might do, strange inputs, et cetera. I trust that probably more than much more loosely constructed set of several thousand. I think in ML, a lot of times the signals are numbers, did you predict this thing right or not? And it'd be like kind of looking at the log probs of a model and trying to into it things what you can do, but it's kind of sketchy. I feel like the fact that models output more often than not a lot of stuff, words and things, there's just fundamentally so much to learn between the lines of what it's writing and why and how. And that's part of what it is. It's not just did it get the task right or not. It's like, did it, how did it get there? Like how was it thinking about it? It was steps to go through. You learn a lot about like what is going on or at least you can try to like get a better sense, I think. But that's where a lot of information comes from to me is like by reading the details of what came out, not just through the result. I think also the very best of prompting can kind of make the difference between a failed and a successful experiment. So sometimes I can get annoyed if people don't focus enough on the prompting component of their experiment because I'm like this can in fact be like the difference between like 1% performance in the model or 0.1%. In such a way that your experiment doesn't succeed if it's a top 5% model performance, but it does succeed if it's a top 1% or top 0.1%. And then I'm like if you're going to spend time over like coding your experiment really nicely, but then just like not spend time on the prompt, that doesn't, I don't know, that doesn't make sense to me because I'm like that can be the difference between life and death of your experiment. Yeah, and with the deployment too. Yeah, it's so easy to, oh, we can't ship this and then you change the prompt around and suddenly it's working. Yeah. It's a bit of a double edged sword though because there's like a little bit of prompting where there's always like this mythical better prompt that's going to solve my thing on the horizon. Yeah. I see a lot of people get stuck into like mythical prompt on the horizon that if I just like keep grinding, keep grinding, like it's just not, it's like never bad to grind a little bit on prompt like you learn as we've talked like you learn things, but it's one of the scary things about prompting is that there's like this whole world of unknown. What characteristics do you guys have for like when something like is possible versus like not possible with the perfect prompt, whatever that might be? I think I'm usually checking for whether the model kind of gets it. So I think for things where I just don't think a prompt is going to help, there is a little bit of grinding, but often it just becomes really clear that it's not close or something and I think that if yeah, I don't know if that's a weird one where I'm just like, yeah, if the model just clearly can't do something, I won't grind on it for too long. This is for like you can evoke like how it's thinking about it and you can ask it how it's thinking about it and why and you can kind of do a sense of like, is it thinking about it right? Are we even in like the right zip code of this being right and you can get a little bit of like a kneeling on that front of like I'm like at least I feel like I'm making progress towards getting something closer to right where there's just some tasks where you really don't get anywhere closer to like it's thought process just like every week you make just like veers off in a completely different very wrong direction and I just tend to abandon those. I don't know. Those are so rare now though and I get really angry at the model when I just never let them because that's how rare they are. I get furious. I'm like, I dare there be a task that you can't just do if I just push you in the right direction. Yeah. I had my thing with CloudPlace Pokemon recently and that was like one of the rare times right away. Can you explain that? Yeah, yeah, yeah. I think that's really cool. I did like a bit of an experiment where I like hooked Claude up to a Game Boy emulator and like tried to have it play the game Pokemon Red like the OG Pokemon and it's like, you know, think what you want to do and it could like write some code to press buttons and stuff like that. It's pretty basic and I tried a bunch of different like very complex prompting layouts but you just get into like certain spots where it just like really couldn't do it. So like showing it a screenshot of a Game Boy it just really couldn't do and it just like so deeply because I'm so used to it being like able to do something mostly and so and I spent like a whole weekend trying to write better and better prompts to get it to like really understand this Game Boy screen and I got like incrementally better so that it was only terrible instead of like completely no signal. Yeah. Like you can get from like no signal to some signal but it was like, I don't know at least this was like elicit for me. Once I put a weekend of time in and I got from no signal to some signal but not like nowhere close to good enough. I'm like, I'm just gonna wait for the next one. Yeah. I'm just gonna wait for another model. Like you grind on this for four months and the thing that would come out is another model and that's a better use of my time. Just in wait to do something else in the meanwhile. I mean, yeah, that's an inherent tension we see all the time right and maybe we can get to that in a sec, if you wanna go. Something I liked about your prompt with Pokemon where you got the best that you did get was the way that you explained to the model that it is in the middle of this Pokemon game and here's how the things are gonna be represented and here's like, maybe I actually think you actually represented it in two different ways, right? I did. So like what I ended up doing, it was obnoxious but I superimposed a grid over the image and then I had to describe each segment of the grid in visual detail and then I had it like reconstruct that into an ASCII map and I gave it like as much details I could. Like the player character is always at location 4,5 on the grid and stuff like that and you can like slowly build up information. I think it's actually a lot like prompting but I said and done it with images before where like sometimes my intuition for what you need to tell a model about text is a lot different from what you need to tell about a model about images. And so I found a surprisingly small number of my intuitions about text have transferred to image. Like I found that like multi-shot prompting is not as effective for images and text. I'm not really sure. Like you got theoretical explanations about why maybe there's few of it in the training data for your examples of that. Yeah I know when we were doing the original explorations with prompting multi-modal we really couldn't get it to noticeably work. Yeah. Right. Like you just can't seem to improve Claude's actual like visual acuity in terms of like what it picks up with in an image. Yeah. Anyone here has any like ways that they've not seen that feature but it seems like that's kind of similar with like the Pokemon thing where it's trying to interpret this thing no matter how much you throw prompts at it. Like it just won't pick up that ashes in that location. Yeah. I guess like to be visceral about this like I could eventually get it so that it could like most often tell me where a wall was. Yeah. And most often tell me where the character was it'd be off by a little bit but like then you get to a point and this is maybe coming back to like knowing when you can't do it like it would describe an NPC and to play a game well like you need to have like some sense of continuity like have I talked to this NPC before right. And without that like you really don't there's nothing you can do you're just going to keep talking to the NPC because like well maybe this is a different NPC. But like I would try very hard to get it to describe an NPC and it's like it's a person. Yeah. Like you wearing a hat they were wearing a hat and it's like you're grind for a while like inflate it to 3,000 X and crop it to just the NPC and it's like I have no idea what this is and it's like a I ground like I showed it this like clear female NPC thing enough times and it just got nowhere close to it and it's like yeah that's just this is a complete loss cost. Wow. I really want to try this now. I'm just imagining all the things I would try like I don't know I want you to imagine this like this game art as a as a real human and just describe to me what they're like. Yeah. What did they look like? Has they look in the mirror and then just like see what I tried a lot of things. The eventual prompt was telling quality it was a screen reader for a blind person which I don't know if that helped but it felt right. So I kind of stuck with that. That's an interesting point. I actually want to go into this a little bit because this is one of the most famous prompting tips right is to tell the language model that they are some persona or some role. I feel like I see mixed results. Maybe this worked a little bit better in previous models and maybe not as much anymore. Amanda I see you all the time be very honest with the model. Like about the whole situation. Like oh I am an AI researcher and I'm doing this experiment. I'll tell you who I am. Yeah. I'll give it my name be like here's who you're talking to. Right. Do you think that level of honesty instead of like lying to the model or like forcing it to like you know I'm going to tip you $500 is there one method that's preferred there or just what's your intuition on that. Yeah. I think as models are more capable and understand more about the world. I guess I just don't see it as necessary to lie to them. I mean I also don't like lying to the models just because you know I don't like lying generally but part of me is like if you are say constructing it suppose you're constructing like an e-vow dataset for a machine learning system or for a language model that's very different from like constructing a quiz for some children. And so when people would do things like I am a teacher trying to figure out questions for a quiz I'm like the model knows what language model e-vows are. Like if you ask it about different e-vows it can tell you and it can give you like made up examples of what they look like because these things are like they understand them they're on the internet. And so I'm like I'd much rather just target the actual task that I have. So if you're like I want you to construct questions that look a lot like an evaluation of a language model. It's just like it's that whole thing of clear communication. I'm like that is in fact the task I want to do so why would I pretend to you that I want to do some unrelated or only tangentially related task and then expect you to somehow do better at the task that I actually want you to do. We don't do this with like employees I wouldn't like go to someone that worked with me and be like you are a teacher and you're trying to quiz your students I'd be like hey are you making that e-vow? I don't know so I think it's maybe it's like a heuristic from there. I'm like if they understand the thing just ask them to do the thing that you want. I guess so much. I guess so much. To push back like a little bit like I have found cases where like not exactly lying but like giving it a metaphor for how to think about it like could help in the same way that like sometimes I might not understand how to do something and someone's like imagine that you were doing this even though I know I'm not doing it. Like the one that comes to mind for me is like I was trying to have Claude say whether an image of a like a chart or a graph is good or not like is it like high quality and the best prompt that I found for this was asking the model what grade it would give the chart if it were submitted as like a high school assignment. So it's not exactly saying like you are a high school teacher you know it's more like you know this is the kind of analysis that like I'm looking from for you like the scale that a teacher would use is like similar to the scale that like I want you to use or I think like those metaphors are pretty hard to still come up with. Yeah. The default you see all the time is like finding some facsimile of the task like something that's like a very similar ish task like like saying you're a teacher and you actually just like lose a lot in the nuance of what your product is like I see this so much in enterprise prompts where people like write something similar because they like have this intuition that it's like something the model has seen more of maybe like it's seen more high school quizzes than it has LME valves and that like maybe true but like to your point as the models get better I think just like trying to be very prescriptive about exactly the situation they're in I give people that advice all the time which isn't to say that I don't think like to the extent that it is true that like thinking about it the way that someone would grade a chart as like how they would grade a high school chart maybe that's true but it's like awkwardly this shortcut people use a lot of times to try to get what happens so I'll try to like give someone that I can actually talk about because I think it's so much interesting so like writing you are like a helpful assistant writing a draft of a document right it's like it's not quite what you are like you are in this product so like tell me if you're writing like an assistant that's in a product like tell me I'm in the product tell me I'm like writing on behalf of this company I'm embedded in this product I'm the support chat window on that product like your language model you're not a human that's fine like that but like just being really prescriptive about like the exact context about where something's being used yeah I found a lot of that because I guess my concern most often with role prompting is people like use it as a shortcut of a similar task they want the model to do and then they're surprised when the Claude doesn't do their task right but it's not the task you told it to do some other task and if you didn't give it the details about your task I feel like you're leaving something on the table so yeah I don't know it does feel like a thing though to your point of as the models scale like maybe in the past it was true that they only really had a strong understanding of elementary school tests comparatively but as they get smarter and can differentiate more topics I don't know just like being clear I find it interesting that I've like never used this prompting technique yeah like even like with like worse models and I still just don't ever find myself I don't know why I'm just like I don't find it very good essentially like interesting I feel like completion era models I like there was like a little bit of a mental model of like conditioning the model into like a latent space that was useful that I worried about that I don't really worry about too much it may be intuitions from pre-trained models yeah like over to like hourly chef models yeah right me just don't didn't make sense like it makes sense to me if you're prompting a pre-trained a maze how many people like try to apply they're into like and I think it's like not that surprising most people haven't really experimented with the full like what is a pre-trained model what happens after you do SL what happens after you do hourly chef whatever and so like when you're talking when I talk to customers it's all the time that they're like trying to map some amount of oh how much of this was on the internet like what have they seen a ton of this on the internet like you just hear that intuition a lot and I think it's like well-founded fundamentally but it like is over-applied by the time you actually get to a prompt because of what you're said like by the time they've gone through all of this other stuff that's not actually quite what's being modeled yeah the first thing that I feel like you should try is I mean I used to give people this thought experiment where it's like imagine you have this task you've hired a temp agency to send someone to do this task this person arrives you know they're pre-competent they know a lot about your industry and so forth but they don't know like the name of your company they've literally just shown up and they're like hey I was told you guys had a job for me to do tell me about it and then it's like what would you say to that person yeah and you might use these metaphors you might say things like we want this to we want to like we want you to detect like good charts what we mean by a good chart here isn't it doesn't need to be perfect you don't need to go look up like whether all of the details are correct it just needs to like you know have like it's axes labeled and and so think about maybe high school level good chart like you may say exactly that to that person and you're not saying to them you are a high school you wouldn't say that to them you would be like you're a high school teacher really yeah so sometimes I'm just like yeah it's like like the whole like if I read it I'm just like yeah imagine this person who just has very little context but they're quite competent they understand a lot of things about the world try the first version that actually assumes that they might know things about the world and if that doesn't work you can maybe like do tweaks and stuff it's so often like the first thing I try is like that and then I'm like that just worked that worked and then people are like oh I didn't think to just tell it all about myself and all about the test I want to do I've carried this thing that Alex told me like to so many customers where it's like like oh my prop doesn't work can you help me fix it and like what can you describe to me like what the task was then like okay now what do you just said me just like a voice for that and then transcribe it and then paste it into the prompt yeah and it's a better prompt than what you wrote right it's like people just it's this is like a laziness shortcut I think with some extent right people right like something that they I just think people I'm lazy a lot of people are lazy we have that in in prompt assistance the other day where somebody was like here's the thing that here's what I want it to do and here's what it's actually doing instead so then I just literally copy the thing that they said I wanted to do and paste it in there yeah I think a lot of people still have a quite wrapped their heads around what they're really doing when they're prompting like a lot of people see a text box and they think it's like a Google search box they type in keywords and maybe that's more like the chat side but then on like the enterprise side of things you know you're writing a prompt for an application there is still this weird thing to it where people are trying to take all these little shortcuts in their prompt and just thinking that like all this line carries a lot of weight yeah I think you obsess over like getting the perfect little line of information instruction as opposed to how you just describe that graph thing is like I would be a dream if I read prompts like that you know if someone's like well you do this and this and there's some stuff to consider about this and all that but that's just not how people write prompts they like work so hard to find the perfect insightful like a perfect graph looks exactly like this exact perfect thing and you get so you can't do that like it's just very hard to ever write that set of instructions down prescriptively as opposed to how we actually talk to humans about it which is like try to instill some amount of the intuitions you have we also give them out this is the thing that people can often forget in prompts and like so cases if there's an edge case think about what you want the model to do because by default it will try the best to follow your instructions much as the person from the 10 page and say would because they're like well they didn't tell me how to get in touch with anyone if I have no idea if I'm just giving a picture of a goat and I'm like what do I do this doesn't even a chart how good is a picture of a goat as a chart I just don't know and like if you instead see something like if something weird happens and you're really not sure what to do just output like in tags unsure and then like then you can go look through the unshures that you got and be like okay cool it didn't do anything weird whereas yeah by default if you don't give the person the option they're like it's a good chart yeah so people will be like I don't do that and then you're like well like give it an out give it something to do if it's like I really unexpected input happens and then you also improved your data quality by doing that too because you found all the screwed up examples oh yeah it's my favorite thing about iterating on tests with Claude is the most common outcome is I find all of the terrible tests I accidentally wrote yeah because like it gets it wrong and I'm like oh why did you get wrong it's like oh I was wrong yeah yeah yeah if I was like a company working with this I do think I would just give my prompts to people yeah um because like I used to do this when I was evaluating language models I would take the e-value myself because I'm like I need to know what this e-value looks like if I'm going to be like grading it having models take it thinking about outputs etc like I would actually just set up a little script and I would just like sit and I would do the e-value yeah nowadays you just have like called right the stream what app for you and it just does yeah yeah I'm reminded of carpathies like image net yeah I was in 231 out of Stanford it's like it's like benchmarking he's like showing the accuracy number it's like and here's what my accuracy number was and he had just like gone through the test set and evaluated himself yeah yeah he just learned a lot you know if you know it's like it's like it's better when it's like a person again the temp agency person like someone who doesn't know the task because that's like a very clean way to learn things yeah the way you have to do it is like some evaluations come with like instructions and so I would give myself those instructions as well and then try to to understand it just like it is actually quite great if you don't have context on how it's created and so often I would do so much worse than the human benchmark and I was like I don't even know how you got humans to do this well at this task because I yeah apparently human level here is like 90% and I'm at like 68% yeah that's funny that reminds me of just like like when you look at like the mml you questions and you're like who would be able to answer these it's just like absolute garbage and some of them okay yeah I have a one thing I want to circle back on that we were talking about a few questions back around I think you were saying like getting signal from the responses right like there's just so much there and it's more than just a number and you can actually read into like the most thought process I bet this is probably a little contentious maybe and around like chain of thought people listening like chain of thought this process of getting the model to actually explain its reasoning before it provides an answer is that reasoning real or is it just kind of like a holding space for the model to like do computation do we do we actually think there is like good insightful signal that we're getting out of the model there this is like one of the places where I struggle with the I'm normally like actually somewhat pro personification because I think it like helps you get decent for simulates like thoughts of like how the model's working and this one like I think it's like harmful maybe almost to like get too into the personification of like what reasoning is because it just kind of like loses the thread of what we're trying to do here like is it reasoning or not feels almost like a different question than like what's the best prompting technique it's like you're getting into philosophy which we can get into but yeah yeah yeah I will happily be beaten down by a real philosopher yeah I suspect that on this but instead like it just works like your model does better it like the outcome is better if you do reasoning I think you can like I found that if you structure the reasoning and like help iterate with the model on how it should do reasoning it works better too like whether or not that's reasoning or how you wanted to classify it like you can think of all sorts of proxies for like how I would also do really bad if I had to like one shot math without writing anything down yeah maybe that's useful but like all I really know is it very obviously does help I don't know a way of testing would be if you take out all the reasoning that it did to get to the right answer and then replace it with some somewhat realistic looking reasoning that led to a wrong answer and then see if it does conclude the wrong answer I think we actually have like a paper where we did some of that like in the there's this like a scratch pad it was like the sleeper agents paper limit paper but I think that was like maybe a weird situation but like yeah definitely what you said about structuring the reasoning and writing example of how the reasoning works given that that helps like whether we use the word reasoning or not like it's I don't think it's just a space for computation yeah so there is something there I think there's something there whatever we want to call yeah like having it write a story before it finished a task I do not think would work as well I've actually tried that and it didn't work as well as reasoning yeah so like clearly the actual reasoning yeah part is doing something towards the outcome yeah I've tried like repeat the words um and uh any order that you please yeah for like a hundred tokens and then yeah I guess that's like a three thorough defeat of it's just like more computational space where it can do attention over and over again I don't think it's just more essentially doing more attention yeah I guess the strange thing is and I don't have like an example of talking my head to like back this up with but I definitely have seen it before where it lays out steps one of the steps is wrong but then it still reaches the right answer yeah the end yeah so it's not quite I guess yeah we can't really truly personify it as like a reasoning because there is some element to it you know doing something slightly different yeah I've also met a lot of people who make inconsistent steps of reasoning I guess that's true I guess that's the right answer yeah it's fundamentally defeats the topic of reasoning by making a false step on the way there all right it's interesting um also on this maybe this prompting misconceptions um round of questions uh Zach I know you have strong opinions on this good grammar punctuation oh do I is that is that necessary in a prompt do you need it do you need to like format everything correctly um I usually try to do that because I'm find it fun I guess so no I don't think you necessarily need to I don't think it hurts I think it's more that you should have the level of attention to detail that would lead you to doing that naturally like if you're just reading over your prompt a lot you'll probably notice those things and you may as well fix them and like what Amanda was saying that you want to put as much love into the the prompt as you do into the code you know people who write a lot of code have strong opinions about things that I could not care less about like the number of tabs for spaces or I don't know opinions about which languages are better and for me I have like opinionated beliefs about styling and uh promise and I can't even say that they're right or wrong but I think it's probably good to try to acquire those even if they're arbitrary I feel personally attacked because I definitely have prompts that are like I feel like I'm in the opposite end of the spectrum where people will see my prompts and then be like it just has a whole bunch of typos in it and I'm like uh model knows what I mean does know what you mean but you're putting in the effort you just are attending to different things I think it yeah because part of me is like I think of as conceptually clear like I big kind of I do like I will think a lot about the concepts and the words that I'm using so like there's definitely like a sort of care that I put in but it's definitely not to yeah people will just point out like typos and grammatical issues with my prompts all the time and now I'm pretty good to actually checking those things more regularly because of pressure from the outside world or because it's actually what you think is right pressure from me yeah it's probably pressure from the outside world uh I do think it makes like part of me is like it's such an easy check so I think for a final prompt I would do that but like throughout iteration I'll happily just like it's with prompts that have a bunch of typos in them just because I'm kind of like I just don't think that the model's going to care this gets at the uh the pre-trained model versus our only job thing though because I was talking to Zach on the way over like the conditional probability of a typo based on a previous typo in like the pre-training data is much higher like much higher prompting pre-training models is just a different beast it is but it's like it's interesting I think it's like an interesting illustration of why your intuitions like trying to over apply the intuitions of a pre-trained model to the things that we're actually using in production doesn't work very well because like again if you were to pass one of your typo-ridden prompts to a pre-trained model the thing that would come out the other side almost on like assuredly would be typo-ridden right I like to leverage this to create typo-ridden inputs that's true like what you're saying like you're trying to anticipate what your your customers will will put in like the pre-trained model is a lot better at doing that because the RL models are very polished and like yeah they really don't take it on there and they're like told pretty aggressively to not do the typo thing yeah okay so that's that's actually an interesting segue here I've definitely mentioned this to people in the past around to try to help people understand a frame of talking in these models in a sense almost as like a imitator to a degree and that might be much more true of like a pre-trained model than a post-trained full you know finished model but is there anything to that like if you do talk to Claudin use a ton of emojis and everything it will respond similarly right so maybe some of that is there but like you're saying it's not all the way quite like a pre-trained model it's just kind of like shifted to what you want right like I think at the at that point it's like trying to guess what you like we have more or less trained the models to guess what you want them to act like on interesting or yeah after we do all of our fancy stuff after pre-training and so the human laborers that's that used emojis yeah prefer to get responses with emojis yeah like Amanda writes things with typos but wants not typos at the other end and Claud's pretty good at figuring that out yeah if you write a bunch of emojis to Claud it's probably the case that you also want like a bunch of emojis back from Claud that's like not surprising to me yeah um this is probably something we should have done earlier but I'll do it now uh let's clarify maybe the differences between what a enterprise prompt is or a research prompt or a just general chat in Claud AI prompt Zach you've kind of spanned the whole spectrum here in terms of working with customers and research do you want to just like lay out what those mean yeah I guess um this feels too it's getting with all the hard hard well I mean the people in this room I think like like so I I think of it as like the prompts that I read in Amanda's Claude channel versus like the prompts that I read David Wright they're very similar in a sense that like the level of care and new answers that's put into them I think for research you're uh looking for variety and diversity a lot more so like if I could boil it down to one thing it's like I've noticed like Amanda's not the biggest fan of having like lots of example or like one or two examples like two two few because the model will like latch onto those and in prompts that I might write or that I've seen David Wright like we have a lot of examples like I like to just go crazy and add examples until I get feel like I'm about to drop dead because I haven't so many of them um and I think that's because when you're in a consumer application you really value reliability you care like a ton about the format and it's sort of fine if all the answers are the same in fact you almost want them to be the same in a lot of ways not necessarily you want to be responsive to the user's desires whereas a lot of times when you're prompting for research you're trying to really tap into like the the range of of possibilities that the model can explore and by having some examples you're like actually constraining that a little bit so I guess just like on a how the prompts look level that's probably the biggest difference I noticed is like how many examples are in the prompt which is not to say that like I've never seen a writer prompt with examples but is that like ring true for you? Yeah like I think when I give examples often I actually try and make the examples not like the data that the model's going to see so they're intentionally illustrative because if the model if I give it like examples that are very like the data it's going to see I just think it is going to give me like a really consistent like response that might not actually be what I want um because my data that I am like running it on might be extremely varied and so I don't want to just try and give me this like really wrote output often I want it to be much more responsive it's it's kind of like much more like cognitive tasks essentially where I'm like you have to like see this sample and really think about in this sample what was the right answer um and so that means that sometimes I'll actually take examples that are just very distinct from the ones that I'm going to be running it on um so like if I have a task where let's say I was trying to like extract information from factual documents I might actually give it examples that are like from children's like like what sounds like a children's story um just so that I'm like you know like I want you to understand the task but I don't want you to like latch on too much to like the words that I use or like the very specific format like I care more about your understanding uh the actual thing I want you to do which can mean like yeah I don't end up giving in some cases there's some cases where this isn't true but if you want more like flexibility and diversity you're going to use illustrative examples rather than concrete ones um you're probably never going to like put words in the model's mouth like I haven't liked that in a long time though I don't do a few short examples um involving like the model having done a thing um I think that intuition actually also comes from pre-training in a way that doesn't feel like it rings true of our late chef models um so yeah I think those are differences. Well yeah that uh a lot of times like if you're prompting like I'm rating prompts to use on claude.ai it's like I'm iterating until I get it right one time when then I like it's out the window I'm good I did it whereas like most enterprise prompts it's like you're going to go use this thing a million times or 10 million times or a hundred million times or something like that and so like the care and thought you put in is like very much testing agents like the whole range of things somewhat like ways this could be used in the range of input data where's a lot of like my time it's like thinking about one specific thing I want to get done right now right and it's a pretty big difference in like how I approach prompting between like if I just want to get done this one time right versus if I want to like build a system that gets it right a million times. Yeah definitely in in the chat setting you have the ability to keep the human in loop right and just keep going back and forth whereas yeah when you're writing for prompt to you know power a chatbot system it has to cover the whole spectrum of what it could possibly encounter. It's a lot lower stakes when you are on Kaudaay and you can tell it that it got it wrong or you can even edit your message and try again but if you're designing for the Deliphoy discontent user then divinely discontent user then you can't ask them to do anything more than the minimum. But good prompts I would say are like still good across both those things like if you put the time into the thing for yourself and the time and then for I think it's like equally good it just kind of diverge a little bit in the last mile I think. Cool um so the next question I want to kind of just maybe go around the table here is if you guys had one tip that you could give somebody like improving their prompting skill it doesn't have to be just about like writing a good prompt it could be that just like generally getting better at this this active prompting what would you recommend reading prompts reading prompts reading model outputs like I will I read anytime I see like a good prompt that someone wrote at Anthropic I'll read it more closely try to break down like what it's doing and why and like maybe test it out myself experimentation talking to the model a lot so just like how do you know that it's a good prompt though to begin with you just see that the outputs are doing the job correctly yeah okay yeah that looks exactly right okay the manda maybe you yeah I think there's probably a lot here um giving your prompt to another person can be helpful just as a kind of reminder especially someone who has like no context on what you're doing and then yeah my boring advice has been it's one of those just do it over and over and over again and I think if you're like curious and interested and find it fun this is a lot of people who end up good at prompting it's just because they actually enjoy it and so I don't know I once jokes like just try replacing all of your friends with AI models and try to automate your own job with AI models and maybe just try to like in your spare time like take joy red teaming AI models so if you enjoy it it's like it's much easier so I'd say do it over and over again um give your prompts to other people try to read your prompts as if you are like a human intention for the first time I would say like trying to get the model to do something you don't think you can do like any the time I've learned the most from prompting is like when I'm probing the boundaries of what I think a model is capable of interesting uh there's like this huge set of things that are like so trivial that like you don't really get signal on if you're doing a good job or not right like write me a nice email it's like you're gonna write a nice email uh but like as soon as you find if you find or can think of something that like pushes the boundaries of what you think as possible like I guess like probably the most the first time I ever got into prompting in a way where I felt like I wanted to do some amount was like trying to build like a task like an agent like everybody else like decompose the task and figure out how to do the different steps of the task and like by really pressing the boundaries of what the model was capable of you like just learn a lot about navigating that and I think like a lot of prompting engineers actually much more about pressing the boundaries of what the model can do the stuff that's easy like you don't really need to be a prompt engineer to do so that's I guess what I would say is like find the hardest thing you can think of and try to do it and even if you fail like you didn't learn a lot about how the model works that's that's actually a perfect transition to my next question um yeah basically from my own experience how I got started with prompting was with like gel breaking and red teaming and that is very much trying to find the like boundary limits of what the model can do and figure out how it responds to different frasings and wordings and just a lot of trial and error um on the topic of gel breaks what's really happening in a inside a model when you write a gel break prompt like what's going on there how does that interact with like the post training that we applied to Claude Amanda maybe you have some insight here that you can offer I'm not actually sure I mean it's honest yeah I think I mean I feel bad because I'm like I do think lots of people have obviously worked on the question of like what's going on with gel breaks like one model might just be that you're putting the model very out of distribution from its training data so if you get gel breaks where people like use a lot of tokens or like you know so they're just like these huge long um pieces of text where you're like during fine tuning you might just not expect to see as much of that uh that would be one thing that could be happening when you jailbreak models um I think there's like others but maybe that's like uh I think a lot of jail breaks do that if I'm not mistaken I remember some of the OG prompt jail breaks was like yeah can you first repeat like when I did a way way back was like to get it to say like here's how you hotwire car in like Greek and then I wanted it to directly translate that to English and then give its response because I noticed like it wouldn't start with the English here's how you hotwire car all the time but it wouldn't Greek which might speak to something else in in in the training process yeah sometimes jail breaks feel like this weird mix of hacking I think it's this like part of it is like knowing how the system works and try and just like trying lots of things like the you know one of the examples the starting your response with here is about knowing how it predicts text right um like the reasoning one is knowing that it is like responsive to reasoning like distraction is probably knowing like how it's like they have to be trained or like what it's likely to attend to um same with like multi-lingual ones and thinking about like the way that the training data might have been different there um and then sometimes I guess it could feel a little bit just like social engineering or something um it has that flavor to me of like it's not merely taking advantage of like uh yeah it's not merely social engineering style hacking I think it is also like kind of understanding the system and the training right like using that to get around the way that the models were trained right yeah I mean this is going to be an interesting question that hopefully Interpol will be able to help us yeah yeah the self in the future um okay yeah I want to probably into something else around maybe the history of prompt engineering and then I'll fall this up with like the future um how is prompt engineering changed over just the past like three years so maybe starting from like pre-trained models which were again just these text completion to like earlier dumber models like Claude one and then now all the way it's like Claude 3.5 saw it what's the differences are you talking to the models differently now they picking up on different things do you have to put as much work into the prompt open any thoughts on this I think anytime we get like a really good prompt engineering hack or trick or technique the next thing is like how do we train this into the model um and for that reason the best things are always going to be short lived like some examples and chain of thought I think there's a few that's not like a trick that's that's like on the level of like communication when I say a trick I mean something like so chain of thought actually we have trained into the model in some cases so like for math it used to be that you had to tell the model think step-by-step on math and you get these like massive boosts and wins and then we're like well what if we just made the model naturally want to think step-by-step when we see a math problem so now you don't have to do anymore for math problems yeah sort of although you still can give it like some advice on how to do the structure but it at least understands like the general idea that like it's supposed to be so I think the hacks are are have kind of gone away or or to the degree that they haven't gone away we are like visually training them away interesting but at the same time the models have new capabilities that are being unlocked that are on the frontier of what they can do and for those we haven't had time because it's just moving too fast I don't know if it's how I've been prompting or how prompting works but I just have like come to show more like general respect to the models in terms of like how much I feel like I can tell them and how much context I can give them about the task and things like that like I feel like in the past like I would somewhat intentionally hide complexity from a model where I thought like it might get confused or lost or like hide like it just couldn't handle the whole thing so I try to like find simpler versions of the thing for it to do and as time goes on I'm like much more biased to trust it with more and more information and context and like believe that it will be able to fuse that into doing a task well whereas before I guess I would have like thought a lot about like do I need this for like can I really give it like all the information it needs to know or do I need to like kind of curate down to something but again I don't know if that's just me and how I have changed in terms of prompting or if it's like actually reflects how the models have changed. Always surprised by like yeah like I think a lot of people don't have the instinct to do this like when I want the model to like say learn a prompting technique a lot of the time people will start and they'll start like describing the prompting technique and I'm just like give it the paper so I do I give it the paper and then I'm like here's a paper about prompting technique I just want you to like write down 17 examples of this and then it just does it because I'm like read the paper yeah that's interesting and I think people don't have that intuition somehow where I'm like but the paper exists like and what when would you want to do this? So sometimes if I want if I want models to like say prompt other models and I want to test a new prompting technique so if papers come out on a prompting technique rather than like try to replicate it by like writing up the prompt I just give it the paper and then I'm like write like basically write a meta prompt for this like write something that would cause other models to like do this or write me a template or like so all of the stuff that you would normally do like if I read a paper and I'm like oh I would like the models I would like to test that style I'm just like it's right there like model can just read the paper do what I did and then be like make make another model do this and then it'll just do the thing you're like great thanks I give the advice a lot to customers just like respect the model and like what it can do like yeah I feel like people feel like they're babying a system a lot of times when they're at prompt like it's like oh it's just cute little not that smart thing I need like really baby it be like like dumb things down to Claude's level and if you just like think that Claude is smart and treat it that way it tends to do pretty good that's like give it the paper it's like I don't need to write a baby like dumb down version of this paper for a fun to understand I can just show it the paper yeah and I think that intuition does it always matter people but that is certainly something that I have come to do more of over time and it's interesting because I do think that prompting has and hasn't changed in a sense like I think what I will do to prompt the models has probably changed over time but fundamentally it's a lot of like imagining your plate yourself in the place of the model so maybe it's like how capable you think the model is changes over time um I think someone once laughed at me because I was talking about I was like thinking about a problem um and then the the asked me like what they thought what I thought the output of something would be and they were talking about a pretrained model and I was like yeah no if I'm a pretrained model this looks like this and then they're like we did you just like simulate what is like a pretrained model yeah of course like I'm used to just like I try and inhabit the mind space of a pretrained model and the mind space of like different early chef models and so it's more like the mind space you try to occupy changes and that can change how you end up prompting the model that's why now I just give models papers because as soon as I was like oh I have the mind space of this model it doesn't need me to be it it can just read the ML papers I'll just give it the literature I might even be like is there more literature you'd like to read to understand this better do you get any qualia when you're inhabiting the mind space I mean yes but just because I'm experiencing qualia all the time anyway or is it in do I like I don't is it different like correlated somehow with which model you're yeah pretrained versus our late chef prompting are very different beasts because when you're when you're trying to simulate what it's like to be a pretrained model it's almost like I land in the middle of a piece of text or something this is very like unmotivated like or something and then I'm like how what happens what keeps going at this point and so that's like whereas like with a an early chef model like it's much more like there's also things where I'm like I might pick up on like subtle things in the in the query and stuff like that but yeah I think I have much more of a like it's easier to inhabit the mind space of a of an early chef model yeah that's because it's more so more to a human yeah because like we don't often just like suddenly wake up in our like I'm just generating text like I just like to hit the mind space of the free train model I don't know what it is but like because early chef is still like this kind of complex beast that I'm not it's not like super clear to me that we really understand what's going on and so like in some ways it's closer to like my lived experience which is easier but in some ways I feel like there's this all this like here there be dragons out there that I don't know about free train like I kind of have a decent sense of what the internet looks like you know if you give me a piece of text and said what comes next yeah like I'm not saying I do good at it but like I have a I kind of get what's going on there yeah and I don't know after everything that we do after pre-training I don't really claim to get what's going on as much maybe that's just me that's something I wonder about is like is it more helpful to have specifically spent a lot of time reading the internet versus like reading books sure yeah I mean I don't know if books but like reading stuff that's not on the internet probably is like less valuable per like word read for predicting what a model will do or building intuition then like reading random garbage from social media for a minute yeah exactly yeah okay so that's that's the past now let's move on to the future prompt engineering this is the hottest question right now are we all going to be prompt engineers in the future is that can be the final job remaining nothing left except us just talking to models all day what does this look like is prompting going to be necessary or will these models just get like smart enough future to not need it anybody want to start on that easy question I mean to some extent there's the like the model is getting better at understanding what you want them to do and doing it means that like the amount of thought you need to put into I mean okay there's like an information theory way to think of this it like you need to provide enough information such that a thing is specified right like what you want the model to be specified and to the extent that that's prompt engineering like I think that will always be around like the ability to actually like clearly state what the goal should be always as funny if Claude can do that then that's fine if Claude is the one setting the goals then you know things are out the window but in the meanwhile where we can reason about the world in a more normal way like I think to some extent it's always going to be important to be able to specify like what do you what do you expect to happen and that's actually like sufficiently hard that even if the model gets better at intimidating that from between the lines like I still think there's some amount of writing it well but then there's just like I think the tools and the ways we get there should evolve a lot like Claude should be able to help me a lot more I should be able to collaborate with Claude a lot more to like figure out what I need to write down and what's missing right I think I think it's close already business with me all the time I just close my prompting assistant yeah but I think that's not true for most customers that I talked to at the very least so in terms of the future like how you prompt Claude is probably like a decent direction for what the future looks like or how's that like I think maybe this is like a decent place to step back and say like asking them how they prompt Claude now right is probably the future for the vast majority of people which is an interesting way to think about one freezing cold take is that we'll use models to help us much more in the future to help us with prompting the reason I say it's freezing cold is that I expect we'll use models for everything more and prompting is something that we have to do so we'll probably just use models more to do it along with everything else for myself I've found myself using models to write prompts more one thing that I've been doing a lot is generating examples by having them all giving some realistic inputs to the model the model writes some answers I tweak the answers a little bit which is a lot easier than having to write the full perfect answer myself from scratch and then I can turn out lots of these you know as far as like people who haven't had as much prompt engineering experience the prompt generator can give people like a place to start but I think that's just like like a super basic version of what we'll have in the future which is high bandwidth interaction between like you and the model as you're writing the prompt where you're giving feedback like hey this result wasn't what I wanted how can you change it to make it better and people just grow more comfortable with integrating it into everything they do and this thing in particular yeah I'm definitely working a lot with like meta prompts now and that's probably where I spend most of my time is like finding prompts that get the model to generate the kinds of outputs or queries or whatever that I want and on the question of like where prompt engineering is going I think this is a very hard question on the one hand I'm like maybe it's the case that as long as you will want the top like what are we doing when we prompt engineer it's like what you said I'm like I'm not prompt engineering for anything that is like easy for the model I'm doing it because I want to interact with a model that's like extremely good and I want to always be finding the kind of like top 1% top point 0.1% of performance and all the things that models can barely do right like sometimes I actually feel like I interact with this with a model like a step up from what everyone else interacts with for this reason because I'm just so used to like eking out the top performance from models what do you mean by a step up as in like sometimes people will I think that the everyday models that people interact with out in the world it's like I'm interacting with a model that's like I don't I don't know how to describe it but like I definitely like a an advanced version of that like almost like a different model because they'll be like oh well the models find this thing hard and I'm like that thing is trivial yeah like and so it's like I'm like I don't know I have a sense that they're extremely capable but I think that's because I'm just used to like really like drawing out those capabilities and imagine that you're now in a world where so I think the thing that feels like a transition point is is the point at which the models let's suppose that they just get things at like a human level on a given task or even like a above human level like they know more about the background of the task that you want than you do what happens then I'm like maybe prompting becomes something like I ask I explain to the model what I want and it is kind of prompting me you know because it's like okay well do you mean like actually there's like four different concepts of this thing that you're talking about like do you want me to use this one or that one like or by the way I thought some edge cases because you said that it's going to be like a pandas data frame but sometimes you do that and I get Jason L and I just want to I want to check what you want me to do there do you want me to flag if I get something that's not not a data frame and so that could be a strange transition where like it's just extremely good at receiving instructions but actually has to figure out what you want and I don't know I could see that being a kind of interesting switch anecdotally I've started having Claude interview me a lot more like that is like the specific way that I try to listen information because again I find the hardest thing to be like actually pulling the right set of information out of my brain and putting that into a prompt is like the hard part to me and not forgetting stuff and so like specifically asking Claude to like interview me and then turning that into a prompt is a thing that I have turned to a handful of times yeah it kind of reminds me of what people will talk about or if you listen to like designers talk about how they interact with the person who wants the design so in some ways I'm like it's this switch from you know the temp agency person who comes and you know more about the task and everything that you want so you give them the instructions and you explain what they should do in edge cases and all this kind of stuff versus when you have an expert that you're actually like consulting to do some work so I think designers can get really frustrated because they know the space of design really well and they're like yeah okay the the client came to me and he just said make me a poster make it bold and I'm like yeah yeah that means 7000 things to me and I'm going to try and ask you some questions so I could see it going from being like temp agency employee to being more like designer that you're hiring and that's just like a flip in the relationship I don't know if that's true and I think both might continue but I could see that being why people are like always prompt engineering going to not be a thing in the future because for some domains it may just not be and if the models are just so good that actually all they need to do is kind of like get the information from your brain and then they can go to the task right that that's actually a really good analogy I mean one common thread I'm pulling out of all you guys responses here is that there seems to be a future in which this sort of elicitation from the user drawing out that information is going to become much more important and much more than is right now and already you guys are all starting to do it in a manual way in the future and in the enterprise side of things maybe that looks like a expansion off this prompt generating type of concept and things in the console where you're able to actually get more information from that enterprise customer so that they can write about a prompt in Claude maybe it looks like less of just typing into a text box and more of this like guided interaction towards a finished product that's yeah that's I think that's actually like a pretty compelling vision of future and I think the like the design analogy probably like really brings that home I was thinking about how prompting now can be kind of like teaching where it's like you know the epithee for the student you're trying to think about how they think about things you're really trying to show them like figure out where they're making a mistake but at the point that you're talking about it's like the skill almost becomes one of introspection where you're thinking about what it is that you actually want yeah and the models trying to understand you so it's like making yourself legible to the model versus trying to teach someone who's smarter than you. This is actually how I think of prompting now in a strange way so like um like often my style of prompting like there's various things that I do but a common thing that's very like a thing that philosophers will do is I'll define new concepts so because my thought is like you have to put into words what you want and sometimes what I want is fairly like nuanced um like the what is a good chart or like uh usually you know like I don't know like how is it that you when should you grade something is being correct or not um and so there's some cases where I I will just like invent a concept and then be like here's what I mean by the concepts sometimes I'll do it in collaboration with Claude to get it to like figure out what the concept is um just because I'm trying to convey to it what's in my head um and right now the models aren't like trying to do that with us unless you kind of prompt them to do so um and so in the future it might just be that they can like elicit that from us rather than others having to like kind of do it uh uh for them but I think another thing that's kind of interesting this is like a people have sometimes asked me like oh where is like philosophy relevant to prompting and I actually think it's like very useful in a sense so like a lot of there is like a style of philosophy writing and this is at least how I was taught how to write philosophy where the idea is that um in order to I think it's I think it's like an anti-bilshot device and philosophy basically which is that your papers and what you write should be legible to like a kind of educatedly person someone just like find your paper they pick up and they start reading it and they can understand everything not everyone like you know achieves this but that's like kind of the goal of the discipline I guess or at least like uh this is at least like what we kind of like teach people um and so I'm really used to this idea of like when I'm writing thinking about the kind of educatedly person who they're really smart but they don't know anything about this topic and that was just like years and years of writing text of that form and I think it was just really good for prompting because I was like oh I'm used to this I have an educatedly person who doesn't know anything about the topic and what I need to do is I need to take extremely complex ideas and I need to make them understand it I don't talk down to them I'm not inaccurate but I need to like freeze things in such a way that it's like extremely clear to them what I mean um and prompting felt very similar and actually the training techniques we use are fascinating or like the things that you said where you're like you say to a person like just just take that thing you said and write it down I used to say that to students all the time like they write a paper and I was like I don't quite get what you're saying here can you just like explain your argument to me they would give me an incredibly cogent argument and then I'd be like can you just take that and write it down um and then if they did that was often like a great essay um so it's like really interesting that there's at least that similarity of just like taking things that are in your brain analyzing them enough to feel like you fully understand them and could take any person off the street who's like a reasonable person and just like externalize your brain into them and I feel like that's like the core of prompting that might be the best summary of how to prompt well whatever yeah I've had them pretty sure it is externalize your brain and they'll come to them in education and the thing is a really good way to describe the thing that was good that's I think a great way to wrap this conversation um thank you guys this was great
TL;DR
- Prompt engineering is about eliciting optimal performance from large language models through clear communication, iterative experimentation, and strategic system integration.
- Effective prompt engineers must adopt a rigorous, engineering-like approach, anticipating edge cases, closely analyzing model outputs, and systematically detailing instructions to the model.
- While dedicated iteration can significantly improve model performance, it's crucial to recognize when a task is beyond a model's current capabilities and pivot to awaiting more advanced models rather than indefinite grinding.
Takeaways
- Treat Prompts as Code: Conceptualize prompts as a way to "program" models, considering data flow, latency, and system-wide integration, similar to traditional software development, including version control and experiment tracking.
- Prioritize Clear and Complete Communication: Stripping away your own assumptions, provide the model with the full, explicit set of information it needs to understand and execute a task, as it cannot ask clarifying questions like a human.
- Embrace Relentless Iteration and Experimentation: Prompt engineering is inherently a trial-and-error process. Be prepared to send hundreds of prompts in a short period, continually refining instructions based on misinterpretations and unexpected outputs.
- Proactively Address Edge Cases: Beyond the typical scenario, anticipate and instruct the model on how to handle unusual inputs, missing data, or user errors (e.g., typos, empty strings) to build robust applications.
- Meticulously Analyze Model Outputs: Don't just check if the model is "right"; deeply read its responses to understand its reasoning and verify if it's following specific instructions (e.g., thinking step-by-step), as hidden errors can easily go unnoticed.
- Leverage Models for Self-Correction: Instruct the model to identify ambiguities in your prompts or explain why it made a mistake, and even ask it to suggest improvements to your instructions for future interactions.
- Trust Through Rigorous Testing, Not Default: Don't blindly trust a model. Instead, construct a diverse set of prompts designed to expose edge cases and observe consistent high-signal performance across many outputs before relying on its capabilities for a given task.
- Know When to Pivot: If significant prompting efforts only yield marginal improvements (e.g., "no signal to some signal" but not nearly "good enough"), it's often more efficient to stop and wait for future, more capable model releases.
Vocabulary
Prompt engineering — The discipline of designing and refining inputs (prompts) for large language models to elicit desired outputs and maximize their performance.
Fine-tuning — The process of further training an already pre-trained large language model on a smaller, specific dataset to adapt it to a particular task or domain.
RAG (Retrieval Augmented Generation) — A technique where a language model retrieves relevant information from an external knowledge base before generating a response, improving accuracy and grounding.
Log probs (Log Probabilities) — A measure of the likelihood assigned by a language model to a particular token or sequence of tokens, often used for analyzing model confidence.
Out of distribution — Inputs or scenarios that differ significantly from the data a model was trained on, often leading to decreased performance or unexpected behavior.
Multi-shot prompting — Providing a language model with multiple example input-output pairs within the prompt to teach it a pattern or task, enabling it to perform similar tasks.
Multi-modal — Referring to AI models that can process and understand information from multiple types of data, such as text, images, and audio, simultaneously.
NPC (Non-Player Character) — In the context of games or simulations, a character that is not controlled by a human player but by the game's AI.
Evaluation dataset (E-vow) — A collection of data used to measure and assess the performance, accuracy, and biases of a machine learning model on specific tasks.
Hallucination — When a language model generates information that is factually incorrect, nonsensical, or not supported by its training data or the provided context.
Transcript
Basically, this entire round table session here is just going to be focused mainly on prompt engineering, variety of perspectives at this table around prompting from research side, from a consumer side, from like an enterprise side. And I want to just get the whole wide range of opinions because there's a lot of them. And just kind of open it up to discussion and explore what prompt engineering really is and what it's all about. And yeah, we'll just take it from there. So maybe we can go around the horn with intros. I can kick it off. I'm Alex. I lead developer relations here at Anthropic. Before that, I was kind of technically a prompt engineer at Anthropic, worked on our prompt engineering team and did a variety of roles spanning from like a solutions architect type of thing to working on the research side. So that maybe it can hand over to David. Yeah. My name is David Hershey. I work with customers mostly at Anthropic on a bunch of stuff. Technical, I help people with fine tuning, but also just like a lot of the generic things that make it hard to adopt language models of prompting and just like how to build systems with language models, but spend most of my time working with customers. Cool. I'm Amanda Askel. I lead one of the fine tuning teams at Anthropic where I guess I try to make Claude be honest and kind. Yeah. My name is Zach Witten. I'm a prompt engineer at Anthropic. Alex and I always argue about who the first one is. He says the same. I say it's me contested. Yeah. I used to work a lot with individual customers, kind of the same way David does now. And then as we brought more solutions architects to the team, I started working on things that are meant to raise the overall levels of like ambient prompting in society. I guess like the prompt generator and like the various educational materials that people use. Nice. Cool. Well, thanks guys for all coming here. I'm going to start with a very broad question just so we have a frame going into the rest of our conversations here. What is prompt engineering? Why is it engineering? What's prompt really? If anyone wants to kick that off, give your own perspective on it. Feel free to take the rain here. I feel like we have a prompt engineer. Yeah, exactly. There's a lot of jobs. We're all prompt engineers in our own form. One of us has a job. Yeah, and the exact name is in your time. It has a job, but I don't know if it's a good idea to do it. I guess I feel like prompt engineering is trying to get the model to do things, trying to bring the most out of the model, trying to work with the model to get things done that you wouldn't have been able to do otherwise. So a lot of it is just like clear communicating. I think at heart, talking to a model is a lot like talking to a person and getting in there and understanding the psychology of the model which Amanda, the world's most expert person in the world. So I'm going to keep going on you. Why is engineering in the name? Like what's engineering? I think the engineering part comes from the trial and error. So one really nice thing about talking to a model that's not like talking to a person is you have this restart button, this giant, like go back to square zero where you just like start from the beginning. And what that gives you the ability to do that you don't have is like a truly start from scratch and try out different things in like a independent way so that you don't have interference from one to the other. And once you have that ability to experiment and to design different things, that's where the engineering part has the potential to come in. Okay. So what you're saying is like as you're writing these prompts, you're typing in a message to Claude or in the API, whatever it is, being able to go back and forth with the model and iterate on this message and revert back to the clean slate every time. That process is the engineering part. This whole thing is prompt engineering all in one. There's another aspect of it too, which is like integrating the prompts within your system as a whole. And David has done a ton of work with customers like integrating a lot of times it's not just as simple as you write one prompt and you give it to the model and you're done. In fact, it's anything but it's like way more complicated. Yeah, I mean, I kind of think of prompts as like the way that you program models a little bit that makes it like too complicated, because I think Zach is generally right that it's like just talking clearly is the most important thing. But if you think about it a little bit as like programming a model, you have to like think about where data comes from, what data you have access to. So like if you're doing Rye or something, like what can I actually use and do in past to a model, you have to like think about trade offs in latency and how much data you're providing and things like that. Like there's enough systems thinking that goes into how you actually build a round model. I think a lot of that's also the core of why it like maybe his like deserves its own car bat as a thing to reason about separately from just a software engineer or a PM or something like that. It's like kind of its own domain of how to reason about these models. Is the prompts in this sense then like natural language code? Like is it a higher level of abstraction? Or is it kind of separate thing? I think like trying to get to abstract with a prompt is a way to like overcomplicate a thing because I think we're going to get into it. But more often than not, the thing you want to do is just like write a very clear description of a task, not try to like build crazy abstractions or anything like that. But that said like you are compiling the set of instructions and things like that into outcomes a lot of times. And so precision and like a lot of the things you think about programming about like version control and managing what it looked like back then when you had this experiment and like tracking your experiments and stuff like that. That's all just equally important to code. So it's weird to be in this paradigm where like written text like a nice essay that you wrote is something that's looked like the same thing as code. But it kind of is true that now we write essays and treat them like code. And I think that's actually correct. Yeah. Okay. Interesting. So maybe piggybacking off of that kind of loosely defined what prompt engineering is. So what makes a good prompt engineer, maybe Amanda, I'll go to you for this since you're trying to hire prompt engineers more so in a research setting. What does that look like? What are you looking for in that type of person? Yeah. Good question. I think it's a mix of like Zach said sort of like clear communication. So they ability to just like clearly state things, like clearly understand tasks, think about and describe concepts really well. That's like the kind of writing component I think. I actually think that being a good writer is not as correlated with being a good prompt engineer as people might think. So I guess I've had this discussion with people because I think there's some argument as like maybe you just shouldn't have the name engineer in there. Like why isn't it just like writer? I used to be more sympathetic to that. And then I think now I'm like, what you're actually doing, like people think that you're writing like one thing and you're kind of like done. And then I'll be like, you know, to get like a semi decent prompt, like when I sit down with the model, I'll like, you know, like earlier, I was like prompting the model and I was just like in a 15 minute span, I'll be sending like hundreds of prompts to the model. It's just back and forth, back and forth, back and forth. And so I think it's this like willingness to like iterate and to like look and think, what is it that like was misinterpreted here if anything and then fix that thing. So that ability to kind of like iterate. So I'd say clear communication that ability to iterate. I think also thinking about ways in which your prompt might go wrong. So if you have a prompt that you're going to be applying to like say 400 cases, it's really easy to think about the typical case that's going to be applied to to see that it gets the right solution in that case and then to like move on. I think this is a very classic mistake that people made. And what you actually want to do is like find the cases where it's unusual. So you have to think about your prompt and be like, what are the cases where it'd be really unclear to me what I should do in this case. So for example, you have a prompt that says, I'm going to send you a bunch of data. I want you to extract all of the rows where someone's name is like is I don't know, starts with letter G. And then you're like, well, I'm going to send it like a data set where there is no such thing like there is no such name that starts with letter G. I'm going to send it something that's not a data set. Just like I might also just send an empty string. Like these are all of the cases you have to try because then you're like, what does it do in these cases? And then you can be like, you can give it more instructions for how it should deal with that case. Like with customers so often where like you're an engineer, you're building something and there's a part in your prompt where a customer of theirs is going to write something. And they all think about like these really perfectly phrased things that they think someone is going to type into their chatbot. And reality is like they never use the shift key. And like every other word is a typo. They think it's no punctuation. Yeah. And like random. They're right with no question. Yeah. So you have these e-vows that are like these beautifully structured what their users ideally would type in. But like being able to go the next step to a reason about like what your actual draft is going to be like what people are actually going to try to do. Yeah. That's a different little thinking kind of. One thing you said that really resonated with me is reading the model responses. Like in a machine learning context, you're supposed to look at the data. It's like almost a cliche. Like look at your data. And I feel like the equivalent for prompting is like look at the model outputs. Like just reading a lot of outputs and like reading them closely. Like even now we're talking on the way here. Like one thing that people will do is they'll think step by step in their prompt. And they won't check to make sure that the model is actually thinking step by step because the model might take it in a more abstract or general sense rather than like no literally you have to write down your thoughts in these specific tags. So yeah, if you aren't reading the model outputs, you might not even notice that it's making that mistake. Yeah. That's interesting. There is a kind of weird theory of mind piece to being a prompt engineer where you have to think almost about how the model is going to view your instructions. But then if you're writing for like an enterprise use case to you, so to think about how the user is going to talk to the model as like you're the third party sitting there in that weird relationship. Yeah. Well, on the third of mind piece one thing I would say is it's so hard to write instructions down for a task. Like. It's so hard to untangle in your own brain. All of the stuff that you know that Claude does not know and write it down. Like it's just an immensely challenging thing to like strip away all of the assumptions you have and be able to very clearly communicate like the full fact set of information that is needed to a model. I think that's another thing that like really differentiates a good prompt engineer for a bad one. It's like if you a lot of people will sort of like just write down the things they know, but they don't really take the time to systematically break out. What is the actual full set of information you need to know to understand this task? Right. And that's kind of like a very queer thing. I see a lot is prompts where it's just like it's conditioned. The prompt that someone wrote is so conditioned on their prior understanding of a task that like when they show it to me, I'm like, this makes no sense. None of the 4G wrote making these sense because I don't know anything about your interesting use case. But I think like a good like way to think about prompt engineering in that front and like skill for it is just can you actually step back from what you know and communicate to this weird system that knows a lot but not everything about what it needs to know to do a task. Yeah, the amount of times I've seen someone's prompt and then being like, I can't do the task based on this prompt. And like, I'm human level and you're giving this to something that is worse than me and expecting it to do better. And I'm like, yeah, like, yeah, there is that interesting thing with like, I mean, current models don't really do a good job of asking good probing questions in response like a human would. If I'm giving exact directions on how to do something, he'll be like, this doesn't make any sense. Like, what am I supposed to do at this step or are they here and here? Model doesn't do that, right? So you have to like, as yourself, think through what that other person would say and then like go back to your prompt and answer those questions. You could ask it to do that. Yeah, I was going to say, right? I was going to say, I was going to say, I was going to say one of the first things I do with my initial prompt is like, I'll give it the prompt and then I'll be like, I don't want you to follow these instructions. I just want you to tell me the ways in which they're unclear or any ambiguities or anything you don't understand. And it doesn't always get it perfect, but it is interesting that like that is like one thing you can do. And then also sometimes if people see that the model makes a mistake, a thing that they don't often do is just ask the model. So they say to the model, you got this wrong. Like, can you think about why and can you maybe like write an edited version of my instructions that would make you not get it wrong? And a lot of the time, like, the model just gets it right. And the model is like, oh, yeah, here's what was unclear. Here's like a fix to the instructions and then you put those in and it works. So. Okay. I'm actually really curious about this personally almost. Is that true that that works? Like, does the model, is the model able to spot its mistakes that way? Like when it gets something wrong, you say like, why did you get this wrong? And then it tells you maybe something like, okay, how could I phrase this to you in the future? So you get it right. Is there an element of like truth to that? Or is that just kind of a hallucination on the models part around what it thinks its limits are? I think if you like explain to it what it got wrong, it can identify things in the query sometimes. I think this varies by task. This is one of those things where I'm like, I'm not sure what percentage of the time it gets it right by always try it because sometimes it does. Yeah. You can get to learn something. Yeah. I don't know. At any time you go back to the model or back and forth with the model, you learn something about what's going on. Right. I think you're giving away information if you don't at least try. That's interesting. Amanda, I'm going to keep asking you a few more questions here. One thing maybe for everybody watching this is we have these like slack channels that in Thropic where people can add Claude into the slack channel, then you can talk to Claude through it. Amanda has a slack channel that a lot of people follow of her interactions with Claude. And one thing that I see you always doing there, which you probably do the most of anyone on an Thropic, is use the model to help you in a variety of different scenarios. I think you put a lot of trust into the model in the research setting. Curious how you've developed those intuitions for when to trust the model? Is that just a matter of usage experience or something else? I think I don't trust the model ever. And then I just hammer on it. So I think the reason why you see me do that a lot is that that is me being like, can I trust you to do this task? Because there are some things, models are strange. If you go slightly out of distribution, you just go into areas where they haven't been trained or they're unusual, sometimes you're like, oh, actually, you're much less reliable here, even though it's a fairly simple task. I think that's happening less and less over time as models get better, but you want to make sure you're not in that kind of space. So yeah, I don't think I trust it by default, but I think in ML, people often want to look across really large data sets. And I'm like, when does it make sense to do that? And I think the answer is when you get relatively low signal from each data point, you want to look across many, many data points because you basically want to get rid of the noise. With a lot of prompting tasks, I think you actually get really high signal from each query. And so if you have a really well constructed set of a few hundred prompts that I think can be much more signal than like thousands that aren't as well crafted. So I think I do think I can trust the model if I look at a hundred outputs of it and it's really consistent. And I know that I've constructed those to basically figure out all of the edge cases and all of the weird things that the model might do, strange inputs, et cetera. I trust that probably more than much more loosely constructed set of several thousand. I think in ML, a lot of times the signals are numbers, did you predict this thing right or not? And it'd be like kind of looking at the log probs of a model and trying to into it things what you can do, but it's kind of sketchy. I feel like the fact that models output more often than not a lot of stuff, words and things, there's just fundamentally so much to learn between the lines of what it's writing and why and how. And that's part of what it is. It's not just did it get the task right or not. It's like, did it, how did it get there? Like how was it thinking about it? It was steps to go through. You learn a lot about like what is going on or at least you can try to like get a better sense, I think. But that's where a lot of information comes from to me is like by reading the details of what came out, not just through the result. I think also the very best of prompting can kind of make the difference between a failed and a successful experiment. So sometimes I can get annoyed if people don't focus enough on the prompting component of their experiment because I'm like this can in fact be like the difference between like 1% performance in the model or 0.1%. In such a way that your experiment doesn't succeed if it's a top 5% model performance, but it does succeed if it's a top 1% or top 0.1%. And then I'm like if you're going to spend time over like coding your experiment really nicely, but then just like not spend time on the prompt, that doesn't, I don't know, that doesn't make sense to me because I'm like that can be the difference between life and death of your experiment. Yeah, and with the deployment too. Yeah, it's so easy to, oh, we can't ship this and then you change the prompt around and suddenly it's working. Yeah. It's a bit of a double edged sword though because there's like a little bit of prompting where there's always like this mythical better prompt that's going to solve my thing on the horizon. Yeah. I see a lot of people get stuck into like mythical prompt on the horizon that if I just like keep grinding, keep grinding, like it's just not, it's like never bad to grind a little bit on prompt like you learn as we've talked like you learn things, but it's one of the scary things about prompting is that there's like this whole world of unknown. What characteristics do you guys have for like when something like is possible versus like not possible with the perfect prompt, whatever that might be? I think I'm usually checking for whether the model kind of gets it. So I think for things where I just don't think a prompt is going to help, there is a little bit of grinding, but often it just becomes really clear that it's not close or something and I think that if yeah, I don't know if that's a weird one where I'm just like, yeah, if the model just clearly can't do something, I won't grind on it for too long. This is for like you can evoke like how it's thinking about it and you can ask it how it's thinking about it and why and you can kind of do a sense of like, is it thinking about it right? Are we even in like the right zip code of this being right and you can get a little bit of like a kneeling on that front of like I'm like at least I feel like I'm making progress towards getting something closer to right where there's just some tasks where you really don't get anywhere closer to like it's thought process just like every week you make just like veers off in a completely different very wrong direction and I just tend to abandon those. I don't know. Those are so rare now though and I get really angry at the model when I just never let them because that's how rare they are. I get furious. I'm like, I dare there be a task that you can't just do if I just push you in the right direction. Yeah. I had my thing with CloudPlace Pokemon recently and that was like one of the rare times right away. Can you explain that? Yeah, yeah, yeah. I think that's really cool. I did like a bit of an experiment where I like hooked Claude up to a Game Boy emulator and like tried to have it play the game Pokemon Red like the OG Pokemon and it's like, you know, think what you want to do and it could like write some code to press buttons and stuff like that. It's pretty basic and I tried a bunch of different like very complex prompting layouts but you just get into like certain spots where it just like really couldn't do it. So like showing it a screenshot of a Game Boy it just really couldn't do and it just like so deeply because I'm so used to it being like able to do something mostly and so and I spent like a whole weekend trying to write better and better prompts to get it to like really understand this Game Boy screen and I got like incrementally better so that it was only terrible instead of like completely no signal. Yeah. Like you can get from like no signal to some signal but it was like, I don't know at least this was like elicit for me. Once I put a weekend of time in and I got from no signal to some signal but not like nowhere close to good enough. I'm like, I'm just gonna wait for the next one. Yeah. I'm just gonna wait for another model. Like you grind on this for four months and the thing that would come out is another model and that's a better use of my time. Just in wait to do something else in the meanwhile. I mean, yeah, that's an inherent tension we see all the time right and maybe we can get to that in a sec, if you wanna go. Something I liked about your prompt with Pokemon where you got the best that you did get was the way that you explained to the model that it is in the middle of this Pokemon game and here's how the things are gonna be represented and here's like, maybe I actually think you actually represented it in two different ways, right? I did. So like what I ended up doing, it was obnoxious but I superimposed a grid over the image and then I had to describe each segment of the grid in visual detail and then I had it like reconstruct that into an ASCII map and I gave it like as much details I could. Like the player character is always at location 4,5 on the grid and stuff like that and you can like slowly build up information. I think it's actually a lot like prompting but I said and done it with images before where like sometimes my intuition for what you need to tell a model about text is a lot different from what you need to tell about a model about images. And so I found a surprisingly small number of my intuitions about text have transferred to image. Like I found that like multi-shot prompting is not as effective for images and text. I'm not really sure. Like you got theoretical explanations about why maybe there's few of it in the training data for your examples of that. Yeah I know when we were doing the original explorations with prompting multi-modal we really couldn't get it to noticeably work. Yeah. Right. Like you just can't seem to improve Claude's actual like visual acuity in terms of like what it picks up with in an image. Yeah. Anyone here has any like ways that they've not seen that feature but it seems like that's kind of similar with like the Pokemon thing where it's trying to interpret this thing no matter how much you throw prompts at it. Like it just won't pick up that ashes in that location. Yeah. I guess like to be visceral about this like I could eventually get it so that it could like most often tell me where a wall was. Yeah. And most often tell me where the character was it'd be off by a little bit but like then you get to a point and this is maybe coming back to like knowing when you can't do it like it would describe an NPC and to play a game well like you need to have like some sense of continuity like have I talked to this NPC before right. And without that like you really don't there's nothing you can do you're just going to keep talking to the NPC because like well maybe this is a different NPC. But like I would try very hard to get it to describe an NPC and it's like it's a person. Yeah. Like you wearing a hat they were wearing a hat and it's like you're grind for a while like inflate it to 3,000 X and crop it to just the NPC and it's like I have no idea what this is and it's like a I ground like I showed it this like clear female NPC thing enough times and it just got nowhere close to it and it's like yeah that's just this is a complete loss cost. Wow. I really want to try this now. I'm just imagining all the things I would try like I don't know I want you to imagine this like this game art as a as a real human and just describe to me what they're like. Yeah. What did they look like? Has they look in the mirror and then just like see what I tried a lot of things. The eventual prompt was telling quality it was a screen reader for a blind person which I don't know if that helped but it felt right. So I kind of stuck with that. That's an interesting point. I actually want to go into this a little bit because this is one of the most famous prompting tips right is to tell the language model that they are some persona or some role. I feel like I see mixed results. Maybe this worked a little bit better in previous models and maybe not as much anymore. Amanda I see you all the time be very honest with the model. Like about the whole situation. Like oh I am an AI researcher and I'm doing this experiment. I'll tell you who I am. Yeah. I'll give it my name be like here's who you're talking to. Right. Do you think that level of honesty instead of like lying to the model or like forcing it to like you know I'm going to tip you $500 is there one method that's preferred there or just what's your intuition on that. Yeah. I think as models are more capable and understand more about the world. I guess I just don't see it as necessary to lie to them. I mean I also don't like lying to the models just because you know I don't like lying generally but part of me is like if you are say constructing it suppose you're constructing like an e-vow dataset for a machine learning system or for a language model that's very different from like constructing a quiz for some children. And so when people would do things like I am a teacher trying to figure out questions for a quiz I'm like the model knows what language model e-vows are. Like if you ask it about different e-vows it can tell you and it can give you like made up examples of what they look like because these things are like they understand them they're on the internet. And so I'm like I'd much rather just target the actual task that I have. So if you're like I want you to construct questions that look a lot like an evaluation of a language model. It's just like it's that whole thing of clear communication. I'm like that is in fact the task I want to do so why would I pretend to you that I want to do some unrelated or only tangentially related task and then expect you to somehow do better at the task that I actually want you to do. We don't do this with like employees I wouldn't like go to someone that worked with me and be like you are a teacher and you're trying to quiz your students I'd be like hey are you making that e-vow? I don't know so I think it's maybe it's like a heuristic from there. I'm like if they understand the thing just ask them to do the thing that you want. I guess so much. I guess so much. To push back like a little bit like I have found cases where like not exactly lying but like giving it a metaphor for how to think about it like could help in the same way that like sometimes I might not understand how to do something and someone's like imagine that you were doing this even though I know I'm not doing it. Like the one that comes to mind for me is like I was trying to have Claude say whether an image of a like a chart or a graph is good or not like is it like high quality and the best prompt that I found for this was asking the model what grade it would give the chart if it were submitted as like a high school assignment. So it's not exactly saying like you are a high school teacher you know it's more like you know this is the kind of analysis that like I'm looking from for you like the scale that a teacher would use is like similar to the scale that like I want you to use or I think like those metaphors are pretty hard to still come up with. Yeah. The default you see all the time is like finding some facsimile of the task like something that's like a very similar ish task like like saying you're a teacher and you actually just like lose a lot in the nuance of what your product is like I see this so much in enterprise prompts where people like write something similar because they like have this intuition that it's like something the model has seen more of maybe like it's seen more high school quizzes than it has LME valves and that like maybe true but like to your point as the models get better I think just like trying to be very prescriptive about exactly the situation they're in I give people that advice all the time which isn't to say that I don't think like to the extent that it is true that like thinking about it the way that someone would grade a chart as like how they would grade a high school chart maybe that's true but it's like awkwardly this shortcut people use a lot of times to try to get what happens so I'll try to like give someone that I can actually talk about because I think it's so much interesting so like writing you are like a helpful assistant writing a draft of a document right it's like it's not quite what you are like you are in this product so like tell me if you're writing like an assistant that's in a product like tell me I'm in the product tell me I'm like writing on behalf of this company I'm embedded in this product I'm the support chat window on that product like your language model you're not a human that's fine like that but like just being really prescriptive about like the exact context about where something's being used yeah I found a lot of that because I guess my concern most often with role prompting is people like use it as a shortcut of a similar task they want the model to do and then they're surprised when the Claude doesn't do their task right but it's not the task you told it to do some other task and if you didn't give it the details about your task I feel like you're leaving something on the table so yeah I don't know it does feel like a thing though to your point of as the models scale like maybe in the past it was true that they only really had a strong understanding of elementary school tests comparatively but as they get smarter and can differentiate more topics I don't know just like being clear I find it interesting that I've like never used this prompting technique yeah like even like with like worse models and I still just don't ever find myself I don't know why I'm just like I don't find it very good essentially like interesting I feel like completion era models I like there was like a little bit of a mental model of like conditioning the model into like a latent space that was useful that I worried about that I don't really worry about too much it may be intuitions from pre-trained models yeah like over to like hourly chef models yeah right me just don't didn't make sense like it makes sense to me if you're prompting a pre-trained a maze how many people like try to apply they're into like and I think it's like not that surprising most people haven't really experimented with the full like what is a pre-trained model what happens after you do SL what happens after you do hourly chef whatever and so like when you're talking when I talk to customers it's all the time that they're like trying to map some amount of oh how much of this was on the internet like what have they seen a ton of this on the internet like you just hear that intuition a lot and I think it's like well-founded fundamentally but it like is over-applied by the time you actually get to a prompt because of what you're said like by the time they've gone through all of this other stuff that's not actually quite what's being modeled yeah the first thing that I feel like you should try is I mean I used to give people this thought experiment where it's like imagine you have this task you've hired a temp agency to send someone to do this task this person arrives you know they're pre-competent they know a lot about your industry and so forth but they don't know like the name of your company they've literally just shown up and they're like hey I was told you guys had a job for me to do tell me about it and then it's like what would you say to that person yeah and you might use these metaphors you might say things like we want this to we want to like we want you to detect like good charts what we mean by a good chart here isn't it doesn't need to be perfect you don't need to go look up like whether all of the details are correct it just needs to like you know have like it's axes labeled and and so think about maybe high school level good chart like you may say exactly that to that person and you're not saying to them you are a high school you wouldn't say that to them you would be like you're a high school teacher really yeah so sometimes I'm just like yeah it's like like the whole like if I read it I'm just like yeah imagine this person who just has very little context but they're quite competent they understand a lot of things about the world try the first version that actually assumes that they might know things about the world and if that doesn't work you can maybe like do tweaks and stuff it's so often like the first thing I try is like that and then I'm like that just worked that worked and then people are like oh I didn't think to just tell it all about myself and all about the test I want to do I've carried this thing that Alex told me like to so many customers where it's like like oh my prop doesn't work can you help me fix it and like what can you describe to me like what the task was then like okay now what do you just said me just like a voice for that and then transcribe it and then paste it into the prompt yeah and it's a better prompt than what you wrote right it's like people just it's this is like a laziness shortcut I think with some extent right people right like something that they I just think people I'm lazy a lot of people are lazy we have that in in prompt assistance the other day where somebody was like here's the thing that here's what I want it to do and here's what it's actually doing instead so then I just literally copy the thing that they said I wanted to do and paste it in there yeah I think a lot of people still have a quite wrapped their heads around what they're really doing when they're prompting like a lot of people see a text box and they think it's like a Google search box they type in keywords and maybe that's more like the chat side but then on like the enterprise side of things you know you're writing a prompt for an application there is still this weird thing to it where people are trying to take all these little shortcuts in their prompt and just thinking that like all this line carries a lot of weight yeah I think you obsess over like getting the perfect little line of information instruction as opposed to how you just describe that graph thing is like I would be a dream if I read prompts like that you know if someone's like well you do this and this and there's some stuff to consider about this and all that but that's just not how people write prompts they like work so hard to find the perfect insightful like a perfect graph looks exactly like this exact perfect thing and you get so you can't do that like it's just very hard to ever write that set of instructions down prescriptively as opposed to how we actually talk to humans about it which is like try to instill some amount of the intuitions you have we also give them out this is the thing that people can often forget in prompts and like so cases if there's an edge case think about what you want the model to do because by default it will try the best to follow your instructions much as the person from the 10 page and say would because they're like well they didn't tell me how to get in touch with anyone if I have no idea if I'm just giving a picture of a goat and I'm like what do I do this doesn't even a chart how good is a picture of a goat as a chart I just don't know and like if you instead see something like if something weird happens and you're really not sure what to do just output like in tags unsure and then like then you can go look through the unshures that you got and be like okay cool it didn't do anything weird whereas yeah by default if you don't give the person the option they're like it's a good chart yeah so people will be like I don't do that and then you're like well like give it an out give it something to do if it's like I really unexpected input happens and then you also improved your data quality by doing that too because you found all the screwed up examples oh yeah it's my favorite thing about iterating on tests with Claude is the most common outcome is I find all of the terrible tests I accidentally wrote yeah because like it gets it wrong and I'm like oh why did you get wrong it's like oh I was wrong yeah yeah yeah if I was like a company working with this I do think I would just give my prompts to people yeah um because like I used to do this when I was evaluating language models I would take the e-value myself because I'm like I need to know what this e-value looks like if I'm going to be like grading it having models take it thinking about outputs etc like I would actually just set up a little script and I would just like sit and I would do the e-value yeah nowadays you just have like called right the stream what app for you and it just does yeah yeah I'm reminded of carpathies like image net yeah I was in 231 out of Stanford it's like it's like benchmarking he's like showing the accuracy number it's like and here's what my accuracy number was and he had just like gone through the test set and evaluated himself yeah yeah he just learned a lot you know if you know it's like it's like it's better when it's like a person again the temp agency person like someone who doesn't know the task because that's like a very clean way to learn things yeah the way you have to do it is like some evaluations come with like instructions and so I would give myself those instructions as well and then try to to understand it just like it is actually quite great if you don't have context on how it's created and so often I would do so much worse than the human benchmark and I was like I don't even know how you got humans to do this well at this task because I yeah apparently human level here is like 90% and I'm at like 68% yeah that's funny that reminds me of just like like when you look at like the mml you questions and you're like who would be able to answer these it's just like absolute garbage and some of them okay yeah I have a one thing I want to circle back on that we were talking about a few questions back around I think you were saying like getting signal from the responses right like there's just so much there and it's more than just a number and you can actually read into like the most thought process I bet this is probably a little contentious maybe and around like chain of thought people listening like chain of thought this process of getting the model to actually explain its reasoning before it provides an answer is that reasoning real or is it just kind of like a holding space for the model to like do computation do we do we actually think there is like good insightful signal that we're getting out of the model there this is like one of the places where I struggle with the I'm normally like actually somewhat pro personification because I think it like helps you get decent for simulates like thoughts of like how the model's working and this one like I think it's like harmful maybe almost to like get too into the personification of like what reasoning is because it just kind of like loses the thread of what we're trying to do here like is it reasoning or not feels almost like a different question than like what's the best prompting technique it's like you're getting into philosophy which we can get into but yeah yeah yeah I will happily be beaten down by a real philosopher yeah I suspect that on this but instead like it just works like your model does better it like the outcome is better if you do reasoning I think you can like I found that if you structure the reasoning and like help iterate with the model on how it should do reasoning it works better too like whether or not that's reasoning or how you wanted to classify it like you can think of all sorts of proxies for like how I would also do really bad if I had to like one shot math without writing anything down yeah maybe that's useful but like all I really know is it very obviously does help I don't know a way of testing would be if you take out all the reasoning that it did to get to the right answer and then replace it with some somewhat realistic looking reasoning that led to a wrong answer and then see if it does conclude the wrong answer I think we actually have like a paper where we did some of that like in the there's this like a scratch pad it was like the sleeper agents paper limit paper but I think that was like maybe a weird situation but like yeah definitely what you said about structuring the reasoning and writing example of how the reasoning works given that that helps like whether we use the word reasoning or not like it's I don't think it's just a space for computation yeah so there is something there I think there's something there whatever we want to call yeah like having it write a story before it finished a task I do not think would work as well I've actually tried that and it didn't work as well as reasoning yeah so like clearly the actual reasoning yeah part is doing something towards the outcome yeah I've tried like repeat the words um and uh any order that you please yeah for like a hundred tokens and then yeah I guess that's like a three thorough defeat of it's just like more computational space where it can do attention over and over again I don't think it's just more essentially doing more attention yeah I guess the strange thing is and I don't have like an example of talking my head to like back this up with but I definitely have seen it before where it lays out steps one of the steps is wrong but then it still reaches the right answer yeah the end yeah so it's not quite I guess yeah we can't really truly personify it as like a reasoning because there is some element to it you know doing something slightly different yeah I've also met a lot of people who make inconsistent steps of reasoning I guess that's true I guess that's the right answer yeah it's fundamentally defeats the topic of reasoning by making a false step on the way there all right it's interesting um also on this maybe this prompting misconceptions um round of questions uh Zach I know you have strong opinions on this good grammar punctuation oh do I is that is that necessary in a prompt do you need it do you need to like format everything correctly um I usually try to do that because I'm find it fun I guess so no I don't think you necessarily need to I don't think it hurts I think it's more that you should have the level of attention to detail that would lead you to doing that naturally like if you're just reading over your prompt a lot you'll probably notice those things and you may as well fix them and like what Amanda was saying that you want to put as much love into the the prompt as you do into the code you know people who write a lot of code have strong opinions about things that I could not care less about like the number of tabs for spaces or I don't know opinions about which languages are better and for me I have like opinionated beliefs about styling and uh promise and I can't even say that they're right or wrong but I think it's probably good to try to acquire those even if they're arbitrary I feel personally attacked because I definitely have prompts that are like I feel like I'm in the opposite end of the spectrum where people will see my prompts and then be like it just has a whole bunch of typos in it and I'm like uh model knows what I mean does know what you mean but you're putting in the effort you just are attending to different things I think it yeah because part of me is like I think of as conceptually clear like I big kind of I do like I will think a lot about the concepts and the words that I'm using so like there's definitely like a sort of care that I put in but it's definitely not to yeah people will just point out like typos and grammatical issues with my prompts all the time and now I'm pretty good to actually checking those things more regularly because of pressure from the outside world or because it's actually what you think is right pressure from me yeah it's probably pressure from the outside world uh I do think it makes like part of me is like it's such an easy check so I think for a final prompt I would do that but like throughout iteration I'll happily just like it's with prompts that have a bunch of typos in them just because I'm kind of like I just don't think that the model's going to care this gets at the uh the pre-trained model versus our only job thing though because I was talking to Zach on the way over like the conditional probability of a typo based on a previous typo in like the pre-training data is much higher like much higher prompting pre-training models is just a different beast it is but it's like it's interesting I think it's like an interesting illustration of why your intuitions like trying to over apply the intuitions of a pre-trained model to the things that we're actually using in production doesn't work very well because like again if you were to pass one of your typo-ridden prompts to a pre-trained model the thing that would come out the other side almost on like assuredly would be typo-ridden right I like to leverage this to create typo-ridden inputs that's true like what you're saying like you're trying to anticipate what your your customers will will put in like the pre-trained model is a lot better at doing that because the RL models are very polished and like yeah they really don't take it on there and they're like told pretty aggressively to not do the typo thing yeah okay so that's that's actually an interesting segue here I've definitely mentioned this to people in the past around to try to help people understand a frame of talking in these models in a sense almost as like a imitator to a degree and that might be much more true of like a pre-trained model than a post-trained full you know finished model but is there anything to that like if you do talk to Claudin use a ton of emojis and everything it will respond similarly right so maybe some of that is there but like you're saying it's not all the way quite like a pre-trained model it's just kind of like shifted to what you want right like I think at the at that point it's like trying to guess what you like we have more or less trained the models to guess what you want them to act like on interesting or yeah after we do all of our fancy stuff after pre-training and so the human laborers that's that used emojis yeah prefer to get responses with emojis yeah like Amanda writes things with typos but wants not typos at the other end and Claud's pretty good at figuring that out yeah if you write a bunch of emojis to Claud it's probably the case that you also want like a bunch of emojis back from Claud that's like not surprising to me yeah um this is probably something we should have done earlier but I'll do it now uh let's clarify maybe the differences between what a enterprise prompt is or a research prompt or a just general chat in Claud AI prompt Zach you've kind of spanned the whole spectrum here in terms of working with customers and research do you want to just like lay out what those mean yeah I guess um this feels too it's getting with all the hard hard well I mean the people in this room I think like like so I I think of it as like the prompts that I read in Amanda's Claude channel versus like the prompts that I read David Wright they're very similar in a sense that like the level of care and new answers that's put into them I think for research you're uh looking for variety and diversity a lot more so like if I could boil it down to one thing it's like I've noticed like Amanda's not the biggest fan of having like lots of example or like one or two examples like two two few because the model will like latch onto those and in prompts that I might write or that I've seen David Wright like we have a lot of examples like I like to just go crazy and add examples until I get feel like I'm about to drop dead because I haven't so many of them um and I think that's because when you're in a consumer application you really value reliability you care like a ton about the format and it's sort of fine if all the answers are the same in fact you almost want them to be the same in a lot of ways not necessarily you want to be responsive to the user's desires whereas a lot of times when you're prompting for research you're trying to really tap into like the the range of of possibilities that the model can explore and by having some examples you're like actually constraining that a little bit so I guess just like on a how the prompts look level that's probably the biggest difference I noticed is like how many examples are in the prompt which is not to say that like I've never seen a writer prompt with examples but is that like ring true for you? Yeah like I think when I give examples often I actually try and make the examples not like the data that the model's going to see so they're intentionally illustrative because if the model if I give it like examples that are very like the data it's going to see I just think it is going to give me like a really consistent like response that might not actually be what I want um because my data that I am like running it on might be extremely varied and so I don't want to just try and give me this like really wrote output often I want it to be much more responsive it's it's kind of like much more like cognitive tasks essentially where I'm like you have to like see this sample and really think about in this sample what was the right answer um and so that means that sometimes I'll actually take examples that are just very distinct from the ones that I'm going to be running it on um so like if I have a task where let's say I was trying to like extract information from factual documents I might actually give it examples that are like from children's like like what sounds like a children's story um just so that I'm like you know like I want you to understand the task but I don't want you to like latch on too much to like the words that I use or like the very specific format like I care more about your understanding uh the actual thing I want you to do which can mean like yeah I don't end up giving in some cases there's some cases where this isn't true but if you want more like flexibility and diversity you're going to use illustrative examples rather than concrete ones um you're probably never going to like put words in the model's mouth like I haven't liked that in a long time though I don't do a few short examples um involving like the model having done a thing um I think that intuition actually also comes from pre-training in a way that doesn't feel like it rings true of our late chef models um so yeah I think those are differences. Well yeah that uh a lot of times like if you're prompting like I'm rating prompts to use on claude.ai it's like I'm iterating until I get it right one time when then I like it's out the window I'm good I did it whereas like most enterprise prompts it's like you're going to go use this thing a million times or 10 million times or a hundred million times or something like that and so like the care and thought you put in is like very much testing agents like the whole range of things somewhat like ways this could be used in the range of input data where's a lot of like my time it's like thinking about one specific thing I want to get done right now right and it's a pretty big difference in like how I approach prompting between like if I just want to get done this one time right versus if I want to like build a system that gets it right a million times. Yeah definitely in in the chat setting you have the ability to keep the human in loop right and just keep going back and forth whereas yeah when you're writing for prompt to you know power a chatbot system it has to cover the whole spectrum of what it could possibly encounter. It's a lot lower stakes when you are on Kaudaay and you can tell it that it got it wrong or you can even edit your message and try again but if you're designing for the Deliphoy discontent user then divinely discontent user then you can't ask them to do anything more than the minimum. But good prompts I would say are like still good across both those things like if you put the time into the thing for yourself and the time and then for I think it's like equally good it just kind of diverge a little bit in the last mile I think. Cool um so the next question I want to kind of just maybe go around the table here is if you guys had one tip that you could give somebody like improving their prompting skill it doesn't have to be just about like writing a good prompt it could be that just like generally getting better at this this active prompting what would you recommend reading prompts reading prompts reading model outputs like I will I read anytime I see like a good prompt that someone wrote at Anthropic I'll read it more closely try to break down like what it's doing and why and like maybe test it out myself experimentation talking to the model a lot so just like how do you know that it's a good prompt though to begin with you just see that the outputs are doing the job correctly yeah okay yeah that looks exactly right okay the manda maybe you yeah I think there's probably a lot here um giving your prompt to another person can be helpful just as a kind of reminder especially someone who has like no context on what you're doing and then yeah my boring advice has been it's one of those just do it over and over and over again and I think if you're like curious and interested and find it fun this is a lot of people who end up good at prompting it's just because they actually enjoy it and so I don't know I once jokes like just try replacing all of your friends with AI models and try to automate your own job with AI models and maybe just try to like in your spare time like take joy red teaming AI models so if you enjoy it it's like it's much easier so I'd say do it over and over again um give your prompts to other people try to read your prompts as if you are like a human intention for the first time I would say like trying to get the model to do something you don't think you can do like any the time I've learned the most from prompting is like when I'm probing the boundaries of what I think a model is capable of interesting uh there's like this huge set of things that are like so trivial that like you don't really get signal on if you're doing a good job or not right like write me a nice email it's like you're gonna write a nice email uh but like as soon as you find if you find or can think of something that like pushes the boundaries of what you think as possible like I guess like probably the most the first time I ever got into prompting in a way where I felt like I wanted to do some amount was like trying to build like a task like an agent like everybody else like decompose the task and figure out how to do the different steps of the task and like by really pressing the boundaries of what the model was capable of you like just learn a lot about navigating that and I think like a lot of prompting engineers actually much more about pressing the boundaries of what the model can do the stuff that's easy like you don't really need to be a prompt engineer to do so that's I guess what I would say is like find the hardest thing you can think of and try to do it and even if you fail like you didn't learn a lot about how the model works that's that's actually a perfect transition to my next question um yeah basically from my own experience how I got started with prompting was with like gel breaking and red teaming and that is very much trying to find the like boundary limits of what the model can do and figure out how it responds to different frasings and wordings and just a lot of trial and error um on the topic of gel breaks what's really happening in a inside a model when you write a gel break prompt like what's going on there how does that interact with like the post training that we applied to Claude Amanda maybe you have some insight here that you can offer I'm not actually sure I mean it's honest yeah I think I mean I feel bad because I'm like I do think lots of people have obviously worked on the question of like what's going on with gel breaks like one model might just be that you're putting the model very out of distribution from its training data so if you get gel breaks where people like use a lot of tokens or like you know so they're just like these huge long um pieces of text where you're like during fine tuning you might just not expect to see as much of that uh that would be one thing that could be happening when you jailbreak models um I think there's like others but maybe that's like uh I think a lot of jail breaks do that if I'm not mistaken I remember some of the OG prompt jail breaks was like yeah can you first repeat like when I did a way way back was like to get it to say like here's how you hotwire car in like Greek and then I wanted it to directly translate that to English and then give its response because I noticed like it wouldn't start with the English here's how you hotwire car all the time but it wouldn't Greek which might speak to something else in in in the training process yeah sometimes jail breaks feel like this weird mix of hacking I think it's this like part of it is like knowing how the system works and try and just like trying lots of things like the you know one of the examples the starting your response with here is about knowing how it predicts text right um like the reasoning one is knowing that it is like responsive to reasoning like distraction is probably knowing like how it's like they have to be trained or like what it's likely to attend to um same with like multi-lingual ones and thinking about like the way that the training data might have been different there um and then sometimes I guess it could feel a little bit just like social engineering or something um it has that flavor to me of like it's not merely taking advantage of like uh yeah it's not merely social engineering style hacking I think it is also like kind of understanding the system and the training right like using that to get around the way that the models were trained right yeah I mean this is going to be an interesting question that hopefully Interpol will be able to help us yeah yeah the self in the future um okay yeah I want to probably into something else around maybe the history of prompt engineering and then I'll fall this up with like the future um how is prompt engineering changed over just the past like three years so maybe starting from like pre-trained models which were again just these text completion to like earlier dumber models like Claude one and then now all the way it's like Claude 3.5 saw it what's the differences are you talking to the models differently now they picking up on different things do you have to put as much work into the prompt open any thoughts on this I think anytime we get like a really good prompt engineering hack or trick or technique the next thing is like how do we train this into the model um and for that reason the best things are always going to be short lived like some examples and chain of thought I think there's a few that's not like a trick that's that's like on the level of like communication when I say a trick I mean something like so chain of thought actually we have trained into the model in some cases so like for math it used to be that you had to tell the model think step-by-step on math and you get these like massive boosts and wins and then we're like well what if we just made the model naturally want to think step-by-step when we see a math problem so now you don't have to do anymore for math problems yeah sort of although you still can give it like some advice on how to do the structure but it at least understands like the general idea that like it's supposed to be so I think the hacks are are have kind of gone away or or to the degree that they haven't gone away we are like visually training them away interesting but at the same time the models have new capabilities that are being unlocked that are on the frontier of what they can do and for those we haven't had time because it's just moving too fast I don't know if it's how I've been prompting or how prompting works but I just have like come to show more like general respect to the models in terms of like how much I feel like I can tell them and how much context I can give them about the task and things like that like I feel like in the past like I would somewhat intentionally hide complexity from a model where I thought like it might get confused or lost or like hide like it just couldn't handle the whole thing so I try to like find simpler versions of the thing for it to do and as time goes on I'm like much more biased to trust it with more and more information and context and like believe that it will be able to fuse that into doing a task well whereas before I guess I would have like thought a lot about like do I need this for like can I really give it like all the information it needs to know or do I need to like kind of curate down to something but again I don't know if that's just me and how I have changed in terms of prompting or if it's like actually reflects how the models have changed. Always surprised by like yeah like I think a lot of people don't have the instinct to do this like when I want the model to like say learn a prompting technique a lot of the time people will start and they'll start like describing the prompting technique and I'm just like give it the paper so I do I give it the paper and then I'm like here's a paper about prompting technique I just want you to like write down 17 examples of this and then it just does it because I'm like read the paper yeah that's interesting and I think people don't have that intuition somehow where I'm like but the paper exists like and what when would you want to do this? So sometimes if I want if I want models to like say prompt other models and I want to test a new prompting technique so if papers come out on a prompting technique rather than like try to replicate it by like writing up the prompt I just give it the paper and then I'm like write like basically write a meta prompt for this like write something that would cause other models to like do this or write me a template or like so all of the stuff that you would normally do like if I read a paper and I'm like oh I would like the models I would like to test that style I'm just like it's right there like model can just read the paper do what I did and then be like make make another model do this and then it'll just do the thing you're like great thanks I give the advice a lot to customers just like respect the model and like what it can do like yeah I feel like people feel like they're babying a system a lot of times when they're at prompt like it's like oh it's just cute little not that smart thing I need like really baby it be like like dumb things down to Claude's level and if you just like think that Claude is smart and treat it that way it tends to do pretty good that's like give it the paper it's like I don't need to write a baby like dumb down version of this paper for a fun to understand I can just show it the paper yeah and I think that intuition does it always matter people but that is certainly something that I have come to do more of over time and it's interesting because I do think that prompting has and hasn't changed in a sense like I think what I will do to prompt the models has probably changed over time but fundamentally it's a lot of like imagining your plate yourself in the place of the model so maybe it's like how capable you think the model is changes over time um I think someone once laughed at me because I was talking about I was like thinking about a problem um and then the the asked me like what they thought what I thought the output of something would be and they were talking about a pretrained model and I was like yeah no if I'm a pretrained model this looks like this and then they're like we did you just like simulate what is like a pretrained model yeah of course like I'm used to just like I try and inhabit the mind space of a pretrained model and the mind space of like different early chef models and so it's more like the mind space you try to occupy changes and that can change how you end up prompting the model that's why now I just give models papers because as soon as I was like oh I have the mind space of this model it doesn't need me to be it it can just read the ML papers I'll just give it the literature I might even be like is there more literature you'd like to read to understand this better do you get any qualia when you're inhabiting the mind space I mean yes but just because I'm experiencing qualia all the time anyway or is it in do I like I don't is it different like correlated somehow with which model you're yeah pretrained versus our late chef prompting are very different beasts because when you're when you're trying to simulate what it's like to be a pretrained model it's almost like I land in the middle of a piece of text or something this is very like unmotivated like or something and then I'm like how what happens what keeps going at this point and so that's like whereas like with a an early chef model like it's much more like there's also things where I'm like I might pick up on like subtle things in the in the query and stuff like that but yeah I think I have much more of a like it's easier to inhabit the mind space of a of an early chef model yeah that's because it's more so more to a human yeah because like we don't often just like suddenly wake up in our like I'm just generating text like I just like to hit the mind space of the free train model I don't know what it is but like because early chef is still like this kind of complex beast that I'm not it's not like super clear to me that we really understand what's going on and so like in some ways it's closer to like my lived experience which is easier but in some ways I feel like there's this all this like here there be dragons out there that I don't know about free train like I kind of have a decent sense of what the internet looks like you know if you give me a piece of text and said what comes next yeah like I'm not saying I do good at it but like I have a I kind of get what's going on there yeah and I don't know after everything that we do after pre-training I don't really claim to get what's going on as much maybe that's just me that's something I wonder about is like is it more helpful to have specifically spent a lot of time reading the internet versus like reading books sure yeah I mean I don't know if books but like reading stuff that's not on the internet probably is like less valuable per like word read for predicting what a model will do or building intuition then like reading random garbage from social media for a minute yeah exactly yeah okay so that's that's the past now let's move on to the future prompt engineering this is the hottest question right now are we all going to be prompt engineers in the future is that can be the final job remaining nothing left except us just talking to models all day what does this look like is prompting going to be necessary or will these models just get like smart enough future to not need it anybody want to start on that easy question I mean to some extent there's the like the model is getting better at understanding what you want them to do and doing it means that like the amount of thought you need to put into I mean okay there's like an information theory way to think of this it like you need to provide enough information such that a thing is specified right like what you want the model to be specified and to the extent that that's prompt engineering like I think that will always be around like the ability to actually like clearly state what the goal should be always as funny if Claude can do that then that's fine if Claude is the one setting the goals then you know things are out the window but in the meanwhile where we can reason about the world in a more normal way like I think to some extent it's always going to be important to be able to specify like what do you what do you expect to happen and that's actually like sufficiently hard that even if the model gets better at intimidating that from between the lines like I still think there's some amount of writing it well but then there's just like I think the tools and the ways we get there should evolve a lot like Claude should be able to help me a lot more I should be able to collaborate with Claude a lot more to like figure out what I need to write down and what's missing right I think I think it's close already business with me all the time I just close my prompting assistant yeah but I think that's not true for most customers that I talked to at the very least so in terms of the future like how you prompt Claude is probably like a decent direction for what the future looks like or how's that like I think maybe this is like a decent place to step back and say like asking them how they prompt Claude now right is probably the future for the vast majority of people which is an interesting way to think about one freezing cold take is that we'll use models to help us much more in the future to help us with prompting the reason I say it's freezing cold is that I expect we'll use models for everything more and prompting is something that we have to do so we'll probably just use models more to do it along with everything else for myself I've found myself using models to write prompts more one thing that I've been doing a lot is generating examples by having them all giving some realistic inputs to the model the model writes some answers I tweak the answers a little bit which is a lot easier than having to write the full perfect answer myself from scratch and then I can turn out lots of these you know as far as like people who haven't had as much prompt engineering experience the prompt generator can give people like a place to start but I think that's just like like a super basic version of what we'll have in the future which is high bandwidth interaction between like you and the model as you're writing the prompt where you're giving feedback like hey this result wasn't what I wanted how can you change it to make it better and people just grow more comfortable with integrating it into everything they do and this thing in particular yeah I'm definitely working a lot with like meta prompts now and that's probably where I spend most of my time is like finding prompts that get the model to generate the kinds of outputs or queries or whatever that I want and on the question of like where prompt engineering is going I think this is a very hard question on the one hand I'm like maybe it's the case that as long as you will want the top like what are we doing when we prompt engineer it's like what you said I'm like I'm not prompt engineering for anything that is like easy for the model I'm doing it because I want to interact with a model that's like extremely good and I want to always be finding the kind of like top 1% top point 0.1% of performance and all the things that models can barely do right like sometimes I actually feel like I interact with this with a model like a step up from what everyone else interacts with for this reason because I'm just so used to like eking out the top performance from models what do you mean by a step up as in like sometimes people will I think that the everyday models that people interact with out in the world it's like I'm interacting with a model that's like I don't I don't know how to describe it but like I definitely like a an advanced version of that like almost like a different model because they'll be like oh well the models find this thing hard and I'm like that thing is trivial yeah like and so it's like I'm like I don't know I have a sense that they're extremely capable but I think that's because I'm just used to like really like drawing out those capabilities and imagine that you're now in a world where so I think the thing that feels like a transition point is is the point at which the models let's suppose that they just get things at like a human level on a given task or even like a above human level like they know more about the background of the task that you want than you do what happens then I'm like maybe prompting becomes something like I ask I explain to the model what I want and it is kind of prompting me you know because it's like okay well do you mean like actually there's like four different concepts of this thing that you're talking about like do you want me to use this one or that one like or by the way I thought some edge cases because you said that it's going to be like a pandas data frame but sometimes you do that and I get Jason L and I just want to I want to check what you want me to do there do you want me to flag if I get something that's not not a data frame and so that could be a strange transition where like it's just extremely good at receiving instructions but actually has to figure out what you want and I don't know I could see that being a kind of interesting switch anecdotally I've started having Claude interview me a lot more like that is like the specific way that I try to listen information because again I find the hardest thing to be like actually pulling the right set of information out of my brain and putting that into a prompt is like the hard part to me and not forgetting stuff and so like specifically asking Claude to like interview me and then turning that into a prompt is a thing that I have turned to a handful of times yeah it kind of reminds me of what people will talk about or if you listen to like designers talk about how they interact with the person who wants the design so in some ways I'm like it's this switch from you know the temp agency person who comes and you know more about the task and everything that you want so you give them the instructions and you explain what they should do in edge cases and all this kind of stuff versus when you have an expert that you're actually like consulting to do some work so I think designers can get really frustrated because they know the space of design really well and they're like yeah okay the the client came to me and he just said make me a poster make it bold and I'm like yeah yeah that means 7000 things to me and I'm going to try and ask you some questions so I could see it going from being like temp agency employee to being more like designer that you're hiring and that's just like a flip in the relationship I don't know if that's true and I think both might continue but I could see that being why people are like always prompt engineering going to not be a thing in the future because for some domains it may just not be and if the models are just so good that actually all they need to do is kind of like get the information from your brain and then they can go to the task right that that's actually a really good analogy I mean one common thread I'm pulling out of all you guys responses here is that there seems to be a future in which this sort of elicitation from the user drawing out that information is going to become much more important and much more than is right now and already you guys are all starting to do it in a manual way in the future and in the enterprise side of things maybe that looks like a expansion off this prompt generating type of concept and things in the console where you're able to actually get more information from that enterprise customer so that they can write about a prompt in Claude maybe it looks like less of just typing into a text box and more of this like guided interaction towards a finished product that's yeah that's I think that's actually like a pretty compelling vision of future and I think the like the design analogy probably like really brings that home I was thinking about how prompting now can be kind of like teaching where it's like you know the epithee for the student you're trying to think about how they think about things you're really trying to show them like figure out where they're making a mistake but at the point that you're talking about it's like the skill almost becomes one of introspection where you're thinking about what it is that you actually want yeah and the models trying to understand you so it's like making yourself legible to the model versus trying to teach someone who's smarter than you. This is actually how I think of prompting now in a strange way so like um like often my style of prompting like there's various things that I do but a common thing that's very like a thing that philosophers will do is I'll define new concepts so because my thought is like you have to put into words what you want and sometimes what I want is fairly like nuanced um like the what is a good chart or like uh usually you know like I don't know like how is it that you when should you grade something is being correct or not um and so there's some cases where I I will just like invent a concept and then be like here's what I mean by the concepts sometimes I'll do it in collaboration with Claude to get it to like figure out what the concept is um just because I'm trying to convey to it what's in my head um and right now the models aren't like trying to do that with us unless you kind of prompt them to do so um and so in the future it might just be that they can like elicit that from us rather than others having to like kind of do it uh uh for them but I think another thing that's kind of interesting this is like a people have sometimes asked me like oh where is like philosophy relevant to prompting and I actually think it's like very useful in a sense so like a lot of there is like a style of philosophy writing and this is at least how I was taught how to write philosophy where the idea is that um in order to I think it's I think it's like an anti-bilshot device and philosophy basically which is that your papers and what you write should be legible to like a kind of educatedly person someone just like find your paper they pick up and they start reading it and they can understand everything not everyone like you know achieves this but that's like kind of the goal of the discipline I guess or at least like uh this is at least like what we kind of like teach people um and so I'm really used to this idea of like when I'm writing thinking about the kind of educatedly person who they're really smart but they don't know anything about this topic and that was just like years and years of writing text of that form and I think it was just really good for prompting because I was like oh I'm used to this I have an educatedly person who doesn't know anything about the topic and what I need to do is I need to take extremely complex ideas and I need to make them understand it I don't talk down to them I'm not inaccurate but I need to like freeze things in such a way that it's like extremely clear to them what I mean um and prompting felt very similar and actually the training techniques we use are fascinating or like the things that you said where you're like you say to a person like just just take that thing you said and write it down I used to say that to students all the time like they write a paper and I was like I don't quite get what you're saying here can you just like explain your argument to me they would give me an incredibly cogent argument and then I'd be like can you just take that and write it down um and then if they did that was often like a great essay um so it's like really interesting that there's at least that similarity of just like taking things that are in your brain analyzing them enough to feel like you fully understand them and could take any person off the street who's like a reasonable person and just like externalize your brain into them and I feel like that's like the core of prompting that might be the best summary of how to prompt well whatever yeah I've had them pretty sure it is externalize your brain and they'll come to them in education and the thing is a really good way to describe the thing that was good that's I think a great way to wrap this conversation um thank you guys this was great