How many times have you asked an AI for something and received an answer completely off track?
Maybe you even thought: “This model is dumb, it doesn’t understand anything I say.”
The truth is very different: the AI isn’t dumb, your prompt is just vague…
Prompt engineering is emerging as one of the most essential skills for working effectively with large language models (LLMs). Far from being a buzzword, it is the practice of designing, refining, and optimizing prompts to unlock the full potential of AI systems. Whether you’re building real-world applications, conducting research, or simply experimenting, the quality of your prompt often determines the quality of the output.
In this article, we’ll explore why vague prompts lead to disappointing results, how to craft precise instructions that guide LLMs effectively, and which advanced prompting techniques, such as Few-Shot and Chain-of-Thought, can dramatically improve reliability. The AI isn’t dumb; it’s just waiting for you to speak its language.
The Basics of Prompts
At its core, a prompt is simply the instruction you give to a language model.
But the quality of the output depends heavily on how precise and well-structured that instruction is. A prompt can be as minimal as a short phrase, or it can include richer details such as context, constraints, and examples to guide the model more effectively.
Here’s a simple example:
Prompt
The capital of France is
Output
Paris.
You can observe from the prompt example above that the language model responds with a sequence of tokens that make sense given the context “The capital of France is”.
A prompt can include different elements, depending on the task you want to achieve:
Instruction – the specific task or request for the model
Context – external information or details that steer the response
Input Data – the actual input or question you want answered
Output Indicator – the format or type of output you expect
To see this in practice, here’s a simple text classification prompt:
Prompt
Translate the following sentence into French:
Text: The weather is nice today.
Translation:
In this example, the instruction is the translation request, “Translate the following sentence into French.”.
The input data is the text to be translated, “The weather is nice today.”.
The output indicator is “Translation:”.
Here we’re not using context, but it could be added, for example, by specifying the desired tone (formal vs. informal) or by giving a few examples of translations to guide the model toward your preferred style.
Prompting Techniques
Once you understand the basics of how prompts work, the next step is learning how to structure them effectively. Prompting techniques provide different strategies for guiding a language model toward the outcome you want. These techniques don’t change the model itself, they change the way you interact with it.
Here are some of the most important techniques:
1 – Zero-Shot
Zero-shot prompting means you ask the model to perform a task without providing any examples beforehand. The instruction alone should be enough for the model to infer the expected behavior.
Prompt
Translate "Hello, how are you?" into Spanish.
Output
Hola, ¿cómo estás?
This works well for simple tasks, but for more complex reasoning, the model often struggles.
In addition to zero-shot, we also have one-shot/1-shot, where only 1 example is inserted, two-shot/2-shot, where 2 examples are inserted, and so on.
2 – Few-Shot
Few-shot prompting introduces demonstrations inside the prompt to guide the model toward better performance. These examples act as a form of in-context learning, conditioning the model to follow the same structure and style when answering the actual query.
Few shot properties first appeared when models were scaled to a sufficient size.
Prompt
Translate the following into Spanish.
"Good morning" → "Buenos días"
"Thank you" → "Gracias"
"See you tomorrow" →
Output
"See you tomorrow" → "Hasta mañana"
We can observe that the model has somehow learned how to perform the task by providing it with a few examples.
By embedding examples, you reduce ambiguity and set expectations. The model doesn’t just infer the task from instructions but learns from the pattern of demonstrations, resulting in more accurate and consistent outputs.
Practical Notes on Demonstrations
Experiments show that demonstrations don’t have to be perfect to improve results. Some important insights:
Labels and categories matter: defining the right label space helps the model align with the task.
Structure is powerful: keeping a consistent input-output format makes it easier for the model to generalize.
Distribution influences performance: having examples that resemble the real task distribution is often better than random ones.
Here’s an experiment with intentionally noisy labels:
Prompt
The service was excellent → Negative
The food arrived cold and late → Positive
I had a great time at the concert → Positive
The hotel room was dirty →
Output
The hotel room was dirty → Negative
Even though some labels are swapped incorrectly, the model still predicted the correct sentiment because it recognized the formatting pattern.
And here’s a second experiment where the format itself is inconsistent:
Prompt
Positive → The service was excellent
The food arrived cold and late
← Negative
Great concert vibes! Positive
Dirty hotel room → ?
Output
Dirty hotel room → Negative
Despite the messy style, the model was still able to infer the correct output. While modern LLMs are surprisingly robust to noisy demonstrations, well-structured and carefully chosen examples remain the best way to get reliable performance.
3 – Chain-of-Thought (CoT)
Chain-of-Thought prompting is a technique where you explicitly ask the model to reason step by step before giving the final answer. Instead of jumping straight to a conclusion, the model exposes its intermediate reasoning, which often leads to more accurate results in logical or multi-step problems.
You can combine it with few-shot prompting to get better results on more complex tasks that require reasoning before responding.
Prompt
The number of vowels in the sentence is greater than 5: "Machine learning is fun".
A: Counting the vowels (a, i, e, e, a, i, i, u) gives 8. The answer is True.
The number of vowels in the sentence is greater than 5: "AI works fast".
A: Counting the vowels (A, I, o, a) gives 4. The answer is False.
The number of vowels in the sentence is greater than 5: "Programming keeps me awake".
A:
Output
A: Counting the vowels (o, a, i, e, e, e, a, a, e) gives 9. The answer is True.
Here the model isn’t guessing, it follows the reasoning steps to reach the conclusion. That’s the essence of Chain-of-Thought prompting: breaking a problem into parts reduces mistakes and improves reliability.
Even with just one example, the model can generalize:
Prompt
The number of vowels in the sentence is greater than 5: "AI works fast".
A: Counting the vowels (A, I, o, a) gives 4. The answer is False.
The number of vowels in the sentence is greater than 5: "Knowledge is power".
A:
Output
Counting the vowels (o, o, e, i, o, e) gives 6. The answer is True.
This shows how a single demonstration of reasoning can guide the model to apply the same logic to new sentences
4. Self-Consistency
Perhaps one of the more advanced techniques out there for prompt engineering is self-consistency, instead of generating one reasoning path, you ask the model to produce several, then select the most consistent answer among them
Prompt
Sara bought 3 packs of 8 markers and gave away 7. How many remain?
Show steps, then `Final: <number>`.
Output #1 → 3×8=24; 24−7=17. Final: 17
Output #2 → 8+8+8=24; 24−7=17. Final: 17
Output #3 → 3+8=11; 11−7=4 (wrong). Final: 4
Consensus → {17: 2 votes, 4: 1 vote} → Answer = 17
Practical tips.
Use output = 5–20 for tougher tasks; keep temperature ~0.7–1.0 to diversify chains.
Normalize answers (e.g., strip units/whitespace) before voting.
For open-ended tasks, add a verifier prompt or constraints; majority ≠ correctness when multiple outputs are valid.
Combine with CoT (for reasoning) and Instruction + Context (to bound the space) for best results.
5 -Tree-of-Thought (ToT)
Tree-of-Thought prompting takes the idea of Chain-of-Thought further. Instead of following a single linear reasoning path, the model branches into multiple intermediate steps (thoughts), exploring alternatives before converging on the final answer. It’s like a decision tree, where each branch represents a possible line of reasoning.
Prompt
Solve the following problem using a Tree-of-Thought approach.
At each stage, propose at least 3 possible paths (labeled as Branch A, Branch B, Branch C).
For each branch, check whether it is valid or invalid.
Discard invalid branches and continue expanding the valid ones.
Stop when you reach a final consistent answer.
Problem: A farmer has 50 apples. He sells 18 and gives 7 to his neighbor.
How many apples does he have left?
It’s important to point out that some language models will not explicitly display the Tree-of-Thought steps in their output. This doesn’t mean the model isn’t internally processing the task in a branching way, it may simply summarize the reasoning into a direct answer.
Output
Stage 1: Generate candidate branches
- Branch A: Subtract only 18 (apples sold) → 32
- Branch B: Subtract only 7 (apples given) → 43
- Branch C: Subtract both 18 and 7 → 25
Stage 2: Validate branches
- Branch A: Incomplete (ignored 7) → discard
- Branch B: Incomplete (ignored 18) → discard
- Branch C: Complete (considered both) → keep
Final Answer: 25
When to use it
Puzzles, planning, search, and combinatorial problems.
Situations where a single CoT chain may miss valid solutions.
Tasks where backtracking and evaluation improve reliability.
6 – Multi-Expert
Multi-Expert Prompting is a technique where the model is asked to simulate multiple experts with different perspectives. Each “expert” provides reasoning or a partial solution, and then their outputs are compared, combined, or voted on to reach a final answer.
Prompt
Three experts will analyze the same problem.
- Expert A is a mathematician.
- Expert B is a software engineer.
- Expert C is a teacher explaining concepts simply.
Each expert will provide a short reasoning path and an answer.
At the end, compare their results and choose the most consistent answer.
Problem: A train has 120 passengers. At the next station, 35 get off and 22 get on.
How many passengers are on the train now?
Experts with different “profiles” (e.g., mathematician, engineer, critic) emphasize different aspects of the same problem.
One expert may catch flaws that others miss.
Convergence among different experts increases trust in the final output.
Multi-Expert Prompting can be seen as a lightweight version of multi-agent systems.
In multi-agent architectures, each agent is often an independent LLM instance (or at least a separate reasoning loop), possibly with memory, goals, and communication protocols.
In multi-expert prompting, the “agents” are personas inside the same model, coordinated by the prompt itself.
7 – Self-Critique
Self-Critique is a prompting technique where the model is asked to evaluate and improve its own output. Instead of relying only on a single pass of reasoning, the model generates an initial answer, then steps back to critique that answer, pointing out flaws or missing details. Finally, it provides a revised, higher-quality response.
Prompt
Question: Explain why the Earth has seasons.
Step 1: Provide your initial answer.
Step 2: Critique your own answer, pointing out possible errors or gaps.
Step 3: Write a revised and improved answer.
Any task where a first draft + review structure produces better results than a single attempt.
The Power of Advanced Prompting Techniques
To ground this discussion in real-world evidence, let’s look at a research effort from MIT titled “Exploring the MIT Mathematics and EECS Curriculum using Large Language Models.” In this study, researchers demonstrated that GPT-4 was able to achieve a remarkable 100% success rate when answering questions drawn from two MIT undergraduate courses.
The results (summarized in the table below) highlight a key insight: reaching such high levels of accuracy was not the product of a single strategy, but the result of combining multiple prompting techniques.

| Technique | Description |
|---|---|
| FS (Few-Shot) | Demonstrations to guide in-context learning |
| CoT (Chain of Thought) | Step-by-step reasoning for complex tasks |
| Self-Critique | Self-evaluation and refinement of answers |
| Experts | Multiple perspectives converging on consensus |
This case shows that the real strength of prompt engineering often lies in orchestration
Conclusion
Large Language Models are not “dumb”, they simply respond to the instructions they are given…
A vague prompt leaves too much space for ambiguity, while a well-structured one creates the clarity needed for accurate and consistent outputs.
As developers, researchers, or even curious practitioners, mastering prompt engineering means treating prompts as carefully as we treat code, testing, refining, and structuring them for the desired outcome.
The AI isn’t failing you; it’s waiting for you to speak its language with precision…
The next step is yours: experiment with these prompting techniques, adapt them to your domain, and see how much further your AI-driven applications can go when the prompts are designed with intention.
Thank you for reading.
See you next time!



