Mastering 7 Essential AI Prompting Techniques

Sep 20, 2025#AI#ML#Prompting

Have you ever typed something into ChatGPT, and the answer was… just okay? 😞 And then, another time, you asked differently — and suddenly it was brilliant?.

That difference is all about prompting.

We’re going to look at seven prompting techniques that researchers and creators use to get the best out of language models. By the end of this post, you’ll have a toolbox you can actually use — whether you’re coding, writing, studying, or just exploring.”

What is Prompting?

Prompting is basically the way we talk to an AI.

But here’s the catch — prompting isn’t a built-in feature. It’s an emergent property. In other words, nobody coded a special module called prompting. We discovered these tricks by experimenting with how language models behave.

It’s like teaching someone a new language — the way you ask the question changes the answer you get.

Let’s start with the simplest one: zero-shot prompting.

1️⃣ Zero-Shot Prompting

You ask an AI model to perform a task without providing any examples of how it should be done. Instead, you only describe the task in natural language, and the model has to infer the pattern and generate the correct output based purely on instructions and its prior knowledg.

This technique easy to use, fast, and works for many tasks, but the results can be less accurate, depend a lot on how you phrase the request, and may be inconsistent.

Classify this review as positive or negative:
The movie was slow, but the acting was brilliant.
Positive
Translate this sentence into French:
'I am going to the library tomorrow.'
Je vais à la bibliothèque demain.
Summarize the following paragraph in one sentence:
Artificial intelligence is a rapidly growing field...
AI is a field that develops machines to perform human-like tasks.
Write a haiku about autumn.
Leaves drift to the ground, whispers of the cooling wind, harvest moon shines bright.

2️⃣ Few-Shot Prompting

In this context, “shot” means example.

  • Zero-shot → no examples, just instructions.
  • One-shot → one example + instructions.
  • Few-shot → a few examples + instructions.

It’s like giving the AI a “shot” at learning the pattern from your prompt. The more “shots” (examples) you give, the better it usually understands the task.

People often talk more about zero-shot (fast, no examples) and few-shot (stronger, with several examples). One-shot is useful, but in practice, if you’re already preparing a prompt, it’s almost as easy to add more than one example — so “few-shot” gets more attention.

Classify reviews as Positive or Negative.

Review: "The food was delicious and the service was excellent." → Positive
Review: "The wait time was terrible and the food was cold." → Negative
Review: "Great atmosphere but overpriced drinks." →
Negative
Translate English to Spanish.

English: "Good morning." → Spanish: "Buenos días."
English: "How are you?" → Spanish: "¿Cómo estás?"
English: "See you tomorrow." → Spanish:
"Nos vemos mañana."
Summarize in one sentence.

Text: "The stock market soared today due to positive earnings reports from major companies." → "Stocks rose after strong earnings."
Text: "Heavy rains caused flooding in several cities across the region." → "Flooding hit cities after heavy rain."
Text: "Artificial intelligence is transforming industries worldwide, from healthcare to finance." →
"AI is changing industries globally."

3️⃣ Chain-of-Thought Prompting

Sometimes you don’t just want an answer, you want reasoning. That’s where chain-of-thought prompting comes in. You literally ask the model to ‘think step by step.’

Instead of jumping straight to the result, the model “thinks out loud” in natural language, which usually improves accuracy on tasks that involve logic, math, or multi-step reasoning.

Common trigger phrases include:

  • Think step by step.
  • Explain your reasoning.
  • Show the steps before giving the answer.
  • Work it out carefully.
  • What are the key steps to solve this problem?
  • Go through each part of the problem and explain how you’ll solve it.
  • Break down the problem into sub-problems.

If a train travels 60 miles per hour for 2 hours,
then 30 miles per hour for 1 hour, how far does it go?
Think step by step.

First, calculate distance in first part: 60 mph × 2 hours = 120 miles.
Then, second part: 30 mph × 1 hour = 30 miles.
Add them: 120 + 30 = 150 miles.
Answer: 150 miles.

Tom has twice as many apples as Sarah. Sarah has 4 apples.
How many apples do they have in total?
Explain your reasoning.

Sarah has 4 apples.
Tom has twice that, so 2 × 4 = 8 apples.
Together they have 4 + 8 = 12 apples.
Answer: 12 apples.


The benefit is clearer reasoning and usually better accuracy, but the downside is longer responses and sometimes unnecessary or incorrect steps. It’s best used for complex problems, not simple factual tasks.

4️⃣ Generated Knowledge Prompting

A technique where the model is first asked to generate some background information or context about a problem, and then that knowledge is used to answer the actual question. Instead of jumping straight to the solution, the model creates intermediate facts or explanations to “prime” itself. This often improves accuracy, especially for reasoning or domain-specific tasks.

List some facts about the Great Wall of China.
• Built as defensive fortification over many dynasties.
• Constructed using brick, tamped earth, wood, and stone.
• Sections stretch thousands of miles across northern China.
• Served for troop movement, lookout posts, and signaling.
Based on the above facts, why was the Great Wall originally built?
The Great Wall was originally built as a defense system to protect Chinese states and empires from invasions and raids, to allow troop movements, and to provide lookout and signaling posts along vulnerable borders.
Generate key concepts about photosynthesis.
• Uses sunlight to convert CO₂ and H₂O into glucose and O₂.
• Occurs mainly in chloroplasts (pigment: chlorophyll).
• Two main stages: light-dependent reactions and Calvin cycle.
• Produces chemical energy (ATP, NADPH) used to fix carbon.
Using the above, explain why sunlight is essential for photosynthesis.
Sunlight provides the energy for light-dependent reactions in chloroplasts, allowing chlorophyll to drive electron transport that makes ATP and NADPH; these energy carriers then power the Calvin cycle to fix carbon into glucose, so without sunlight the whole process cannot proceed.

5️⃣ Least-to-Most Prompting

A technique where a complex problem is broken down into a sequence of simpler subproblems, and the AI is guided to solve them step by step, starting with the easiest part and gradually moving to the hardest.

The idea is to reduce cognitive load for the model — instead of tackling the whole problem at once, it solves simpler pieces first, building toward the final answer. This often improves performance on multi-step reasoning, math, or logic task.

Alice has 3 apples. Bob gives her 2 more apples. How many apples does Alice have now?
Alice has 3 + 2 = 5 apples.
If Alice eats 2 apples, how many does she have left?
5 - 2 = 3 apples left.
Alice wants to share her remaining apples equally with 2 friends. How many apples does each person get?
3 apples ÷ 3 people = 1 apple each.

6️⃣ Self-Refine Prompting

A technique where the AI is asked to review and improve its own initial answer, often iteratively, to produce a more accurate or polished result. Instead of just providing one answer, the model evaluates its output, identifies mistakes or gaps, and refines it.

It’s distinct from other techniques because it doesn’t require a human to provide the feedback or a separate model for the critique. Particularly effective for complex tasks like code optimization, creative writing, or long-form content generation, where a single prompt is unlikely to produce a perfect result.

Write a short summary of photosynthesis in one sentence.
Photosynthesis is the process where plants use sunlight to make food.
Check your previous answer and improve it to be more precise and informative.
Photosynthesis is the process by which plants use sunlight, carbon dioxide, and water to produce glucose and oxygen.

7️⃣ Maieutic Prompting

A technique inspired by the Socratic method of “maieutics,” or “midwifery.” The core idea is to guide the AI to “give birth” to its own insights and understanding through a series of structured, open-ended questions, rather than simply giving it a direct instruction.

Just as Socrates would ask questions to help his students uncover truths they already held within their minds, maieutic prompting uses questions to draw out the reasoning, knowledge, and potential solutions that the AI already possesses.

Instead of a single, long-winded prompt, maieutic prompting involves a back-and-forth conversation. You might start with a broad question and then follow up with more specific, probing questions based on the AI’s response.

What does a plant need to create its own food?
A plant needs three main things to make its food: sunlight, water, and carbon dioxide.
Where does it get each of those things from?
Sunlight comes from the sun, of course. A plant absorbs it through its leaves.
Water is taken from the soil by the roots.
Carbon dioxide is a gas that plants absorb from the air, also through their leaves.
What does the plant do with those three ingredients? What's the process called?
The plant uses the energy from sunlight to combine the water and carbon dioxide. This chemical reaction creates glucose, which is the plant's food. This entire process is called photosynthesis. As a byproduct, the plant also releases oxygen.

Conclusion

Mastering AI prompting techniques is the key to unlocking the full potential of large language models. From zero-shot simplicity to few-shot guidance, from reasoning-oriented methods like chain-of-thought and least-to-most, to advanced strategies like self-refine and maieutic prompting, each approach offers unique advantages depending on your task.

By understanding and experimenting with these techniques, you can guide AI more effectively, produce higher-quality outputs, and solve complex problems with confidence. Ultimately, the best results come from combining these strategies thoughtfully, adapting them to your specific goals, and iterating to find what works best.