Master craftspeople follow principles that guide their work. Similarly, effective prompters follow proven strategies that consistently produce better results. In this lesson, you’ll learn the fundamental principles that separate mediocre prompts from exceptional ones.
Provide a detailed explanation of the causes and effects of climate change, including impacts on global temperatures, weather patterns, and sea levels. Also discuss possible solutions and mitigation actions. Requirements:- Keep it under 500 words- Suitable for a 10-year-old child- Use simple language and concrete examples- Include 3 main causes and 3 main effects
Vague: “Write about dogs.”Your turn: Make this specific by defining:
What aspect of dogs?
What format?
What audience?
What length?
Sample Solution
Write a 300-word informative article about dog training basics for first-time dog owners. Cover:1. House training fundamentals2. Basic commands (sit, stay, come)3. Positive reinforcement techniquesUse an encouraging, supportive tone and include practical tips that can be implemented immediately.
Vague: “Help me with my code.”Your turn: Make this specific by including:
What programming language?
What’s the problem?
What have you tried?
What’s the desired outcome?
Sample Solution
I’m writing a Python function to calculate the factorial of a number,
but I’m getting a RecursionError for large inputs.Current code:
def factorial(n): return n * factorial(n-1)
Please help me:
Identify the bug
Fix the recursion issue
Add input validation for negative numbers
Suggest an iterative alternative for better performance
Research shows that simply adding this phrase significantly improves LLM performance on reasoning tasks.
Without Guidance
With Reasoning Guidance
You are a mathematician. Solve this problem.Problem: What is 15% of 240?
Output:
The answer is 36.
✅ Correct, but no reasoning shown
You are a mathematician. Follow these steps:Step 1: Interpret the problem carefullyStep 2: Choose the most effective strategyStep 3: Perform calculations step-by-stepStep 4: Review for accuracy and explain your solutionProblem: What is 15% of 240?
Output:
Step 1: I need to find 15% of 240Step 2: I'll convert the percentage to a decimal and multiplyStep 3: - 15% = 0.15 - 0.15 × 240 = 36Step 4: Verification: 36 is 15% of 240 because 36/240 = 0.15 = 15%The answer is 36.
You are a financial advisor. A client asks:"I have $10,000 to invest. Should I put it all in stocks or split between stocks and bonds?"Approach this systematically:1. Identify key factors to consider (risk tolerance, time horizon, goals)2. Explain the pros and cons of each option3. Ask clarifying questions if needed4. Provide a reasoned recommendation5. Explain the rationale behind your adviceResponse:
This structure ensures the model considers multiple angles before recommending.
You are an expert at answering questions based on provided context.Context: """The 2028 Summer Olympics will be held in Los Angeles. Basketball competitions are scheduled for July 24 - August 9, 2028.As of now, the games have not yet occurred."""Question: Who won the 2028 Olympics basketball gold medal?Answer based only on the context provided. If the information is not in the context, say so.
Expected Output:
Based on the provided context, the 2028 Olympics have not yet occurred, so there is no winner yet. The games are scheduled for July-August 2028 in Los Angeles.
Summarize the article below (delimited by ###).###[Article content here]###Summary:
Label Sections Clearly
Task: TranslationSource Language: EnglishTarget Language: SpanishStyle: FormalInput: "Hello, how are you?"Output:
Use Structured Lists
Analyze the following code and provide:1. A brief description of what it does2. Any bugs or issues found3. Suggestions for improvement4. Refactored versionCode:[code here]Analysis:
Specify Output Format
Extract information and return as JSON with these fields:- name (string)- age (integer)- occupation (string)- skills (array of strings)Text: "John Smith, 35, is a software engineer skilled in Python, JavaScript, and cloud architecture."JSON:
Here’s how to apply all four principles in a single prompt:
[PRINCIPLE 1: CLARITY & SPECIFICITY]You are a technical writer creating API documentation.[PRINCIPLE 2: REASONING GUIDANCE]Follow this process:1. Analyze the function signature and parameters2. Identify the purpose and use cases3. Note any edge cases or limitations4. Structure the documentation clearly[PRINCIPLE 3: CONTEXT]Function to document:```pythondef calculate_discount(price: float, discount_percent: float, min_price: float = 0) -> float: """Apply discount with minimum price floor.""" discounted = price * (1 - discount_percent / 100) return max(discounted, min_price)
[PRINCIPLE 4: FORMAT]
Provide documentation in this format:
Notes: [Any important considerations]Documentation:
---## Practice Exercise: Apply All PrinciplesTransform this weak prompt using all four principles:**Weak Prompt:**
Write about machine learning
**Your Task:**Apply each principle to create a strong prompt. Consider:- What specific aspect of ML?- What reasoning process?- What context is needed?- What format works best?<Accordion title="Sample Solution">
[CLARITY & SPECIFICITY]
You are an educator creating an introductory lesson on machine learning
for high school students with no prior programming experience.[REASONING GUIDANCE]
Structure your explanation by:
Starting with a relatable real-world example
Explaining the core concept in simple terms
Describing how it differs from traditional programming
Providing a concrete application example
[CONTEXT]
Focus on supervised learning, specifically classification tasks.
Avoid technical jargon. Use analogies to everyday experiences.[FORMAT]
Create a 400-word lesson with:
</Accordion>---## Key Takeaways<CardGroup cols={2}><Card title="Clarity Reduces Ambiguity" icon="bullseye"> Specific instructions narrow the possibility space and improve consistency</Card><Card title="Reasoning Activates Thinking" icon="brain"> Explicit guidance leads to deeper analysis and better answers</Card><Card title="Context Grounds Responses" icon="anchor"> Reference information prevents hallucination and improves accuracy</Card><Card title="Format Shapes Interpretation" icon="shapes"> Structure and delimiters help models parse your intent correctly</Card></CardGroup>---## The Prompting ChecklistBefore submitting any prompt, verify:<Steps><Step title="✓ Is my instruction clear and specific?"> No ambiguity about what I want</Step><Step title="✓ Have I provided necessary context?"> All relevant background information included</Step><Step title="✓ Does my format reduce ambiguity?"> Clear structure with appropriate delimiters</Step><Step title="✓ Would examples help clarify my intent?"> Consider adding demonstrations if needed</Step><Step title="✓ Have I specified output format/length/style?"> Clear expectations for the response</Step></Steps>---## Module 1 Complete!Congratulations! You've completed the foundations of prompting. You now understand:- ✅ What prompting is and why it matters- ✅ How to structure effective prompts- ✅ In-context learning techniques- ✅ The four core principles of great prompts<Card title="Continue to Module 1 Assessment" icon="clipboard-check" href="/module-1/assessment">Test your knowledge and earn your Module 1 completion</Card>