Prompting and it's Techniques

Table of contents

Prompting is a like a you are ordering food in the restaurant and it can be different ways to order just like prompting techniques.
Prompting
Prompting is a instructions which is provide to the AI for getting desired outputs.
Here is a 10 Prompting Techniques which I discuss to understand using Ordering Restaurant Food Example.
Prompting Techniques
1. Zero-Shot Prompting
"Surprise me."
No examples. No context. Just ask your question and let the AI figure it out.
Example:
What’s the capital of Brazil?
Answer: Brasília
2. Few-Shot Prompting
"Here’s how I like my pasta. Can you make something like that?"
You give a few examples first, so the AI picks up on the pattern.
Example Prompts:
Q: What’s the capital of France?
A: Paris
Q: What’s the capital of Germany?
A:
More accurate because you showed what you’re looking for.
3. Chain-of-Thought Prompting
"Explain the steps, not just the result."
Ask the AI to think out loud. That way, it avoids rushed or wrong answers.
Example:
Sarah has 5 cookies and eats 2. How many are left? Explain your answer.
The AI walks through the logic like it’s following a recipe.
4. Self-Consistency Prompting
"Ask a few chefs, pick the best dish."
AI tackles the same question multiple times with chain-of-thought reasoning, then goes with the most consistent answer.
Useful for complex tasks that need accuracy.
5. Instruction Prompting
"Follow these steps exactly."
Clear, specific directions. No guessing.
Example:
Write a friendly email to reschedule a Zoom meeting for Friday.
Simple and reliable when you know what you want.
6. Direct Answer Prompting
"Just tell me the answer."
No need for a breakdown—just the info.
Example:
What’s 15 x 4?
Answer: 60
Straight to the point.
7. Persona-Based Prompting
"Answer like Gordon Ramsay would."
Ask the AI to take on a certain personality or tone.
Example:
You are Steve Jobs. What’s your take on innovation?
Adds character and a unique voice to the reply.
8. Role-Playing Prompting
"You’re the chef. I’m the critic. Go."
AI plays a role in a scenario. Great for practice or creative setups.
Example:
Act like a tech interviewer. Ask me three questions.
Good for simulations, learning, and storytelling.
9. Contextual Prompting
"Here’s everything you need to know before you cook."
The more context you give—like background or preferences—the better the AI can tailor its response.
Example:
I’m writing a resume for a frontend developer role. Can you improve this summary?
The better the input, the better the output.
10. Multimodal Prompting
"Here’s a picture—can you work from this?"
Instead of just text, you feed the AI an image, audio, or other format. And it responds accordingly.
Example:
Here’s a photo of a handwritten note. Can you type it out and summarize it?
AI that sees and hears, not just reads.
Final Thoughts: Order Smart, Prompt Better
Prompting is like giving a good food order:
Want it fast? Be direct.
Want it your way? Add details.
Want it done right? Show examples.
The more clearly you ask, the better the AI can deliver.
#chaicode #prompt #promptingtechniques #ai #chaiaurcohort #GenAI
Subscribe to my newsletter
Read articles from Ansh Mittal directly inside your inbox. Subscribe to the newsletter, and don't miss out.
Written by

Ansh Mittal
Ansh Mittal
I have a MERN Development knowledge and Strong JavaScript expertise and frontend development expertise for creating user-friendly websites along with impressive functionalities. I can deliver maintainable and scalable code with Best Practices of coding, SEO and Web accessibility. I can create website with AI Integration or Rag Systems.