A Prompt Engineering Cheatsheet That Boils Down to Four Questions
Common Prompt Frameworks: A Summary
A quick-reference manual for prompt frameworks. Covers 13 mainstream frameworks + 4 reasoning techniques + 5 content construction techniques. Each framework is given as meaning table → template → example → use case.
Applicable models: GPT-4/5, Claude, Gemini, Qwen, DeepSeek, GLM, and other mainstream large models.
All templates use a consistent
# Role:structured heading style (see Preliminary: Writing Conventions).
30-Second Overview (Only If You're in a Hurry)
If you don't want to read the whole thing, remember these "four moves" to cover most scenarios:
| Scenario | What to Use | Skeleton |
|---|---|---|
| Simple daily tasks | RTF | # Role: → # Task: → # Format: |
| Formal content creation | CO-STAR | # Context: # Objective: # Style: # Tone: # Audience: # Response: |
| Need reasoning/analysis | + CoT | Add # Output Rules: to require step-by-step reasoning |
| Need style mimicry | + Few-shot | Give 2-3 desired examples under # Examples: |
One more safety field:
# Output Rules:
1. If information is insufficient, ask me first; don't guess.
2. Respond in Simplified Chinese.
Preliminary: Writing Conventions
All templates in this manual use structured headings like
# Role:instead of natural-language prose like "You are [role]. Please help me [task]." Here's why.
Two Writing Styles Compared
❌ Natural-language prose
You are a senior new-media editor. Please write 5 attractive headlines for an article about going to bed early and waking up early, in a numbered list, each no more than 20 characters.
✅ Structured headings
# Role: Senior new-media editor
# Task: Write 5 attractive headlines for a health-education article about "early to bed, early to rise"
# Format: Numbered list; each headline no more than 20 characters; no clickbait style
Why Structured Headings Are More Reliable
| Reason | Explanation |
|---|---|
| Clear structural boundaries | Markdown headings are explicit block markers; the model treats the entire section after # Task: as a "task field" rather than continuing to read it as narrative. In natural language, slots depend on punctuation and the model has to guess |
| Slots don't bleed | In prose, "background" and "requirements" mix in the same paragraph; AI often ignores constraints as background. Headings naturally isolate them |
| Easy to modify item by item | Change the format by editing just # Format:; delete an audience by removing one line. No need to rewrite the whole sentence |
| Collaborative and diffable | When a team maintains prompts, Git can show precisely which field changed |
| Programmatically assemblable | Template engines replace variables by # {field}: more reliably than regex matching natural language |
| Supports hierarchy | # for main fields, ## for sub-blocks, expressing relations like "this constraint belongs to that objective" |
Three Usage Rules
① Labels in English, content in Chinese (English label patterns have the highest density in training data)
✅ # Role: Senior copy editor
② Structure positions use half-width colons and half-width parentheses
✅ # Role: Senior copy editor
❌ # 角色:Senior copy editor (full-width colon, often breaks template engines)
③ Consistent hierarchy, no mixing Chinese and English at the same level
✅ # Role: / # Task: / # Format:
❌ # Role: / # 任务: / # 输出格式:
💡 One-liner:
# Role:is like adding a "field name" to your prompt. The clearer the field name, the lower the chance of the AI filling the wrong slot.
Table of Contents
- Preliminary: Writing Conventions
- I. The Essence of Frameworks: Four Questions That Must Be Answered
- II. Entry-Level Frameworks (3 Elements)
- III. Advanced Frameworks (4-6 Elements)
- IV. Reasoning Enhancement Techniques
- V. Content Construction Techniques
- VI. Combining Frameworks and Techniques
- VII. Full Framework Comparison Table
- VIII. Selection Decision Tree
- IX. Language and Format Specifications
- X. General Writing Principles
- XI. Common Mistakes
- Appendix A: One-Page Quick Reference
- Appendix B: Ready-to-Use Template Library
I. The Essence of Frameworks: Four Questions That Must Be Answered
Prompt frameworks are structured templates that break a one-sentence requirement into several fixed "slots." They look varied, but at heart they all answer four questions:
┌──────────────────────────────────────────────┐
│ ① Who is speaking? → # Role Role / professional perspective │
│ ② What is being said? → # Task Task / goal / material │
│ ③ What constraints? → # Constraints Audience / taboos / boundaries │
│ ④ How to deliver? → # Format Format / length / structure / examples │
└──────────────────────────────────────────────┘
The differences between frameworks are just which layers they pick and the order they arrange them. Once you understand that, you don't need to memorize frameworks—forget the names and you can assemble your own.
Why frameworks are worth using:
| Benefit | Explanation |
|---|---|
| No omissions | Role, audience, format, constraints all written at once; AI doesn't have to guess |
| Low barrier | Fill in the template; no need to "know how to write prompts" |
| Reproducible | Different people using the same template get similar quality |
| Easy iteration | When results are poor, you can pinpoint which slot wasn't written well |
💡 One-liner: A framework is a "format contract" for your prompt, clarifying what you want, how to give it, and what not to include.
II. Entry-Level Frameworks (3 Elements)
Three-element frameworks share a trait: 30 seconds to write, cover 80% of daily needs.
1. RTF Framework · Simplest Usable
Role – Task – Format | Source: community common, promoted by OpenAI courses
| Letter | Meaning | Explanation |
|---|---|---|
| R | Role | What identity you want the AI to assume |
| T | Task | What exactly to do |
| F | Format | What output form |
Template
# Role: [AI's identity, the more specific the better]
# Task: [the specific task to complete]
# Format: [output form + hard constraints]
Example
# Role: Senior new-media editor, good at health-education headlines, dislikes clickbait
# Task: Write 5 headlines for a health-education article about "early to bed, early to rise"
# Format:
- Numbered list, one per line
- Each headline no more than 20 characters
- Don't use words like "shocking," "must-read," "doctors are shocked"
Use cases: daily Q&A, copywriting, emails, translation/polishing. Not for: formal content needing fine style control.
2. TAG Framework · Execution-Oriented
Task – Action – Goal | Source: project-management perspective
| Letter | Meaning | Explanation |
|---|---|---|
| T | Task | What to do |
| A | Action | Through what steps/methods |
| G | Goal | Final desired result |
Template
# Task: [what to do]
# Action: [how many steps, what each step does]
# Goal: [acceptance criteria, the more quantifiable the better]
Example
# Task: Analyze this quarterly sales data
# Action:
1. Look at overall trend first (year-over-year, quarter-over-quarter)
2. Then break down by product line, identify specific contributors to growth and decline
3. Finally attribute: price, channel, or product itself
# Goal: A one-page report clearly indicating the 2 directions to focus on next quarter
Use cases: data analysis, project planning, giving AI multi-step work. Trait: naturally includes "acceptance criteria," suitable for reuse by others.
3. APE Framework · Purpose-Driven
Action – Purpose – Expectation | Source: community common
| Letter | Meaning | Explanation |
|---|---|---|
| A | Action | What you want the AI to do |
| P | Purpose | The motivation/use for doing it |
| E | Expectation | Expected output style or standard |
Template
# Action: [what to do]
# Purpose: [why do it, where it goes, who it's for]
# Expectation: [output style, length, quality requirements]
Example
# Action: Translate this product description into English
# Purpose: For overseas social media, aimed at 18-28 year-old users
# Expectation:
- Colloquial, engaging
- No more than 100 words
- Ready to publish, no second-round polishing needed
Use cases: translation, rewriting, summarization—as long as the AI knows "where it's going," it automatically matches tone and vocabulary.
4. PAR Framework · Narrative Structure
Problem – Action – Result | Source: consulting-industry narrative structure
| Letter | Meaning | Explanation |
|---|---|---|
| P | Problem | What problem/current state |
| A | Action | What action was taken |
| R | Result | What (quantifiable) result was obtained |
Template
# Problem: [current situation and pain point]
# Action: [what I did / will do]
# Result: [what I want it to look like]
Example
# Problem: My resume project descriptions are too flat, sent 30 applications with zero interviews
# Action: Rewrite the following 3 experiences using "verb-first + quantifiable result"
# Result:
- Each no more than 2 lines
- Highlight business impact (cost saved / efficiency gained), not daily duties
- Keep original facts, don't fabricate numbers
# Input:
"""
(paste resume project section)
"""
Use cases: resume polishing, case packaging, project retrospectives, performance reporting.
III. Advanced Frameworks (4-6 Elements)
The more elements, the more control, but the more effort to write. Use as needed; don't be complete for completeness' sake.
1. ICIO Framework · Material Processing
Instruction – Context – Input – Output
| Letter | Meaning | Explanation |
|---|---|---|
| I | Instruction | What to ask the AI to do |
| C | Context | Supplementary background |
| I | Input Data | Raw material to process |
| O | Output | Desired output format |
Template
# Instruction: [what you want the AI to do]
# Context: [material source, purpose]
# Input:
"""
[raw material]
"""
# Output: [output structure]
Example
# Instruction: Extract action items from the following meeting notes
# Context: This is a product weekly meeting record with development, design, and operations attendees
# Input:
"""
(paste full meeting notes)
"""
# Output: Markdown table with columns "Item / Owner / Deadline / Priority"
# Output Rules: Mark items without an owner as "to be claimed," don't fill in yourself
Use cases: information extraction, content organization, translation, any task with raw material to process.
⚠️ Key: material under # Input: must be wrapped in delimiters (""" or XML tags), otherwise the AI may treat sentences in the material as instructions.
2. RACE Framework · Rapid Structuring
Role – Action – Context – Expectation
| Letter | Meaning | Explanation |
|---|---|---|
| R | Role | AI's identity |
| A | Action | What to do |
| C | Context | Contextual information |
| E | Expectation | Output requirements |
Template
# Role: [identity]
# Action: [task]
# Context: [background]
# Expectation: [output requirements]
Example
# Role: Semiconductor industry analyst
# Action: Compare SMIC and TSMC in advanced process gap
# Context: For internal technology strategy meeting; readers have basic industry knowledge
# Expectation:
- No more than 800 words
- Conclusion first, then evidence
- Attach source direction for 3 key data points (I'll verify myself)
Use cases: industry analysis, expert Q&A—more background than RTF, less verbosity than CO-STAR; best value for expert Q&A.
3. CARE Framework · Example-Driven
Context – Action – Result – Example
| Letter | Meaning | Explanation |
|---|---|---|
| C | Context | Contextual situation |
| A | Action | What to do |
| R | Result | Desired output |
| E | Example | A reference sample |
Template
# Context: [background]
# Action: [task]
# Result: [desired output]
# Example: [a sample text]
Example
# Context: I'm preparing a self-introduction in English for a master's interview, targeting computer science
# Action: Help me write a first draft of the self-introduction
# Result:
- Colloquial, not written-language
- About 1 minute (around 150 words)
- Highlight project experience, downplay course grades
# Example:
"""
Good morning, professors. My name is ___, and my passion for
machine learning began when I first built a recommendation
system for my dorm's book-sharing shelf...
"""
Use cases: drafting, mimicking writing style. # Example: is its entire value—giving an example always beats giving adjectives.
4. CO-STAR Framework ⭐ Most Complete Structure
Context – Objective – Style – Tone – Audience – Response Source: Sheila Teo, Singapore GovTech, winner of the 2023 GPT-4 Prompt Engineering Competition
| Letter | Meaning | Explanation |
|---|---|---|
| C | Context | Who you are, what situation, what materials |
| O | Objective | What task for the AI to complete |
| S | Style | Formal/colloquial, mimic which author, which genre |
| T | Tone | Emotional attitude: professional, humorous, friendly, serious |
| A | Audience | Who it's for, their knowledge level and concerns |
| R | Response | Output format: table/list/length/structure and other hard requirements |
Template
# Context:
[background info, use scenario, relevant material]
# Objective:
[the specific task to complete]
# Style:
[which writing style, sentence patterns to mimic]
# Tone:
[what emotional attitude]
# Audience:
[who it's for, their level, what they care about]
# Response:
[output form and hard constraints]
Example
# Context:
I'm a product manager at a SaaS company that just launched a project-management tool for small and medium businesses. Now I need a conversion email for trial users who registered but haven't paid.
# Objective:
Write a conversion email that highlights "30% cheaper than competitors and faster to get started," guiding users to their first payment.
# Style:
Refer to Mailchimp marketing emails: short sentences, data-backed, clear call-to-action at the end.
# Tone:
Professional but friendly, no greasy over-selling.
# Audience:
Small business owners, 30-45, non-technical, care about cost and efficiency, time-poor, immune to "limited-time offers."
# Response:
- Email body no more than 200 words
- Provide 2 alternative subject lines
- End with a bolded action-button text
Why it's strongest: # Style: and # Audience: are the two layers most frameworks lack, and they determine the "flavor" of the output. The same product description for a CTO and for a mom is two completely different texts.
Use cases: marketing copy, business emails, formal reports, any content creation for a specific audience.
5. CRISPE Framework · Multi-Option Experiment
Capacity – Insight – Statement – Personality – Experiment
| Letter | Meaning | Explanation |
|---|---|---|
| C | Capacity / Role | Expert identity the AI plays |
| R | Insight | Background info and key judgments |
| S | Statement | Explicit task instruction |
| P | Personality | Output style, attitude |
| E | Experiment | Ask for multiple options to choose from |
Template
# Capacity: [expert identity]
# Insight: [key facts and judgments I have]
# Statement: [specific task]
# Personality: [style and attitude]
# Experiment: [how many options, how to evaluate]
Example
# Capacity: UX researcher with 10 years experience
# Insight: Our app's 30-day retention is only 8%, but D1 retention is 45%, indicating users aren't non-retaining but mid-term churn; the problem is a 7-30 day experience gap
# Statement: Analyze 5 possible causes for 7-30 day churn
# Personality: Sharp and direct, no pleasantries, start with the most likely cause
# Experiment: Each cause paired with 1 low-cost verification plan (completable within a week), annotated with verification cost and expected signal, so I can pick 2 to start
Use cases: expert consulting, deep diagnosis, decision tasks needing "multi-option comparison."
# Experiment: is the soul of this framework—it forces the AI from "give one answer" to "give a set of options."
6. RISEN Framework · Clear Boundaries
Role – Instruction – Steps – End Goal – Narrowing
| Letter | Meaning | Explanation |
|---|---|---|
| R | Role | AI's identity |
| I | Instruction | Specific task |
| S | Steps | Steps to complete the task |
| E | End Goal | Desired final result |
| N | Narrowing | Constraints: length, taboos, scope, budget |
Template
# Role: [identity]
# Instruction: [task]
# Steps: [①②③ step by step]
# End Goal: [delivery standard]
# Narrowing: [budget/time/taboos/upper limits, listed one by one]
Example
# Role: Travel planner
# Instruction: Plan a 5-day trip to Chengdu
# Steps:
1. First determine a daily theme area (avoid back-and-forth)
2. Then arrange one activity for morning / afternoon / evening
3. Finally give transport mode and time for each leg
# End Goal: The plan can be followed directly without checking guides
# Narrowing:
- Total budget under 3,000 yuan (excluding intercity transport)
- No internet-famous restaurants with queues over 30 minutes
- Daily walking no more than 15,000 steps
- Day 3 afternoon must be reserved for rest
Use cases: itinerary planning, project planning, study schedules—any "bounded" planning task.
⚠️ The more specific # Narrowing: is, the more usable the plan. "Not too expensive" is meaningless; "per person under 200" is a constraint.
7. BROKE Framework · Iterative Evolution
Background – Role – Objectives – Key Results – Evolve Source: community framework inspired by OKR goal-management thinking
| Letter | Meaning | Explanation |
|---|---|---|
| B | Background | Task background and current state |
| R | Role | Role the AI plays |
| O | Objectives | Results to achieve |
| K | Key Results | Quantifiable specific output requirements |
| E | Evolve | How to continuously improve based on my feedback |
Template
# Background: [background and current state]
# Role: [identity]
# Objectives: [goals]
# Key Results:
- [quantifiable requirement 1]
- [quantifiable requirement 2]
# Evolve: [how to change later]
Example
# Background: Need to write an onboarding handbook for new employees; currently only scattered Feishu docs
# Role: Corporate training expert skilled in knowledge management
# Objectives: Produce a clearly structured onboarding handbook outline
# Key Results:
- 5 chapters covering policy, tools, process, culture, and FAQ
- Each chapter lists 3-5 subsection titles plus a one-sentence description
- Chapter 1 must be readable within 20 minutes
# Evolve: I'll give feedback chapter by chapter; you only rewrite the chapter I point out, keep the rest unchanged, don't restructure everything
Use cases: long documents, series content, projects requiring multiple rounds of polishing.
# Evolve: is what distinguishes it from other frameworks—agree in advance how to change, avoiding rewriting everything each round.
8. CLEAR Framework · With Reflection Mechanism
Concise – Logical – Emotional – Actionable – Reflective
| Letter | Meaning | Explanation |
|---|---|---|
| C | Concise | The instruction itself should be short and clear |
| L | Logical | Steps should be clearly ordered |
| E | Emotional | Specify emotional appeal or tone expectation |
| A | Actionable | Require immediately executable plans |
| R | Reflective | Have the AI explain its reasoning for calibration |
Template
# Concise: [one sentence to state the task]
# Logical: [in what order]
# Emotional: [tone and emotional nuance]
# Actionable: [what directly executable thing you want]
# Reflective: [have AI explain why it did it that way]
Example
# Concise: Help me explain this product proposal to a non-technical executive
# Logical: Business value first → implementation approach → risks and mitigation
# Emotional: Confident but not boastful, avoid jargon, don't use "empower" or "closed loop"
# Actionable: Give a 3-minute oral report outline, one sentence per point
# Reflective: After the outline, use 3 sentences to explain why you arranged the narrative that way
Use cases: upward reporting, cross-department communication, situations where you want AI to "hand in homework and also the thinking."
# Reflective: lets you see the AI's thought process—the best tool for diagnosing "why it wrote it wrong."
9. CREATE Framework · With Exclusions
Clarity – Relevant info – End state – Ask – Type – Exclusions
| Letter | Meaning | Explanation |
|---|---|---|
| C | Clarity | Specify what the task is |
| R | Relevant info | Necessary background and selling points |
| E | End state | Describe the ideal state after completion |
| A | Ask | Direct request statement |
| T | Type | Output genre/form |
| E | Exclusions | Explicitly specify what should not appear |
Template
# Clarity: [what is the task]
# Relevant Info: [selling points/facts/parameters]
# End State: [what success looks like]
# Ask: [how many, what you want]
# Type: [genre and form]
# Exclusions: [prohibited content]
Example
# Clarity: Write a Xiaohongshu (Little Red Book) planting-vegetable copy for a children's eye-care desk lamp
# Relevant Info:
- Selling points: flicker-free, auto dimming, national AA-level illumination
- Price: 299 yuan
- Target: parents of 3-8 year-old children
# End State: After posting, the comment section will have parents asking "where's the link"
# Ask: Write 1 main post + 5 hashtags
# Type: Xiaohongshu note style, with emoji, short paragraphs, 1-2 sentences per paragraph
# Exclusions:
- Don't use absolute terms like "best," "first," "national-level"
- Don't disparage competitors, don't mention specific brand names
- Don't promise any therapeutic effect or vision improvement
Use cases: social media content, copy with compliance or brand taboos.
# Exclusions: is its greatest value—"what not to write" often corrects the AI's habitual output more than "what to write" (especially ad-law forbidden words, brand negative lists).
IV. Reasoning Enhancement Techniques
These are not "fill-in-the-blank templates" but techniques that change the AI's thinking path; they can be layered on any framework.
1. Chain of Thought (CoT) ⭐ Most Important Reasoning Technique
Principle: Require the AI to write out intermediate reasoning steps instead of jumping to conclusions. The intermediate steps become "context anchors" for subsequent generation, greatly reducing the probability of miscalculation, skipped steps, and confusion.
Method 1: One-sentence trigger (easiest)
# Output Rules: Please think step by step, list the reasoning steps first, and give a separate conclusion at the end.
Method 2: Write into a field (recommended, combines with framework)
# Role: Financial analyst
# Task: Determine whether this project can break even within 3 years
# Input:
"""
Initial investment 12 million; expected annual revenue 4 million, annual operating cost 1.8 million;
From year 2, revenue grows 15% annually, cost grows 8% annually.
"""
# Steps:
1. Calculate net profit year by year
2. Accumulate cash flow year by year, find the year it turns positive
3. Check if it turns positive within year 3
# Output Rules: Write out the calculation process for each step, don't skip; conclusion at the end
Method 3: Few-shot CoT (best effect)
# Examples:
Q: Xiaoming has 3 apples, buys 5, eats 2, how many are left?
A: First calculate total 3+5=8, then subtract eaten 2, 8-2=6. Answer: 6.
# Task:
Q: (new question)
# Output Rules: Answer in the reasoning format of the example above
Use cases: math, logical reasoning, multi-step analysis, decisions involving multiple conditions. Not suitable for: simple factual Q&A (makes answers verbose, no gain in factualness).
2. Tree of Thoughts (ToT)
Principle: Instead of one reasoning chain, branch out multiple paths, evaluate each, then choose the best to deepen. Suited for open-ended problems without a single standard answer.
# Role: Retail strategy consultant
# Task: Increase revenue for this offline bookstore
# Steps:
1. First propose 3 strategies in completely different directions (three thinking branches)
2. For each strategy, evaluate: investment cost, speed of effect, failure risk, fit with my existing resources
3. Choose the best overall, expand into an executable plan
# Output Rules: Explicitly state why the other two were eliminated
3. ReAct (Reason + Act)
Principle: Think → Act (retrieve/call tools) → Observe result → Think again loop. This is the underlying working mode of AI agents; in daily dialogue it manifests as: letting the AI declare a plan first, then execute, and proactively report when information gaps appear instead of fabricating.
# Task: Research which of three projectors is best for bedroom use
# Steps:
1. First list the dimensions to compare
2. Analyze item by item
3. If any information is insufficient, explicitly tell me what's missing, don't guess
4. Finally give a recommendation with reasons
# Output Rules: After each round of information supplementation, give a new conclusion rather than starting over
4. Self-Consistency
Principle: Have the AI solve the same problem from multiple independent angles; if conclusions match, credibility is high; if they don't, the problem itself is disputed or under-specified.
# Task: Evaluate whether this startup idea is worth executing
# Steps:
1. Analyze independently from a financial feasibility angle
2. Analyze independently from a market-space angle
3. Analyze independently from a personal capability-fit angle
# Output Rules:
- Analyze each angle separately, don't cross-reference, don't pre-conclude
- Final summary: if the three conclusions contradict, explicitly point out the contradiction and what information I need to decide
Use cases: major decisions, high-risk judgments. Cost is 3x tokens; use only for truly important problems.
V. Content Construction Techniques
1. Few-shot (Few-Shot Examples) ⭐ Most Effective Single-Point Efficiency Tactic
Principle: Give 2-3 "input → output" examples so the AI mimics through pattern matching. Research shows a few high-quality examples often beat thousands of words of adjective descriptions.
# Task: Write a one-sentence slogan for the following products
# Examples:
- Input: thermos cup → Output: Carry the warmth of morning into evening.
- Input: desk lamp → Output: Light one lamp, warm a room.
- Input: umbrella → Output: When the sky rains, I'm prepared.
# Input: humidifier
# Output:
Three iron rules
- Example quality > example quantity (3 gems > 10 mediocre)
- Format must be consistent (punctuation, length, structure uniform)
- AI copies flaws in examples—don't use flawed examples to pad
2. Role Playing (Persona)
Principle: Specifying an identity activates the model's knowledge distribution and expression habits in that domain.
❌ # Role: Universe's strongest marketing expert
✅ # Role: 12-year brand director in FMCG industry
# Style: Explain selling points in one sentence; fewer adjectives, more concrete scenarios; dislike hollow slogans
Key: The value of a role isn't the "title" but "experience + expertise + expression habits"—the title is identity, the latter two are behavioral constraints.
3. Constraint Anchoring
Principle: Separate positive requirements (what) and negative constraints (what not) into two fields, far more effective than mixing them in one paragraph.
# Requirements:
- For zero-beginner readers
- Whole text under 500 characters
- Use everyday metaphors liberally
# Prohibitions:
- No technical terms (explain in parentheses if necessary)
- Don't start with "as everyone knows" or "with the times"
- No more than 3 exclamation marks
4. Delimiters
Principle: Physically separate "instructions" and "materials" to prevent the AI from treating material content as instructions (a primary defense against prompt injection, and key to stability in long-document processing).
Method 1: Triple quotes
# Input:
"""
(paste long text)
"""
# Task: Summarize the three core points of the above material
Method 2: XML tags (Claude officially recommends, tags in English)
<material>……</material>
<instruction>……</instruction>
Method 3: Markdown headings
# Background:
# Task:
# Input:
Key: The longer the material, the more it needs delimiters. This is the most overlooked yet most impactful stability trick.
5. Output Formatting
Principle: Not just describing the format, but providing a skeleton for the AI to fill, and forbidding extra output.
# Task: Determine the sentiment of the following user comment and extract keywords
# Input:
"""
Charges fast, but the case lost paint after two weeks; customer service attitude is ok.
"""
# Output Format: Output strictly as the following JSON, nothing else
{
"sentiment": "positive/negative/neutral",
"keywords": ["keyword1", "keyword2"],
"summary": "one-sentence summary, no more than 30 characters"
}
| Output purpose | Recommended form |
|---|---|
| For program processing | JSON (keys in English) |
| For human reading | Markdown headings + lists |
| Data comparison | Markdown tables |
| Need to paste back into docs | Plain text, no Markdown symbols |
VI. Combining Frameworks and Techniques
Frameworks provide "information structure," techniques provide "thinking style" and "expression style"—they multiply together:
Basic framework + reasoning technique + content technique = production-grade prompt
Example 1: CO-STAR + CoT + Few-shot
→ Write a persuasive business proposal (need audience analysis, rigorous argument, and fixed style)
Example 2: ICIO + delimiters + Output Format
→ Extract structured info from long material and generate an execution plan
Example 3: CRISPE + ToT + Self-Consistency
→ Multi-option evaluation of a major decision (need options, multi-path, cross-validation)
Example 4: RTF + CoT
→ Solve a math problem (lightest combination)
A universal field that can be appended to any prompt:
# Output Rules:
1. If information is insufficient, ask me first; don't guess.
2. For complex problems, reason step-by-step first, then give a conclusion.
3. Conclusion first, then reasoning.
4. Respond in Simplified Chinese.
VII. Full Framework Comparison Table
| Framework | Element Count | Unique Field | Best Use Case | Difficulty |
|---|---|---|---|---|
| RTF | 3 | # Format: |
All simple daily tasks | ⭐ |
| TAG | 3 | # Action: |
Execution-type, multi-step tasks | ⭐ |
| APE | 3 | # Purpose: |
Translation, rewriting, summarization | ⭐ |
| PAR | 3 | # Problem: |
Resume, review, case | ⭐ |
| ICIO | 4 | # Input: |
Material processing, information extraction | ⭐⭐ |
| RACE | 4 | — | Expert Q&A, industry analysis | ⭐⭐ |
| CARE | 4 | # Example: |
Drafting, mimicking style | ⭐⭐ |
| CO-STAR | 6 | # Style: # Audience: |
Marketing copy, formal content | ⭐⭐⭐ |
| CRISPE | 5 | # Insight: # Experiment: |
Expert consulting, multi-option decisions | ⭐⭐⭐ |
| RISEN | 5 | # Narrowing: |
Bounded planning | ⭐⭐ |
| BROKE | 5 | # Key Results: # Evolve: |
Long documents, continuous polishing | ⭐⭐⭐ |
| CLEAR | 5 | # Reflective: |
Upward reporting, complex collaboration | ⭐⭐⭐ |
| CREATE | 6 | # Exclusions: |
Social media content, compliance copy | ⭐⭐⭐ |
Field-reuse cross-reference (understand this one table, and you don't need to memorize frameworks):
| Field | Appears in | Meaning consistent? |
|---|---|---|
# Role: |
RTF / CRISPE / RISEN / RACE / BROKE / CARE(C) | Yes: AI's identity |
# Context: |
CO-STAR / RACE / CARE / ICIO / CLEAR(Concise) | First four consistent; CLEAR's C means "concise" |
# Audience: |
Only CO-STAR | The only framework with a distinct "audience" field; that's why it's strongest |
# Expectation: |
APE / RACE / CARE / BROKE / CREATE | All relate to "desired output," interchangeable |
# Objective: |
CO-STAR / BROKE / ICIO(Instruction) | Consistent: task goal |
Conclusion: Framework names differ, but fields heavily overlap. Only four truly determine quality: audience, constraints, examples, and output format.
VIII. Selection Decision Tree
What type of task is yours?
│
├─ Simple Q&A / small copy / write an email
│ └→ RTF (# Role / # Task / # Format, 30 seconds to write)
│
├─ Have raw material to process (extract / summarize / translate / rewrite)
│ └→ ICIO + delimiters (# Input: """...""")
│
├─ Content creation (copy / email / report / proposal)
│ ├─ For a specific audience → CO-STAR
│ ├─ Has taboos or compliance requirements → CREATE
│ ├─ Need multiple options → CRISPE
│ └─ Need to mimic a style → CARE or + Few-shot
│
├─ Planning (trip / project / study schedule)
│ └→ RISEN (# Narrowing: be specific)
│
├─ Long documents / series content / repeated polishing
│ └→ BROKE (# Evolve: agree on how to change)
│
├─ Deep reasoning (math / logic / complex decisions)
│ └→ Any framework + CoT (+ ToT branching)
│
├─ Major decisions that can't go wrong
│ └→ CRISPE + ToT + Self-Consistency
│
└─ Upward reporting / need AI to explain thinking
└→ CLEAR
Three practical judgments:
- The "pricier" the task, the more complete the framework. For a social post, use RTF; for a client-facing proposal, use CO-STAR.
- When uncertain, use RTF + CoT. This combo covers 90% of cases.
- Frameworks can't save you from missing information. If you can't even say who it's for, no framework helps.
IX. Language and Format Specifications
This section answers frequent questions: Should the heading be
# Roleor# 角色? Should colons be full-width or half-width?
Conclusion: English labels + Chinese content is the mainstream and safe approach
But it's not a hard requirement; its impact is far smaller than "whether it's written clearly." Here's the trade-off rationale.
Reasons for English labels
| Reason | Explanation |
|---|---|
| Training distribution | Mainstream structured prompts (LangGPT, Anthropic official templates, community million-strong prompts) almost all use # Role / ## Workflow / <instructions> skeletons. English label patterns have higher density, more stable in long contexts and format-sensitive scenarios |
| XML tags | Claude is specifically optimized for English tags like <context>, <example>; Chinese tags are understood but offer no advantage |
| Program-friendly | If prompts are assembled in code (template engines, agent orchestration), English keys are safer, avoiding encoding and punctuation issues |
Reasons for Chinese labels
| Reason | Explanation |
|---|---|
| Prevent language drift | This is more important than label language: too much English in the instruction makes the model more likely to answer in English. For Chinese output, either write the instruction in Chinese or explicitly add # Output Rules: Respond in Simplified Chinese |
| Team maintainability | If prompts need to be edited by non-technical colleagues and put into Chinese docs, # 角色: is more intuitive than # Role: |
| Domestic models no disadvantage | Qwen, DeepSeek, GLM understand Chinese instructions well enough; Chinese labels are perfectly usable |
Scenario choice table
| Scenario | Recommendation |
|---|---|
| Daily personal use, Chinese output | English skeleton + Chinese content (most mainstream, adopted in this manual) |
| To share / team collaborative maintenance | All Chinese, lower comprehension cost |
| Will be code-parsed | Structure labels, JSON keys always English |
| Use Claude with XML tags | Tags in English |
Three technical details more practical than "language choice"
✅ # Role: Senior copy editor ← half-width colon, standard
❌ # 角色: Senior copy editor ← full-width colon, some parsers/template engines break
✅ # Role: Senior copy editor ← mixed Chinese/English spacing is common, fine
✅ # 角色: Senior copy editor ← also perfectly fine
❌ Mixing both in the same prompt ← worst; breaks structural pattern
✅ # Role: / # Task: / # Format: ← all English, consistent hierarchy
❌ # Role: / # 任务: / # 输出格式: ← mixing two languages at same level, worst
On punctuation
- Structural punctuation uses half-width:
:,,,",(). Full-width symbols (:,""()) can cause parsing errors in code, JSON, and template variables. - Body content uses Chinese punctuation: a reading experience issue, unrelated to machine parsing.
- In code blocks, always half-width: example JSON, variable names, commands must be ASCII.
One iron rule
Consistency > language choice. Within the same prompt, heading hierarchy is either all English or all Chinese; mixing breaks the structural pattern the model recognizes. Which language you use for headings usually matters far less than "whether you wrote the audience and quantified constraints."
X. General Writing Principles
Whatever framework you use, these principles matter more than the framework itself:
Specific beats abstract ❌
# Style: Write professionally→ ✅# Style: Consulting-report tone, conclusion first, each paragraph no more than 3 linesQuantify everything quantifiable ❌
# Format: Make it shorter→ ✅# Format: No more than 200 words / under 5 items / 3 sentencesAlways write the audience "For people with zero tech knowledge" and "for CTOs" are two different universes.
Examples are the ultimate weapon A sample you're satisfied with beats all adjectives.
Explain the motivation; the AI fills in details itself Knowing "why" lets it infer "how."
Allow the AI to ask questions Adding "if information is insufficient, ask me first" significantly reduces fabrication.
Iterate, don't restart When the result is off, say "which field is wrong + what you expect"—far more efficient than rewriting everything.
Negative lists matter just as much
# Prohibitions:often corrects the AI's habits better than# Requirements:.Put instructions first, material last In long-material scenarios, give the task and format requirements first, then the
# Input:. Models are more sensitive to beginning and end.Strip decorative text Words like "please," "kindly," "thank you so much" have almost no effect; save that space for concrete information.
XI. Common Mistakes
| Mistake | Problem | Better practice |
|---|---|---|
| Writing everything in one natural-language paragraph | Slots have no boundaries; AI easily misses constraints | Use # Role: # Task: # Format: to split fields |
| Stacking polite phrases | Nearly zero effect on results | Use the space for background and constraints |
| All requirements in one sentence | AI has to guess | Break into structured slots with a framework |
| Overdoing role settings | # Role: Universe's strongest expert has zero information |
Write experience, expertise, expression habits |
| Only say what, not for whom | Output style necessarily misses | Add # Audience: |
| Expect one-shot perfection | Complex tasks rarely get right first try | Reserve 2-3 iteration rounds |
| Inconsistent example quality | AI copies flaws from examples | Choose carefully, uniform format |
| The longer the prompt, the better | Redundant info dilutes key instructions | Keep only task-relevant info |
| Ignoring delimiters | Long material and instructions mix; prone to injection | Use """ or XML tags |
| Forgetting to specify output language | Output language drifts with instruction language | Add # Output Rules: Respond in Simplified Chinese |
| Full-width punctuation in structural positions | Template parsing, JSON errors | Always use half-width in structural positions |
| Messing up field hierarchy | Mixing # and ## chaotically makes structure worse |
Top-level fields uniformly #, sub-blocks ## |
Appendix A: One-Page Quick Reference
【1|Daily Quick · RTF】
# Role: [identity + expertise]
# Task: [specific task]
# Format: [form + length + taboos]
【2|Formal Creation · CO-STAR】
# Context: [background and material]
# Objective: [task goal]
# Style: [style reference]
# Tone: [tone nuance]
# Audience: [audience profile]
# Response: [format + length + quantity]
【3|Material Processing · ICIO】
# Instruction: [what to do]
# Context: [material source and purpose]
# Input:
"""
[original text]
"""
# Output: [output structure]
【4|Planning · RISEN】
# Role: [identity]
# Instruction: [task]
# Steps: [①②③]
# End Goal: [delivery standard]
# Narrowing: [budget / time / taboos / upper limits]
【5|Reasoning Enhancement · Universal Suffix】
# Output Rules:
1. If information insufficient, ask first; don't guess.
2. For complex problems, reason step-by-step first, then conclude.
3. Conclusion first, reasoning after.
4. Respond in Simplified Chinese.
【6|Style Mimicry · Universal Prefix】
# Examples:
- Input: ___ → Output: ___
- Input: ___ → Output: ___
# Task: Process new input in the above style
Appendix B: Ready-to-Use Template Library
B1. Copywriting Template (CO-STAR)
# Context:
[What the product/service is, current stage, why I need this content]
# Objective:
[What specific purpose this copy should achieve: click / conversion / share / build trust]
# Style:
[Whose style to follow, or describe sentence features: short/long, colloquial/formal, witty/serious]
# Tone:
[Professional / friendly / restrained / provocative]
# Audience:
[Age group, identity, pain points, what they care about most, what they'll question]
# Response:
- Length: [word count]
- Structure: [headline / opening / body / end CTA]
- Quantity: [how many versions]
- Extra: [hashtags / headline alternatives]
# Exclusions:
[absolute terms, competitor mentions, unpromisable claims]
B2. Long-Document Processing Template (ICIO + Delimiters + CoT)
# Instruction:
Read the following material and complete [specific task].
# Context:
[Material source, purpose, what I ultimately want to do with it]
# Input:
"""
[paste original text]
"""
# Requirements:
1. Read the whole text first, don't just process the beginning
2. If the material has contradictions or missing info, list them separately, don't fill in yourself
3. When quoting, note the source paragraph
4. For long material, give an overall framework first; I'll confirm before expanding section by section
# Output:
[output structure]
B3. Decision Analysis Template (CRISPE + ToT)
# Capacity:
Senior consultant in [domain]
# Insight:
[current state, info I have, my leanings and concerns]
# Statement:
Evaluate [decision option] and give a recommendation.
# Personality:
State conclusions and risks directly, don't list every possibility.
# Experiment:
Give 3 executable options, each annotated:
- Investment cost
- Time to effect
- Main risk
Finally state which you recommend and why you eliminated the others.
# Narrowing:
[budget / time / hard red lines]
# Output Rules:
Conclusion first, then reasoning; if there's a key variable I haven't considered, point it out separately.
B4. Learning/Understanding Template (RTF + CoT + Analogy)
# Role:
Senior lecturer in [domain], good at explaining complex concepts to beginners
# Task:
Help me understand [concept]
# Steps:
1. First use a everyday analogy to explain what it is
2. Then explain its core mechanism (step by step, each step no more than 2 sentences)
3. Give one positive and one negative example
4. Finally list the 3 most common beginner misconceptions
# Format:
All Chinese, no formulas, explain terms in parentheses, total under 800 words
# Output Rules:
Don't start with a definition; start with an analogy.
B5. Reporting/Communication Template (CLEAR)
# Concise:
Explain [this thing] to [non-technical executive / client / cross-department colleague]
# Logical:
Business value first → implementation approach → risks and mitigation
# Emotional:
Confident but not boastful, avoid jargon and words like "empower" and "closed loop"
# Actionable:
Give a 3-minute oral report outline, one sentence per point, with a one-page key data sheet
# Reflective:
After the outline, use 3 sentences to explain why you arranged the narrative that way
Version 2.1 | Updated 2026-11-04 | 13 frameworks · 9 techniques | All templates use # Field: structured style