Foundations

Core Prompting Principles

Fundamental principles for better prompts

Beyond structure, effective prompt engineering is guided by principles—fundamental truths that apply across models, tasks, and contexts. Master these principles, and you'll be able to adapt to any prompting challenge.

The 8 Core Principles

These principles apply to every AI model and every task. Learn them once, use them everywhere.

Principle 1: Clarity Over Cleverness

The best prompts are clear, not clever. AI models are literal interpreters—they work with exactly what you give them.

Be Explicit

Implicit (problematic)

Make this better.

Explicit (effective)

Improve this email by:
1. Making the subject line more compelling
2. Shortening paragraphs to 2-3 sentences max
3. Adding a clear call-to-action at the end

Avoid Ambiguity

Words can have multiple meanings. Choose precise language.

Ambiguous

Give me a short summary.
(How short? 1 sentence? 1 paragraph? 1 page?)

Precise

Summarize in exactly 3 bullet points, each under 20 words.

State the Obvious

What's obvious to you isn't obvious to the model. Spell out assumptions.

You're helping me write a cover letter.

Important context:
- I'm applying for a Software Engineer position at Google
- I have 5 years of experience in Python and distributed systems
- The role requires leadership experience (I've led a team of 4)
- I want to emphasize my open-source contributions

Principle 2: Specificity Yields Quality

Vague inputs produce vague outputs. Specific inputs produce specific, useful outputs.

The Specificity Ladder

Write a 500-word article explaining how rising ocean temperatures cause coral bleaching, aimed at high school students, with 2 specific examples from the Great Barrier Reef, in an engaging but scientifically accurate tone

Each level adds specificity and dramatically improves output quality.

Specify These Elements

AudienceWho will read/use this?
LengthHow long/short should it be?
ToneFormal? Casual? Technical?
FormatProse? List? Table? Code?
ScopeWhat to include/exclude?
PurposeWhat should this accomplish?

Principle 3: Context Is King

Models have no memory, no access to your files, and no knowledge of your situation. Everything relevant must be in the prompt.

Provide Sufficient Context

Insufficient context

Why isn't my function working?

Sufficient context

I have a Python function that should filter a list of dictionaries by a specific key value. It's returning an empty list when it should return 3 items.

Function:
def filter_items(items, key, value):
    return [item for item in items if item[key] = value]

Call: filter_items(items, 'status', 'active')
Expected: 2 items, Got: empty list

The Context Checklist

Before You Submit

Ask yourself: Would a smart stranger understand this request? If not, add more context.

Context Checklist0/5

Principle 4: Guide, Don't Just Ask

Don't just ask for an answer—guide the model toward the answer you want.

Use Instructional Framing

Just Asking

What are the pros and cons of microservices?

Guiding

List 5 advantages and 5 disadvantages of microservices architecture.

For each point:
- State the point clearly in one sentence
- Provide a brief explanation (2-3 sentences)
- Give a concrete example

Consider perspectives of: small startups, large enterprises, and teams transitioning from monoliths.

Provide Reasoning Scaffolds

For complex tasks, guide the reasoning process:

Reasoning Scaffold Example

This prompt guides the AI through a systematic decision-making process.

I need to choose between PostgreSQL and MongoDB for my e-commerce project.

Think through this systematically:
1. First, list the typical requirements for an e-commerce database
2. Then, evaluate each database against each requirement
3. Consider trade-offs specific to my use case
4. Make a recommendation with clear justification

Principle 5: Iterate and Refine

Prompt engineering is an iterative process. Your first prompt is rarely your best.

The Iteration Cycle

1. Write initial prompt
2. Review output
3. Identify gaps or issues
4. Refine prompt
5. Repeat until satisfied

Common Refinements

Too verboseAdd "Be concise" or length limits
Too vagueAdd specific examples or constraints
Wrong formatSpecify exact output structure
Missing aspectsAdd "Make sure to include..."
Wrong toneSpecify audience and style
InaccurateRequest citations or step-by-step reasoning

Keep a Prompt Journal

Document what works:

Task: Code review
Version 1: "Review this code" → Too generic
Version 2: Added specific review criteria → Better
Version 3: Added example of good review → Excellent
Final: [Save successful prompt as template]

Principle 6: Leverage the Model's Strengths

Work with how models are trained, not against them.

Models Want to Be Helpful

Frame requests as things a helpful assistant would naturally do:

Against the grain

I know you can't do this, but try to...

With the grain

Help me understand...
I'm working on X and need assistance with...
Could you walk me through...

Models Excel at Patterns

If you need consistent output, show the pattern:

Pattern Example

This prompt shows the AI exactly what format you want for book recommendations.

Recommend 3 science fiction books. Format each recommendation as:

📚 **[Title]** by [Author]
*[Genre] | [Publication Year]*
[2-sentence description]
Why you'll love it: [1 sentence hook]

---

Models Can Role-Play

Use personas to access different "modes" of response:

As a devil's advocate, argue against my proposal...
As a supportive mentor, help me improve...
As a skeptical investor, question this business plan...

Principle 7: Control Output Structure

Structured outputs are more useful than free-form text.

Request Specific Formats

Return your analysis as:

SUMMARY: [1 sentence]

KEY FINDINGS:
• [Finding 1]
• [Finding 2]
• [Finding 3]

RECOMMENDATION: [1-2 sentences]

CONFIDENCE: [Low/Medium/High] because [reason]

Use Delimiters

Clearly separate sections of your prompt:

### CONTEXT ###
[Your context here]

### TASK ###
[Your task here]

### FORMAT ###
[Desired format here]

Request Machine-Readable Output

For programmatic use:

Return only valid JSON, no explanation:
{
  "decision": "approve" | "reject" | "review",
  "confidence": 0.0-1.0,
  "reasons": ["string array"]
}

Principle 8: Verify and Validate

Never blindly trust model outputs, especially for important tasks.

Ask for Reasoning

Solve this problem and show your work step by step.
After solving, verify your answer by [checking method].

Request Multiple Perspectives

Give me three different approaches to solve this problem.
For each, explain the trade-offs.

Build in Self-Checking

After generating the code, review it for:
- Syntax errors
- Edge cases
- Security vulnerabilities
List any issues found.

Summary: The Principles at a Glance

Clarity Over ClevernessBe explicit and unambiguous
Specificity Yields QualityDetails improve outputs
Context Is KingInclude all relevant information
Guide, Don't Just AskStructure the reasoning process
Iterate and RefineImprove through successive attempts
Leverage StrengthsWork with model training
Control StructureRequest specific formats
Verify and ValidateCheck outputs for accuracy

Which principle suggests you should include all relevant background information in your prompt?

Practice: Fill in the Blanks

Test your understanding of the core principles by completing this prompt template:

Apply the PrinciplesFill in the blanks to create a well-structured prompt — write anything you want!
You are a with expertise in . Context: I'm working on . Task: Constraints: - Keep your response under words - Focus only on Format: Return your answer as .
AI-powered semantic validation
Principles Checklist0/8 complete

These principles form the foundation for everything that follows. In Part II, we'll apply them to specific techniques that dramatically enhance prompt effectiveness.