ð Published Online: https://tiny.cc/promptengg
These are the most basic, yet essential, techniques for interacting with LLMs. They form the building blocks for more complex prompting strategies.
Description: Asking the model to perform a task without providing any examples. It relies solely on the model's pre-trained knowledge.
When to Use: For common, straightforward tasks where the model likely has a good understanding, or when you don't have good examples.
Example Prompt:
Translate the following English sentence to Spanish:
"Hello, how are you?"Description: Providing the model with one (one-shot) or several (few-shot) examples within the prompt itself to demonstrate the desired input/output format or behavior. This helps the model infer patterns.
When to Use: When the task is less common, requires a specific output format, or needs to adhere to a particular style. It's great for teaching the model "how" to respond.
Example Prompt (Few-Shot):
Classify the sentiment of the following movie reviews as Positive, Negative, or Neutral:
Review: "This movie was absolutely brilliant and captivating."
Sentiment: Positive
Review: "The plot was confusing, and the acting was subpar."
Sentiment: Negative
Review: "It was an okay film, nothing groundbreaking, but not terrible."
Sentiment: Neutral
Review: "I laughed so hard my stomach hurt! A must-watch."
Sentiment:Description: Directly and unambiguously stating the task, desired output format, and any constraints. Often combined with other techniques. This is arguably the most fundamental aspect.
When to Use: Always! Good prompt engineering starts with clear instructions.
Example Prompt:
Summarize the provided text in exactly 100 words. The summary should focus on the main arguments and be written in a neutral, objective tone.
[Text to summarize goes here]These techniques provide the AI with necessary background information and set boundaries for its responses, ensuring relevance and adherence to rules.
Description: (Often used in chat interfaces like Claude or ChatGPT) Setting an overarching behavior, persona, or set of rules for the AI that persists across multiple turns in a conversation. This acts as a global directive.
When to Use: To establish a consistent role or policy for the AI throughout a discussion.
Example Prompt (System Prompt):
You are a helpful programming assistant. Your goal is to provide concise, correct, and well-commented Python code snippets. Always explain your code. If a user asks for anything unethical or harmful, politely decline.(Note: In many systems, this is a separate field from the user prompt.)
Description: Assigning a specific persona or role to the model for a particular interaction, which influences its tone, style, and knowledge base.
When to Use: To get responses from a specific perspective (e.g., expert, casual friend, historical figure).
Example Prompt:
Act as a seasoned cybersecurity analyst. Explain the importance of multi-factor authentication (MFA) in simple terms to a non-technical small business owner.Description: Including specific background information, relevant facts, or previous conversation turns directly within the prompt to provide necessary context.
When to Use: When the AI needs specific data points or awareness of prior interactions to generate an accurate or relevant response.
Example Prompt:
Given the following product description:
"The XYZ Smartwatch features a 1.5-inch AMOLED display, 2-day battery life, heart rate monitor, and GPS. It's water-resistant up to 50 meters."
Write three unique selling propositions (USPs) for marketing this product.Description: Using Markdown syntax (e.g., headings, bullet points, code blocks) within the prompt to explicitly define the desired structure and format of the output.
When to Use: When you need highly structured outputs (e.g., JSON, YAML, bulleted lists, tables, code).
Example Prompt:
Create a recipe for chocolate chip cookies.
Use the following markdown structure for your response:
# [Recipe Name]
## Ingredients
* [Ingredient 1]
* [Ingredient 2]
...
## Instructions
1. [Step 1]
2. [Step 2]
...These methods are designed to guide the AI's internal thought processes, encouraging it to break down problems, plan steps, and show its work.
Description: Instructing the model to show its step-by-step reasoning process before arriving at a final answer. This dramatically improves performance on complex reasoning tasks (e.g., math word problems, logical puzzles) by encouraging intermediate thinking steps.
When to Use: For problems that require logical deduction, multiple steps, or problem-solving. It makes the model's "thinking" transparent.
Example Prompt:
The average speed of a car is 60 miles per hour. If it travels for 3.5 hours, how far does it travel? Show your work step-by-step.
Step 1: Identify given information.
Step 2: Identify what needs to be calculated.
Step 3: Recall the relevant formula.
Step 4: Perform the calculation.Description: A specific form of CoT where the reasoning steps are presented in a table format, often to enhance clarity and organization, especially for structured data or comparisons.
When to Use: When the reasoning involves multiple variables, comparisons, or a need for highly organized output.
Example Prompt:
Analyze the pros and cons of cloud computing vs. on-premise servers for a small startup. Present your analysis in a table with columns for 'Aspect', 'Cloud Computing (Pro/Con)', and 'On-Premise Servers (Pro/Con)'.
Thought Process Table:
| Aspect | Cloud Computing (Pro/Con) | On-Premise Servers (Pro/Con) |
|------------------|---------------------------|------------------------------|
| Initial Cost | | |
| Scalability | | |
| Maintenance | | |
| Security | | |Description: Guiding the model to first generate a high-level outline or "skeleton" of the response, and then filling in the details for each section. This ensures comprehensive coverage and logical flow.
When to Use: For generating long-form content, essays, articles, or complex reports where structure is paramount.
Example Prompt:
Generate a comprehensive guide on starting a small online business. First, provide an outline of the main sections, then expand on each section with detailed information.
Outline:
1. [Section 1 Title]
2. [Section 2 Title]
3. [Section 3 Title]
...
Now, expand on each section:Description: A technique where the model first generates relevant background knowledge or context before tackling the main task. This helps improve performance on knowledge-intensive tasks by providing the model with additional relevant information.
When to Use: For tasks requiring domain knowledge, fact-based reasoning, or when the model might benefit from additional context before responding.
Example Prompt:
First, generate some relevant knowledge about renewable energy storage technologies and their current limitations.
Based on that knowledge, now analyze: What are the three most promising solutions for grid-scale energy storage, and what are the main barriers to their widespread adoption?These techniques are designed to manage complex interactions, ensure consistency, or guide the model through highly structured, multi-stage processes.
Description: This technique involves prompting the model multiple times for the same question, potentially with slightly varied prompts or by sampling different reasoning paths (e.g., using Chain-of-Thought). Then, the most consistent or frequently occurring answer among the generated responses is chosen as the final answer. It's like asking several experts and taking the consensus.
When to Use: For critical tasks where accuracy is paramount, especially in reasoning, mathematical problems, or logical puzzles, where a single incorrect step can derail the entire solution.
Example Prompt:
Solve the following riddle: "I speak without a mouth and hear without ears. I have no body, but I come alive with wind. What am I?"
Think step-by-step to arrive at the answer.(You would run this prompt several times, compare the 'Thought' processes and final answers, and pick the most frequent correct one.)
Description: Breaking down a complex problem into a sequence of simpler sub-problems. The solution to each sub-problem is then used as context or input for solving the next, building up to the final answer. This is akin to scaffolding a solution.
When to Use: For highly complex problems that are naturally decomposable, where solving intermediate steps is necessary to progress. It reduces cognitive load on the model.
Example Prompt:
Task: Write a Python script to fetch the current weather for a given city and display the temperature and humidity.
Step 1: First, write the Python code to make an API request to a weather service (e.g., OpenWeatherMap) using a placeholder API key and city name.
Step 2: Next, parse the JSON response from the weather API to extract the temperature and humidity.
Step 3: Finally, combine these parts into a full script and add print statements to display the results clearly.Description: The model is first prompted to generate its own relevant examples or demonstrations based on a general task description. Then, these self-generated examples are used as few-shot examples in a subsequent prompt to help the model solve a new, similar problem.
When to Use: When you want the model to learn from "itself" for a specific task without manually crafting examples, or when the task is unique and no existing examples are readily available.
Example Prompt (Two-stage process):
Stage 1 Prompt:
Generate 3 examples of how to rephrase a formal sentence into a casual one.
Example 1:
Formal: "Kindly provide the documentation at your earliest convenience."
Casual: "Can you send the docs when you get a chance?"
Example 2:
Formal:
Casual:
...Stage 2 Prompt (after getting examples from Stage 1):
[Include the 3 examples generated in Stage 1 here]
Now, rephrase the following formal sentence into a casual one:
Formal: "I respectfully request an update on the project's progress."
Casual:Description: An advanced reasoning technique that explores multiple reasoning paths (like branches of a tree) and allows the model to backtrack or prune less promising paths. It involves generating multiple intermediate "thoughts" or possible next steps, evaluating them, and then pursuing the most promising ones.
When to Use: For highly complex problems that require strategic search, planning, or decision-making, where there isn't a single obvious step-by-step solution. It's more sophisticated than simple CoT.
Example Prompt:
Problem: You are given 5 items with weights and values: (A: 2kg, $10), (B: 3kg, $15), (C: 1kg, $7), (D: 4kg, $20), (E: 2kg, $12). Your backpack can hold a maximum of 6kg. Which items should you choose to maximize total value?
Explore multiple thought paths. For each path, consider:
1. Initial choice.
2. Remaining capacity.
3. Next best item to add.
4. Total value and weight.
Evaluate each path and determine the optimal selection.Description: An extension of ToT where a human intervenes at various points in the "thought tree" to provide feedback, steer the model, or prune incorrect branches. This combines the structured reasoning of ToT with human guidance.
When to Use: For extremely challenging problems where human intuition or domain expertise is needed to guide the AI's exploration, making it a powerful human-AI collaboration tool.
Example Interaction:
AI: "I'm considering two paths for the marketing campaign: Path A (social media focus) and Path B (email campaign focus). What are your initial thoughts on these approaches?"
User: "Path A sounds good, but ensure it targets Gen Z. Let's explore that branch."
AI: "Focusing on Path A. My next thoughts are to identify key social platforms. Should I prioritize TikTok or Instagram?"
User: "Go with TikTok for this product."(This back-and-forth guides the AI's internal ToT process.)
Description: A framework that combines reasoning and acting in an interleaved manner. The model alternates between thinking about the problem, taking actions (like using tools or gathering information), and reasoning about the results to determine next steps.
When to Use: For complex problem-solving that requires multiple steps, tool usage, research, or when the solution path isn't clear from the start. Particularly effective for AI agents and interactive workflows.
Example Prompt:
Solve this step by step using reasoning and actions:
Task: Find the best restaurant in downtown Seattle for a business dinner tonight.
Think: What information do I need to find the best restaurant?
Act: Search for highly-rated business restaurants in downtown Seattle
Observe: [Results from search]
Think: Now I need to check availability and make recommendations
Act: Check availability for tonight at top 3 options
Observe: [Availability results]
Think: Based on ratings, availability, and business dinner suitability...
Act: Provide final recommendation with reasoningDescription: A technique that combines the model's pre-trained knowledge with real-time retrieval of relevant information from external knowledge bases, documents, or databases. This enhances accuracy and provides up-to-date information.
When to Use: When you need current information, domain-specific knowledge, or factual accuracy that goes beyond the model's training data. Essential for enterprise applications requiring access to proprietary data.
Example Prompt:
Using the retrieved documents about our company's Q4 financial performance:
[Retrieved Context: Q4 revenue increased 15%, costs rose 8%, new product line launched...]
Based on this specific financial data, analyze our company's performance and recommend strategic priorities for Q1. Cite specific numbers from the retrieved information.These techniques are about controlling the aesthetic and emotional qualities of the AI's response, making it suitable for specific audiences or situations.
Description: Explicitly instructing the model on the desired emotional tone (e.g., empathetic, excited, neutral, urgent) and overall writing style (e.g., formal, casual, academic, poetic).
When to Use: When the manner in which the information is conveyed is as important as the information itself, such as in marketing copy, creative writing, customer service responses, or internal communications.
Example Prompt:
Rewrite the following technical explanation of blockchain technology in a way that is inspiring and easy for a high school student to understand, emphasizing its potential for a fairer future.
[Technical explanation text]Description: Adding phrases that imply high stakes or reward for producing a high-quality output. While seemingly psychological, these can sometimes nudge models to dedicate more "effort" or focus. It encourages the model to think it's solving a very important problem.
When to Use: When you need the absolute best effort from the model on a critical task, although its effectiveness can vary between models and iterations.
Example Prompt:
Generate a compelling marketing slogan for a new eco-friendly cleaning product. This is extremely important for our launch, and the success of our company depends on a truly impactful slogan.These techniques involve guiding the AI through a process of self-correction or external feedback to refine and enhance its outputs over multiple interactions.
Description: Instructing the model to first rephrase or critically analyze the input prompt to ensure it fully understands the query, before generating its final response. This helps prevent misunderstandings and encourages deeper processing.
When to Use: For complex, ambiguous, or critical questions where a precise understanding of the query is vital for an accurate response. It simulates a "System 2" (slow, deliberate) thinking process.
Example Prompt:
Before answering, rephrase the user's request in your own words to confirm understanding. Then, provide a detailed response.
User Request: "How do I optimize my website for search engines without spending too much money?"
Rephrased Request: [Model's rephrasing here]
Detailed Answer: [Model's answer here]Description: Prompting the model to generate an output, then critically evaluate its own output for flaws or areas of improvement, and finally revise the output based on its self-criticism. This can be done iteratively.
When to Use: For tasks requiring high quality, precision, or adherence to specific criteria, allowing the model to refine its own work. It mimics a self-review process.
Example Prompt:
Write a short persuasive paragraph arguing for remote work.
After writing the paragraph, critically analyze it. Identify any weaknesses, logical gaps, or areas for stronger persuasion.
Finally, rewrite the paragraph based on your self-criticism to improve its effectiveness.Description: Explicitly breaking down a complex problem into distinct, smaller sub-tasks, and then guiding the model to address each sub-task sequentially. This is similar to Least-to-Most, but emphasizes the explicit definition of sub-tasks by the prompt.
When to Use: For highly structured problems that can be naturally divided, ensuring that each component is addressed thoroughly before combining for the final solution.
Example Prompt:
Task: Create a marketing email for a new online course on Python for Data Science.
Sub-task 1: Write an engaging subject line that highlights the benefit of the course.
Sub-task 2: Draft the opening paragraph, addressing a pain point for beginners in data science.
Sub-task 3: List 3-4 key benefits or modules of the course using bullet points.
Sub-task 4: Write a clear call-to-action to enroll in the course.
Sub-task 5: Combine all parts into a complete email.Description: Instructing the model to ask itself follow-up questions relevant to the initial query, and then using the answers to those self-generated questions to inform its final response. It's a way for the model to gather more information or clarify its understanding internally.
When to Use: For open-ended questions or tasks where the initial prompt might lack sufficient detail, prompting the model to explore relevant sub-topics.
Example Prompt:
Answer the following question thoroughly: "How does climate change impact global food security?"
First, ask yourself relevant sub-questions that need to be answered to address the main question comprehensively. Then, answer each of those sub-questions, and finally, synthesize your answers into a complete response to the original question.Description: Training the model to critique and revise its own outputs based on a set of principles or "constitution." This helps ensure responses align with desired values and guidelines.
When to Use: For sensitive topics or when you need responses that adhere to specific ethical guidelines or organizational policies.
Example Prompt:
Generate a response to this customer complaint about a delayed order. Before finalizing your response, review it against these principles:
1. Show empathy and understanding
2. Take responsibility without making excuses
3. Offer concrete solutions
4. Maintain a professional tone
Revise your response if needed to better align with these principles.Description: Explicitly asking the model to consider multiple viewpoints or stakeholder perspectives before providing a response.
When to Use: For complex decisions, controversial topics, or when you need a balanced analysis that considers various stakeholders.
Example Prompt:
Analyze the decision to implement a four-day work week from three perspectives:
1. Employee perspective
2. Employer/management perspective
3. Customer perspective
Consider the benefits and concerns from each viewpoint before providing your overall assessment.Description: Using analogies or comparisons to help the model understand complex concepts or to generate creative solutions by drawing parallels to familiar situations.
When to Use: When explaining difficult concepts, generating creative solutions, or when you want to leverage the model's understanding of familiar domains.
Example Prompt:
Explain quantum computing using the analogy of a library. How would quantum bits (qubits) be like books in this library, and how would quantum superposition and entanglement work in this context?Description: Incorporating different types of input (text, images, code, data) within a single prompt to leverage the model's ability to process and connect information across modalities.
When to Use: When working with visual content, code analysis, or when you need to analyze relationships between different types of data.
Example Prompt:
Analyze this code snippet and the accompanying error screenshot. Identify the issue and provide a fix:
[Code snippet here]
[Error screenshot here]
Based on both the code and the visual error information, explain what's happening and how to resolve it.Description: Maintaining a consistent character or expert persona across multiple interactions while adapting the communication style to different contexts within that persona.
When to Use: For long-form interactions, educational content, or when building trust through consistent expertise demonstration.
Example Prompt:
You are Dr. Sarah Chen, a senior data scientist with 15 years of experience in machine learning and a specialty in healthcare AI. You're known for explaining complex concepts clearly while maintaining scientific rigor.
Throughout this conversation, maintain this persona while adapting your communication style to each question's complexity level.
First question: "What's the difference between supervised and unsupervised learning?"Description: Asking the model to anticipate potential outcomes, consequences, or future scenarios based on current information or proposed actions.
When to Use: For strategic planning, risk assessment, or when you need to consider future implications of current decisions.
Example Prompt:
Based on the current trends in remote work adoption and the following company data:
- 68% of businesses now provide prompt engineering training to staff
- LinkedIn reports a 434% increase in job postings mentioning prompt engineering since 2023
- Certified prompt engineers command 27% higher wages than comparable roles
Predict three potential scenarios for our company's AI strategy over the next 2 years. For each scenario, outline the probability, key drivers, and potential impacts on productivity and competitive advantage.Description: Asking the model to simulate different perspectives, mental states, or viewpoints of various stakeholders or characters. This technique helps generate more nuanced responses by considering how different people might think, feel, or react in given situations.
When to Use: For character development, stakeholder analysis, conflict resolution, empathy-building exercises, or any scenario requiring understanding of different mental models.
Example Prompt:
Simulate the thought processes of three different people regarding a new AI policy:
1. A concerned parent worried about their child's privacy
2. A tech startup founder excited about AI opportunities
3. A retired teacher skeptical of new technology
For each perspective, explain their likely concerns, hopes, and questions about AI in education.Description: Techniques designed to reduce various types of bias in AI responses, including demographic bias, confirmation bias, cultural bias, and cognitive biases. This involves explicit instructions to consider multiple viewpoints and avoid stereotypical assumptions.
When to Use: For sensitive topics, decision-making processes, content creation that reaches diverse audiences, or any task where bias could lead to unfair or harmful outcomes.
Example Prompt:
Analyze the hiring challenges in the tech industry. Before responding:
1. Consider multiple demographic perspectives
2. Avoid stereotypical assumptions about any group
3. Include viewpoints from different geographic regions
4. Acknowledge your own potential biases
5. Present balanced information from multiple sources
Provide an objective analysis that represents diverse experiences and viewpoints.These cutting-edge techniques represent the frontier of prompt engineering, often involving AI systems working on their own prompting strategies.
Description: Using AI to write, analyze, or optimize prompts for other AI interactions. This involves prompting an AI system to become a prompt engineer itself.
When to Use: When you need to systematically improve prompts, generate variations, or when you're working on complex prompt optimization tasks.
Example Prompt:
You are a prompt engineering expert. Analyze this prompt and suggest 3 improvements:
Original prompt: "Write a blog post about AI."
For each improvement:
1. Identify the weakness in the original
2. Provide the improved version
3. Explain why the improvement will work better
4. Predict the likely outcome differenceDescription: Creating sequences of prompts where the output of one prompt becomes the input for the next, creating complex workflows and reasoning chains.
When to Use: For multi-stage tasks that require different types of processing at each step, or when a single prompt would be too complex.
Example Prompt Chain:
Prompt 1 (Research): "Identify the top 5 trends in renewable energy for 2025. Provide just the trend names."
Prompt 2 (Analysis): "For each of these trends: [Insert output from Prompt 1], analyze the market impact and adoption barriers."
Prompt 3 (Strategy): "Based on this analysis: [Insert output from Prompt 2], recommend investment strategies for a $50M clean energy fund."Description: Prompts that adapt based on the AI's previous responses or external context, creating reactive and personalized interactions.
When to Use: For personalized learning, adaptive conversations, or when the prompt needs to evolve based on user responses or changing context.
Example Prompt:
Start with a basic explanation of machine learning. After each response, assess the user's apparent knowledge level based on their questions, then adjust your next explanation's complexity accordingly.
If they ask basic questions â Use simpler analogies
If they ask technical questions â Increase technical depth
If they seem confused â Provide more examples
If they seem advanced â Skip to advanced concepts
Begin with: "Machine learning is..."Description: Systematically creating and testing multiple versions of prompts to find the most effective approach for specific tasks or audiences.
When to Use: When optimizing for specific outcomes, testing audience responses, or when you need to fine-tune prompt performance.
Example Prompt Testing Framework:
Version A (Direct): "List 5 benefits of remote work."
Version B (Role-based): "As an HR expert, explain 5 key benefits of remote work to a skeptical CEO."
Version C (Scenario-based): "A company is considering remote work. What are 5 compelling benefits they should know?"
Test each version and measure:
- Response quality (1-10)
- Completeness of answer
- Actionability of advice
- Tone appropriatenessUnderstanding the theoretical foundations helps you apply techniques more effectively and create better prompts from first principles.
Description: Applying principles of human cognitive load management to AI prompting, recognizing that AI systems also have processing limitations and work better with well-structured information.
Key Principles:
Application Example:
â High Cognitive Load:
"Analyze this data, consider multiple perspectives, write creatively, make it engaging, ensure accuracy, format it properly, and make strategic recommendations while being concise but comprehensive."
â
Optimized Cognitive Load:
Step 1: "Analyze this data for key trends."
Step 2: "Based on these trends: [output], what are 3 strategic implications?"
Step 3: "Write an engaging summary of these implications for executives."Description: Understanding how AI systems process information sequentially and how to structure prompts to align with these processing patterns.
Key Concepts:
Practical Applications:
â
Optimized Information Flow:
1. Context first: "You are analyzing customer feedback data..."
2. Task definition: "Your goal is to identify sentiment patterns..."
3. Specific instructions: "For each review, classify sentiment as..."
4. Output format: "Present results in this format..."
5. Examples: "Here are 3 examples of the expected output..."Description: Understanding the psychological aspects of human-AI interaction and how different prompting styles affect both AI performance and human satisfaction.
Key Insights:
Example Applications:
ð Anthropomorphic Approach:
"Take your time to think through this problem carefully. I trust your expertise in this area."
âïļ Authority Positioning:
"As the leading expert in cybersecurity, how would you advise..."
ðŊ Specificity Over Abstraction:
Instead of: "Be creative"
Use: "Generate 3 unexpected solutions, like how Airbnb solved housing differently"Practical considerations for deploying and optimizing prompt engineering in real-world applications.
Description: Techniques for making prompts more efficient while maintaining effectiveness, crucial for cost management and performance.
Key Strategies:
Example Optimizations:
â Token-Heavy (127 tokens):
"I would like you to please analyze the following customer feedback data that we have collected from our recent survey. Please take your time to carefully review each response and provide a comprehensive analysis of the sentiment expressed by our customers. We are particularly interested in understanding both positive and negative themes."
â
Token-Optimized (45 tokens):
"Analyze this customer feedback data. Identify sentiment patterns and key positive/negative themes.
Data: [feedback]"
Saved: 82 tokens (65% reduction)Description: Understanding the resource costs and returns of different prompting techniques to make informed decisions about when to use complex vs. simple approaches.
Technique Cost-Benefit Matrix:
| Technique | Token Cost | Time Cost | Accuracy Gain | Best ROI Scenarios |
|---|---|---|---|---|
| ðŊ Zero-Shot | ðĒ Very Low | ðĒ Instant | ðĩ Baseline | High-volume, simple tasks |
| ð Few-Shot | ðĄ Medium | ðĄ Setup time | ðĄ Moderate improvement | Format-specific tasks |
| ð Chain-of-Thought | ðĄ Medium | ðĄ Moderate | ðĒ Significant improvement | Complex reasoning |
| ðŊ Self-Consistency | ðī High | ðī Multiple runs | ðī Substantial improvement | Critical decisions only |
| ðģ Tree-of-Thoughts | ðī Very High | ðī Extensive | ðī Major improvement | Strategic planning |
Note: Actual performance gains vary significantly based on task type, model used, and implementation quality. These are general patterns observed in practice.
Cost Optimization Guidelines:
ð° Budget-Conscious Approach:
1. Start with Zero-Shot for baseline
2. Add Few-Shot only if format matters
3. Use CoT for reasoning tasks
4. Reserve expensive techniques for high-stakes decisions
ðŊ Quality-First Approach:
1. Use Self-Consistency for accuracy
2. Employ Tree-of-Thoughts for complexity
3. Optimize tokens after establishing effectiveness
4. Consider cost as secondary factorDescription: Tailoring prompts to work optimally with different AI models, recognizing that each model has unique strengths and response patterns.
Model Comparison & Adaptation:
GPT-Style Prompt Example:
"Write a Python function that calculates compound interest. Make it clean and well-commented. Then show 3 usage examples."Claude-Style Prompt Example:
"I'm analyzing investment options for a retirement portfolio. Here's the context: [detailed background]. Please analyze these options considering multiple factors. Show your reasoning for each step."Gemini-Style Prompt Example:
"Analyze this data and extract the key points. Focus on factual accuracy and present any patterns you identify."Important: The AI model landscape evolves rapidly in 2025, with new capabilities and improvements released frequently. Always test with your specific use case and stay updated on the latest model releases.
Description: Curated collections of proven prompts for specific industries, adapted to domain-specific language, requirements, and use cases.
Clinical Decision Support:
"As a clinical decision support system, analyze these patient symptoms: [symptoms]. Consider differential diagnoses, but always emphasize that this is for educational purposes only and requires validation by qualified healthcare practitioners."
Medical Research Summary:
"Summarize this medical research paper focusing on: 1) Clinical significance, 2) Methodology strengths/limitations, 3) Implications for practice. Use evidence-based language throughout."
*Important: Healthcare prompts should always include appropriate disclaimers and emphasize the need for professional medical judgment.*Contract Analysis:
"Review this contract section focusing on liability clauses. Identify potential risks and ambiguous language. Present findings in risk-level format: High/Medium/Low with explanations."
Legal Research:
"Research precedents related to [legal issue]. Focus on [jurisdiction] cases from recent years. Summarize key holdings and their potential applicability."
*Important: Legal prompts should include disclaimers that output is for informational purposes and not legal advice.*Financial Analysis:
"Analyze this company's financial statements using ratio analysis. Focus on liquidity, profitability, and leverage ratios. Compare against industry benchmarks and identify key trends."
Market Research:
"Conduct a competitive analysis of [industry]. Structure the analysis using Porter's Five Forces framework. Provide actionable insights for market entry strategy."Curriculum Development:
"Design a learning module for [topic] targeting [grade level]. Include: learning objectives, key concepts, activities, and assessment methods. Align with [educational standards]."
Student Assessment:
"Create a rubric for evaluating [assignment type]. Include 4 performance levels with specific criteria for each. Focus on both content mastery and skill development."Code Review:
"Review this code for: 1) Security vulnerabilities, 2) Performance issues, 3) Maintainability concerns. Provide specific recommendations with code examples where applicable."
System Design:
"Design a system architecture for [requirements]. Consider scalability, reliability, and cost optimization. Present the design with diagrams and justify key decisions."Common Combinations:
You are an expert Python developer.
Task: Write a Python function `calculate_median(numbers_list)` that takes a list of numbers and returns their median. The list might be empty or contain non-numeric values.
First, outline the steps to handle edge cases (empty list, non-numeric values) and the core logic for calculating median for even and odd length lists.
Then, write the complete, well-commented Python code for the function.
Finally, provide 3 test cases for your function, including edge cases.You are a witty, cynical, but ultimately endearing travel blogger.
Goal: Write a short blog post (around 300 words) about your disastrous but memorable trip to a remote jungle lodge.
Ensure the tone is humorous and self-deprecating.
Structure:
1. Engaging Hook
2. Describe the "disaster" with specific, funny details
3. Acknowledge a small positive takeaway
4. Concluding remarkAnalyze the following sales data for Q1 (Jan-Mar) and identify the top 3 performing products and the month with the highest overall sales.
Sales Data:
Jan: Product A: $1200, Product B: $800, Product C: $1500
Feb: Product A: $1300, Product B: $950, Product C: $1600
Mar: Product A: $1100, Product B: $1000, Product C: $1700
First, clearly state the steps you will take to identify the top products and highest sales month.
Then, show your calculations for each product's total Q1 sales and each month's total sales.
Finally, state your conclusions clearly.You are a senior JavaScript debugging expert.
I'm encountering an 'Uncaught TypeError: Cannot read properties of undefined (reading 'name')' in my React application.
Here's the relevant component code:
[React Component Code]
Here's the data structure I'm passing to it:
[Data Structure JSON]
First, identify the likely cause of this error based on the code and error message.
Second, suggest a specific code change to fix it.
Third, explain why your fix resolves the issue.Context - Limit - Example - Action - Refine
Context: "You're a senior UX designer with 10 years of experience..."
Limit: "Focus only on mobile app interfaces, not web..."
Example: "Like how Spotify handles music discovery..."
Action: "Design a user flow for..."
Refine: "If the solution seems too complex, prioritize simplicity over features."Situation - Task - Action - Result
Situation: "A SaaS company is experiencing 40% churn rate..."
Task: "Your goal is to develop a retention strategy..."
Action: "Analyze the data, identify patterns, and propose solutions..."
Result: "Present a plan that could reduce churn to under 20% within 6 months."Point - Reason - Example - Point
Point: "Remote work increases productivity"
Reason: "Because it eliminates commute stress and provides flexible scheduling"
Example: "Microsoft Japan saw 40% productivity increase with 4-day work week"
Point: "Therefore, companies should embrace remote work policies"Remember: Prompt engineering is rapidly evolving. The key to mastery is continuous learning, experimentation, and adaptation to new AI capabilities and limitations. Stay curious, test extensively, and always prioritize ethical AI use! ðâĻ
| Technique | Best For | Complexity | When to Use | Avoid When |
|---|---|---|---|---|
| ðŊ Zero-Shot | Simple, common tasks | ðĒ Low | Quick answers, known domains | Complex reasoning needed |
| ð Few-Shot | Specific formats | ðĄ Medium | Pattern learning, format consistency | Too many examples confuse |
| ð CoT | Math, logic, reasoning | ðĄ Medium | Multi-step problems | Simple factual queries |
| ð Role Prompting | Expert perspectives | ðĒ Low | Domain expertise needed | Generic tasks |
| âïļ System Prompting | Consistent behavior | ðĒ Low | Multi-turn conversations | One-off tasks |
| ð§ Contextual | Domain-specific tasks | ðĄ Medium | Specialized knowledge needed | Generic knowledge |
| ð Markdown | Structured outputs | ðĒ Low | Formatted responses | Casual conversation |
| ðŊ Self-Consistency | Critical accuracy | ðī High | High-stakes decisions | Time-sensitive tasks |
| ðģ ToT | Strategic planning | ðī Very High | Complex decision-making | Simple decisions |
| ð§ RCI | High-quality outputs | ðī Medium-High | Quality refinement | Time-sensitive |
ð What's your primary goal?
â
âââ ð Simple factual answer
â âââ ðŊ Zero-Shot + ð Clear Instructions
â
âââ ðĻ Specific format/pattern
â âââ ð Few-Shot + ð Markdown
â
âââ ð§ Complex reasoning
â âââ Single complex problem
â â âââ ð CoT + ðŊ Self-Consistency
â âââ Multi-step process
â âââ ð Least-to-Most + ð§Đ Decomposed
â
âââ âĻ Creative content
â âââ ð Role + ðĻ Style + ðĶī Skeleton
â
âââ ð Expert analysis
â âââ ð Role + ð§ Contextual + ðïļ Perspective-Taking
â
âââ â ïļ Critical decisions
âââ ðģ ToT + ðŊ Self-Consistency + ðĪ Interactive| Domain | Primary Technique | Secondary | Use Cases |
|---|---|---|---|
| ðŧ Software Dev | ð Clear Instructions | ð§ Contextual | Code generation, debugging |
| âïļ Content | ð Role Prompting | ðĻ Style | Blog posts, marketing copy |
| ð Data Analysis | ð CoT | ð Tabular CoT | Data interpretation, reporting |
| ðž Business | ðïļ Perspective-Taking | ðģ ToT | Strategy, decision making |
| ð Education | ð Analogical | ð Step-Back | Concept explanation, curriculum |
| Problem | Quick Fix | Prevention |
|---|---|---|
| Generic responses | Add ð Role + ð§ Context | Always define AI's role |
| Poor formatting | Use ð Markdown | Specify exact format |
| Shallow reasoning | Add ð CoT | Ask for step-by-step thinking |
| Inconsistent results | Use ðŊ Self-Consistency | Test multiple variations |
| Off-topic answers | Use ð Clear Instructions | Be specific about goals |
Remember: Start simple, iterate based on results, and combine techniques strategically. The most effective prompts often use 2-3 compatible techniques rather than trying to use everything at once! ðŊâĻ
Publication Date: December 19, 2025
Version: 1.0 - Comprehensive Learning Edition
This comprehensive guide was created by Sri Bolisetty, AI Practitioner and Generalist.
For questions, feedback, or collaboration opportunities, you can reach out via:
This comprehensive guide represents a collaborative effort to create the most complete and practical prompt engineering resource available for learners at all levels. From foundational techniques to cutting-edge experimental methods, this guide provides both theoretical understanding and hands-on practical applications.
Key Features:
Educational Philosophy: This guide follows evidence-based learning principles, using concrete examples for technique demonstration while maintaining accuracy in instructional content. Examples serve to illustrate patterns and structures - learners should adapt them to their specific contexts and verify information for professional use.
Community & Feedback: Prompt engineering is a rapidly evolving field. As new techniques emerge and existing methods are refined, this guide will continue to be updated to serve the learning community.
Acknowledgments: Special thanks to the AI research community, prompt engineering practitioners, and educators who continue to advance this field through open collaboration and knowledge sharing.
"The best prompts don't just get better outputs - they help humans and AI work together more effectively."
Happy Prompting! ðâĻ
ÂĐ 2025 - This guide is shared for educational purposes. Please cite appropriately when using or referencing this material.