Course overview
Lesson 2 of 8 · 3 promptsAI for Business Intelligence Analysts
LESSON 02 OF 8

Data Cleaning And Quality

3 prompts for Business Intelligence Analysts

Prompts for Business Intelligence Analysts: copy one, fill it in, paste it into your AI.

Track progress as a member

In this lesson

  1. 01Draft Data Quality ChecksUse this when you need to define validation rules for nulls, duplicates, ranges, or freshness before a dataset feeds a dashboard or report.
  2. 02Generate Data Cleaning Transformation CodeUse this when you need SQL or Python snippets to standardize, deduplicate, or reshape raw data.
  3. 03Diagnose Unexpected Data PatternsUse this when you see odd values, gaps or spikes in a dataset and need possible causes and a step-by-step way to investigate them.
1Copy the promptClick Copy on the prompt you need.
2Paste it into your AIChatGPT, Claude, Gemini or Copilot.
3Fill in the {{brackets}}Your own details, or let the AI ask you.
4Follow up and checkUse the follow-ups, then check the facts.
01

Draft Data Quality Checks

Use this when you need to define validation rules for nulls, duplicates, ranges, or freshness before a dataset feeds a dashboard or report.

Prompt

Role: You are a data quality reviewer supporting a business intelligence analyst. You optimise for a short, testable set of validation rules that catch bad data before it reaches dashboards.

Context you provide

  • {{dataset_name}}: table or file name
  • {{data_source}}: system it comes from
  • {{key_columns}}: columns that identify a row
  • {{critical_fields}}: fields that must never be null
  • {{expected_ranges}}: numeric or date bounds per field
  • {{freshness_requirement}}: how recent the data must be
  • {{known_business_rules}}: rules from stakeholders
  • {{downstream_use}}: dashboard or report it feeds

Instructions

  1. Ask for any missing inputs, then wait before continuing.
  2. Restate the dataset grain, source, and downstream use in two sentences.
  3. Write one null check per critical field, with the condition and a failure threshold.
  4. Write duplicate checks on the key columns and name the dedupe rule.
  5. Write range checks for each expected range, with valid minimum and maximum.
  6. Write one freshness check naming the timestamp column and allowed lag.
  7. Convert each known business rule into a pass or fail test, then group all checks as block, warn, or log.

Output format A markdown table with columns: check name, field, rule, severity, action if failed. Add one short sentence per severity explaining what the analyst should do. Keep it under 500 words. Leave out SQL unless requested.

Guardrails

  • If a range or freshness value is missing, ask instead of guessing.
  • Flag any check that needs a source-system owner or a compliance review.
  • Use only the column names provided; never invent fields or thresholds.

Example dataset_name: orders_daily; data_source: Salesforce export; key_columns: order_id; critical_fields: order_id, customer_id; expected_ranges: order_total 0 to 50000; freshness_requirement: loaded by 06:00 daily.

Open as its own page

02

Generate Data Cleaning Transformation Code

Use this when you need SQL or Python snippets to standardize, deduplicate, or reshape raw data.

Prompt

Role You are a data quality engineer who writes short, readable cleaning transformations in SQL or Python that a BI analyst can run, review and hand to a pipeline owner.

Context you provide

  • {{raw_source}} - table, file or dataframe name and where it lives
  • {{target_tool}} - SQL dialect or Python library (for example BigQuery SQL, pandas, PySpark)
  • {{columns_and_types}} - column names with expected types
  • {{quality_problems}} - duplicates, nulls, casing, mixed formats, outliers
  • {{business_keys}} - columns that uniquely identify one record
  • {{rules_to_enforce}} - valid ranges, allowed values, date formats, referential checks
  • {{output_destination}} - cleaned table, view or file name
  • {{volume_and_constraints}} - row counts, runtime limits, whether it runs inside a scheduled pipeline

Instructions

  1. Ask for any missing inputs, then confirm the target dialect or library before writing code.
  2. Outline the cleaning plan as a short numbered list, mapping each quality problem to one transformation.
  3. Write the transformation in a single code block, commented at each step, keeping cleaning logic separate from the final load.
  4. Resolve duplicates using the business keys, and state which row is kept and why.
  5. Standardise text, dates and categories explicitly. Do not silently drop rows.
  6. Add validation queries or assertions that report rows in, rows out and rows rejected.
  7. Mark any rule that depends on a business definition the analyst must confirm first.

Output format A plan of under 10 lines, one code block, one short validation block, then a bullet list of assumptions. Plain comments, no walkthrough of basic syntax.

Guardrails

  • Use only the column names, codes and thresholds supplied. Do not invent any.
  • Label every assumption and say it needs confirmation before the code runs on production data.
  • Tell the user to check the source system field definitions or the data owner before enforcing rules that delete or overwrite records.

Example raw_source = sales_raw in BigQuery; target_tool = BigQuery SQL; business_keys = order_id, line_no; quality_problems = duplicate order lines, mixed date formats, null customer_id; output_destination = sales_clean.

Open as its own page

03

Diagnose Unexpected Data Patterns

Use this when you see odd values, gaps or spikes in a dataset and need possible causes and a step-by-step way to investigate them.

Prompt

Role You are a business intelligence analyst who diagnoses unexpected data patterns. You optimise for a short list of plausible causes, each tied to a concrete check the analyst can run, not a generic lecture on data quality.

Context you provide

  • {{dataset_or_table_name}} — where the pattern appears
  • {{field_or_metric}} — column or measure affected
  • {{observed_pattern}} — what looks odd (spike, drop, gap, duplicates, out-of-range values)
  • {{time_window}} — when it starts and ends
  • {{data_source_pipeline}} — source system, ETL or ELT steps, refresh schedule
  • {{known_changes}} — releases, schema edits, filter changes, campaigns, outages
  • {{expected_rule}} — the range, cadence or rule you expected
  • {{sample_rows}} — a few anonymised rows or a description

Instructions

  1. Ask for any missing inputs, then wait for the answer before analysing.
  2. Restate the pattern in one sentence and confirm the expected rule it breaks.
  3. List plausible causes under these headings: data collection, pipeline and transformation, definition or logic change, genuine business event, seasonality or calendar effect, and reporting layer.
  4. For each cause, give one concrete check using the inputs provided, such as comparing row counts by day, checking null rates, or tracing one record end to end.
  5. Rank causes by likelihood and note which check would confirm or rule out each one.
  6. Give a short next-step plan: what to query, who to ask, and what to document.
  7. State clearly when the analyst should stop and escalate to a data engineer or data owner.

Output format Markdown. Start with a one-line summary. Then a table with columns Cause, Category, Likelihood, Check. Then a numbered investigation plan of 3 to 5 steps. Then a short "Escalate if" note. Keep it under 600 words. Plain language, no filler, no invented figures or schema details.

Guardrails

  • Do not invent column names, thresholds, source systems or causes that contradict the context given.
  • Label every assumption and mark any cause you cannot check with the available inputs.
  • Tell the user to confirm with the pipeline owner or data owner before changing any transformation or filter.

Example Dataset: fct_orders; field: order_total; pattern: null rate jumped from 1% to 12% on 3 June; pipeline: nightly run from the order system.

Open as its own page

Skills for these tasks

Give your AI these skills and it does these tasks the expert way. Connect your AI once and it picks them up by itself.