Back to cookbook

ChatGPT Prompt for Exploratory Data Analysis on a New Dataset

27 views Published

Make this prompt yours

Share

This ChatGPT prompt for exploratory data analysis (EDA) is built for analysts, students, and data scientists opening a dataset for the first time and needing a structured first pass before any modeling starts. Instead of asking the model to "analyze this data" and getting a generic paragraph back, the prompt walks it through the same checklist a human analyst would follow: shape and structure, missing values, distributions, outliers, and relationships worth investigating further.

The prompt asks the model to separate observations from recommendations, so you get a clear read on what the data actually shows before any suggestion about what to do next. It also asks for follow-up questions the data raises, which is often the most useful output of an EDA pass, since it tells you where to dig deeper rather than treating the first summary as final.

When the dataset is large, comes from a CSV or PDF export, or is spread across multiple files, pasting the whole thing into a chat window either doesn't fit or buries the model in irrelevant rows; pulling just the relevant slice first with Context Extractor keeps the EDA prompt focused on the columns and records that actually matter.

Prompt template

Make this prompt yours

prompt-template
209 tokens
Role: You are a data analyst performing an initial exploratory analysis on a new dataset. Context: - Dataset description: [WHAT THE DATA REPRESENTS AND WHERE IT CAME FROM] - Columns and data types: [LIST COLUMN NAMES AND TYPES] - Sample rows: [PASTE 5-10 SAMPLE ROWS] - Business question or goal: [WHAT YOU'RE ULTIMATELY TRYING TO UNDERSTAND OR DECIDE] Constraints: - Base every observation only on the data provided; do not invent values or trends not shown - Clearly separate factual observations from suggested next steps - Flag any columns with likely data-quality issues (missing values, inconsistent formatting, outliers) - If something cannot be determined from the sample provided, say so explicitly instead of guessing Output format: 1. Dataset overview (shape, column types, general structure) 2. Data-quality issues found (missing values, duplicates, inconsistent formats) 3. Key distributions and notable patterns 4. Three to five follow-up questions worth investigating further

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
254 tokens
Role: You are a data analyst performing an initial exploratory analysis on a new dataset. Context: - Dataset description: Monthly subscription cancellations for a SaaS product, exported from the billing system - Columns and data types: customer_id (string), plan_type (string), signup_date (date), cancel_date (date), cancel_reason (string, often blank), monthly_revenue (float) - Sample rows: cust_1042, Pro, 2024-03-01, 2025-01-15, "too expensive", 49.00 / cust_2210, Starter, 2024-11-20, 2025-01-18, "", 12.00 / cust_0087, Pro, 2023-06-05, 2025-01-20, "missing features", 49.00 - Business question or goal: Understand which customer segments are cancelling most and why Constraints: - Base every observation only on the data provided - Separate observations from next steps - Flag data-quality issues - Say explicitly if something can't be determined from the sample Output format: 1. Dataset overview 2. Data-quality issues 3. Key distributions and patterns 4. Follow-up questions

When to use it

  • Opening a new dataset for the first time and needing a structured overview before modeling
  • Onboarding onto a dataset someone else collected, where the quirks and gaps aren't documented
  • Preparing a quick data summary to share with a non-technical stakeholder
  • Deciding which columns or segments deserve a deeper, more rigorous analysis

Best practices

  • Paste the actual column names, data types, and a few sample rows, not just a description of the dataset
  • Ask explicitly for missing-value counts and how the model would handle them, rather than letting it assume
  • Request the analysis in a fixed structure (summary, distributions, outliers, questions) so results are easy to scan
  • For very large or multi-sheet datasets, trim the input to the columns actually relevant to your business question before running the prompt

Common mistakes

  • Pasting an entire raw dataset with no context on what each column represents
  • Treating the model's summary as a finished analysis instead of a starting point for deeper investigation
  • Not asking for missing-value or data-quality issues, which then surface later during modeling
  • Accepting statistical claims (correlations, averages) without asking the model to show its reasoning or flag uncertainty

FAQs

How do I write a ChatGPT prompt for exploratory data analysis?

Give the model the actual column names, data types, and several real sample rows rather than a general description, then ask for a fixed structure: overview, data-quality issues, distributions, and follow-up questions. That structure is what turns a vague summary into a usable first pass.

Can ChatGPT do real statistical analysis on a dataset I paste in?

ChatGPT can describe patterns visible in the exact rows you provide and reason about likely relationships, but it cannot compute precise statistics across a full dataset it hasn't seen in full, and it can't verify claims against data outside what's pasted in. Treat its output as a starting hypothesis to verify with actual computation, not a finished statistical result.

What's the difference between EDA and full data analysis?

Exploratory data analysis is the first pass: understanding structure, quality, and obvious patterns before deciding what deeper analysis or modeling is worth doing. It's meant to generate questions and flag issues, not produce final conclusions.

How much sample data should I include in an EDA prompt?

Include enough rows to show the range of values and any quirks (blanks, inconsistent formatting, outliers) — typically 5 to 15 rows plus the full column list and data types. For large datasets, extracting a representative slice is more useful than pasting thousands of rows the model can't fully process anyway.

Which Cuelara tool helps when my dataset is too large to paste directly into a prompt?

Context Extractor — it pulls only the relevant snippets or columns from large CSVs, PDFs, or multi-file exports via RAG, which keeps the EDA prompt focused and cuts down on hallucinated patterns from incomplete context.

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