Unveiling the Secrets of AI Prompting
Make your AI Assistant work as expected : Part-1
Introduction to Prompting:
Many people give a set of instructions to the AI agent and expect the correct or intended output. But the output is not always accurate as expected. Where does this gap happen? Is it the model’s fault or the fault in our prompting. In this article, let’s explore what are the different ways to write a prompt to the AI Assistant so that it can respond the way you intended.
Zero-Shot Prompting:
A Set of instructions is given to the model directly without any proper examples, without any step-by-step thinking/process. The instruction can be precise or detailed. It’s like asking a chef to “make a good pasta” without telling the style (spicy, creamy, white sauce) or showing what you like.
Example:
User: “I want to make a good pasta recipe for dinner.”
AI Assistant: “Sure! Here’s a simple pasta recipe: boil pasta, sauté garlic in olive oil, add tomatoes and spices, mix with pasta, and top with cheese. Serve hot.”
In this case, you may not like red pasta with tomatoes. instead, you may be looking for white pasta. If the assistant gives white pasta with milk ingredients. Maybe you are looking for Vegan-based white pasta.

Few-Shot Prompting:
Few-shot prompting is when you give set of instructions to the model along with a few examples of what kind of output you are looking for. The examples act like a reference, so the model copies the style, format, and level of detail more accurately.
Example:
User:Suggest dinner ideas based on my preference.
Example 1 Preference: “Spicy, vegetarian, Indian” → Suggestion: “Paneer bhurji + roti…”
Example 2 Preference: “Light, high-protein” → Suggestion: “Grilled chicken salad…”
Example 3 Preference: “Quick 15 min” → Suggestion: “Egg stir-fry…”Now: “I want a quick vegan dinner, not too spicy.”
Assistant:
“Chickpea salad wrap, tofu stir-fry with mild seasoning, or hummus bowl with veggies…”
Chain-of-thought prompting:
The model is instructed to break down the thoughts in a step-by-step way and it thinks several times before giving the answer by following all the steps of thought process given by the user
Prompt structure is flexible as per users need
Example
User:
You are an AI Sales Assistant who is expert in deciding which is the best laptop for the user
For the given user input, you analyze the input and break down the requirements step by step.
think of all 5 steps on how can you suggest a best laptop before giving the output
Follow the steps in sequence which includes “gather the requirements”, “gather the reviews“, “analyze”, “think” “decide”, “validate”, “result”.
Rules:
Follow all the given steps
Suggest multiple laptops
Output Format:
Laptop name:
Specifications:
Category
specialty & purpose: in 2-3 paragraphs
Rating:
Example:
“““
User Input: which laptop is best under $1000
Output:
step: “gather the requirements”, content: “ok, the user is looking for a best laptop under $1000”
step: “gather the reviews”, content: “need atleast 4/5 reviews”
step: “think”, content: “What can be his daily use? Mostly people use for casual use, gaming, heavy tasks with software, does he like windows or mac or linux? let’s keep in this in mind of all the categories”
step: “output”, content: “one laptop on mac and explaining the category, specialty & purpose. secong laptop on gaming windows and explaining category, specialty & purpose 3rd office purpose laptop etc”
step: “Validate”, content:”ok, total laptops are 4(any number) of different specifications, categories, specialty & purpose, Rating
step: “result”, content:
Here are the best laptops under $1000
Laptop name:
Specifications:
Category
specialty & purpose: in 2-3 paragraphs
Rating:
…..up to 5 laptops
“““
Assistant:
https://gemini.google.com/share/a710c4d97de2
https://chatgpt.com/share/69877e87-b67c-8010-8c3c-eac15f6b8c00

Self-Consistency prompting:
Self-consistency prompting is a technique where user ask the same model to generate multiple independent solutions for the same question. Then you select the answer that appears most consistently across the outputs. This improves reliability on problems where there is usually one correct answer.
Example:
User Prompt:You are tasked with comparing two numbers and determining which is greater. However, the answer depends on the CONTEXT in which these numbers appear.
Given two numbers: {number_1} and {number_2}
Follow these steps:
Step 1: Identify all possible contexts where these numbers might appear. Generate at least 3-5 different interpretations:
Mathematical/numerical value
Version numbers (software, documents)
Section/chapter references (books, articles)
Dates or time periods
Measurements with implied precision
Other relevant contexts based on the numbers
Step 2: For EACH context, determine which number is greater and explain why. Provide clear reasoning for each interpretation.
Step 3: Summarize your findings. Present which number is greater in each context and identify if there's a dominant interpretation or if context truly matters.
Format your response as:
CONTEXT ANALYSIS:
[Context Name]:
Greater number: [X]
Reasoning: [explanation]
[Context Name]:
Greater number: [X]
Reasoning: [explanation]
[Continue for all contexts...]
SUMMARY:
Mathematical comparison: [result]
Most likely intended context: [your assessment]
Final answer: [context-dependent answer or most probable interpretation]
Example: Numbers to compare: 9.12 and 9.2
AI Assistant: https://chatgpt.com/share/698a85b0-02a0-8002-b635-d4ff758ab4c3
Note: All the attempts and voting happen internally automatically and output can also depend on the context. Refer the above example to understand clearly

AI Assistant’s are not mind readers they respond to patterns, structure, and context provided through prompts. When prompts are vague, the outputs tend to be generic. When prompts are well-structured, contextual, and intentional, the results become far more aligned with what the user actually wants.
In this part, we explored foundational prompting techniques such as zero-shot, few-shot, structured reasoning, and self-consistency. Each approach serves a different purpose, and no single method is universally “best.” The key is understanding when to use each technique and how much guidance the model needs for a given task.
Effective prompting is less about writing longer instructions and more about providing the right signals examples, constraints, structure, and context. As these signals improve, the gap between intent and output narrows significantly.
In Part 2, we’ll build on these foundations and explore more advanced prompting strategies, common pitfalls, and practical patterns that can help you design prompts that are not only accurate, but reliable and repeatable across real-world use cases.