Anatomy of a Good Prompt
Learn the components of effective prompts for real LLM-powered products
Learning goals
- •Understand the CRISPE framework for structuring prompts
- •Learn best practices for clarity and specificity
- •Know how to use delimiters and formatting effectively
The CRISPE Framework
A strong prompt often includes these elements:
C - Context
Background information the model needs to understand the task.
R - Role
Who the model should act as (expert, assistant, character).
I - Instructions
Clear, specific directions for what to do.
S - Specifics
Details about format, length, style, or constraints.
P - Persona
Tone and voice characteristics for the response.
E - Examples
Sample inputs and outputs to demonstrate expectations.
Prompt Structure Best Practices
Be Specific, Not Vague
❌ "Write something about dogs"
✅ "Write a 100-word informative paragraph about Golden Retrievers' temperament for first-time dog owners"
Use Clear Delimiters
Separate different parts of your prompt with clear markers:
Context: [Your context here]
---
Task: [Your task here]
---
Format: [Expected output format]Order Matters
Put the most important information at the beginning and end of prompts. Information in the middle may receive less attention (the "lost in the middle" problem).
Be Explicit About Format
If you want a list, say "as a numbered list." If you want JSON, specify the schema.