Back to cookbook

Claude Prompt to Analyze a CSV Dataset and Summarize Key Insights

23 views Published

Make this prompt yours

Share

This Claude prompt is for analysts, founders, and marketers who need to turn a raw CSV export into a plain-language summary of what the data actually shows. It's built for situations where you have a spreadsheet of sales, survey, or usage data and need the key trends, outliers, and takeaways without writing your own analysis script first.

The prompt asks the model to work only from the data you paste in or describe, state its assumptions about column meanings, and separate factual observations from suggested next steps. That distinction matters because a language model does not run calculations internally the way a spreadsheet formula does — it reasons over the numbers you give it, so accuracy depends on giving it clean, complete data and asking it to show its reasoning.

Because it's written as plain role and task instructions, this prompt works in Claude, ChatGPT, or Gemini with no changes. For very large datasets, pair it with each tool's file upload or code-execution feature rather than pasting raw rows into the chat.

Prompt template

Make this prompt yours

prompt-template
210 tokens
Role: You are a data analyst who explains findings in plain language for a non-technical audience. Context: - Dataset description: [WHAT THE DATA REPRESENTS, E.G., "MONTHLY SALES BY REGION"] - Columns: [COLUMN NAME: WHAT IT MEANS, repeat for each column] - Data: [PASTE CSV ROWS OR ATTACH THE FILE] - Business question: [WHAT YOU'RE TRYING TO LEARN, E.G., "WHICH REGION IS DECLINING"] Constraints: - State any assumptions you make about unclear columns before analyzing - Show the reasoning or calculation behind any number you report - Flag any data quality issues (missing values, small sample size, duplicates) you notice Task: Analyze the data to answer the business question above. Output format: 1. Key findings (3-5 bullet points, plain language) 2. Notable outliers or anomalies, with the specific rows or values involved 3. Caveats or data quality issues 4. Suggested next steps for further analysis

Want it sharper? Optimize this prompt with Prompt Optimizer, check it with the Prompt Debugger or shorten it with the Token Optimizer.

Example input

example-input
177 tokens
Dataset description: Monthly subscription sales by region for Q1 2026 Columns: month: calendar month; region: sales region (North, South, East, West); new_subscribers: count of new paid subscriptions; churned_subscribers: count of cancellations Data: month,region,new_subscribers,churned_subscribers Jan,North,120,30 Jan,South,95,25 Jan,East,110,28 Jan,West,60,22 Feb,North,118,32 Feb,South,90,27 Feb,East,105,26 Feb,West,40,24 Mar,North,125,29 Mar,South,88,30 Mar,East,100,25 Mar,West,22,26 Business question: Which region is at risk of net subscriber decline?

When to use it

  • Getting a first-pass summary of a sales, survey, or product-usage export before a meeting
  • Spotting outliers or unexpected patterns in a dataset you haven't explored yet
  • Turning a raw CSV into a short written summary for a non-technical stakeholder
  • Generating hypotheses to test further in a spreadsheet or BI tool, not as a final report

Best practices

  • Include column headers and a short description of what each column represents
  • Ask the model to state any assumptions it made about ambiguous columns before analyzing
  • Request that it separate observed facts from suggested interpretations or next steps
  • For datasets over a few hundred rows, use the tool's file upload or code execution feature instead of pasting raw text

Common mistakes

  • Pasting a partial or truncated CSV and expecting totals or averages to be accurate
  • Not specifying the business question, which leads to a generic, unfocused summary
  • Treating the output as verified statistics instead of asking for the calculation shown
  • Skipping a request for caveats, so small sample sizes or missing data go unmentioned

FAQs

Can Claude or ChatGPT actually calculate statistics from a CSV?

They reason over the numbers you provide and can perform straightforward arithmetic, but for large datasets or precise statistics, use the tool's code execution or file analysis feature rather than relying on the chat response alone.

How much data can I paste directly into the prompt?

For more than a few hundred rows, accuracy drops and you risk hitting context limits. Upload the file directly if the tool supports it, or ask the model to analyze a representative sample.

Why does the prompt ask the model to state its assumptions?

Column names are often ambiguous (like "active" or "score"), and having the model state its interpretation upfront lets you catch a misread before it affects the whole analysis.

Does this prompt work the same in Claude, ChatGPT, and Gemini?

Yes, it uses plain instructions with no vendor-specific syntax, though each tool's file upload and code execution capabilities differ, so check what's available before pasting large datasets.

Found this prompt useful? Share it.

Share

More in Data Analysis & Data Science

Data Analysis & Data Science

ChatGPT Prompt to Analyze Open-Ended Survey Responses

This survey analysis prompt is for turning a spreadsheet of open ended survey answers, the free text box rather than the multiple choice que…

ROLE: You are a research analyst summarizing open-ended survey responses for [TEAM/STAKEHOLDER].

CONTEXT:
- Survey question asked: "[EXACT SURVEY QUESTION]"
- Number of responses: [NUMBER]
- Responses: [PASTE RESPONSES, ONE PER LINE OR AS A LIST]

TASK:
1. Group the responses into [NUMBER, E.G. 5-8] distinct themes based on what respondents actually said.
2. For each theme, give a short label, an approximate count or percentage of responses it covers, and 2-3 verbatim quotes.
3. Note any responses that don't fit cleanly into a theme and list them separately as "other."
4. Flag if any theme seems to be driven by a single vocal subgroup rather than a broad pattern, based on the language used.

CONSTRAINTS:
- Do not invent quotes; use only exact text from the provided responses.
- Do not merge themes that are related but distinct, e.g. "price too high" and "unclear pricing page" should stay separate.

OUTPUT FORMAT:
A table (Theme | Approx. Count/% | Example Quotes) followed by an "Other" section for uncategorized responses.

Make this prompt yours

Data Analysis & Data Science

AI Prompt to Query and Summarize MongoDB Collections via MongoDB's MCP Server

This prompt is for data analysts and backend engineers who want an AI assistant like Claude or ChatGPT to query a live MongoDB database thro…

ROLE: You are a data analyst with access to a MongoDB database through an MCP connection.

CONTEXT:
- Database: [DATABASE_NAME]
- Collection: [COLLECTION_NAME]
- Relevant fields: [FIELD_NAMES]
- Time range or filter (if applicable): [DATE_RANGE_OR_CONDITION]

TASK:
1. Query the specified collection through the MCP connection to answer this question: [QUESTION_IN_PLAIN_LANGUAGE].
2. Show the exact query or aggregation pipeline used.
3. Report the total number of documents the query matched.
4. Summarize the result in 2-3 plain-language sentences a non-technical stakeholder could understand.
5. Flag anything unusual in the data, such as missing fields, unexpected nulls, or a result that seems inconsistent with the time range given.

CONSTRAINTS:
- Only report numbers that came from the actual query result, not an estimate.
- If the MCP connection cannot reach the collection, say so instead of guessing an answer.

OUTPUT FORMAT:
- Query used: [pipeline or filter]
- Documents matched: [count]
- Summary: [plain-language explanation]
- Notes: [anything unusual, or "none"]

Make this prompt yours

Data Analysis & Data Science

AI Prompt to Build an RFM Customer Segmentation Model From Purchase Data

This prompt guides ChatGPT, Claude, or Gemini through building an RFM (Recency, Frequency, Monetary) customer segmentation model directly fr…

ROLE: You are a customer analytics specialist helping me segment customers using the RFM (Recency, Frequency, Monetary) framework.

CONTEXT:
- Data: [DESCRIBE YOUR DATA - e.g. "a CSV with columns: customer_id, order_date, order_total"]
- Analysis period: [TIME RANGE, e.g. "last 12 months"]
- Business type: [E.G. ECOMMERCE, SUBSCRIPTION, RETAIL]
- Number of segments wanted: [NUMBER, e.g. "5-7 named segments"]

TASK:
1. First, review the data I provide and flag any quality issues (missing values, duplicate orders, refunds, or inconsistent date formats) before scoring anything.
2. Calculate Recency, Frequency, and Monetary values per customer based on the period above.
3. Score each metric from 1 (worst) to 5 (best) relative to the full customer base.
4. Combine the three scores into a single RFM code and assign each customer to a named segment (e.g. Champions, Loyal Customers, At Risk, Lost).
5. Summarize how many customers fall into each segment and one recommended action per segment.

CONSTRAINTS:
- State the scoring thresholds you used so the method can be repeated on future data
- Do not invent data points that are not in the file I provide
- If a required column is missing, ask me for it instead of assuming

OUTPUT FORMAT:
- A table: customer_id | recency_score | frequency_score | monetary_score | RFM_segment
- A short summary section listing segment names, customer counts, and one action per segment

DATA:
[PASTE OR DESCRIBE YOUR CUSTOMER PURCHASE DATA HERE]

Make this prompt yours