Back to cookbook

ChatGPT Prompt to Check Data Quality Before Starting Analysis

12 views Published

Make this prompt yours

Share

This data quality check prompt is built for anyone who needs to validate a dataset before running any real analysis on it: analysts, data scientists, BI practitioners, and operators handed a spreadsheet or export they didn't produce themselves. Instead of jumping straight into charts or statistics, the prompt asks ChatGPT, Claude, or Gemini to systematically scan the data for the kinds of problems that quietly wreck downstream conclusions, like missing values, inconsistent formats, duplicate keys, impossible ranges, and mismatched data types across columns that should agree.

The model works from a data quality checklist rather than a vague "look this over" request, which matters because generic review prompts tend to catch only the most obvious issues and skip subtler ones, such as a date column silently mixing two formats or a category field with inconsistent casing that fragments what should be one group. Structuring the ask around specific checks (completeness, consistency, validity, uniqueness) gives the model a concrete rubric instead of leaving it to guess what "quality" means for this particular dataset.

Because a flagged issue list is only useful if someone can trust it, the prompt also asks the model to explain why each problem matters for the planned analysis, not just that it exists. When the dataset is large or split across multiple files, pulling only the relevant columns or sheets into context first with a tool like Context Extractor keeps the review focused and avoids burying real issues in irrelevant data the model has to wade through.

Prompt template

Make this prompt yours

prompt-template
318 tokens
ROLE: You are a data quality analyst reviewing a dataset before it is used for analysis. CONTEXT: Dataset description: [WHAT THE DATASET CONTAINS AND ITS SOURCE] Intended use: [WHAT ANALYSIS OR DECISION THIS DATA WILL SUPPORT] Columns and expected types/ranges: [LIST COLUMN NAMES WITH EXPECTED FORMAT, e.g. "signup_date: YYYY-MM-DD", "amount: positive decimal"] Data sample or full dataset: [PASTE DATA OR DESCRIBE WHERE IT IS ATTACHED] TASK: Review the dataset against these quality dimensions: 1. Completeness - identify missing or null values and which columns/rows they affect 2. Consistency - flag mixed formats, inconsistent casing, or conflicting values for the same entity 3. Validity - flag values outside expected ranges, types, or formats 4. Uniqueness - identify duplicate records or duplicate keys that should be unique CONSTRAINTS: - For each issue found, cite the specific column and example row(s), not just a general statement - Rate each issue's severity as Blocking, Should Fix, or Cosmetic based on impact to [INTENDED USE] - Do not attempt to fix the data yourself; only identify and explain issues - If you cannot determine whether something is an issue without more context, say so explicitly rather than guessing OUTPUT FORMAT: A table with columns: Issue, Column(s) Affected, Example Row(s), Severity, Why It Matters Followed by a short summary paragraph stating whether the dataset is ready for analysis or needs cleanup first.

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
264 tokens
ROLE: You are a data quality analyst reviewing a dataset before it is used for analysis. CONTEXT: Dataset description: Customer orders export from an e-commerce platform, 4,200 rows, covering the last 6 months Intended use: Monthly revenue trend analysis and customer segmentation Columns and expected types/ranges: order_id (unique string), customer_email (valid email format), order_date (YYYY-MM-DD), order_total (positive decimal, USD), status (one of: pending, shipped, cancelled, refunded) Data sample: order_id: ORD-1001, customer_email: jane.doe@email.com, order_date: 2026-03-14, order_total: 89.99, status: shipped | order_id: ORD-1002, customer_email: JDOE@EMAIL.COM, order_date: 03/15/2026, order_total: -12.50, status: Shipped | order_id: ORD-1001, customer_email: mike.r@email.com, order_date: 2026-03-16, order_total: 45.00, status: pending TASK: Review the dataset against completeness, consistency, validity, and uniqueness. Rate severity and cite example rows. OUTPUT FORMAT: Table as specified, followed by a readiness summary.

When to use it

  • Before building a dashboard, report, or model on a dataset you received from someone else and haven't personally vetted
  • When a dataset combines exports from multiple systems (CRM, spreadsheet, database dump) that may use different formats or conventions
  • When stakeholders will make decisions based on the analysis, so undetected errors have real downstream cost
  • When you're onboarding a new or unfamiliar dataset and need a fast read on how trustworthy it actually is

Best practices

  • Tell the model the dataset's intended use (forecasting, reporting, joining with another table) so it flags issues that matter for that specific purpose, not quality in the abstract
  • Ask for a severity rating on each issue found (blocking, worth fixing, cosmetic) so you can triage instead of treating every flag as equally urgent
  • Share column definitions or a data dictionary if one exists, since the model can't know a value is invalid unless it knows the expected range or format
  • Request examples of the actual rows that triggered each flag, not just a category label, so you can verify the issue is real before spending time fixing it

Common mistakes

  • Asking the model to "check the data" with no criteria, which produces a shallow pass that misses domain-specific validity issues
  • Treating the model's output as a guarantee of clean data rather than a first-pass review that still needs a spot check against the source
  • Pasting a sample of rows and assuming the findings generalize to the full dataset, when a quality issue elsewhere may not appear in that sample
  • Fixing every flagged issue mechanically without first confirming whether it actually affects the specific analysis you're about to run

FAQs

How do I write a ChatGPT prompt to check data quality before analysis?

Give the model the dataset (or a representative sample), the column definitions with expected formats, and the intended use of the analysis, then ask it to check specifically for completeness, consistency, validity, and uniqueness issues rather than a generic review. Asking for example rows and a severity rating for each flag makes the output actionable instead of just a list of concerns.

What's the difference between a data quality check and exploratory data analysis?

A data quality check is a narrower, earlier step focused on finding errors, missing values, and inconsistencies that would make an analysis unreliable. Exploratory data analysis comes after the data is trusted and focuses on understanding patterns, distributions, and relationships in the data itself.

Can AI models actually catch data quality issues reliably?

They're good at catching issues that are visible in the text of the data itself, such as mixed formats, obvious duplicates, out-of-range values, and inconsistent casing. They can't verify against ground truth outside the data they're given, so results should be treated as a strong first pass that still gets spot-checked, especially on a large dataset where only a sample was reviewed.

Should I paste raw data into the prompt or describe it?

Pasting actual rows (or a representative sample) works better than describing the data, because the model can only flag concrete issues it can see, like a specific malformed date or duplicate ID. A written description alone gives it nothing to check against.

Which Cuelara tool can help me work with large datasets in this kind of prompt?

Context Extractor — when the dataset is a large CSV, spreadsheet, or multi-file export, it pulls out just the relevant columns or sections so the quality check stays focused instead of getting lost in irrelevant data. Intelligence Score — useful for checking that your data quality prompt itself is specific enough (clear criteria, expected formats) before you run it on a real dataset.

Found this prompt useful? Share it.

Share

More in Data Analysis & Data Science

Data Analysis & Data Science

AI Prompt to Explore and Summarize a Snowflake Dataset via Snowflake's MCP Server

This AI prompt is for analysts and data scientists who want a fast first pass over an unfamiliar table in Snowflake , using Snowflake's MCP…

ROLE: You are a data analyst assistant helping profile an unfamiliar database table before analysis.

CONTEXT:
- Table name: [SCHEMA.TABLE_NAME]
- Analysis goal: [WHAT YOU ARE TRYING TO ANSWER OR BUILD WITH THIS DATA]
- Schema: [LIST COLUMN NAMES AND DATA TYPES]
- Sample rows: [PASTE 10-20 SAMPLE ROWS]
- Row count and known constraints: [TOTAL ROW COUNT, ANY KNOWN PRIMARY/FOREIGN KEYS]

TASK:
1. For each column, state what it likely represents based on its name and sample values.
2. Flag columns with unexpected nulls, inconsistent formatting, or suspicious outlier values.
3. Identify which columns are most relevant to the stated analysis goal.
4. Note any data quality concerns that should be resolved before using this table in analysis.

CONSTRAINTS:
- Base conclusions only on the schema and sample data provided; do not assume business logic that isn't shown.
- Clearly separate "likely meaning" from "confirmed meaning" when the sample data is ambiguous.

OUTPUT FORMAT:
- A short table-level summary (what this table appears to represent)
- A column-by-column breakdown: name, likely meaning, data quality notes
- A ranked list of columns most relevant to the stated analysis goal
- A list of open data quality concerns to verify before analysis

Make this prompt yours

Data Analysis & Data Science

AI Prompt to Audit BigQuery Query Costs Using Google Cloud's MCP Server

This BigQuery MCP prompt is for data analysts and engineers who want to find out why their Google Cloud bill is climbing without manually di…

ROLE: You are a cloud cost analyst assistant with access to a BigQuery MCP server.

CONTEXT:
- Google Cloud project: [PROJECT_ID]
- Pricing model: [on-demand or flat-rate/slot-based]
- Time window to audit: [TIME_WINDOW, e.g. last 7 days]
- Cost or bytes-scanned threshold to flag: [THRESHOLD]

TASK:
1. Query job and billing metadata for the specified project and time window.
2. Rank queries and scheduled jobs by bytes scanned (or slot-seconds, for flat-rate pricing) above the threshold.
3. Group the results by table or dataset to identify recurring cost patterns.
4. For each high-cost pattern, identify the likely cause (e.g. missing partition filter, SELECT *, unnecessary full table scan, lack of clustering).
5. Recommend a specific fix for each pattern, ordered by estimated cost savings.

CONSTRAINTS:
- Clearly state whether figures are bytes scanned or estimated dollar cost, and note the pricing model used.
- Do not recommend a fix without identifying the specific query or job pattern causing the cost.

OUTPUT FORMAT:
- Summary of total cost/bytes scanned in the audited window
- Ranked list of top cost drivers (query/job, table, bytes or cost)
- Root cause per driver
- Recommended fix per driver, ordered by estimated savings

Make this prompt yours

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