Skip to main content
Learning PathLesson 3 of 4 · Foundation
Foundation · Lesson 3 of 4beginner12 min read

The Prompt Engineering Mindset for Data Work

The difference between a useless AI response and a brilliant one is how you ask. Learn the prompting patterns that turn AI into a reliable analytics partner.

The number one skill that separates analysts who get value from AI and those who don't isn't technical — it's communication. The way you phrase your request determines whether you get a useless generic response or exactly what you need.

The Golden Rule: Context + Task + Format

Every great prompt has three parts: who you are and what you're working with (context), what you need done (task), and how you want the answer (format). Miss any one of these and you'll get a mediocre response.

Manual Workflow

Write a SQL query for marketing data

With AI

I'm a marketing analyst working with a PostgreSQL database. I have a table called 'campaigns' with columns: campaign_id, channel, date, spend, impressions, clicks, conversions, revenue. Write a SQL query that calculates ROAS, CPA, CTR, and conversion rate by channel for the last 30 days. Sort by ROAS descending. Add comments explaining each calculation.
Time saved: Vague prompt → 3 back-and-forths. Specific prompt → correct on first try

Pattern 1: Role Setting

Tell the AI who you are and who it should be. This dramatically improves the relevance of responses.

Prompt Example
any

Set the role before asking your question:

You are a senior marketing analytics consultant. I'm a mid-level marketing analyst at a B2B SaaS company. Our main KPIs are MQLs, pipeline generated, and CAC payback period.

I need to build a weekly executive dashboard. What metrics should I include, and how should I structure it?

Pattern 2: Show, Don't Tell

Instead of describing your data, show a sample. AI understands examples much better than descriptions.

Prompt Example
any

Include a sample of your actual data:

Here's a sample of my campaign data:

Date, Channel, Spend, Clicks, Conversions, Revenue
2024-03-01, Google Ads, 1250.00, 342, 28, 4200.00
2024-03-01, Meta Ads, 890.00, 567, 15, 2100.00
2024-03-01, LinkedIn, 2100.00, 89, 8, 6400.00

Write a SQL query that identifies which channels are underperforming relative to spend. Define 'underperforming' as ROAS below 2.0.

Pattern 3: Chain of Thought

For complex analysis, ask the AI to think step-by-step. This produces more accurate and thorough results.

Prompt Example
any

Ask for step-by-step reasoning:

I need to analyze why our email channel conversion rate dropped 40% last month.

Think through this step by step:
1. What data would I need to investigate this?
2. What are the most likely causes?
3. What SQL queries would help me diagnose each cause?
4. How should I present findings to my VP of Marketing?

Pattern 4: Specify the Output Format

Don't let the AI decide how to format the response. Tell it exactly what you need.

Prompt Example
any

Be explicit about the format you want:

Analyze this campaign performance data and give me:

1. A one-paragraph executive summary (no jargon, suitable for a CEO)
2. A table showing top 5 and bottom 5 campaigns by ROAS
3. Three specific, actionable recommendations with expected impact
4. The SQL query I can run to monitor this weekly

Keep the total response under 500 words.
Watch Out
Never paste sensitive customer data (emails, names, financial details) into AI tools without checking your company's data policy. Most AI tools process your inputs on external servers. Use anonymized or aggregated data for prompts, or use enterprise plans with data privacy guarantees.
Pro Tip
Save your best prompts. When you find a prompt pattern that works well for a specific task (weekly reporting, campaign analysis, anomaly detection), save it somewhere you can reuse it. Your prompt library is one of your most valuable assets as an AI-powered analyst.
Try It Yourself

Take a vague question you'd normally ask AI and rewrite it using the Context + Task + Format pattern:

Rewrite this vague prompt into a specific one using the Context + Task + Format pattern:

Vague: "Help me analyze my marketing data"

Rewrite it by adding:
- Context: Your role, company type, data structure
- Task: Specific analysis you need
- Format: How you want the output structured

Then try both versions and compare the responses.

Next up: the iteration loop — the workflow pattern that makes AI a reliable partner instead of a frustrating guessing game.

Get weekly job alerts

Curated marketing analytics roles — delivered every Monday.