- Blog Categories
- Project Management
- Agile Management
- IT Service Management
- Cloud Computing
- Business Management
- BI And Visualisation
- Quality Management
- Cyber Security
- DevOps
- Most Popular Blogs
- PMP Exam Schedule for 2025: Check PMP Exam Date
- Top 60+ PMP Exam Questions and Answers for 2025
- PMP Cheat Sheet and PMP Formulas To Use in 2025
- What is PMP Process? A Complete List of 49 Processes of PMP
- Top 15+ Project Management Case Studies with Examples 2025
- Top Picks by Authors
- Top 170 Project Management Research Topics
- What is Effective Communication: Definition
- How to Create a Project Plan in Excel in 2025?
- PMP Certification Exam Eligibility in 2025 [A Complete Checklist]
- PMP Certification Fees - All Aspects of PMP Certification Fee
- Most Popular Blogs
- CSM vs PSM: Which Certification to Choose in 2025?
- How Much Does Scrum Master Certification Cost in 2025?
- CSPO vs PSPO Certification: What to Choose in 2025?
- 8 Best Scrum Master Certifications to Pursue in 2025
- Safe Agilist Exam: A Complete Study Guide 2025
- Top Picks by Authors
- SAFe vs Agile: Difference Between Scaled Agile and Agile
- Top 21 Scrum Best Practices for Efficient Agile Workflow
- 30 User Story Examples and Templates to Use in 2025
- State of Agile: Things You Need to Know
- Top 24 Career Benefits of a Certifed Scrum Master
- Most Popular Blogs
- ITIL Certification Cost in 2025 [Exam Fee & Other Expenses]
- Top 17 Required Skills for System Administrator in 2025
- How Effective Is Itil Certification for a Job Switch?
- IT Service Management (ITSM) Role and Responsibilities
- Top 25 Service Based Companies in India in 2025
- Top Picks by Authors
- What is Escalation Matrix & How Does It Work? [Types, Process]
- ITIL Service Operation: Phases, Functions, Best Practices
- 10 Best Facility Management Software in 2025
- What is Service Request Management in ITIL? Example, Steps, Tips
- An Introduction To ITIL® Exam
- Most Popular Blogs
- A Complete AWS Cheat Sheet: Important Topics Covered
- Top AWS Solution Architect Projects in 2025
- 15 Best Azure Certifications 2025: Which one to Choose?
- Top 22 Cloud Computing Project Ideas in 2025 [Source Code]
- How to Become an Azure Data Engineer? 2025 Roadmap
- Top Picks by Authors
- Top 40 IoT Project Ideas and Topics in 2025 [Source Code]
- The Future of AWS: Top Trends & Predictions in 2025
- AWS Solutions Architect vs AWS Developer [Key Differences]
- Top 20 Azure Data Engineering Projects in 2025 [Source Code]
- 25 Best Cloud Computing Tools in 2025
- Most Popular Blogs
- Company Analysis Report: Examples, Templates, Components
- 400 Trending Business Management Research Topics
- Business Analysis Body of Knowledge (BABOK): Guide
- ECBA Certification: Is it Worth it?
- Top Picks by Authors
- Top 20 Business Analytics Project in 2025 [With Source Code]
- ECBA Certification Cost Across Countries
- Top 9 Free Business Requirements Document (BRD) Templates
- Business Analyst Job Description in 2025 [Key Responsibility]
- Business Analysis Framework: Elements, Process, Techniques
- Most Popular Blogs
- Best Career options after BA [2025]
- Top Career Options after BCom to Know in 2025
- Top 10 Power Bi Books of 2025 [Beginners to Experienced]
- Power BI Skills in Demand: How to Stand Out in the Job Market
- Top 15 Power BI Project Ideas
- Top Picks by Authors
- 10 Limitations of Power BI: You Must Know in 2025
- Top 45 Career Options After BBA in 2025 [With Salary]
- Top Power BI Dashboard Templates of 2025
- What is Power BI Used For - Practical Applications Of Power BI
- SSRS Vs Power BI - What are the Key Differences?
- Most Popular Blogs
- Data Collection Plan For Six Sigma: How to Create One?
- Quality Engineer Resume for 2025 [Examples + Tips]
- 20 Best Quality Management Certifications That Pay Well in 2025
- Six Sigma in Operations Management [A Brief Introduction]
- Top Picks by Authors
- Six Sigma Green Belt vs PMP: What's the Difference
- Quality Management: Definition, Importance, Components
- Adding Green Belt Certifications to Your Resume
- Six Sigma Green Belt in Healthcare: Concepts, Benefits and Examples
- Most Popular Blogs
- Latest CISSP Exam Dumps of 2025 [Free CISSP Dumps]
- CISSP vs Security+ Certifications: Which is Best in 2025?
- Best CISSP Study Guides for 2025 + CISSP Study Plan
- How to Become an Ethical Hacker in 2025?
- Top Picks by Authors
- CISSP vs Master's Degree: Which One to Choose in 2025?
- CISSP Endorsement Process: Requirements & Example
- OSCP vs CISSP | Top Cybersecurity Certifications
- How to Pass the CISSP Exam on Your 1st Attempt in 2025?
- Most Popular Blogs
- Top 7 Kubernetes Certifications in 2025
- Kubernetes Pods: Types, Examples, Best Practices
- DevOps Methodologies: Practices & Principles
- Docker Image Commands
- Top Picks by Authors
- Best DevOps Certifications in 2025
- 20 Best Automation Tools for DevOps
- Top 20 DevOps Projects of 2025
- OS for Docker: Features, Factors and Tips
- More
- Agile & PMP Practice Tests
- Agile Testing
- Agile Scrum Practice Exam
- CAPM Practice Test
- PRINCE2 Foundation Exam
- PMP Practice Exam
- Cloud Related Practice Test
- Azure Infrastructure Solutions
- AWS Solutions Architect
- IT Related Pratice Test
- ITIL Practice Test
- Devops Practice Test
- TOGAF® Practice Test
- Other Practice Test
- Oracle Primavera P6 V8
- MS Project Practice Test
- Project Management & Agile
- Project Management Interview Questions
- Release Train Engineer Interview Questions
- Agile Coach Interview Questions
- Scrum Interview Questions
- IT Project Manager Interview Questions
- Cloud & Data
- Azure Databricks Interview Questions
- AWS architect Interview Questions
- Cloud Computing Interview Questions
- AWS Interview Questions
- Kubernetes Interview Questions
- Web Development
- CSS3 Free Course with Certificates
- Basics of Spring Core and MVC
- Javascript Free Course with Certificate
- React Free Course with Certificate
- Node JS Free Certification Course
- Data Science
- Python Machine Learning Course
- Python for Data Science Free Course
- NLP Free Course with Certificate
- Data Analysis Using SQL
- Home
- Blog
- Data Science
- Prompting Techniques: 9 Techniques for Better AI Results and Responses
Prompting Techniques: 9 Techniques for Better AI Results and Responses
Updated on Oct 05, 2026 | 0.8k+ views
Share:
Table of Contents
View all
Quick Overview
- Prompting techniques include zero-shot, one-shot, few-shot, chain-of-thought, self-consistency, least-to-most, role prompting, ReAct, and Tree of Thoughts.
- Zero-shot, one-shot, and few-shot prompting differ mainly in the number of examples given to the AI, from none to one or multiple examples.
- Reasoning-based techniques such as chain-of-thought, self-consistency, and least-to-most prompting help handle tasks that require multiple reasoning steps.
- Advanced techniques such as ReAct and Tree of Thoughts are useful for tool-based workflows, complex planning, and exploring multiple possible solutions.
- This guide covers how each prompting technique works, where to use it, practical examples, and how to choose the right technique based on task complexity and desired output.
Want to apply prompting techniques more effectively? Build practical skills with upGrad KnowledgeHut Generative AI and Prompt Engineering Course for Professionals.
What are the main types of prompting techniques?
Prompting techniques are techniques of writing and structuring the instruction to an AI tool to make it understand the task and respond to it appropriately.
There are three broad groups of the key prompting techniques:

1. Foundational prompting techniques
Foundational techniques are the most basic approaches that can be used in everyday work with AI. The only difference between them lies in the number of examples shown to the AI before asking it to do something.
Examples of foundational prompting techniques are:
- Zero shot prompting
- One shot prompting
- Few shot prompting
2. Reasoning-based prompting techniques
Reasoning based techniques are helpful when a task involves several logical steps in order to achieve an appropriate outcome. They encourage AI models to consider the problem in a systematic manner.
Such types of techniques may be used in mathematics, analysis, problem solving, and similar types of tasks which require logical steps to arrive at an answer.
Examples of reasoning based techniques are:
- Chain of Thought prompting
- Self Consistency prompting
- Least to Most prompting
3. Advanced agentic prompting techniques
Advanced techniques can be applied in case of tasks related to planning, decision making, usage of tools or a variety of solutions. These types of strategies are especially important where AI programs have to reason through an issue instead of providing an answer directly.
Examples of such advanced techniques include:
- Role prompting
- ReAct prompting
- Tree of Thoughts prompting
Also Read: Prompt Engineering for Beginners: Step-by-Step Guide
What are the main foundational prompting techniques?
Foundational prompting is a basic way of instructing the AI. Foundational prompting is suitable for new users since it requires little prompt engineering and expertise.
There are three types of the foundational prompting technique which include zero shot, one shot and few shot prompting. The difference between the various types is the number of examples provided prior to performing the task.
Also Read: What is Prompt in AI?
1. Zero-Shot prompting
Zero-shot prompting means instructing an AI to do something without giving any example of how it should be done. The word 'zero' in this context relates to the number of examples provided.
How it works: AI learns from massive data sets of text during the training process. Once a proper instruction is given, the model utilizes the learned knowledge to understand the context and respond accordingly.
Example: “Provide a summary of the benefits of working remotely in 100 words.”
The AI gets the instruction directly and finishes the task without needing any further instructions.
Best use cases of Zero-shot prompting
Zero-shot prompting works well for:
- General questions
- Summarization
- Brainstorming ideas
- Content generation
- Simple research tasks
2. One-Shot prompting
One-shot prompting consists of providing a single example before asking the AI to complete the task. The example serves as a reference point for the model to understand the desired format, tone or style.
Example:
Change the sentence to a more professional form.
Example: “Send me the report today.” → “Please share the report by the end of the day.”
Now change: “I need the presentation quickly.”
The example above allows the AI to understand how to construct the answer.
One-shot prompting is useful when:
- You need a specific output format
- The task is relatively simple
- A single example clearly demonstrates the pattern
3. Few-Shot prompting
Few shot prompting provides the AI with various examples before making it perform a similar task. By observing various examples, the AI is able to learn the pattern and apply it to a new input. The various examples allow the AI to have a better idea of the way various reviews should be classified.
Among other foundational prompting techniques, few-shot prompting is considered the most reliable one.
Example:
Classify the reviews into Positive, Negative, and Neutral:
"The delivery was very fast." - Positive
"The product stopped working within one week." - Negative
"The product is good, but delivery was late." - Neutral
Now classify: "The quality is excellent, but the packaging is damaged."
Few-shot prompting is particularly useful when:
- Consistent formatting is required
- Accuracy is important
- Classification or extraction tasks are involved
- You need predictable outputs
Also Read: Prompt Engineering Best Practices for High Quality Outputs
What are the most effective reasoning-based prompting techniques?
Reasoning-based prompting techniques are designed for situations where a simple answer is not enough and the AI needs to analyze, reason, or solve a problem step by step. Some of these techniques are:
1. Chain-of-Thought (CoT) prompting
Chain of Thought or CoT prompting is a method where an AI model is asked to solve a problem through a series of reasoning processes.
Example:
What would be the total cost of 15 notebooks sold for ₹80 each with a 10% discount?
Calculation:
Original cost = 15 × ₹80 = ₹1,200
Discount = 10% of ₹1,200 = ₹120
Total cost = ₹1,200 - ₹120 = ₹1,080
CoT prompting can be helpful in solving problems that are mathematical in nature or logical questions or any questions that require a series of steps.
2. Self-consistency prompting
Self-consistency prompting involves using a problem-solving strategy in a slightly advanced way. Rather than having only one path of reasoning, the model can explore many paths and determine which answer is most consistent.
Example:
A shop gives a 20% discount on a product that costs ₹2,500. What is the final cost?
Two different calculation approaches may be considered here:
- Calculate the discount first and subtract it from the original price.
- Calculate the remaining 80% of the original price.
Both the approaches give ₹2,000.
Self consistency prompting is very effective in situations when several reasoning processes could be considered. It will be especially helpful in logical and mathematical questions.
3. Least-to-Most prompting
Least to Most involves the division of an apparently complex task into simple components. First, the AI solves the simplest components and subsequently uses the results to tackle the complex task.
Example:
Create a marketing strategy for a new online fitness program.
Rather than asking for the entire marketing strategy all at once, the task can be split as follows:
- Identify the target audience.
- Identify the audience's main problems.
- Select suitable marketing channels.
- Develop content ideas.
- Create a campaign structure.
- Define performance metrics.
Such divisions make a big task simpler to handle.
Least to Most prompting may be useful in research, planning, analysis, programming, and various other situations whereby one output depends on another earlier output.
Learn how prompting techniques fit into modern AI workflows with the Applied Agentic AI Certification Course [Best in 2026], designed for practical agentic AI applications.
What advanced prompting techniques are used for complex AI tasks?
Advanced prompting is helpful for situations where an AI system requires additional information or different methods of reasoning, or interaction with other programs.
Below are some advanced prompting techniques.
1. Role prompting
The role prompting provides the AI with a certain role or perspective before being asked to perform some tasks. It allows directing on what type of the answer is required by providing the expected tone or expertise.
Example:
Act as an experienced SEO consultant. Provide five ways a small business can increase its website ranking. Use clear language and give examples for each suggestion.
In this case, the role, task and target audience for the AI is provided. This can help to receive a more relevant answer.
Role prompting can be helpful in content creation, teaching, brainstorming, business analysis, customer service, and explanations.
2. ReAct prompting
ReAct stands for Reasoning and Acting. This is an AI technique where the system combines reasoning and actions like performing a search query, accessing some information, or interacting with other tools.
The process here does not involve generating a response. Instead, the AI agent follows a process of:
Understanding the task → making a decision → taking an action → observing the outcome → and continue
Example:
Someone is asking an AI assistant the following question:
Identify three good hotels in Delhi for a business visit, compare them based on cost and location, and recommend the best one.
An AI system with a tool would have to perform search and gather information for comparing hotels before making the decision.
ReAct prompting is quite effective in tasks for AI agents where there is involvement of other tools or information.
3. Tree of Thoughts prompting
Tree of Thoughts prompting gives an opportunity to the AI system to discover several different approaches to a problem instead of being confined to a single approach.
Consider it as an attempt to create branches from some starting point. Every created branch means a possible solution that can be investigated and analyzed.
Example:
An organization needs to boost its sales online. Name three possible approaches, analyze their pros and cons, and provide recommendations on what would be the best approach for a small business having budget restrictions.
An AI may discover various options such as:
Boost online sales
- SEO strategy
- Paid advertising
- Email marketing
All these approaches may be analyzed according to such criteria as cost, efforts, expected results, etc.
Tree of Thoughts prompting can be helpful in strategic planning, decision-making, creative problem-solving, and other tasks that have multiple possible solutions.
Looking to apply AI beyond individual prompts? The AI-Powered Product Management Certification with Microsoft can help you use AI across practical product management workflows.
How do you choose the right prompting technique?
There is no single best technique for every situation. A practical approach is to start with the simplest method and add complexity only when the task requires it.
Based on task complexity
Task complexity is one of the simplest ways of determining the appropriate method. For a simple and familiar task, zero shot prompting may be enough.
For example: Summarize this article in five bullet points.
In case of the task, which requires a particular format or style, one-shot or few-shot prompting can serve as an example for the AI to follow.
For complex multistep tasks, reasoning-based approaches like Chain of Thought and Least to Most prompting might be appropriate. If the task requires using any tools or outside knowledge, then ReAct prompting is more suitable.
Task complexity |
Suitable technique |
| Simple question or instruction | Zero shot prompting |
| Specific format or style | One shot prompting |
| Repeated pattern or classification | Few shot prompting |
| Multi step problem | Chain of Thought prompting |
| Problem with several smaller stages | Least to Most prompting |
| Task requiring a specific perspective | Role prompting |
| Task involving tools or actions | ReAct prompting |
| Multiple possible solutions | Tree of Thoughts prompting |
Based on desired output quality
Another criterion in selecting a prompting technique would be the nature of the desired output quality.
1. Speed
For cases where speed is the main consideration, then one should use zero-shot prompting, which does not need much pre-training and takes seconds to generate useful output.
2. Accuracy
In cases where speed is not a concern but accuracy is, one could consider using few-shot prompting and self-consistency prompting techniques. More examples and reasoning can aid in minimizing mistakes.
3. Consistency
In cases where you require consistent answers in terms of the format, then the few-shot prompting technique is usually the most suitable. Examples help set up a pattern of answers for the AI.
4. Explainability
In some cases, the output answer may not be enough, it is also important to know the process behind an answer apart from knowing what the answer is.
Also Read: How to Use ChatGPT for Prompt engineering
Conclusion
The right prompting technique depends on the task, not on how advanced the technique sounds. Zero-shot prompting is often enough for simple requests, while one-shot and few-shot prompting help when the AI needs examples to follow.
For complex reasoning, techniques such as chain-of-thought, self-consistency, and least-to-most prompting can provide more structure. ReAct and Tree of Thoughts are better suited to tasks involving tools, planning, or multiple possible solutions. Start with the simplest approach and add more guidance only when the task requires it.
Have A Query? Get in Touch With Our Customer Support | upGrad KnowledgeHut
Frequently Asked Questions (FAQs)
1. What are prompting techniques in AI?
Prompting techniques are methods used to structure instructions given to an AI model to get a specific type of response. They include zero-shot, one-shot, few-shot, chain-of-thought, role prompting, ReAct, and Tree of Thoughts. Each technique provides a different level or type of guidance based on the task.
2. What is prompt chaining?
Prompt chaining breaks a complex task into multiple prompts that are completed in sequence. The output from one prompt becomes the input or context for the next step. For example, an AI can first summarize research, then extract key findings, and finally turn those findings into a report.
3. What is the difference between zero-shot and one-shot prompting?
Zero-shot prompting asks the AI to perform a task without providing an example. One-shot prompting provides one example to demonstrate the expected pattern, format, or style. One-shot prompting is useful when a single example can clarify an instruction that may otherwise be ambiguous.
4. Is one-shot prompting better than zero-shot prompting?
Not always. Zero-shot prompting is often sufficient for simple, clearly defined tasks, while one-shot prompting can be more useful when the AI needs to follow a particular format or pattern. The better option depends on whether providing an example improves the output enough to justify the additional prompt context.
5. What is zero-shot chain-of-thought prompting?
Zero-shot chain-of-thought prompting asks an AI model to approach a problem step by step without providing worked examples. A common form adds an instruction such as “think step by step” to a reasoning task. It is mainly intended for problems involving multiple logical or mathematical steps.
6. What is the difference between chain-of-thought and Tree of Thoughts?
Chain-of-thought prompting generally guides the model through a single sequence of reasoning steps. Tree of Thoughts explores multiple possible reasoning paths, evaluates them, and can select a more promising path. Tree of Thoughts is therefore more suitable for problems where exploring alternatives is important.
7. What is retrieval-augmented prompting?
Retrieval-augmented prompting provides an AI model with relevant information retrieved from external sources or a knowledge base as part of the prompt context. The model then uses that information to generate its response. This can help ground answers in specific documents or organizational data instead of relying only on the model's existing knowledge.
8. How is RAG different from prompting?
Prompting is the broader practice of giving instructions and context to an AI model, while RAG (Retrieval-Augmented Generation) is a system architecture that retrieves relevant information before generating an answer. A RAG system can use prompting to tell the model how to use the retrieved information. In other words, prompting is an input technique, while RAG combines retrieval with generation.
9. How do prompting techniques improve AI outputs?
Prompting techniques improve outputs by giving the AI clearer instructions, examples, context, reasoning structure, or output requirements. For example, few-shot prompting can help the model follow a specific pattern, while structured instructions can make the response more consistent. The improvement depends on the task, model, and quality of the prompt.
10. Are prompting techniques the same for every AI model?
The basic techniques can be used across many AI models, but their effectiveness and behavior can differ between models. A technique that works well with one model may need different instructions, examples, or formatting with another. Model capabilities, training, context limits, and instruction-following behavior can all affect the result.
1639 articles published
KnowledgeHut is an outcome-focused global ed-tech company. We help organizations and professionals unlock excellence through skills development. We offer training solutions under the people and proces...
Get Free Consultation
By submitting, I accept the T&C and
Privacy Policy
