Prompt Formula & 6 Background Elements
One universal formula (Role + Task + Background + Format + Constraint) plus 6 data-specific background elements to stop AI from guessing and reduce rework.
Universal Prompt Formula: 5 Pieces
| Role | Task | Background | Format | Constraint |
|---|---|---|---|---|
| What identity | What to do | What it should know | What the output looks like | What not to do |
| e.g., Data Analyst | e.g., Analyze Q1 sales | e.g., Data in XX file, tax-inclusive | e.g., HTML report + dashboard | e.g., Don't fabricate targets, flag anomalies as "to be verified" |
The 5-piece formula isn't a rigid template — it's a checklist. Run through it before each prompt and fill in what's missing. The most common mistake is giving only the task without background, forcing AI to guess.
Data Analysis Specifics: 6 Background Elements
The clearer the background, the less AI guesses, and the more accurate the analysis. For data analysis scenarios, the background needs 6 elements:
Business
What is this data for? → "Sales detail" "Expense records" "User behavior logs"
Time
What period does it cover? → "Q1 2026" "Last 30 days" "Full year 2025"
Fields
What does each column mean? → "Date, salesperson, product, quantity, amount, province, customer type"
Definition
How are numbers calculated? → "Tax-inclusive, unique order count" "Tax-exclusive, by row count"
Question
What do I want to know? → "Regional and product sales performance" "Why did March decline"
Target
Is there a benchmark? → "Compare to monthly targets" "Year-over-year comparison"
Crash Comparison: Just Saying "Analyze This"
Core Principle
AI produces the first draft and fills gaps; you judge and make the final call. Think of AI as a very smart subordinate — as the boss, your job is to assign work clearly and approve the result.
Next lesson: the main event — the 9-step workflow hands-on, taught and demonstrated step by step.
Fundamentals & Core Concepts
See the finished product, then understand the 5-stage workflow, 4 core concepts, and 6 common scenarios. Build the core mindset: AI handles implementation, you handle the thinking.
9-Step Workflow Hands-On
Step by step — from data preparation to report review, run the full data analysis pipeline using a single sales dataset to produce a complete analysis report on the spot.
Tutorials