Yuval Avidani
Author
Let's fly high. You're writing to a language model, meaning software that takes text and returns text, like ChatGPT, Claude or Gemini, and you get a mediocre answer, a vague one, or just not what you wanted. And then you blame the model. Mistake. In most cases the problem isn't the model, it's the phrasing. That phrasing, the text you type to the model, is called a prompt, and the instruction itself is the request you're making. Prompt Engineering is the skill of phrasing your prompt so the model gives you exactly what you need, and it's one of the most valuable skills today in the world of AI (artificial intelligence).
Let's start with the intuition, before any technique. A language model is not a search engine pulling ready-made answers from a database. It's a mechanism that guesses the most probable next word, over and over, based on everything you've written up to that point. Think of it as a very smart autocomplete: you give it a start, and it builds the continuation word by word. The richer and more precise the context you give, the smaller the model's "guessing space" shrinks toward the answer you actually want. "Guessing space" is simply the collection of all the plausible answers the model could give to your prompt. A vague prompt = a huge guessing space = a generic answer (general-purpose, fits everyone and therefore isn't really for you). A sharp prompt = a narrow space = a precise answer. All ten techniques below are really just different ways to shrink that guessing space.
1. Give it a role (Role / Persona). A "persona" is a character you ask the model to play. Instead of "write me something about nutrition," write "you are a clinical dietitian with 15 years of experience." Why does this work? The model was trained, meaning it learned patterns, on billions of texts, and texts written by experts look different from texts written by amateurs. When you give it a role, you're steering the model to pull up the style, depth and vocabulary of that specific field.
2. Give it context. Context is all the information about your situation that the model has no way of knowing on its own. The model knows nothing about you beyond what you wrote in the prompt. "Write a post" versus "write an Instagram post, target audience beginners aged 25–35, casual tone." Context is what separates an answer tailored to you from an answer tailored to everyone.
3. Define the output format. "Output" is what the model returns; "format" is its shape: a paragraph, a table, or JSON (a structured text format that computers read easily). The model doesn't know what shape you want, so tell it: "return a table with three columns: name, pro, con." Without this, you'll get whatever the model guesses is convenient, not what's convenient for you.
4. Give it examples (Few-Shot). The term "Few-Shot" means giving the model a few solved examples before the actual task. Why? Because one example is worth a thousand explanations. If you show the model two "input→output" pairs in the style you want, it'll mirror the pattern impressively well. The opposite is called "Zero-Shot": asking with no example at all.
5. Ask for step-by-step thinking (Chain of Thought). "Chain of Thought" is the instruction for the model to break the problem into steps and write them out before giving a final answer. Why is this critical? Because when a model "rushes" to a final answer on a complex question, it makes more mistakes. When it writes out its reasoning steps, each step it wrote becomes part of the context that guides the next step, and that makes it more accurate. Ask it to "think step-by-step before you answer," and watch accuracy jump on logic and math tasks.
6. Break big tasks apart (Decomposition). "Decomposition" means splitting into parts. Instead of asking for "build me a whole app" in one prompt, ask first for planning, then file structure, then code for each file. Why? Because the bigger and more loaded a single task is, the higher the chance the model "forgets" a piece, gets tangled, or mixes things up. Small tasks = less room for error.
7. Set constraints. A constraint is a rule that limits the answer: "write under 50 words," "don't use technical terms," "no intro." A constraint is a fence. Without fences the model will wander; with fences it stays exactly on your field.
8. Ask it to ask you (Clarifying Questions). Add to your prompt: "if you're missing information, ask me before you start." This is one of the strongest, most neglected tricks out there. Instead of the model inventing wrong assumptions, it stops and clarifies. This way you avoid getting a complete answer built on a shaky foundation.
9. Let it critique itself and fix it (Self-Critique). After you get an answer, ask: "now critique your own answer, find 3 weaknesses and fix them." The model is capable of checking itself, and round two is almost always better than round one. Why? Because in the first round it's generating content; in the second round it's in critique mode, which is a different task that exposes gaps it didn't see before.
10. Attach a negative example. A "Negative Example" is an example of what you don't want. Sometimes the easiest way to show that is: "don't write like this: [bad example]." This shrinks the guessing space from the opposite direction, marking exactly the pit you shouldn't fall into.
Now the bottom line that ties it all together. The first three techniques, role, context, format, are the skeleton of almost every good prompt. If you remember just one thing: everything running through your head when you think about the task, write it out explicitly. The model doesn't read minds, it reads words.
Let's see exactly what it looks like when you combine several techniques together: a weak prompt versus a prompt that stacks role + context + example + format + constraint:
One last tip from the field: don't try to nail the perfect prompt on your first attempt. Prompt engineering is a loop: write, see what comes back, spot the gap, sharpen. Every round teaches you how the model "thinks," and within a few tries you'll develop an intuition that's worth gold. Start now, in whatever tool you already have open. Let's fly high.
