Table of Contents
ToggleHow to Write an AI Prompt
One of the most important things to understand about AI is the quality of AI’s outputs depends heavily on the quality of your inputs. If you give AI vague or poorly structured prompts, you’ll likely get weak responses. But when your prompts are clear, specific, and well-crafted, the results can be remarkably useful. In short: garbage in, garbage out.

In the AI world, the practice of designing AI prompts to produce optimal outputs is called Prompt Engineering. Think of prompt engineering as your way of “speaking AI.” The better you are at crafting prompts, the more value you can extract from the model—like getting high performance out of a powerful engine. It’s silly to expect an engine to operate at peak performance if the air intake is clogged, the fuel is low quality, or its oil hasn’t been changed in 3 years.
Example of a Poor AI Prompt
Suppose we’d like to use AI to build a long term financial plan to help us retire by the age of 50. An example of a poor AI prompt would be “how to retire by age 50”. This is probably what you’d type into Google before AI existed, and then you’d follow the tedious process illustrated in the previous section. Why is this such a poor prompt? Because it contains almost no information – all the AI knows is that we want to retire by age 50. Any financial advisor would agree that we’ve left out all the relevant details needed to answer this question:
- How old are you now?
- What is your household income?
- Do you have any debt?
- What is your current net worth?
- What are your monthly expenses?
- What is your risk tolerance? And so on.
The prompt “how to retire by age 50” will result in generic advice that is not at all tailored to our situation. Thankfully, we can do way better by incorporating prompt engineering techniques.
Let’s walk through a list of established prompt engineering techniques and then rebuild our financial strategy prompt using what we learned. Note that some of the techniques are optional and not always required.
1. Tell the AI to adopt a persona
Set the stage by indicating who you want the AI to be. An experienced financial planner? A world class chef? A negotiation expert? Pick a role that reflects the situation. I recommend starting each prompt with “Suppose you are a [insert persona here]”.
2. Clearly state AI's task
What exactly is it that you want the AI to accomplish? Recommend ski resorts in Colorado? Suggest 5 technology stocks to invest in? Explain quantum mechanics in simple terms? You can list one task or multiple tasks. Just make sure you state them clearly and avoid ambiguity.
3. Context, context, context!
Context is the main factor that differentiates good prompts from bad prompts. It’s the nitty gritty details and specifics that helps AI accomplish your task to the best of its ability. Context allows AI to provide personalized advice tailored to your situation – something search engines can’t do. For example, if you’d like recipe recommendations, context might include allergies, ingredients you have on hand, foods you don’t like, time constraints, etc. Want financial planning advice? Context includes your age, income, risk tolerance, goals, net worth, debts, etc. Remember that AI can’t read your mind, so always ask yourself – “What details would AI want to know to help me with this task”? Lastly, here’s a powerful pro-tip: if you’re unsure what context you should provide, just ask AI! It’ll lay out a list of questions for you to answer.
4. Provide relevant examples (optional)
Providing examples (if you have them) helps point AI in the right direction. This technique is powerful when used in conjunction with context. If you are looking for tropical vacation destinations and you enjoy hiking, list past vacations you’ve enjoyed along with your favorite hiking trails. Want AI to help write a blog post on marathon training tips that has a similar tone to an article you recently read? Copy and paste the article text into AI so it can get a feel for what you’re looking for. The more examples, the better. The AI world refers to prompts with no examples as zero-shot prompting, prompts with one example as single-shot prompting, and prompts with multiple examples as multi-shot prompting.
5. Specify response format and/or depth
Specify what format you’d like AI to respond in. Do you want AI to provide a bulleted list? Perhaps you want exactly 3 bullet points, with each bullet point being no more than 10 words. Maybe you’d prefer a 300-word essay, a 10-line poem in the style of Shakespeare, or a 2 minute sales pitch in the tone of Steve Jobs. Would you prefer an in-depth PhD-level analysis, a high level summary including only key points, or a simple explanation even a 5-year-old could understand? Do you want AI to create a table comparing several options? If so, feel free to specify the exact columns you’d like it to include. The options are endless – feel free to get creative!
6. Encourage step by step thinking
This technique works best for tasks that involve logical reasoning—like solving math problems, troubleshooting complex issues, debugging code, etc. It may sound surprising, but AI research has consistently shown that telling the model to “think step by step” significantly improves accuracy. This approach encourages AI to break the problem into smaller parts, reason through each one, and gradually arrive at the correct answer. It will also cause AI to show its work, which you can review for accuracy. For logical reasoning problems, I’d recommend ending your prompts with “Think step by step to ensure we arrive at the correct answer.
7. Use iterative prompting
You won’t always like AI’s initial response. I can promise you that! When AI gives you a subpar response, follow up with clear feedback and ask for specific adjustments. For example, if AI writes you an email that sounds too robotic, give it that exact feedback and ask for a more casual response. If possible, point out the exact words or sentences you don’t like. If you don’t like the vacation destinations it recommended, specify which ones you didn’t like and why. Treat it like a game of ping pong – go back and forth with AI until you like its response. Even if you have to spend 5-10 minutes tweaking AI’s responses, it’s often still quicker than bypassing AI altogether. It’s important to understand that AI isn’t perfect, and patience is sometimes necessary to get the most out of it.
Formula for a perfect prompt
Let’s summarize what we learned above to build a formula for the perfect AI prompt. Applying this formula in your prompts will help you get the most out of AI every time.

Example of a good prompt
Now that we understand prompt engineering techniques, let’s apply the perfect prompt formula to the financial planning problem mentioned at the beginning of this section.

Notice how we’ve completely transformed our initial prompt (“how to retire by age 50”) into a clear, structured, and highly personalized request. Rather than providing generic financial advice, AI will tailor its advice to our unique situation. And if you don’t like AI’s initial response, remember to provide enough feedback (“play ping pong with it”) until you’re satisfied.
It’s important to understand that not all prompts need to be this detailed to unlock productivity. Not even close! I purposely chose this example because financial planning is highly complex and benefits from large amounts of context. For your every day prompts, just make sure you clearly state your task, add in relevant context, and pepper in the other techniques as needed. If you do this, you’ll begin unlocking productivity in no time.
If you’ve made it this far into the course, congrats! You already know more about AI than the vast majority of professionals. Use this confidence and the prompt engineering techniques above to start creating your own effective prompts. In the next section, we’ll apply prompt engineering principles to a wide variety of real-world use cases.