Setting the Scene Effectively
Framing techniques: 'You are...', 'Given that...', 'The goal is...'.
Opening Frames That Work
The first sentence of your prompt is the most important. It sets the model's operating context — the lens through which it will interpret everything that follows.
Effective opening frames include: You are..., The context is..., Given that..., and The goal is.... Each activates a different dimension of context before the actual task begins.
The 'You Are...' Frame
The You are... frame assigns a persona to the model. This activates the vocabulary, reasoning style, and priorities associated with that role.
Key: be specific. 'You are an expert' is weak. 'You are a senior Python engineer with 10 years of experience who prioritizes readability over cleverness' is strong.
Persona frames work best when the persona implies a specific way of thinking and communicating that you need.
import anthropic
client = anthropic.Anthropic(api_key='sk-ant-your-key-here')
persona_prompts = [
'You are a Socratic philosophy professor. Ask 3 probing questions about this claim: AI will replace programmers.',
'You are a skeptical venture capitalist who has seen 500 pitches. Give brutal feedback on this pitch: We are building an AI writing assistant.',
'You are a patient kindergarten teacher. Explain what a computer does in 3 sentences for 5-year-olds.'
]
for prompt in persona_prompts:
response = client.messages.create(
model='claude-opus-4-5',
max_tokens=150,
messages=[{'role': 'user', 'content': prompt}]
)
print(f'--- Persona ---')
print(prompt[:80] + '...')
print(response.content[0].text.strip())
print()All lessons in this course
- What Context Means in AI Prompting
- Providing Background Information
- Setting the Scene Effectively
- Context Length and Relevance