Prompting That Works: Real Examples and Techniques
Most people use only 10% of what AI can do because they write weak prompts. Learn the techniques used by experts โ with real before/after examples.
The Four Elements of an Effective Prompt
A high-quality prompt typically contains four elements: (1) Context โ who you are and what situation you are in. (2) Task โ what you specifically want the AI to do. (3) Format โ how you want the output structured. (4) Constraints โ what to include, exclude, or be careful about. Most people write prompts with only the Task element and wonder why results are mediocre. The more context you give, the more the model can tailor its response. Think of it as briefing a capable but brand-new contractor who knows nothing about your project yet. They are skilled, but they need the full picture from you.
Context + Task + Format + Constraints = a prompt the AI can actually execute well.
Key Takeaways
- โEffective prompts include Context, Task, Format, and Constraints
- โChain-of-thought prompting (ask it to reason step by step) significantly improves complex outputs
- โSpecify role and audience to activate the right communication style
- โAI is a powerful first-draft tool โ always verify specific facts and citations
- โAsk the AI to identify its own assumptions to surface potential errors
โ๏ธ Prompt Examples: Weak vs. Strong
Explain machine learning.
I am a marketing manager with no technical background. Explain how machine learning works using an analogy I can use when talking to clients. Keep it under 150 words and avoid jargon.
Why it matters: The weak prompt produces a generic textbook definition. The strong prompt specifies who you are, why you need it, how long it should be, and what style is needed โ resulting in something immediately usable.
How do I improve my team's productivity?
I manage a 6-person remote software team. We struggle with missed deadlines and unclear ownership on cross-functional projects. Think step by step about the root causes this typically indicates, then suggest 3 concrete interventions with how to implement each.
Why it matters: The weak prompt is too broad for a useful answer. The strong prompt gives context (team size, remote, software), the specific problem, asks for step-by-step reasoning, and requests a structured output.
Fix my code.
You are a senior Python developer doing a code review. Here is my function: [paste code]. Identify: (1) any bugs, (2) performance issues, (3) security vulnerabilities. For each issue, explain why it is a problem and show the corrected code.
Why it matters: Vague requests for 'fixing' produce surface-level changes. Specifying the reviewer role, the exact categories to check, and the output format (explain + fix) produces comprehensive, actionable feedback.
What do people think about social media?
Summarize the main academic perspectives on social media's effects on adolescent mental health. Distinguish between correlational and causal findings. Note any areas of genuine scientific disagreement. Do not invent citations โ if you are uncertain about a source, say so.
Why it matters: The weak prompt generates generic opinions. The strong prompt specifies the domain (academic, not popular opinion), the analytical angle (correlation vs causation), asks for epistemic honesty about uncertainty, and explicitly guards against hallucinated citations.