- Published on
A Practical Guide to Prompting AI
5 min read

- Authors

- Name
- Greg Yung
Table of Contents
The single biggest predictor of how much value someone gets from AI is not the model they use. It is how they ask. I have watched two people put the same tool to the same task and get wildly different results — and the difference was entirely in the prompt.
The good news is that prompting well is not a bag of secret tricks. It is mostly the discipline of making your thinking explicit. If you can brief a sharp new colleague clearly, you can prompt well. Here is what actually moves the needle.
The mental model that helps most: you are not typing search queries, you are delegating to a capable teammate who has no context except what you give them. Everything below follows from that.
Give it a role and a goal
Start by telling the model who it should be and what you are trying to achieve. "You are a skeptical senior engineer reviewing this for security bugs" produces a completely different — and far more useful — response than pasting code with no framing.
The role sets the lens. The goal sets the destination. Without them, the model guesses at both, and its guess is usually a bland average of everything it has seen.
Give it context — the part everyone skips
This is where most prompts fail. The model cannot see your codebase, your constraints, your audience, or the three things you already tried. It knows only what you tell it.
So tell it. The stack you are using. The deadline. Who the writing is for. What "good" looks like to you. What you have already ruled out. A prompt with rich context and a mediocre request beats a clever request with no context, every time.
Give just enough context — then let it crawl outward
There is a trap on the other side of this, though. The instinct, once you learn that context matters, is to dump everything into the prompt — every file, every doc, the whole history. That backfires. Too much context buries the signal, and the model spends its attention on things that do not matter to the task at hand.
The better move is to give just enough context to point the model in the right direction, and then let it crawl outward to gather the rest itself. Modern AI tools can read files, follow references, search a codebase, and pull in what they need — but only if you set them up to. Your job is not to hand over the whole map. It is to mark the starting point and the destination, and trust the model to find the paths between them.
In practice that means: name the entry point, not every file. "Start with the auth middleware and follow it to wherever sessions are validated" beats pasting twenty files and hoping. Tell it where to look when it needs more — "the conventions are in the README, the API contract is in openapi.yaml" — so it can pull that context in exactly when the task calls for it, instead of you guessing up front what it will need.
This is how the best results happen: a tight, well-aimed starting context, and a model empowered to expand it along the right paths. The AI ends up smarter about your problem than you could have made it by front-loading, because it built its understanding by following the actual structure of the work rather than a pile of context you dumped in a fixed order. Point it at the door and let it explore the house.
Be specific about the output you want
Vague asks get vague answers. If you want a step-by-step plan, ask for one. If you want three options with trade-offs, say so. If you want a table, or code with tests, or a five-sentence summary, name it.
Specifying the shape of the answer does two things: it gets you something you can actually use, and it forces you to clarify what you are really after — which is often the more valuable outcome.
Ask it to think before it answers
For anything non-trivial, tell the model to reason before it concludes. "List the likely causes ranked by probability before suggesting a fix." "Ask me clarifying questions before you write any code." "Do a pre-mortem before recommending the plan."
This does two things. It produces better answers, because the reasoning improves the conclusion. And it gives you something you can inspect — you can see why it landed where it did, and catch a wrong turn before it becomes a wrong answer.
Iterate — the first answer is a draft
The biggest mistake is treating the first response as final. It is a draft. The real value comes from the second, third, and fourth turns: "tighten this," "you missed the concurrency case," "make it half as long," "why did you choose that approach?"
Think of it as a conversation with a capable collaborator, not a vending machine. The people who get the most from these tools are not the ones with the perfect opening prompt. They are the ones who steer well.
Know when not to trust it
A guide to prompting has to end here. These tools are confident even when they are wrong, and they will invent facts, APIs, and citations that do not exist. Prompting well gets you better drafts, not verified truth.
So keep the human in the loop where it matters: anything you will ship, publish, or decide on. Use AI to think faster and draft further, then apply your own judgment. That combination — the tool's speed and your accountability — is where the real leverage is.
Looking for starting points? Grab a few from the AI Example Prompts library and adapt them to your work.