Everything You Need to Know About Prompt Engineering
In this Article, you’ll learn everything you need to know about prompt engineering. I’ll explain what it is. Why it’s important. How to do it faster. The top techniques and methods and advanced strategies to get the most out of loops.
With that said, let’s dive in. So what I’ve done for this Article is have created a markdown file that contains all of the examples and key talking points that I’ll go over. Now, if you want this file for yourself for your reference, you can get it for free just by clicking the link in the fotter description and subscribing to my newsletter. Anyways, let’s start and I want to just show you a quick example of a bad prompt versus a great prompt just to kind of set the tone, and then we’ll get into all of the other theory. And keep in mind, all of the different topics in this video are available down below in the video player or the chapters in the comments in case you want to fast forward.
What is a Bad Prompt?
Okay, so what is a bad prompt? Well, an example of that would be something like write something about our product. It’s going to give you something like generic marketing fluff, wrong tone, wrong length, probably no CTA. The model is effectively going to guess what you want here, whereas a better prompt would be something like this.
You are a senior B2B copywriter. Write a two sentence LinkedIn ad for our project manager at SAS. As an alternative. The audience is ops managers at mid-sized companies. The tone is confident but not salesy and end with a clear CTA.
Now, if you do this, you’re hopefully going to get a result that’s on brand scoped, actionable, and easy to drop into an ad. The point of me showing you these examples is that when we’re writing these prompts, we’re using the same tool or the same LLM. So what’s giving us the difference in result isn’t the LLM, it’s the way in which we instruct it. And most people, while this kind of seems obvious, are writing prompts closer to the iPad prompt than they are to the good prompt, and just because a prompt is long does not necessarily make it good. Which I’m going to go over in this video.
What is Prompt Engineering and Why Does it Matter?
So this leads me to what is prompt engineering and why does it matter? Well, you should really think of prompt engineering just like programing in natural language. So rather than using Python or Java or JavaScript, you’re just using, you know, text or your voice or whatever language it is that you speak in to try to get some kind of result complete some action, get some text, whatever. Effectively what you’re doing is you’re giving instructions in plain language instead of something like code.
Now, it’s important to note that the models that we give these instructions to, they don’t have a built in task list. So you have to define the task, the role, the format and the constraints within the prompt. And you have to be very specific with what it is that you actually want. And that’s why the same model can seem brilliant or useless, depending on the clarity, context and the structure that you provide.
The Agent Era
Now, when most people prompt AI models, they’re trying to get some kind of text in return. And while that’s still a very valid use case of these models, it’s important to note that we’ve now shifted kind of into an agent era where a lot of these models are capable of interacting with various tools, searching the web, and actually taking actions they can change something in your asana, right? They can write a Google doc, they can create a PowerPoint slide. And because of that prompt, engineering becomes even more powerful because we’re no longer just directing the model to try to give us some kind of textual output, we’re actually instructing it to take some kind of actions which can give us a real meaningful result.
So just keep that in mind. While a lot of what I’m showing you here is going to be based on text. This also works for agents, right? Or more complex models that are capable of calling tools and just go through quick example. You can see a vague prompt would be something like help me with my essay was a specific prompt is something like you were a tutor, help me improve the thesis and first paragraph of this 500 word history essay on the causes of World War one. Keep my voice, adjust the edits inline, etc..
Why is it Important?
Okay. Now, in terms of why this is important, well, we’re moving more and more towards an AI world. So for people like developers, marketers, researchers, just anyone who’s using AI, the better the result you can get from it, obviously the better that is for everyone, and the faster you can get to the result if you have better prompts. So the takeaway write better prompts is just better results for everyone, and this is overall a skill that you will learn over time. But by knowing some of the foundations that I’ll teach in this video, it will just speed that up for you and allow you to think of these a little bit more intentionally while you’re writing the prompts.
Faster Prompting via Voice
Now, what you’ve probably gathered at this point is that the more details we include in the prompt, the better the result or action is that this model will take. Now, that’s generally true. I mean, longer prompts are not always better, but most of the time they will give you a better result. However, that’s only if you actually take the effort to write them. Most people are lazy, they type very slow, and they don’t want to spend ten, 20, 30 minutes here typing a prompt just to have to maybe change it, iterate on it, whatever.
So what I’m going to suggest to you guys is going forward, rather than typing your prompts, just speak them. So use your voice, use natural language and this will allow you to have prompts significantly faster where you can include all of the details without lazily having to type them in. Now this applies on phone and applies on computer, and the tool that I use to do this within any application doesn’t just have to be something like ChatGPT. Here is called a whisper flow.
Now I’m just going to quickly show you how it works and if you want to try it for free, I have a link in the description. I would highly recommend it because it is currently the best dictation tool that works a lot better than anything built into your computer. So for example, let me just do something. Hey, this is just a quick test where I want to dictate with whisper flow and see what kind of results I’m getting. Notice I’m talking, you know, extremely, extremely fast. I’m making a few repetitions, pauses, etc. and let’s see the result that we get.
Okay, so you can see the kind of little bubble popped up there. And pretty much instantly we get the result. And you’ll see that if we go through the result here, it automatically does the punctuation, adds the capitalization, and corrects any of the ums, ons, or repetitions that I had. I believe I said extremely twice. It recognized that wasn’t useful and it just removed. So you get a much faster, better result and you can also do something like this. I want to have three bullet points. Bullet point one is Apple’s bullet point two is banana’s, bullet point three is pears. And you’ll see that it will automatically format it for me like that.
Read More:100 Years of Tech: From VR’s Origin to Robot Dogs
Okay. So when you’re doing the prompts, the formatting is very important as well. And this tool will handle it for you compared to a built in dictation. I do have a long term partnership with them, full disclosure, but I was using them much before we did the partnership because the tool is very, very good. You can see here I’ve spoken 35,000 words. My WPM is 162, which is much faster than I would be able to type. It has a lot of other features like dictionaries, snippets. You can change the style based on the apps that you’re working inside of notes, all of this kind of stuff, and a bunch of settings where I was just hitting a keyboard shortcut on my computer, and that allows me to actually trigger flow to start activating on my computer.
I use this in every kind of application. Sometimes I use it to write emails, sometimes I use it for prompting. Right? Sometimes I used in cursor to prompt a model or reference files, and I’ll show you more of it in the video. But the point is, speak your prompts, you’re just going to have better prompts. And this tool also is available on phone. They actually recently released it on Android, so you can use it directly from the keyboard like on your iPhone or Android. So even if you’re on mobile, you have no excuse not to give a detailed, comprehensive prompt that actually includes the information that you want.
How Large Language Models Think
So this now leads us to the next section, which is how let’s think. Now, an LLM is a large language model. And effectively what these are capable of doing is replying to text okay. So you give some text in, they give some text app. Now you can configure them in very fancy ways to call tools or call other LMS or create something or take some action. But effectively, at the very root of an Lem, there’s a text prediction model.
It’s important to understand this because when you give a prompt to a model, you need to imagine that what it’s attempting to do is predict the next text that you would expect to see in this sequence. So while you might see reasoning models, you think that you know the AI is thinking or developing something. Really, it’s just been trained on a massive amount of data and given some prompt it’s able to predict with a relative degree of accuracy what it is it thinks you want in terms of the output. So the prediction is usually going to be in text or in tokens that they may call it right. You give some tokens in it spits some tokens out. That’s effectively what an Lem is. We don’t need to worry about the architecture or anything complicated there just remember you have some input, you get some output, and it’s just predicting what it thinks that output is going to be.

Context and Memory
Now with that in mind and Lem by default. So something like GPT 5.2 right. It doesn’t have any memory. Now what would give it memory is the providers of these models injecting previous parts of your conversation into the prompt or into the model automatically. So what you need to understand is that a lot of times when you use, you don’t. Lem’s right. You use ChatGPT, you use Claude, or you use curser. Behind the scenes, the people who developed those tools or these interfaces to work with the LMS, they’re injecting a lot of data into the prompt that you provide to give you a better response.
So while you may prompt and say, hey, you know, review my essay and tell me what’s wrong behind the scenes, the prompt is significantly larger than that, where it includes a lot more details that the Lem is looking at. So it’s just important for you to understand that, because by default, it doesn’t have memory. It doesn’t have, like all of these fancy features that you see in like the ChatGPT user interface. The reason why that exists is because OpenAI, who made ChatGPT, created this nice interface on top of the Lem, which is like the brain at the heart of all of this, that injects this other information into the prompt that then goes to the model, that then gives you the response.
So 99% of the time, your prompt is not the only thing the yellow Lem is seeing. It’s going to be seeing, you know, previous conversation history. Maybe it has access to some tools, right? Whatever. There’s all kinds of things that are usually being thrown in that you don’t actually get to see. And it’s really important that you kind of internalize that and understand it. And you don’t think like GPT 5.2 or something has this memory and just knows everything about you. The only reason that it knows something is because it’s just taking information that you’ve given to it previously, and just injecting that into the prompt that it’s using to give you the response.
Now, that additional information that I just talked about is typically referred to as context. It’s the other stuff that the Lem can see and look at. That’s not just the prompt that you gave it. So just understand that the context, specificity and structure that you provide is what shapes what it’s going to say next. And a lot of these tools, just like, you know cursor. Right. The tool that I’m using right now, if I create an agent by default, it’s jamming a bunch of context into the prompt. And if I tag something like this markdown file right. And I say, you know, hello world, the prompt is Hello world plus all of this additional context.
Steering vs. Commanding
Now, with that in mind, let’s quickly talk about steering versus commanding the model. So the common mistake that most people make when prompting is they command the model to do something, rather than steering it in the correct direction. Now commanding the model is something like summarize this okay. Do this, you know, write this down. Take this thing. Look at this thing. Whatever. Right. So if that’s the case, the model chooses the length, the style and the focus that it’s going to take when it’s summarizing the thing in this instance.
Whereas steering the model, you give it more direction on exactly what you want. So you are an executive assistant. Summarize the meeting transcript and for bullet points, focus on decisions and action items. No filler. Notice that we’re not only telling you what to do, we’re telling it what not to do, and we’re giving it a much more clear objective where when it’s trying to predict what we want next, it can give us a much more accurate, better result because of the detail we’ve included in the prompt. So when you steer the model, you’re typically indicating the length, the focus and the format that you want. Whereas when you’re commanding the model, you’re telling it to do something and it’s picking how it’s going to do that. The result you’re going to get, etc.. So I’m not going to focus on that too much more, but just understand commanding and steering.
Core Techniques: Specificity and Role Setting
Now, what I want to do is get into the core techniques of prompt engineering and really focus on a lot of examples. So one of the most basic and important techniques that you can employ is to be specific and to set the scene or specify the particular role that you want. The model or agent to take. Now these are the four things that, if you include, will always give you a much better result than simply commanding the model to do something. If you include a role in audience, a tone, and some kind of format or output, you’re almost always going to get a significantly better reply.
So here it says, you know, reply to this customer complaint. Okay, fine, you can reply to it. But if you said something like this, you’re giving it all of these details the role, the audience, the tone and the format. So you’re going to get a better response. So what I want to do now show you a few practical examples of this by actually writing or voicing the prompt here in ChatGPT. So let’s just do a quick example of the bad prompt, right? Reply to this customer complaint. And then I’m just going to paste in a random one that I generate here. And let’s see the result that we get here from ChatGPT.
So you can see here it gave us something decent, but it just assumed it was an email. Even though you know, we didn’t specify we want it to be an email gave us something relatively long. It didn’t say it was from the support team. Whatever. So what I’m going to do now is just make a new chat and let’s now do a much more detailed prompt with the same customer complaint so we can say you are a customer support lead. Reply to this complaint from a paying user whose expert failed twice. Acknowledge the frustration. Apologize. Briefly. Confirm we’re investigating and offer a concrete next step. For example, we’ll email it in 24 hours, keep it under 150 words and sign off as the support team.
Cool. So that is our prompt. Okay. Notice again the whisper here automatically formatted it for us. So another important part when you are writing the prompts is that if you structure it well so you have like bullet points for example, different sections, you separate things out into clear sentences. It’s going to be a lot easier for the model to understand what you want and predict the next text. For example, if we even just do a quick delimiter, like adding these three lines and saying, you know, here is the complaint. And then putting a colon, it’s separate. So like this is the thing it should be listening to. And then this is the additional context.
And also notice that I created a new session here in ChatGPT by making a new chat so that it’s not automatically going to include the previous text that I had in the conversation in the prompt. So I’m just going to go ahead and hit enter here. What I mean is that if I had just run this underneath the other example that I gave, you know, we can still get a decent result, but it’s going to be a little bit confused or mixed up with the other conversation history, because that’s going to be included in the prompt as well, because ChatGPT will include that as context. So if we look here, you can see now we get something a little bit more concise. You know, it says best regards support team. And it’s followed generally what it is that we asked it to do.
Few-Shot Prompting
Then the next technique you can use is referred to as few short prompting. Now effectively what this means is that you are going to give a few different examples of input and output pairs that you’re looking for, so that when you give the prompt, the model can give you a better reply. So when you do this, the model can infer and figure out the pattern which it’s very good at doing, and then replicate the pattern to give you the exact result that you’re looking for.
This is especially helpful when you want something in a specific format style. You have various edge cases, and you want to do something like a classification task using an LLF, because limbs are actually very good at classifying things. For example, like is this email positive or negative? Is it red or black, whatever, right. All of those things. But only if they know and have examples to be able to classify that. And in fact, when you talk about fine tuning LMS, what you’re effectively doing is you’re passing them a bunch of different examples of inputs and output pairs so they can infer that pattern on top of their base training to give you a more specific, better result.
So let’s have a look at a few examples here. I’m not going to throw them on screen. Let’s just go into ChatGPT and we can do a few prompts and see the result that we get. So let’s do something like turn this user feedback into a short support ticket title. The feedback is the app crashed when I uploaded a PDF over ten megabits on iPhone. Okay, and let’s see what we get here. Perfect. Let’s see what it gives us. Okay, so you can see we didn’t really get any clear formatting in this case. It didn’t actually give me one title. It gave me five because again it’s just guessing what to do.
But let’s change and do something like this. Turn user feedback into a short ticket title. We want this to be under 60 characters, use the format area and then brief description. Okay. And then I’m just going to paste this. And then here I’m just going to say here are a few examples of the format that I’m looking for. Just give me back one line of text that starts with a title and then includes the, area. And then a brief description of the issue. Okay. And then we should just say something like this. And then I can even do, do not return anything other than the title. Okay. Cool.
So let’s now run this and you can see that I gave a few examples. So let’s actually separate the examples a little bit. So it’s it’s a bit easier to see. And you can see that we have you know feedback long. It is broken with Google on Safari the title is off okay. And then Google login fails on Safari. And then let’s go here. Feedback is export to CSV only. Exports first 200 rows. The title export right CSV feedback. The app crashed when I upload a PDF over ten megabytes an iPhone. This is actually the example that I’m going to pass paste to it in a second. Sorry. And I’m going to say like this. This is the feedback to generate the title for. Cool. Okay. And then it should give us the title and let’s see if that works.
Now again I’m being super specific, but I’m just trying to show you that if I give it a few examples, we hopefully will get a better response. And there you go. You can see it says upload and then iPhone app crashes on PDFs over ten megabits. So in this case I was super verbose. But look at the difference. So we went from this kind of crap here right from the LM to this, which now I could directly plug into like some API or I could use in my app. And I know that the format I’m going to get from the model is going to be consistent. And then I could just do something else now because I’m in the same chain. So let’s go. Like feedback I don’t know here. Let’s go feedback and let’s change this to say something I don’t know what’s a good example of feedback. The keyboard does not disappear when clicking outside of the frame on the login screen. Okay. And let’s see if we give it if it gives us the title back. Now. And there you go. You can see it just gives us the title. And we can now keep doing this in this chain because it has the previous context on how it should behave.
Chain of Thought Prompting
Now the next technique to go over is called chain of thought prompting. Now this is asking the model to reason step by step before it gives the final answer. Now this will reduce errors on logic, math, you know, the planning, whatever in different comparisons. And a lot of models do this by default now, especially if you’re using like a planning model or a reasoning model where they’re instructions internally. Right. Again, like in the prompt that’s being created for you in the back end is to actually do this.
The reasoning models, like they’re still using a core line, but they just have some fancy kind of tools and orchestration on top of them to make them do this. But if you’re not using a fancy model like that, then you want to tell it to reason with chain of thought. So without it, you have something like, you know, store sells pens for $2 and notebooks for $5. Sarah buys three pens and two notebooks. She has a 10% off coupon. Coupon? Sorry. How much does she pay now?
If you don’t tell it to reason, it’s just going to look at this text and try to predict the result. Now, in a lot of cases, it will get this wrong. Just like the famous example of asking them to count. You know how many teaser and strawberry or something, and it just can’t do it unless you change the prompt to tell it how to reason through it so that it actually thinks before it gives you the response. Okay, so I’m actually not going to show this in ChatGPT because it is probably not going to work or prove the example where I think both prompts will give us a very similar result, just because the default reasoning for like GPT models is already really good, but with some other models where they don’t do the reasoning by default, or if you’re not using them in the interface like ChatGPT and you’re just using it in like an API or something, then you definitely would want to include these kind of keywords, right?
So just anyways, keep that in mind for chain of thought. A lot of times now the models that are super modern and, you know, state of the art will do this by default. And actually auto detect what reasoning model they should use based on what you asked them. But it is kind of worth knowing, especially, you know, six months ago, 12 months ago, this was a lot more important than it probably is right now.
Structured Output
So the next method that is super underrated is structured output. Now this is asking the model to provide the output in some kind of format like Json tables, XML, markdown, whatever, and then giving an exact example of what you’re looking for such that you’re able to parse this and use it in some other format or in some other application. Now, in my case, you know, I do a lot of development work, right? And when I have the model generating something, maybe I want to read it into a database. Maybe I want to display it on the front end of my website, whatever.
In order to do that, I typically need it in some type of structure. So what I will do is something like what you see right here where I actually provide a Json object schema. This is what is referred to, which is really just an example of what it should look like to the model. So it knows how to give me the output. So obviously compared to the first example where we just said something like this, the main difference is that we’re providing the structure and we’re telling it that we want it to respond with just that. No other text in a particular shape.
So we’re kind of almost doing this a multi shot prompting right, or few short prompting, but combining it with some kind of output as well. So anyways, let me go to ChatGPT and just show you a quick example. So what’s something that we can do. so we can say maybe compare Trello, Monday.com and Clickup. For a small team of 5 to 10 people, I want to understand the main features, the limitations and the pricing. And what I’d like you to do is output this with valid Json only. Don’t give me any other text and make sure that it’s in this shape. Okay, so that is what we’re going to do here. Just put that in with whisper. And then I’m just going to paste in the format. So we’ll just put it like that and we’ll say example format like so okay.
So let’s run this now and let’s see what we get okay. So just give me the output right now. But you can see that it’s following this format. It’s in a valid Json object. And now I would be able to load this into my code. I could store it in a database right. I can return it from an API. It doesn’t matter. But it is very useful. And it’s going to be a lot better than if you just gave me this random kind of markdown text that ChatGPT usually replies with.
Constraints and Negative Instructions
Moving on, let’s talk about constraints and negative instructions. So sometimes the best prompts are not talking too much about what to do, but they’re talking about what not to do. Now the more constraints which is saying you know, do this, don’t do this, be within this bounds, whatever the better the results you’re going to get, because you’re steering the model more accurately.
Some examples of constraints is for example the length. Now you could say summarize in exactly three bullet points. That’s fine. That’s a constraint. You also could say keep the reply under 300 words or under five bullet points. Right. You could have a tone like no slang or humor. Do not apologize. Right. Do not use bullet points. Use one short paragraph. Do not suggest paid tools. Do not include code. Describe the approach only. So when you do that, it actually ends up listening a lot better sometimes than telling it what you want.
And this has been shown a lot, especially with a lot of the researchers working with these models oftentimes are including a large list of things not to do because it just works extremely well for prompting. So you don’t want to write something like write a short intro for our onboarding doc. Instead, you would say, write a short intro for onboarding doc. Start directly with what the user will do in this section. Do not start with welcome or generic greetings. And then in that case, you’re going to get something that is straight to the point.
Anyways, let’s have a quick look at an example here. If we go inside of something like ChatGPT again, let’s make a new chat. So let’s just do something like write a short out of office email reply from me. Tip okay, so this would be without any constraints. And let’s see the kind of response that we get. Okay, so ChatGPT actually gave me something interesting here, but it’s not really that useful for an out of office email because I need to know, for example, the dates, the time, all of that kind of stuff.
So let’s do something better would be, say, write a short out of office reply, start with the exact dates I’m away, and one sentence on who to contact for urgent issues. Do not use the phrase limited access. Reply when I can or thank you for your patience. Be short to the point, but detail enough that people understand when I’m coming back, I’m going to be away from March 1st to March 25th. Okay, so in this case, again, we’ve included a few constraints. So hopefully we’re going to get a better response here from ChatGPT. And let’s see perfect. And you can see that we get a much better email that doesn’t include any of the other fluff like, you know, message me if you need to. Limited access. Right. Which funny enough, we got in this one, but we didn’t get here.
Iterative Refinement
Now the next method to go over is pretty straightforward, and you probably already do this, but it’s just to do iterative refinement on your prompts. So very rarely is the first prompt you send going to give you the desired result. So rather than restarting simply improve the prompt over and over again until you get what you’re looking for.
So as it says here, you know, treat prompting as a conversation, not just a one shot attempt. The first reply maybe isn’t right, so you’re going to refine it by saying shorter. I’d like it more formal. Add another example. Focus only on X, whatever. Of course, the better first prompt you give, you know, the better. But sometimes you just don’t know what the result is going to be. In that case, don’t restart. Just keep going based off the result that you have. If you’re in like a decent enough place now, an example flow here you can see, you know, you dropped a two sentence blurb. Whatever it returns four sentences a bit salesy. Hey, cut it to two sentences. You know, make it more factual. Whatever model tightens it up, add it to work, a Google calendar, whatever. You get the idea. I’m not going to show this to you in ChatGPT because I think it’s pretty intuitive. But the point is, be iterative with your prompt.
Interview-Style Prompting
And then the last method that I’m quickly going to show you, we’ll go into some more stuff after is the interview style prompting, which is super powerful and extremely underrated. So I’m just going to read through some of this because it’s pretty descriptive. But instead of guessing what context to provide, give the model the task and ask it to interview you for whatever it is that it needs.
So a lot of times you know, you’re not going to be able to provide the best context because you don’t actually know what information the model needs to give you the correct result. You can go off the top of your head, you can guess whatever, but it’s actually better if the model prompts you on what it is that it needs, and you go back and forth where it’s prompting you and then your prompting it, and you get a much better response.
So you state the goal, and then the model will ask you clarifying questions, and you can answer them one by one, and then it can perform the operation with the full context. Now it works because we often leave out details, right? Audience constraints, format examples because we don’t know the model needs them. So if we let them surface that information first, or let the model ask that, it gives us kind of the prompt to then give it all of the details. And a lot of times we’re lazy or we have assumptions. So again, we just don’t include so






