← All AI Engineer talks

AI Engineer Summit 2025

The Model Isn’t Wrong—You’re Just Bad at Prompting

About this talk

PromptHub co-founder Dan Cleary explains why prompt engineering remains a practical first step before introducing more complex LLM architectures. He covers chain-of-thought and few-shot prompting, automatically generated reasoning chains, and model-provider-specific meta-prompting. Using examples involving DeepSeek-R1, OpenAI o1, and MedPrompt, he discusses why reasoning models may benefit from extended reasoning but can perform worse when supplied unnecessary few-shot examples or excessive context.

Chapters

  1. 0:00Introduction and why prompt engineering still matters
  2. 2:06Chain-of-thought, few-shot prompting, and generated reasoning chains
  3. 5:42Meta-prompting and iterative prompt optimization
  4. 6:58Reasoning-model prompting: examples, context, and extended thinking
  5. 8:34Free prompt-engineering resources and closing

Talk transcript

  1. 0:00

    Hey everyone, how's it going? Dan here. So excited that you're joining today. Um, we're gonna be talking about all things related to prompt engineering. And so some very quick background on myself.

  2. 0:08

    I'm the co-founder of PromptHub, it's the GitHub for prompts. Based in New York. I'm a Lakers fan, more specifically a LeBron fan, but that just means February's been a great month for me.

  3. 0:16

    Um, and I'm a marathon runner. And so today we'll be covering a lot of ground, a lot of templates, a lot of free stuff, um, that should be hopefully pretty helpful that you can go and take and start messing around with.

  4. 0:26

    And so we'll talk about why prompt engineering is still important, why chain-of-thought prompt, uh, prompting has been so revolutionary, especially when it comes to test-time compute, few-shot prompting, using LLMs to help you write prompts via meta-prompting, how prompt engineering with reasoning models is actually very different, um, and a bunch of res-resource templates we've got.

  5. 0:45

    So I usually include a slide like this in any of my talks, and I, I waiver from doubling down and including more of these and completely removing it. But, you know, I think the meme in the beginning was that, you know, why do you even-- why is prompt engineering even a term?

  6. 0:58

    You can just tell the model what to do. But I think anyone who's ever actually shipped an LLM-based feature has known it, it's much more nuanced from that. Even just trying to understand what you want the model to do is challenging.

  7. 1:11

    And I think it's just a really good starting point for folks. Of course, um, it's the easiest and most successful way to get better outputs from LLMs, and it's a part of the med-- a greater system, right?

  8. 1:22

    We all have access to the same models, um, but the prompts, the architecture, everything around that is how we can also have a competitive advantage in our product or whatever we're building.

  9. 1:32

    I think, you know, something that was mentioned in Anthropic's recent paper, uh, or blog post about agents is that going for the simplest solution, I think is really key to keep in mind.

  10. 1:41

    It's really easy to kind of run away with these things when you're working with LLM to think about everything you can do, and that's great. Um, but, you know, just spending an hour trying to mess around with a prompt and then determining that, you know, it's impossible to solve whatever you're trying to do via prompt engineering, and

  11. 1:56

    you need to do more complex RAG or things along those lines, I think is, is not super smart. You need to give some time here, because if you can do it, it's much simpler to manage.

  12. 2:06

    And so we'll cover just two main methods, chain-of-thought and few-shot prompting, just 'cause I think they're the most effective and most topical. There are a bajillion more. A lot of them fall underneath the umbrella of general reasoning prompts.

  13. 2:17

    Um, we've covered most, if not all of these, and they're all available as templates in PromptHub as well that you can check out for free.

  14. 2:26

    So what is chain-of-thought prompting? Simply when you instruct the model to

  15. 2:31

    reason or think about the problem or a solution before actually jumping into whatever that, that answer is. And so it breaks down problems into sub-problems. Um, you get a glimpse into how the model is thinking, which can be helpful for, for troubleshooting.

  16. 2:47

    It's widely applicable, of course. You can use it kind of with any model. Um, easy to implement as well. And it's so powerful that it's now kind of being built into these reasoning models, and so you don't even really need to do it for those reasoning models.

  17. 2:58

    And so the classic kind of zero-shot way to do this is just to add something to your prompt that will make the model think a little bit before it's just giving you the output.

  18. 3:06

    You know, you want it to just generate some sort of kind of reasoning tokens beforehand and think step by step. What's a classic one? Take a breath and think it through.

  19. 3:13

    Things along those lines. Another very popular way to do this is by having few-shot examples of those reasoning steps. And so if I'm having a prompt to do solve math problems, I can include another math problem in the prompt and show the reasoning steps I wanted to solving that.

  20. 3:30

    And of course, you can use LLMs to generate these reasoning chains as well. So there's something called just automatic chain of thought, which is a framework, um, that's a little bit more involved.

  21. 3:39

    Um, there's another one called AutoReason, which is just a single prompt here, where you pass your task or question and it will generate, um, reasoning chains. It actually has few-shot examples of reasoning chains in there as well, and you can try this out in PromptHub.

  22. 3:52

    And even the training template that DeepSeek used for its R1 model, um, basically did this. It had it generate its thinking process, uh, within think tags and then-- and used all these outputs, these generated reasoning chains to train the model to be really good at chain-of-thought.

  23. 4:08

    And so this is also available inside PromptHub. You can input your task, get a reasoning chain, um, copy, on your way, and that's totally free if you want to try it out.

  24. 4:16

    And as I mentioned, we have a, a ton of these, um, in the platform, a ton of reasoning chains that you can go and check out. Some of them are chain-of-thought, some of them are other type of, um, reasoning or verification methods as well.

  25. 4:29

    But they're all pretty helpful, I would say, especially when you want to use them when, when you're dealing with like complex problems.

  26. 4:36

    So moving on to few-shot prompting. Um, it's-- that's generally when you include examples of what you want the model to kind of mimic or do or to understand about your problem, and essentially you're doing a show rather than tell.

  27. 4:48

    And so in this example here, I'm telling, um, the model that I have this client, we need to like generate some content for it. Here's a brief, here's the related content.

  28. 4:57

    Here's a brief, here's the related content. And then I say, "Here's the brief," and then the model will fill in this, this content here. And so rather than trying to encapsulate my client's tone or style by sending an input and output example, a brief and a piece of content, I can kind of teach the model, uh, exact

  29. 5:14

    what I want. The great part of this is that you get most of the gains from just like an example or two. Um, almost all the graphs kind of look like this when you're looking at number, number of examples versus, uh, performance, and sometimes performance can degrade once you have like a bunch.

  30. 5:30

    Um, but it's great for builders 'cause you only need, I'd say one or two. You want, kind of want to have them be diverse and cover your bases of different inputs you could expect that model to handle.

  31. 5:39

    Um, but yeah, you don't need many of them.

  32. 5:42

    And so next up is meta-prompting. Um, you know, I think it'd be silly as some people who are working with LLMs to not use LLMs for this part of the process.

  33. 5:50

    So meta-prompting is basically just using an LLM either to create a prompt, refine a prompt, improve a prompt, whatever that might be.

  34. 5:57

    There are a ton of frameworks for this out there. Um, some of them are require you to have coding knowledge, some of them don't. There are a bunch of free tools as well, which of course are very user-friendly.

  35. 6:06

    Anthropic has a great one. OpenAI has one inside of their playground, and then we also have one in PromptHub. Um, the difference with ours is you can select which model provider you are using, and it will run a different meta prompt because a prompt that is good for OpenAI models might not be the same as Anthropic.

  36. 6:24

    And so we, we tailor it a little bit for you as well. And then we also have a way that you kind of iteratively work with a, um, kind of like a copilot inside PromptHub.

  37. 6:33

    It's built off very similar things to TextGrad, where you can run prompts, give feedback. So this is another free tool that you have to your disposal as well because prompt engineering is something that we can use help with, so why not u-leverage LLMs?

  38. 6:47

    And so moving on to kind of to stuff that's much more, um, apparent now and more recent is that reasoning models are very different, both in terms of how they work and how you prompt them.

  39. 6:58

    So Microsoft released a paper earlier this year about their MedPrompt framework. It's not super important, but basically they ran, uh, a prompt engineering framework with o1 and found that adding examples led to worse performance.

  40. 7:12

    And the researchers at DeepSeek when building R1 found this as well, uh, that few-shot degraded performance. And OpenAI kind of mentioned this when they first released o1-preview, saying that you need to be careful when providing additional context because it can kind of overcomplicate things and confuse the model.

  41. 7:31

    And so you gotta be careful with examples, but if you need to-- want to increase performance, there's been a lot of research that has shown that the more reasoning a model does, the better the output could be.

  42. 7:41

    So in that same MedPrompt paper, they had a prompt that was, you know, quick response and then a prompt that prompted the model to think more. Um, and they saw that better results when the model was thinking more from extended reasoning.

  43. 7:53

    And the folks at DeepSeek saw this as well. So as they continued to train the model, the length of the response or the thought process increased, and then also this will in turn, um, increase accuracy and performance as well.

  44. 8:08

    And so overall, when you're using reasoning models specifically, minimal prompting, nothing can really beat like a really good, clear task description. I'm gonna encourage more reasoning if you're having trouble kind of getting maybe that last bit of performance, having-- encouraging the model to reason more can be helpful.

  45. 8:24

    Avoid few-shot prompting. If you're gonna do it, start with like one, one, maybe only two examples. And then you don't really need to instruct the model on how to reason.

  46. 8:34

    It's kind of built in there, so doing that can actually, um, hurt performance as well. And so as I mentioned, lots of free resources. We run a Substack called Prompt Engineering Substack.

  47. 8:43

    We write on our blog. Um, there's a bunch of prompts in the community from us and from other people. And so I hope this was helpful, and I hope you have a great time at the summit, and have a great day.