Prompt Engineering: The Secret to Getting Better AI Output
April 25, 2025
Parker Rex breaks down practical prompt engineering: how to talk to AI to get better output, the core anatomy of prompts, and the tooling and workflows that actually work in practice.
Prompt Architecture: Models, Context, and When to Use What#
- Model families
- Chat models: cheap, fast, great for high-frequency tasks
- Chain-of-thought (thinking) models: longer, deeper outputs but more expensive
- Hybrid models (e.g., Google Gemini): powerful all-around, increasingly the default for many tasks
- Practical guidance
- Use hybrid for writing or coding tasks
- Use chat models for quick, repeatable prompts
Context is King#
- Context defines how the AI interprets your request
- Without context, even a brilliant model can produce generic or off-mark results
- Build prompts with a consistent structure to maximize alignment from run to run
The 5-Part Prompt Template#
Always structure prompts with these five elements:
- Role: Define the assistant’s persona (e.g., “You are an expert direct-response copywriter.”)
- Purpose: State what you want the assistant to accomplish
- Instructions: Give step-by-step, atomic tasks
- Rules: Include constraints and anti-rules (e.g., “use fifth-grade writing level,” “avoid fluff”)
- Output: Define the exact format and expectations (e.g., a template, JSON, or a short draft)
Concrete example (writing task):
- Role: You are an expert direct-response copywriter.
- Purpose: You will rewrite a draft into a more persuasive version.
- Instructions: 1) Read the draft. 2) Identify 3-5 improvements. 3) Produce a revised draft. 4) Provide rationale. 5) List changes.
- Rules: - Write at an 8th-grade level. - No fluff. - Provide output in JSON:
{ "title": "", "body": "", "cta": "" }. - Output: Deliver a JSON object with fields title, body, and cta.
Tip: you can “end it” with the exact expected output so the model returns structured results you can consume downstream.
The Manual Prompt-Engineering Workflow#
- Start with a solid draft
- Prompt the model, read the output, then evaluate
- Iterate by tweaking the prompt (not just the draft)
- Tools to help refine prompts:
- Anthrop ic: use the Generate Prompt button to improve your draft
- Google: use the “Help me write” feature to reshape prompts
- OpenAI: use the model’s output to refine further (a feedback loop)
- The core idea: prompts are artifacts; you improve them by deliberate, manual evaluation, then re-prompts
Example workflow:
- Write a draft
- Feed it into the model with the 5-part template
- Copy the output back into a sheet or notes
- Manually assess quality, adjust the prompt, and re-run
- Repeat until you’re satisfied
Token Efficiency and Structured Outputs#
- Tokens are the unit of compute, not characters
- Dead space and verbosity waste tokens and money
- Prefer structured formats (JSON, XML) to minimize tokens and maximize parse-ability
- JSON often easier to read and process; XML can be more verbose but sometimes more expressive
- Visualizing data
- Think of JSON as a flat table or spreadsheet: each object is a row, fields are columns
- Where to try prompts
- Anthropic Playground (playground.anthropic)
- OpenAI Playground (platform.openai.com/playground)
- Other model explorers and IDEs exist, but focus on the two above for practical testing
Tools, Environments, and Prompts Workflows#
- Versel Playground: explore multiple models side-by-side and compare outputs
- Google’s prompt tooling (e.g., “Help me write”)
- OpenAI Playground: experiment with different prompts and formats
- MIMO: notebook-style prompts for iterative, agent-like workflows
- Useful for building a sequence of steps (offers, headlines, hooks) and evaluating each stage
- Prompt management realities
- Prompts are artifacts to be stored and reused
- Plan for hotkeys and quick access; consider future tooling to manage expansions and compressions of prompts
Prompt Management and Future Plans#
- Prompt artifacts and hotkeys
- Store and bind reusable prompts to shortcuts
- Expansion vs. compression prompts
- Expansion: take a small input and expand it (e.g., expand a headline into a full ad copy)
- Compression: condense long-form content into concise versions
- Vision for a centralized prompt tool
- Input modality (text, image, video, audio) → model outputs (text, code, media)
- Model selection pane shows the outputs per model
- Aims to streamline prompt creation and orchestration across media formats
Practical Takeaways#
- Start with a strong context using the 5-part prompt framework
- Optimize input length to maximize output quality without wasting tokens
- Use structured outputs (JSON/XML) to simplify downstream processing
- Refine prompts manually before automating or scaling
- Treat prompts as repeatable artifacts you store, tag, and bind to workflows
- Explore community tools and early-access prompts generators when available
Quick Wins to Try Today#
- Write a 5-part prompt for your current task (role, purpose, instructions, rules, output)
- Use JSON as the output format and define the fields you need
- Run a few iterations: draft → improved draft via the prompt → evaluate outputs in a spreadsheet or notes
- Experiment with Anthropic’s Generate Prompt button and Google’s “Help me write” feature to see how prompts can be improved automatically
Links#
If you found this helpful, consider sharing a prompt you’re working on in the community to get feedback and accelerate your own improvements.
Transcript
Hey, I'm Parker Rex. I led tech for a startup that sold for 23 million bucks. After that, I've been using AI pretty much every single day to figure out how do you get the most leverage out of it for both coding, media, and business in general. And I'm going to go through some prompts. So, I've been doing the whole prompt thing since it became a word. And a lot of people in our community have questions about it. A lot of people on the internet have questions about it. So, this should be a simplified explainer. So, first of all, prompts. This is how you talk to the computer. There are a bunch of PhD level intelligent beings inside your computer. You just need to know how to talk to them. It's not them, it's you. So, first off, on the anatomy of prompts, you have different types of models and talking to them the right way matters. So, you have chat models, you have chain of thought or thinking models. These ones are typically more expensive. And you have hybrid models, which is one of the newer ones. Now, you're probably like, "Wow, this is getting jargony." Chat just means you're pingponging back and forth. They're the cheaper models. So, you can get more out of them. They can act more like thinking models if you have a better prompt, but that's typically just instant feedback. Chain of thought. You send it, it's thinking, it's thinking, it's thinking, and it comes back with a longer version. You could think of even the deep research tools as thinking models or sonnet 37 thinking. Then you have hybrid. These are all the Gemini models from Google and they dominate. I think this is the future for most of the tasks that you'll be doing. Of course, chat models will be great for the cheapest, fastest, high frequency tasks. So in your case, you'll probably be using hybrid if you're doing writing or coding. So that's the high level. Now there's this thing called context. Context is king in prompting. So context is the information that you're giving to the LLM. So, I always think of it where if I walked up to someone who is really smart on the street and I just blurted out, I need a poem about this and it's my company and make this poem awesome about my company or I need a React component for my company or whatever. If I didn't provide them any context, I don't care if it's Einstein, he's going to look at me confused, but they're programmed to give you a response. So, you'll get a response and it's going to be a confident response, but it's not going to be great. That's why context matters. And so context when it comes to prompting is a few things. You follow the same template every single time where you define a role. So if I walked up to that person on the street and I said, "You are an expert at direct response marketing. You act like Dan Kennedy." You don't use words like Delve. You do use words like blank whatever that list is. So by just defining a role, it's really great. You started off on the right step and you want to be really specific about what that role is. This is you providing it context. So after you do the role, you can give it what's called a purpose. So you are responsible for XYZ and you're going to follow the following instructions. That's the third. So in our case, you're going to take in you will receive a draft of some direct response copy. You will receive a React component and you will do the following with either that copy or that React component. So now we've given it a role, we've given it a purpose, we've given it instructions. And you can jam these into just one thing and not define these, but again it won't be as good. and I'm trying to make them awesome because it's literally lifechanging. So you've had the role, the purpose, the instructions. Next, you need to define the rules. So instructions are step by step and make them atomic, meaning they can stand alone. It's not build a website. It's we're making a header. These are the following things we need for that header. The libraries, dependencies, blah blah blah. Or we're making the copy. We're doing five to seven sentences. Don't use this. Don't or uh five to seven sentences in this format. And then rules. This is when I put in the strict things such as in the copywriting world, you might write fifth grade writing level. And I'll show you an example of this afterwards so you can see. And then I'd say do not. So this is the anti-ruule. Use delve for writing or in coding use classes. Cool. And then finally you end it. Now we have five things. And finally you end it with the expected output. And this is where you define exactly what you want. So in our case with the writing we can provide an example or if you wanted to you can just put a template. So just depends on what it is you're doing. With writing I can give it an example. With coding I can say the you know I need a couple things. I need the file name. I need the code and I need maybe something else. But that's how you can define exactly what you're going to get back. And in layman's terms, this is just like the outputs that you want. But in coding terms, this would be structured output because computers like structure. So if you go through all these steps, you're going to have a good time. If you don't, you're going to be frustrated. So I highly suggest not getting frustrated. Now I'll show you some examples. of what context looks like. So, I did a big post about this on our community, which will be on a separate site soon. Very excited, but it'll be a little bit more expensive. So, join this now if you want to be a part of it. But in this case, I have the prompt template and you can interchange these words. So, if you see purpose or if you see instructions versus rules, that's fine. But you want to nail the role. So, you are blank. You want to roll nail the purpose. You are going to receive whatever the thing is you wrote and you need to return the thing that you want. The rules, the instructions, any examples that you have. This is really great. And then you pass it what the draft is. So you probably started somewhere and I highly suggest that if you just come in with nothing, you haven't flex the muscle required to get better. All AI is is a multiple on your existing skill. So if you're a 5x engineer, your multiple is not going to be as high as a 10x engineer. So an example, you're an expert writing assistant trained in direct response for copywriting techniques of I give examples. I give it a task. I said here's the context. I provide context, which is my actual example. I give it a bunch of rules. I give it the steps and I go through all of these things. And then finally, I'm going to get to this later in the video, but since I'm already here, companies have spent billions of dollars to take your best draft, which is this, and make it even better. So, don't jump straight into this step I'm about to reveal. go do this manually because again the quality that you give it gets a higher multiple. So when I look at this I have little snippets that I start with and then I go in and I find the magical button and this magical button is specific to whichever model you're using for writing. I highly suggest still using anthropic. I thought that we'd get away with just using Google, but I just it's very very good at writing when you use Enthropic. But in Google, if you go in, you'll see help me write. This is the button. When you open that up, it's going to generate the prompt to make it better, specific to their models. So take the draft that you spent time on covering all the steps that I just said, and it'll make it even better. In the anthropic world, there's a button. Let's see. There's a button right here called generate prompt. So that's where you would click it and you'd paste in that amazing draft that you just labored with love over. And then finally in OpenAI, there's their button couple trill. So and then the way that you make it better is by taking the outputs, so the things that it gives back and then putting them in a spreadsheet and actually reading them. So my process is I prompt, I read the output, which is essentially you doing an evaluation on it manually and then tweaking it. That's how you get a good prompt. There are better ways to do this programmatically, but I'm not interested in that and showing that in this video at least. I'm definitely interested in that. Other concepts that are important to keep in mind so that you're educated on the topic are that you want to optimize the stuff that you're putting in. So context format for token efficiency. What is a token? It is not crypto. It is not a character. They're slightly different. So when we think of writing a post somewhere, we think in characters. Character A, B, C, D, those are all one character per letter. LLM think in tokens. So slightly different. And it's because of the way that their guessing machines work. But for the purpose of this video, you can just kind of see an example of this where if you have dead space, you're wasting valuable compute. Compute meaning the amount of horsepower these things use up to respond to you. So on the left hand side, this is in what's called JavaScript object notation, which is JSON. And what you can think of it as, this looks scary for nontechnical people, but this is how computers talk to each other. This is one way that they do this. And then this version is XML, which is another way. And the short of it is this is a better way of doing it because you can see there are significantly less tokens, which is again the credits basically that are gobbled up and used against the compute on the AI. JavaScript object notation. When you look at this and you're confused, I would just flip this sideways and think of it as a spreadsheet. So if this it looks like this funny looking tree, you can just think of each of one of these as a column and then there's the stuff within it and then the column can have multiple things in it. So if you can, then you would ask for it in XML format, but again, that's just kind of a nuance. It it really if you're using the steps that I outlined and you gave it to the LLM platform, which is on the Playground website, that's where all of those are. So if you wanted to see those magical buttons, then you would go to playground.anthropic or playground.opAi OpenAI or platform and you can see them. So the next thing we're going to cover is the anatomy. You can see that in this case they've outlined that you want the goal success criteria and then the cognitive work. This is a simplified version. I just use the one that I showed you. But the tactics, draft it and test plus it up with the with the features. Paste them into a spreadsheet and read them. And then on to some more tools. So you can go and there's this one that's by Versel. It's called the playground. And you can see that you can select the different models. So if you wanted to, you can actually click this little plus button and you can add more and more and more. That's a pretty cool way to do it. Again, I just go and I use the playgrounds. Another one. I have not used this, but I just felt like it's necessary to call out for folks out there where there's a whole IDE or essentially development environment just for prompts, but I I don't use that. And for the nerds out there, I use this which is called Mimo. MIMO, if you're familiar with Python notebooks, it basically lets you write your prompts. So in this case, I have a prompt for building offers. And if I wanted to, I would break them into steps. So this is essentially the manual way of doing what's called an agentic workflow. Wow, a lot of jargon. All that means is they're different prompts that when you get the output, then you'll take it, you'll see if you like it, and then you can enter it into the next thing. So in my case, I did an offer analysis. That's what this one here is. And then I had another one which was the offer plus up and then the unique value proposition, the headlines and hooks. And you can do this for pretty much anything. I had it write an ebook just out of curiosity to see what would that look like. And these are all written in XML. Not necessary. That's the next level of doing this kind of stuff. This was taken from another YouTuber called Indie Indie Dan. Indie Dev Dan I think it is. And I just kind of added to it. But I do find myself not using this at all. I'll be honest. So I think it was helpful as an exercise to learn. But ultimately what I will be doing for our community will be did I draw this somewhere? Let me pull that up. I still find prompt management in general to be lacking in terms of the ease of what you can do. So when I make them, I just store them to hotkeys, but I'm running out of hotkeys. So bind your prompts because prompts are artifacts. They're things that you want to hang on to. What this guy's cooking, but they're these things that you want to hang on to after you make them. And when you run out of hotkeys, which I teach at Vibe with AI, then you kind of run into a problem. So this is what I'm doing next for our community is you basically when you make prompts you're trying to go in some cases from something to something. And this would be for expansion prompts which are things that take something small and expand upon them or compression prompts which is something long format to short format. But it really reminds me of the pattern that you see of this from and to. And so this is something I'm excited to build in the future, which is you can take whatever it is that you have. So there might be some sort of switch up here that determines the media format, if it's imagery, if it's video, if it's text, if it's audio. And then you get the options in here. And then you'll paste whatever that is that input. And then you can select whatever you can output it to based on the models that you have selected. Then the models you have selected will appear with outputs which should be really cool. And I actually ran a reverse engineer prompt to figure out how does the Hemingway editor work. So if you know Hemingway, it provides a grade level for content. So if I grab this and I paste it in here, this is going to say a lot of stuff. It's going to say eight of 12 sentences are very hard to read. One of 25 sentences hard to read. But you see all this syntax highlighting and it gives you a grade. So we want a low grade level, not because we think people are dumb, but because simple language sells. The best communicators on the planet communicate at a sub 8th grade level. And if you guys are interested in this, then comment prompt generator below. And I will put you on a list to give you early access to it when it is rolling. That's how I do my prompts. If you find this helpful, please like the video. It helps me out, makes the world go around, and subscribe to the channel. And then, of course, we have the community, which we're so excited about. And I am excited to just build in all these things that I personally need being an AI proumer, a prouser of it. And we'll be rolling these out in the future. Thanks so much for watching and I'll see you in the next one.