AI can help analyse CSV files and spreadsheets, but useful results depend on clear instructions and deliberate checking. This guide provides reusable AI data analysis prompts for cleaning data, profiling columns, finding trends, investigating anomalies, segmenting records, choosing charts, and producing executive summaries—without treating an AI-generated conclusion as automatically correct.
Overview
The best prompts for analysing CSV files do more than ask, “What does this data show?” They define the dataset, the business question, the required calculations, the expected output, and the checks the AI must perform before drawing conclusions.
Before uploading a file, remove information that the analysis does not need. Customer names, email addresses, account numbers, free-text notes, and other sensitive fields may create unnecessary privacy risk. Where possible, use aggregated or synthetic data for experimentation. The AI Data Privacy Checklist provides a practical review before you send information to an AI tool, while the guide to synthetic data for LLM testing can help when a real dataset is not required.
For reliable results, give the model these details:
- Purpose: what decision or question the analysis should support.
- Data dictionary: what each column means, including units and allowed values.
- Time and scope: the date range, geography, customer group, or other boundaries.
- Definitions: how terms such as revenue, active user, conversion, or churn are calculated.
- Output format: tables, bullet points, formulas, charts, or a structured report.
- Uncertainty rules: ask the model to identify missing values, assumptions, and limitations rather than filling gaps silently.
If your AI tool can execute code or calculate from an uploaded file, ask it to show the method or intermediate totals. If it cannot reliably calculate, use it to prepare an analysis plan and verify the results in a spreadsheet, database, or statistical tool.
Checklist by scenario
1. Data cleaning and preparation
Use this prompt before asking for trends or recommendations:
You are helping me prepare a dataset for analysis. Inspect the uploaded CSV or spreadsheet and report:1. The number of rows and columns.
2. Each column's apparent data type and example values.
3. Missing, blank, duplicated, or inconsistent values.
4. Date, currency, percentage, and unit formatting issues.
5. Suspicious outliers or impossible values.
6. Duplicate records and a proposed rule for handling them.
Do not modify the data silently. Create a table with the issue, affected column, row count or examples, likely impact, and recommended action. Clearly separate confirmed findings from assumptions.This is one of the most useful AI spreadsheet prompts because it creates an audit trail before interpretation begins. Ask for a proposed cleaning plan first; approve changes separately if the tool can edit files.
2. Column profiling
Use this data analysis prompt template when you need a quick understanding of an unfamiliar file:
Profile every column in this dataset. For each column, provide:- business meaning, if inferable
- data type and measurement unit
- number and percentage of missing values
- number of unique values
- representative values or summary statistics
- unusual values or formatting patterns
- whether the column is suitable for grouping, filtering, prediction, or calculation
Do not invent a definition for an unclear column. Mark it as "needs clarification" and list the question I should answer.A profile is particularly helpful when several people contribute data or when column names are abbreviated. It also exposes fields that look numeric but contain text, mixed currencies, or percentages stored as whole numbers.
3. Trend and time-series analysis
For monthly KPIs, seasonal planning, or recurring reports, provide the period and metric definitions explicitly:
Analyse the trend in [metric] by [day/week/month/quarter] from [start date] to [end date].Use this definition of [metric]: [definition]. Use [date column] as the time field and [currency/unit] as the unit. Show:1. The value for each period.
2. Absolute and percentage change from the previous period.
3. The comparison with [previous period or baseline], if available.
4. The largest increases and decreases.
5. Any incomplete periods or gaps in the data.
6. Plausible explanations that are supported by fields in the dataset.
Do not claim that one factor caused a change unless the data supports that conclusion. Distinguish description, hypothesis, and evidence.This wording reduces vague conclusions and makes it easier to compare the AI output with a pivot table or formula-based report.
4. Segmentation
When analysing customers, products, tickets, regions, or campaigns, define the grouping logic instead of asking the model to find “interesting segments” without constraints:
Segment the records using [specified fields or rules]. Use these groups: [list groups or thresholds]. For each segment, report record count, share of total, [primary metric], median [secondary metric], and the most important differences from the overall dataset.Flag segments with a small sample size. Do not describe a segment as better or worse without stating the metric and comparison baseline. Explain how the result would change if the threshold changed.If you want the AI to suggest groups, ask for two or three alternative approaches and require a plain-language explanation of each. Avoid allowing arbitrary clusters to become business categories without human review.
5. Anomaly investigation
Use this prompt when a value, period, or record looks unusual:
Find observations that are unusual relative to the rest of the dataset using appropriate checks for this data type. For each potential anomaly, show the row or period, the relevant value, the comparison baseline, and the rule used to flag it.Classify each item as one of: likely data-entry issue, possible operational event, valid rare case, or cannot determine. Do not remove or correct records. Suggest the next verification step and identify which conclusions are sensitive to these observations.An unusual value is not automatically an error. It may reflect a promotion, outage, acquisition, reporting change, or genuine rare event.
6. Chart recommendations
Ask for a visualisation plan before requesting a chart:
Recommend charts for the following analysis: [question and dataset]. For each recommendation, state the chart type, x-axis, y-axis, grouping, aggregation, filters, and the question it answers.Include one chart for trend, one for comparison, and one for distribution only where each is appropriate. Warn me about misleading scales, excessive categories, missing periods, and comparisons with incompatible units. Do not recommend a chart merely because it is visually attractive.7. Executive summary
Once calculations have been checked, use a reporting prompt rather than asking for a generic summary:
Write an executive summary of the verified analysis below. Include:- three to five evidence-based findings
- the relevant values, periods, and comparison baselines
- important limitations and missing data
- decisions or follow-up questions supported by the evidence
- a short methodology note
Do not introduce facts that are not present in the analysis. Label recommendations as recommendations, not findings. Keep causal language cautious.For a repeatable workflow, save the prompt alongside the dataset version, definitions, date range, and final calculations. The prompt template library for research and reporting offers related structures for source-aware analysis.
What to double-check
AI-generated analysis should be treated as a working draft until these checks are complete:
- Recalculate key figures. Check totals, averages, percentages, growth rates, and denominators independently. A plausible-looking number can still use the wrong range or unit.
- Inspect missing values. Confirm whether blanks mean zero, not applicable, unavailable, or simply unrecorded. These meanings produce different results.
- Check date logic. Look for mixed date formats, time zones, incomplete months, duplicated periods, and records outside the intended reporting window.
- Verify definitions. Confirm that the AI used the intended revenue, conversion, customer, or activity definition. Similar labels may measure different things.
- Review assumptions. Require a list of assumptions and mark each as confirmed, reasonable but unverified, or unacceptable.
- Test small samples. Select a few rows and reproduce the transformation manually. This can reveal incorrect parsing or silent exclusions.
- Check privacy and access. Confirm that the uploaded data is appropriate for the selected tool and that unnecessary personal or confidential fields have been removed.
For recurring AI workflows, retain a small set of known examples and expected outputs. Compare new results against them after changing a prompt, model, spreadsheet process, or calculation rule. A prompt testing and regression framework can help teams make this comparison systematic.
Common mistakes
- Asking an open-ended question: “Analyse this file” does not define what matters. State the decision, metric, period, and audience.
- Skipping the data dictionary: The model may infer a plausible but incorrect meaning from a short column name.
- Confusing correlation with cause: A shared movement is a reason to investigate, not proof that one variable caused another.
- Accepting invented context: If the dataset does not include a reason for a change, the output should say that the reason is unknown.
- Editing before inspecting: Automatic deduplication, imputation, or outlier removal can change the analysis. Review proposed changes first.
- Overfitting small groups: Tiny segments can produce unstable percentages and dramatic-looking differences.
- Using one prompt for every job: Cleaning, trend analysis, anomaly detection, and reporting require different instructions and checks.
- Failing to record versions: Without the source file, prompt, definitions, and date of analysis, a recurring report is difficult to reproduce.
When to revisit
Return to this checklist before each monthly or quarterly KPI review, seasonal planning cycle, new dataset, or major change to a spreadsheet workflow. Revisit the prompts when column names, business definitions, reporting periods, or source systems change. You should also review them when your AI tool changes its file-upload, calculation, code-execution, sharing, or data-handling features; verify the tool's current documentation rather than assuming an old workflow still behaves the same way.
A practical repeatable process is:
- Prepare a redacted copy and write a short data dictionary.
- Run the cleaning and column-profiling prompt.
- Choose the scenario prompt that matches the question.
- Request calculations, assumptions, and limitations in a defined output format.
- Recalculate important figures and inspect samples manually.
- Save the verified findings, prompt version, dataset version, and unresolved questions.
- Update the prompt when the workflow changes, then test it against a known example before using it for decisions.
This approach makes AI data analysis more useful without giving up professional judgement. The AI can accelerate exploration and reporting, while the analyst remains responsible for definitions, verification, privacy, and the final decision.