Zero-Shot Prompting
No examples given; AI infers from instructions.
Example: "Classify this text as positive, negative, or neutral: 'I love this sunny day!'"
Expected Output: Positive.
One-Shot Prompting
Provide one example for guidance.
Example: "Convert to Roman numerals: 5 = V. Now: 10."
Expected Output: X.
Few-Shot Prompting
Give 2-5 examples to show patterns.
Example: "Q: What is the capital of France? A: Paris. Q: Capital of Japan? A: Tokyo. Q: Capital of Brazil?"
Expected Output: Brasília.
Chain-of-Thought (CoT)
Encourage step-by-step reasoning. Add "Think step by step."
Example: "Solve: If a bat and ball cost $1.10 total, and the bat costs $1 more than the ball, how much is the ball? Think step by step."
Expected Output: Ball = $0.05 (steps: Let ball = x; bat = x + 1; x + (x + 1) = 1.10 → 2x + 1 = 1.10 → x = 0.05).
Role-Playing
Assign a character for tailored responses.
Example: "You are a pirate captain. Explain photosynthesis in pirate lingo."
Expected Output: "Arrr, photosynthesis be like plants eatin' sunlight fer grub, turnin' it into sugar with their green sails!"
Self-Consistency
Generate multiple responses and pick the most common (run 3x, vote).
Example: "What is 15% of 200? Reason step by step. [Repeat 3 times and select majority answer.]"
Expected Output: 30 (consistent across runs).
Tree of Thoughts (ToT)
Explore branches of reasoning like a decision tree.
Example: "Plan a trip to Paris. Branch 1: Budget option. Branch 2: Luxury. For each, list 3 pros/cons and pick best."
Expected Output: Structured branches with reasoned choice.
Advanced Tips
• Use delimiters: Wrap inputs in ``` or quotes.
• Specify output format: "Respond in a table: Column1=Name, Column2=Age."
• Control length: "In 100 words max."
• Avoid bias: "Base on facts only."
• Pro Tip: Test variations—A/B your prompts.