The Complete Guide to AI Prompts for Data Analysis (With Examples)
The Complete Guide to AI Prompts for Data Analysis
Data analysts, PMs, and business leaders are using AI prompts for data analysis to clean messy datasets, write SQL, build dashboards, and generate stakeholder‑ready summaries in minutes instead of hours. In this guide, you will learn how to turn AI into a serious analysis copilot using structured, role‑based prompts from the Build Fast with AI Prompt Library, plus ready‑to‑use examples for Excel, SQL, Python, and BI tools.
Why Data Analysts Need Better AI Prompts (Not Just “Do My Analysis”)
Most analysts have already tried throwing a CSV at ChatGPT or another LLM and asking: “Analyze this data and tell me insights.” The result is usually shallow, generic commentary and sometimes flat‑out hallucinations. The problem is not the model; it is vague prompting that ignores context, data structure, and business goals.
Your AI becomes genuinely useful when you treat it like a specialized teammate with a clearly defined role, workflow, and responsibilities. That is exactly how the Build Fast with AI Prompt Library is structured: instead of generic “data prompts,” you get full role profiles like Business Data Analyst, ML Data Scientist, Data Engineer, Analytics Engineer, and Data Architect that you can load into any chat in one shot.
Here’s a simple way to start a session using your library:
Open the prompt for the closest role (e.g., Business Data Analyst, ML Data Scientist, Analytics Engineer, Data Engineer, or Data Architect).
Paste that role prompt into ChatGPT or your preferred model so the AI “becomes” that persona.
Then layer the specific data cleaning, SQL, visualization, and summary prompts from this article on top.
Example meta‑prompt using your library style
“You are a Business Data Analyst inside a high‑growth SaaS company. You specialize in turning raw product, marketing, and revenue data into clear, actionable insights for leadership. You think in terms of business impact, not just charts. Ask clarifying questions before you answer, call out data quality issues, and always propose next‑step experiments or follow‑up analyses when you see something interesting.”
This mirrors the tone and structure of your dedicated Business Data Analyst prompt and can be combined with the task‑specific prompts below for a complete workflow.

Data Cleaning Prompts (Built Around Your Analyst Roles)
Cleaning and transforming data is still where most analysts lose time, whether they sit in Excel, BigQuery, Snowflake, or a modern data stack. With the Build Fast with AI Prompt Library, you can combine the Business Data Analyst or Data Engineer persona with targeted cleaning prompts so AI helps you profile, clean, and document datasets in a repeatable way.
1. Prompt to profile a dataset
Use after you’ve “activated” the Business Data Analyst prompt:
**“Using your Business Data Analyst expertise, help me profile this dataset. Here is a sample of 20–50 representative rows: [paste sample] Columns: [list columns with types and 1–2 word descriptions].
List potential data quality issues (missing values, inconsistent categories, outliers).
Suggest concrete cleaning steps I should implement in SQL or Python.
Propose 5 automated validation checks I can add to a Data Engineer or Analytics Engineer pipeline (refer to those roles from the Build Fast with AI Prompt Library where relevant).”**
This prompt uses your role system explicitly (Business Data Analyst + Data Engineer/Analytics Engineer) and sets you up for downstream automation.
2. Prompt to generate Excel/Sheets cleaning steps
**“Act as the Business Data Analyst from my prompt library, working in Excel/Google Sheets. My dataset has the following issues: [e.g., inconsistent date formats, extra spaces, mixed upper/lowercase, duplicate customer IDs]. For each issue:
Describe the cleaning approach.
Provide the exact Excel formula and the Google Sheets equivalent.
Explain the formula in plain language so a junior analyst can follow it.”**
This aligns with popular “ChatGPT prompts for Excel” searches while pushing readers towards your library as the source of the analyst persona.
3. Prompt to standardize categorical values
**“Using the Data Engineer and Business Data Analyst personas from the Build Fast with AI Prompt Library, help me standardize categories in this column: [describe or paste frequency table].
Propose a clean, standardized category list.
Generate a mapping table from raw values to standardized values.
Provide: • An Excel/Sheets formula to apply the mapping. • A SQL CASE statement I can drop into a transformation job.”**
Now your cleaning logic is reusable across both spreadsheets and your warehouse, and the connection to those roles in your library is explicit.
4. Prompt to spot outliers and logging errors
“You are combining the perspectives of: Business Data Analyst + Data Engineer (from my prompt library). Given this dataset description [schema] and these summary stats (min, max, avg, percentiles), identify potential outliers or impossible values that likely come from data entry or logging bugs. Explain why each is suspicious, and suggest specific SQL tests or dbt tests I should add to my analytics engineering layer.”
5. Prompt to document the data prep process
“Using the Business Data Analyst persona, write a ‘Data Preparation’ section for an analytics report. I performed these steps: [list steps OR paste previous chat]. Explain what was done, why it was necessary, and any remaining limitations in non‑technical language. Make it easy for Product Managers, Marketers, and Finance stakeholders (who also have their own role prompts in my library) to understand what they can and cannot trust in the analysis.”
This encourages cross‑role collaboration, tying your Data Analyst prompts to PM, Marketing, and Finance prompts in the library.

SQL Query Generation Prompts (Supercharged by Analytics Engineer + Data Engineer)
LLMs are strong at generating SQL, but your prompt library makes them significantly more reliable by locking them into specific warehouse‑focused personas like Analytics Engineer and Data Engineer.
1. Prompt to generate a first‑pass SQL query
*“You are the Analytics Engineer from my Build Fast with AI Prompt Library, working in [Snowflake/BigQuery/Postgres]. Tables and relationships: [describe schema, keys, and grain]. Business question from my Business Data Analyst persona: ‘[e.g., Find the 10 customers with the highest LTV in the last 12 months, excluding refunds]’. Write a single SQL query that answers this question, using clear CTEs (no SELECT ). Add comments explaining each step, and mention any assumptions you’re making about business logic.”
You can then follow up with:
“Now, as the Data Engineer persona, suggest how to optimize this query for large tables (~100M rows). Include indexing/partitioning/clustering recommendations and any pre‑aggregation strategies.”
2. Prompt to refactor legacy or messy SQL
**“Switch to the Analytics Engineer persona from my prompt library. Here is a legacy SQL query that is hard to maintain: [paste query]
Rewrite it using CTEs, consistent naming, and clear structure.
Add comments explaining each transformation so a junior Business Data Analyst can understand it.
Call out any logic bugs or filters that should be applied earlier for performance.”**
3. Prompt to convert stakeholder questions into SQL
**“You are the Business Data Analyst + Analytics Engineer from my prompt library collaborating together. Schema: [describe tables, keys, and business meaning]. Stakeholder question: ‘[paste question from PM/Marketing/Sales/Finance]’.
Translate this into a precise analytical question.
Write a SQL query that answers it.
Explain in plain English what the query does and how to interpret the results so the original stakeholder (who could be using the Product Manager or Marketing prompts from my library) can understand it.”**
4. Prompt to debug a failing query
**“Using the Data Engineer persona, help debug this SQL: [paste query + error message OR incorrect output sample].
Identify likely causes.
Propose a corrected version.
Explain the fix as if mentoring a junior Business Data Analyst.”**
5. Prompt to turn SQL results into insights
**“You are the Business Data Analyst persona. I ran this SQL query and got these results: [paste sample rows].
Summarize key patterns, anomalies, or segments worth exploring.
Suggest 3–5 follow‑up queries, specifying which persona (Business Data Analyst, ML Data Scientist, or Data Engineer) from my prompt library would handle each step.
Flag any data quality concerns.”**
Visualization and Dashboard Prompts (With Built‑In Storytelling)
Visualization isn’t just about picking chart types; it’s about telling a story PMs, marketers, and executives can act on. Because your prompt library includes roles like Business Data Analyst, Product Manager, Growth Marketer, and Finance Analyst, you can explicitly ask AI to design dashboards and narratives tailored to each persona.
1. Prompt to choose the right charts
“You are the Business Data Analyst persona from my prompt library. Dataset summary: [metrics, dimensions, time range]. Stakeholder audience: [e.g., Product Managers, Growth Marketing Specialists, FP&A Analysts – all of which also exist as roles in my prompt library]. Recommend specific chart types (line, bar, stacked bar, histogram, box plot, funnel, cohort, etc.) for each key question. Explain why each chart is appropriate and how to label it so non‑technical executives understand it quickly.”
2. Prompt to design a dashboard layout
**“Take on the Business Data Analyst + Product Manager personas. I want a KPI dashboard in [Looker/Power BI/Tableau] for [team]. Business goals: [list]. Available metrics: [list].
Propose a logical dashboard layout from top to bottom with sections and chart types.
Suggest filters/slicers.
Provide 3 rules of thumb to keep it focused.
Highlight which prompts from my Data Analyst or Product Manager role pages are best for iterating on this dashboard over time.”**
3. Prompt to generate Excel chart instructions
“Act as the Business Data Analyst persona, working purely in Excel/Google Sheets. Columns: [describe]. Describe step‑by‑step how to create a pivot table and pivot chart for [specific analysis]. Include any calculated fields and formatting tips. At the end, suggest 2–3 follow‑up prompts from my prompt library (e.g., Growth Marketer, Finance Analyst) that could use this chart in their own workflows.”
4. Prompt to turn charts into a narrative
“You are the Business Data Analyst persona collaborating with the Executive Coach persona from my prompt library. Here are the key charts/findings: [describe]. Write a 1–2 page narrative that explains what’s happening, why it matters, and 3–5 specific actions for the next quarter, in language suitable for C‑level stakeholders.”
5. Prompt for executive slide outlines
“Using the Business Data Analyst + Chief of Staff personas, propose a 10–15 slide outline for an executive presentation on this analysis: [context + main findings]. For each slide, include: • Title • 1–2 key bullet points • Recommended visual (chart/table/diagram). Note which roles from my prompt library (e.g., Product Manager, Marketing, Finance) should review or contribute to each slide.”
Statistical Analysis Prompts (Anchored to ML Data Scientist + Data Analyst)
Your prompt library already includes advanced personas like ML Data Scientist, Data Engineer, Data Architect, and AI & Machine Learning roles, which makes it ideal for scaffolding statistical and modeling work.
1. Prompt to choose appropriate statistical tests
**“You are the ML Data Scientist persona from my prompt library. I have these questions: [list 2–3 questions]. For each:
Recommend the right statistical test.
List assumptions.
Suggest how the Business Data Analyst persona should visualize and present the results to non‑technical stakeholders.”**
2. Prompt to generate Python/R code
“Using the ML Data Scientist persona, generate Python (pandas, statsmodels/scikit‑learn) code for this analysis: [describe dataset, columns, target, question]. Include: • Data loading and cleaning • Exploratory summaries • The appropriate test or model • A plain‑English interpretation of key outputs. Then, show how the same analysis would look in R (tidyverse + broom) for teams who prefer that stack.”
3. Prompt to interpret statistical output
**“You are the ML Data Scientist persona paired with the Business Data Analyst persona. Here is output from my [test/model] in [tool]: [paste].
Explain the key numbers in plain English.
State whether results are statistically significant and at what level.
Describe practical implications and limitations for Product, Marketing, and Finance stakeholders (all of whom also have prompts in my library).”**
4. Prompt to scope a modeling project
**“Act as the ML Data Scientist persona from my prompt library. I want to build a [churn prediction/lead scoring/fraud detection] model using these features: [list].
Suggest an appropriate model family and why.
Outline the end‑to‑end workflow (data splits, feature engineering, evaluation).
Recommend evaluation metrics.
Highlight pitfalls (data leakage, bias, overfitting).
Suggest how the Data Engineer and Data Architect personas should productionize this.”**
5. Prompt for sensitivity and scenario analysis
“You are the FP&A Analyst + ML Data Scientist personas working together. I have a forecasting/financial model with these key drivers: [variables]. Explain how to run sensitivity and scenario analysis. Propose specific scenarios (best, base, worst) and how the Business Data Analyst persona should visualize and communicate the results to leadership.”
Executive Summary Prompts (From Raw Data to C‑Suite‑Ready Story)
Your library has perfect “bridge” roles for communication (e.g., Business Data Analyst, Executive Coach, Chief of Staff, Product Strategist, Financial Analyst) that can turn complex analysis into clear decisions.
1. Prompt to draft a one‑page executive summary
“You are the Business Data Analyst persona collaborating with the Executive Coach persona from my prompt library. Here are my analysis notes: [paste bullets, charts, metrics]. Write a one‑page executive summary that: • Starts with the main takeaway in 2–3 sentences • Highlights 3–5 key findings with specific numbers • Recommends 3 concrete actions Avoid technical jargon and keep sentences short.”
2. Prompt to create audience‑specific versions
**“Using the same findings, generate three summaries:
For C‑level executives (paired with Chief of Staff persona).
For Product Managers (paired with Product Strategy Expert persona).
For Marketing (paired with Growth Marketing Specialist persona). Tailor language, level of detail, and actions to each audience.”**
3. Prompt for Slack/email updates
“Act as the Business Data Analyst persona. Turn these findings into a concise Slack/email update for leadership. Include: • A one‑sentence headline • 3 bullets with numbers • A simple call to action (e.g., approve experiment X, align on KPI Y). Keep it under 150 words.”
Common Mistakes to Avoid When Using AI for Data Analysis
Even with a strong prompt system, there are pitfalls.
Treating AI as a source of truth instead of a copilot
Always compute numbers in your analytics stack; use your prompt library to guide thinking, generate code, and improve communication, not to replace proper calculations.
Skipping dataset description and business context
Always give roles from your library (e.g., Business Data Analyst, ML Data Scientist) a clear schema, time frame, and business question so they don’t hallucinate.
Ignoring privacy and governance
Don’t paste sensitive PII or regulated data into public models; use your prompts inside secure, compliant environments when handling real production data.
Blindly trusting generated SQL/Python/Excel
Treat every snippet as a starting point. Test on small samples and validate against known benchmarks before you trust it in production.
Under‑using cross‑role collaboration
The power of your library is cross‑functional: combine Data Analysts with Product, Marketing, Sales, and Finance personas so insights turn into action faster.
An AI‑Enhanced Data Analysis Workflow Using Your Prompt Library
To get the most out of AI prompts for data analysis, wire them into a repeatable workflow powered by your prompt library roles.
Kickoff & context
Load the Business Data Analyst persona prompt.
Describe the business problem, success metrics, and dataset schema.
Data understanding & cleaning
Use the cleaning prompts above with Business Data Analyst + Data Engineer personas.
Implement the suggested Excel, SQL, or Python steps and validate.
Exploration & hypothesis generation
Ask the analyst persona for hypotheses and exploratory cuts.
Use Analytics Engineer/Data Engineer personas to generate the supporting SQL.
Deep analysis & modeling
Bring in the ML Data Scientist persona for tests and modeling.
Use their prompts to choose methods, generate code, and interpret results.
Storytelling & decision support
Switch to Business Data Analyst + Chief of Staff + Product Strategy Expert or Growth Marketing Specialist to craft narratives, slides, and action plans.
Tailor outputs per audience using the role prompts for Product, Marketing, Sales, and Finance.
This way, your “AI prompts for data analysis” are not just a long list of commands, but a reusable, cross‑functional system built around the 500+ professional roles in the Build Fast with AI Prompt Library.
CTA: Browse the Data Analyst Prompt Collection (and Beyond)
Instead of trying to remember every prompt from this guide, you can load ready‑made role prompts for every part of your analytics workflow directly from your library.
Suggested CTAs for the blog:
Mid‑article banner:
“Ready to turn AI into your full analytics team? Browse the Data Analyst, ML Data Scientist, Data Engineer, and Analytics Engineer prompts inside the Build Fast with AI Prompt Library — 500+ role‑based prompts you can use today.”
End‑of‑article CTA:
“Want all these AI prompts for data analysis in one place? Get instant access to the Build Fast with AI Prompt Library, including dedicated roles for Business Data Analyst, ML Data Scientist, Analytics Engineer, Data Engineer, Marketing Analyst, and more. Start with the Data Analysts category and build your end‑to‑end AI analysis workflow in minutes.”
Link targets to use in the article:
Business Data Analyst:
https://www.buildfastwithai.com/tools/prompt-library/business-data-analystML Data Scientist:
https://www.buildfastwithai.com/tools/prompt-library/ml-data-scientistData Engineer:
https://www.buildfastwithai.com/tools/prompt-library/data-engineerAnalytics Engineer:
https://www.buildfastwithai.com/tools/prompt-library/analytics-engineer


