Skip to main content
Duration: 60 minutes

Introduction

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.

The Four Core Principles

Principle 1: Clarity & Specificity

Narrow the possibility space with precise instructions

Principle 2: Guide Reasoning

Direct the model’s thinking process step-by-step

Principle 3: Provide Context

Ground responses with relevant background information

Principle 4: Format Matters

Structure influences how models interpret your intent

Principle 1: Clarity and Specificity

The Problem with Vague Prompts

LLMs can interpret vague prompts in countless ways. Specificity narrows the possibility space, guiding the model toward your intended outcome.

Examples: Vague vs. Specific

  • ❌ Vague
  • ✅ Specific
Tell me about climate change.
Problems:
  • Too broad - could cover any aspect
  • No scope defined
  • Unclear audience level
  • No format specified

Specificity Checklist

When crafting prompts, ask yourself:
  • Define the core task clearly
  • Specify the type of output (explanation, list, code, etc.)
  • State the purpose or goal
  • Technical level (beginner, intermediate, expert)
  • Age group or background
  • Prior knowledge assumptions
  • Length (word count, character limit)
  • Format (bullet points, paragraphs, JSON)
  • Tone (formal, casual, professional)
  • Style (technical, conversational, academic)
  • Required elements
  • Topics to avoid
  • Specific examples needed
  • Level of detail

Practice: Making Prompts Specific

  • Exercise 1
  • Exercise 2
Vague: “Write about dogs.”Your turn: Make this specific by defining:
  • What aspect of dogs?
  • What format?
  • What audience?
  • What length?
Write a 300-word informative article about dog training basics 
for first-time dog owners. Cover:

1. House training fundamentals
2. Basic commands (sit, stay, come)
3. Positive reinforcement techniques

Use an encouraging, supportive tone and include practical tips 
that can be implemented immediately.

Principle 2: Guide the Reasoning Process

Why Reasoning Guidance Matters

LLMs can jump to conclusions. Explicit reasoning guidance activates deeper thinking and improves accuracy, especially for complex tasks.

The “Let’s Think Step-by-Step” Phenomenon

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

Reasoning Patterns

Sequential Steps

Step 1: [First action]
Step 2: [Second action]
Step 3: [Third action]

Think-Then-Answer

First, think through the problem.
Then, provide your answer.

Explain-Your-Work

Show your reasoning process.
Explain each decision you make.

Self-Verification

After solving, verify your answer.
Check for common mistakes.

Complex Problem Example

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 option
3. Ask clarifying questions if needed
4. Provide a reasoned recommendation
5. Explain the rationale behind your advice

Response:
This structure ensures the model considers multiple angles before recommending.

Principle 3: Provide Reference Information

The Hallucination Problem

LLMs can generate plausible-sounding but incorrect information. Providing context grounds responses in facts.

Without Context vs. With Context

  • ❌ Without Context
  • ✅ With Context (RAG Approach)
Who won the 2028 Olympics basketball gold medal?
Problem: The model might:
  • Invent a plausible answer
  • Admit it doesn’t know (better)
  • Confuse with past Olympics

When to Provide Context

1

Factual Questions

Provide source documents, data, or verified information
2

Domain-Specific Tasks

Include relevant background, terminology, or constraints
3

Document Analysis

Supply the full document or relevant excerpts
4

Code Debugging

Include the actual code, error messages, and environment details

Context Best Practices

Be Relevant

Only include information pertinent to the task

Be Complete

Provide all necessary details to answer fully

Be Organized

Structure context logically (chronological, hierarchical)

Be Clear

Use delimiters to separate context from instructions

Principle 4: Format Matters

How Format Influences Interpretation

The way you structure your prompt significantly impacts how the model parses and responds to it.

Format Comparison

  • Unstructured
  • Structured with Delimiters
  • Code-Style Format
Translate I have an orange to German
Issues:
  • Ambiguous boundaries
  • Unclear what to translate
  • No format guidance

Effective Formatting Techniques

Common delimiters:
  • Triple quotes: """
  • Triple backticks: ```
  • XML tags: <text>...</text>
  • Brackets: [...]
Example:
Summarize the article below (delimited by ###).

###
[Article content here]
###

Summary:
Task: Translation
Source Language: English
Target Language: Spanish
Style: Formal

Input: "Hello, how are you?"
Output:
Analyze the following code and provide:

1. A brief description of what it does
2. Any bugs or issues found
3. Suggestions for improvement
4. Refactored version

Code:
[code here]

Analysis:
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:

Common Pitfalls to Avoid

Watch out for these mistakes:
  1. Assuming the LLM knows what you want
    • ❌ “Fix this”
    • ✅ “Fix the syntax error on line 5 where the function is missing a closing parenthesis”
  2. Providing contradictory instructions
    • ❌ “Be brief but comprehensive”
    • ✅ “Provide a comprehensive overview in under 200 words”
  3. Using ambiguous language
    • ❌ “Make it better”
    • ✅ “Improve readability by adding comments and using descriptive variable names”
  4. Neglecting output format
    • ❌ “List the items”
    • ✅ “List the items as a numbered list with one item per line”
  5. Information overload
    • ❌ Dumping entire documents without focus
    • ✅ Providing relevant excerpts with clear context

Putting It All Together

The Complete Prompt Framework

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 parameters
2. Identify the purpose and use cases
3. Note any edge cases or limitations
4. Structure the documentation clearly

[PRINCIPLE 3: CONTEXT]
Function to document:
```python
def 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:

Function Name

Purpose: [Brief description] Parameters:
  • param1: [type] - [description]
  • param2: [type] - [description]
Returns: [type] - [description] Example Usage:
[code example]
Notes: [Any important considerations] Documentation:

---

## Practice Exercise: Apply All Principles

Transform 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:
  1. Starting with a relatable real-world example
  2. Explaining the core concept in simple terms
  3. Describing how it differs from traditional programming
  4. 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:

Introduction

[Hook with relatable example]

What is Machine Learning?

[Simple definition and explanation]

How It Works

[Basic process description]

Real-World Example

[Concrete application]

Key Takeaway

[Summary in one sentence] Lesson:
</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 Checklist

Before 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>
I