The RTCFC Framework
A five-part framework that makes prompt engineering systematic and repeatable.
Most people write prompts by gut feel — they type something, hope for the best, and rephrase randomly when it doesn't work. The RTCFC framework gives you a systematic approach: Role, Task, Context, Format, Constraints. Use this framework and you'll get consistently better results with less trial and error.
Setting a role tells the AI what expertise, perspective, and communication style to adopt. A "marketing strategist" gives different advice than a "financial analyst" even when looking at the same data. The role primes the model to access the relevant patterns from its training.
The task is the action verb: what the AI should do. Start with a clear imperative: Analyze, Write, Compare, List, Explain, Create, Review, Evaluate. One prompt should have one primary task. If you need multiple outputs, list them explicitly.
Context is the background information the AI needs. This is where you paste documents, describe your situation, explain the audience, or provide data. More relevant context almost always produces better output. The key word is "relevant" — don't dump irrelevant information.
Format specifies the structure of the output: bullet points, numbered list, table, JSON, email, paragraph, report, code block. Being explicit about format is one of the easiest ways to improve AI output.
Constraints are rules and boundaries: word count limits, things to include or exclude, tone requirements, technical restrictions. Constraints prevent the AI from going off track.
RTCFC Framework in Action
Full RTCFC framework example for data analysis.
[ROLE]: You are a senior data analyst at an e-commerce company. [TASK]: Analyze the following monthly sales data and identify the three most important trends. [CONTEXT]: We're a mid-size online retailer selling home goods. Last quarter we launched a new kitchen category. The data below covers the past 6 months. [DATA] [FORMAT]: Present your analysis as: 1. Executive summary (3 sentences) 2. Three key trends (bullet points with supporting data) 3. Two recommended actions [CONSTRAINTS]: Focus on actionable insights, not obvious observations. Don't exceed 300 words.
Prompt Templates
RTCFC Quick Template
Quick-start RTCFC template for any task.
You are a [ROLE] with expertise in [SPECIALTY]. [TASK]: [What you want done — use a clear action verb]. Context: [Background information, data, situation description]. Format the response as: [bullet points / table / report / JSON / etc.]. Constraints: - [Word limit or length] - [Tone or style] - [What to include or exclude]
Framework Adapter
Gets AI to help you build a structured prompt from a rough idea.
I need to accomplish this task: [DESCRIBE TASK IN PLAIN ENGLISH]. Help me build a structured prompt using the RTCFC framework (Role, Task, Context, Format, Constraints). For each component, suggest what I should include for this specific task. Then combine them into one ready-to-use prompt.
Test Your Knowledge
Knowledge Check
1 / 3
What does RTCFC stand for?
Key Takeaways
- ✓RTCFC provides a systematic approach: Role, Task, Context, Format, Constraints
- ✓Setting a role primes the AI to access relevant expertise and communication patterns
- ✓One prompt should have one clear primary task
- ✓Format specification is one of the easiest wins for better output
- ✓Use the framework as a mental checklist, not rigid labels
Continue Learning
Role & Task
Deep dive into the two most impactful components: who the AI should be and what it should do.
Context, Format & Constraints
How to provide the right background information and control the shape of AI output.
What Are LLMs
A plain-English explanation of large language models and why they behave the way they do.