PromptCorrectlyPromptCorrectly
StudioAI CoursesLibraryBlogPricingAbout
Log inStart free
PromptCorrectlyPROMPTS FOR · DATA ANALYSIS & EXCEL
Home/Prompts for every field/Data Analysis & Excel
📉

40+ ChatGPT & AI prompts for Data Analysis & Excel

Analysis prompts work when they include the schema or the column headers, a sample of the data, and the question you're answering. From those, AI writes the formula or query, explains it, and warns you about the trap you're about to fall into.

The hub covers Excel and Sheets, SQL, Python, statistics, visualisation choices and the writing-up — the part analysts hate and stakeholders read.

✦ Start a brief for data analysis & excel — we pre-fill it
40 prompts · full textFree to copyWorks in ChatGPT · Claude · GeminiRun instantly on our brain
How to use AI for analysts

Three rules that separate useful output from filler

  1. Paste headers and five rowsThe model can't write a formula for columns it can't see.
  2. State the question, not the method“Which region's growth is slowing?” lets it choose the right approach and explain it.
  3. Ask what could be wrong“What assumptions does this analysis make and how would I check them?”
The prompts

40 prompts for analysts — copy, or open in the Studio

#1

SQL → English Explainer

Translate any SQL query into bullets that an analyst can act on.

★ Data
**Role:** Senior analytics engineer who has reviewed 5,000+ SQL queries. You can read a 200-line CTE in 90 seconds and explain it to a non-technical PM.

**Context:** SQL query: [paste]. Schema overview: [tables and key columns the analyst should know]. Audience: [the person you're explaining to — PM, ops, exec].

**Task:** Explain the SQL.

1. One-sentence summary: what question does this query answer?
2. Walk the CTEs / subqueries in execution order. For each: what it does (in business terms), what it filters on, what it returns.
3. Final SELECT: what comes out — column meanings in business terms.
4. Edge cases the query handles (or doesn't): NULL handling, duplicates, ties.
5. Performance notes: indexes assumed, materializations, anything that would slow it down at 10x current data.

**Constraints:**
- No SQL jargon without a translation ("LEFT JOIN" → "keeps every row from the first table even if no match")
- Bullet points, not paragraphs
- Highlight any place the query could give misleading results
- ≤500 words

**Output format:** 5 sections · bullet format · ≤500 words.
#2

Translate Business Questions Into SQL

Turns a plain-English stakeholder question into a correct, well-commented SQL query against a known schema.

Data Analysis & SQL
ROLE: You are a senior analytics engineer who writes production SQL for a [DATABASE_ENGINE] warehouse (e.g., Snowflake, BigQuery, Postgres).

CONTEXT: The stakeholder question is: "[BUSINESS_QUESTION]". The relevant tables and columns are:
[SCHEMA_DDL_OR_TABLE_DESCRIPTIONS]
Grain, primary keys, and known join keys: [GRAIN_AND_KEYS].

TASK (reason step by step before writing SQL):
1. Restate the question as a precise analytical ask, listing the metric(s), dimension(s), filters, and time window implied.
2. Identify which tables and join paths are needed and flag any fan-out or many-to-many risk.
3. Decide the correct aggregation grain to avoid double counting.
4. Write a single SQL query that answers the question, using CTEs for readability and inline comments on any non-obvious logic.
5. State 2-3 assumptions you made and how a different assumption would change the result.

OUTPUT FORMAT:
- Section 1: Interpreted ask (bullets)
- Section 2: Final SQL in a fenced ```sql block
- Section 3: Assumptions & caveats

CONSTRAINTS: Use ANSI-compatible syntax for [DATABASE_ENGINE]; never SELECT *; alias every table; qualify all columns; handle NULLs explicitly in filters and aggregates. Do not invent columns that are not in the provided schema; if a needed column is missing, say so instead of guessing.
#3

Data Quality Audit Query Suite

Generates a battery of SQL checks to surface nulls, duplicates, referential breaks, and anomalies in a table.

Data Analysis & SQL
ROLE: You are a data quality engineer who writes assertion-style checks before data is trusted.

CONTEXT: Audit the table [TABLE_NAME] with schema [SCHEMA]. Business rules it should obey: [BUSINESS_RULES] (e.g., amount >= 0, status in a known set, one row per order). Related tables for referential checks: [RELATED_TABLES]. Engine: [DATABASE_ENGINE].

TASK:
1. Generate checks across these dimensions: completeness (NULLs in required fields), uniqueness (primary key dupes), validity (range/enum/format), consistency (cross-field rules), referential integrity (orphan foreign keys), freshness (max timestamp recency), and volume (row-count anomaly vs prior period).
2. For each check, write a SQL query that returns 0 rows when healthy and the offending rows/counts when not.
3. Assign a severity (block / warn / info) to each check.
4. Recommend which checks belong in CI vs scheduled monitoring.

OUTPUT FORMAT: Check catalog table [Check | Dimension | Severity] -> One ```sql``` per check (labeled) -> Where to run each.

CONSTRAINTS: Each check must be unambiguous: zero rows = pass. Avoid SELECT *; return only keys and the failing values. Make thresholds parameters, not magic numbers. Note any check that requires a baseline/prior snapshot to evaluate.
#4

Pivot And Unpivot Data In SQL

Reshapes data between long and wide formats with conditional aggregation or native PIVOT, including dynamic cases.

Data Analysis & SQL
ROLE: You are a SQL practitioner who reshapes data reliably across engines.

CONTEXT: I need to [PIVOT_OR_UNPIVOT] this data. Current shape and sample: [SAMPLE_DATA]. Desired output shape: [TARGET_SHAPE]. The pivot column values are [KNOWN_VALUES or "unknown/dynamic"]. Engine: [DATABASE_ENGINE].

TASK:
1. Confirm the reshape direction and identify the row keys, the column-source field, and the value field.
2. If pivoting: write the query using conditional aggregation (CASE WHEN inside SUM/MAX) as the portable approach, and also the native PIVOT syntax if [DATABASE_ENGINE] supports it.
3. If the pivot values are dynamic, explain how to generate the column list (and give the templated/dynamic-SQL approach) since pure SQL needs a fixed column list.
4. If unpivoting: use UNION ALL or native UNPIVOT/cross join with a values list.
5. Show the before/after on the sample rows.

OUTPUT FORMAT: Reshape spec -> Portable ```sql``` -> Native syntax (if available) -> Dynamic-columns note -> Before/after illustration.

CONSTRAINTS: Prefer conditional aggregation for portability; mark native syntax as engine-specific. Choose an aggregate (SUM/MAX/MIN) deliberately and explain why. Handle the case where a key has no value for a pivoted column (NULL vs 0).
#5

Optimize A Slow SQL Query

Diagnoses why a query is slow and rewrites it with targeted, explained optimizations and an index plan.

Data Analysis & SQL
ROLE: You are a database performance engineer specializing in [DATABASE_ENGINE] query tuning.

CONTEXT: The query below runs slowly (current runtime ~[CURRENT_RUNTIME] on ~[ROW_COUNTS] rows). Relevant schema, indexes, and partitioning: [SCHEMA_AND_INDEXES]. EXPLAIN/EXPLAIN ANALYZE output (if available): [EXPLAIN_OUTPUT].
Query:
```sql
[SLOW_QUERY]
```

TASK:
1. Walk through the execution plan and name the top 1-3 bottlenecks (e.g., full scans, spills, nested-loop blowups, redundant sorts, non-sargable predicates).
2. For each bottleneck, explain the root cause in one sentence.
3. Produce a rewritten query that is logically equivalent but faster, preserving the exact result set.
4. Recommend concrete physical changes (indexes, partition keys, clustering, materialization) with the exact DDL.
5. Estimate the expected improvement and call out any tradeoffs.

OUTPUT FORMAT: (1) Diagnosis table [Issue | Cause | Fix], (2) Optimized ```sql```, (3) Index/DDL recommendations, (4) Expected impact & tradeoffs.

CONSTRAINTS: Guarantee identical results to the original (note any edge case where they could differ). Prefer set-based logic over row-by-row. Do not recommend hints unless justified. Flag any change that alters NULL or duplicate handling.
#6

Translate Pandas To SQL And Back

Converts a data transformation faithfully between pandas and SQL while preserving exact semantics.

Data Analysis & SQL
ROLE: You are an analytics engineer fluent in both pandas and SQL who preserves exact semantics across the translation.

CONTEXT: I have this transformation written in [SOURCE_LANGUAGE] (pandas or SQL) and want an equivalent in [TARGET_LANGUAGE]. Schema/dtypes: [SCHEMA]. Engine/pandas version notes: [ENVIRONMENT].
Source code:
```
[SOURCE_CODE]
```

TASK:
1. Describe what the source does as an ordered list of logical operations (filter, group, aggregate, window, merge, pivot).
2. Translate to [TARGET_LANGUAGE], matching results row-for-row.
3. Call out every place where the two languages differ in default behavior (NULL vs NaN handling, join key dtype coercion, group-by dropping NaN keys, ordering not guaranteed in SQL, index semantics) and how you reconciled it.
4. Provide a small equivalence check the user can run on sample data.

OUTPUT FORMAT: Logical steps -> Translated code in fenced block -> Semantic-difference notes (bulleted) -> Equivalence test.

CONSTRAINTS: Do not assume row order unless the source guarantees it; add an explicit ORDER BY or sort_values if order matters. Match NULL/NaN handling exactly. Preserve column names and dtypes. Flag any operation that has no clean equivalent and propose the closest faithful option.
#7

Design Indexes For A Query Workload

Recommends a minimal, high-impact index set for a set of queries with column order and covering rationale.

Data Analysis & SQL
ROLE: You are a database performance architect designing an indexing strategy.

CONTEXT: These are the most frequent/expensive queries in the workload: [QUERY_LIST]. Table schemas, row counts, and existing indexes: [SCHEMA_AND_INDEXES]. Write/read ratio: [WRITE_READ_RATIO]. Engine: [DATABASE_ENGINE].

TASK (reason before recommending):
1. For each query, identify the predicates (equality vs range), join columns, ORDER BY, and GROUP BY that drive index needs.
2. Propose a minimal set of indexes, specifying column order using the equality-before-range-before-sort principle, and mark covering/INCLUDE columns where they avoid lookups.
3. Explain which queries each index serves and why composite over single-column.
4. Flag redundant or duplicate indexes to drop, and the write-amplification cost of what you add.
5. Give the exact CREATE INDEX DDL.

OUTPUT FORMAT: Per-query predicate analysis -> Recommended index set with rationale -> Indexes to drop -> Write-cost note -> ```sql``` DDL.

CONSTRAINTS: Order composite-index columns equality first, then range, then sort. Do not over-index given the write/read ratio. Account for selectivity; an index on a low-cardinality column may be useless. Note where a partial/filtered index applies.
#8

Root-Cause A Metric Spike Or Drop

Drives a systematic decomposition to explain why a metric moved, with SQL to test each hypothesis.

Data Analysis & SQL
ROLE: You are an analyst leading an investigation into an unexpected metric movement.

CONTEXT: [METRIC_NAME] [rose/fell] by [MAGNITUDE] between [PERIOD_A] and [PERIOD_B]. Available tables: [SCHEMA]. Known recent changes (releases, pricing, marketing, data pipeline): [KNOWN_CHANGES]. Engine: [DATABASE_ENGINE].

TASK (reason explicitly):
1. First rule out a data/instrumentation artifact (pipeline delay, tracking change, dedup change, timezone shift). Give a SQL check for each.
2. Decompose the metric into its drivers (e.g., revenue = users x conversion x AOV) and quantify which driver moved most.
3. Segment the move by dimension (geo, platform, plan, new vs returning) to localize it.
4. Form a ranked list of hypotheses with a SQL test for each and the result that would confirm or reject it.
5. State the most likely cause and your confidence, plus what evidence would change your mind.

OUTPUT FORMAT: Artifact checks -> Driver decomposition table -> Segmentation findings -> Ranked hypotheses with tests -> Conclusion & confidence.

CONSTRAINTS: Always check for data artifacts before behavioral explanations. Quantify contributions; do not hand-wave. Distinguish correlation from cause. Note any segment too small to be significant.
#9

Define A Metric Precisely For The Whole Org

Turns a fuzzy KPI into a rigorous, unambiguous metric definition with SQL and edge-case rules.

Data Analysis & SQL
ROLE: You are an analytics lead writing the canonical definition for a contested business metric.

CONTEXT: The metric is [METRIC_NAME] (e.g., Monthly Active Users, Net Revenue Retention, Gross Margin). Stakeholders currently compute it inconsistently. Relevant tables: [SCHEMA]. Engine: [DATABASE_ENGINE]. Reporting grain and timezone: [GRAIN_AND_TZ].

TASK:
1. Write a one-sentence plain-language definition everyone can agree on.
2. Specify the exact numerator, denominator (if a ratio), population, time window, and timezone.
3. Enumerate edge-case rules: refunds, cancellations, trials, internal/test accounts, currency conversion, partial periods, reactivations, deduplication.
4. Provide a reference SQL implementation that encodes every rule above with comments tying each clause to a rule.
5. List 3 ways the metric is commonly miscomputed and how this definition prevents each.

OUTPUT FORMAT: Definition -> Components table -> Edge-case ruleset -> Reference ```sql``` -> Common errors prevented.

CONSTRAINTS: Leave no ambiguity a reasonable analyst could interpret two ways. Exclude test/internal accounts explicitly. Pin the timezone and the period boundary (inclusive/exclusive). Make the SQL the single source of truth.
#10

Chart Type Selection Decision Tree

Reasons step by step from data shape and analytic intent to the optimal chart type with ranked alternatives.

Data Visualization & BI Dashboards
You are a data visualization specialist trained in Cleveland-McGill perceptual ranking. CONTEXT: I need to visualize [VARIABLE_DESCRIPTION] where the data type is [DATA_TYPE], the number of categories is [CATEGORY_COUNT], and the analytic intent is [INTENT: comparison/composition/distribution/relationship/trend]. Audience expertise is [AUDIENCE_LEVEL].

TASK STEPS:
1. Reason aloud: classify the analytic intent and the cardinality of each dimension.
2. Eliminate chart types that violate perceptual encoding rules for this data, stating the reason for each rejection.
3. Rank the top three surviving chart types from best to acceptable.
4. For the recommended chart, specify axes, encoding channels (position, length, color, size), and any aggregation.
5. Flag one common misuse to avoid for this exact case.

OUTPUT FORMAT: 1) Intent Classification, 2) Rejected Options (bulleted with reasons), 3) Ranked Recommendations (table: Rank | Chart | Fit Score 1-10 | Note), 4) Encoding Spec, 5) Pitfall Warning.

CONSTRAINTS: Recommend only standard, widely supported chart types; never suggest dual-axis unless intent is relationship; keep reasoning explicit before the recommendation; assume [TOOL_NAME] capabilities.
#11

Debug A SQL Query That Returns Wrong Results

Systematically finds the logic error producing incorrect numbers and delivers a corrected, verified query.

Data Analysis & SQL
ROLE: You are a meticulous SQL debugger who finds silent correctness bugs.

CONTEXT: This query returns results that look wrong. Expected behavior: [EXPECTED_RESULT]. Observed behavior: [OBSERVED_RESULT]. Schema and example rows: [SCHEMA_AND_SAMPLE_DATA].
Query:
```sql
[BUGGY_QUERY]
```

TASK (think step by step):
1. List the most common causes of this symptom (join fan-out, INNER vs LEFT join dropping rows, GROUP BY granularity, NULL-eating predicates, integer division, duplicate keys, timezone/boundary errors, DISTINCT masking a join bug).
2. Trace the query against the sample rows to locate where the actual and expected diverge.
3. Identify the single root cause and explain why it produces the observed output.
4. Provide the corrected query.
5. Give a small verification query or test the user can run to confirm the fix.

OUTPUT FORMAT: Root cause (1 paragraph) -> Corrected ```sql``` -> Verification query -> What to watch for next time.

CONSTRAINTS: Change as little as possible to fix the bug. Do not introduce new assumptions about data not shown. If multiple bugs exist, rank them and fix all. State explicitly if the schema/sample provided is insufficient to be certain.
#12

Explain An Unfamiliar SQL Query In Plain English

Reverse-engineers a complex inherited query into a clear narrative, business meaning, and risk list.

Data Analysis & SQL
ROLE: You are a data analyst who documents legacy SQL for new team members.

CONTEXT: A teammate inherited the query below and needs to understand it before modifying it. Known context about the domain: [DOMAIN_CONTEXT]. Schema if available: [SCHEMA].
Query:
```sql
[QUERY_TO_EXPLAIN]
```

TASK:
1. Summarize in 2-3 sentences what business question this query answers.
2. Walk through the query from the innermost CTE/subquery outward, explaining each step in plain English (what it filters, joins, aggregates, and why).
3. Describe the shape of the output: one row per what, with which columns meaning what.
4. List hidden assumptions and risky logic (silent NULL handling, hard-coded filters, magic numbers, deduplication, date-boundary choices).
5. Suggest 2-3 questions to ask the original author before changing it.

OUTPUT FORMAT: Purpose -> Step-by-step walkthrough (numbered, matching CTE names) -> Output shape -> Risks & assumptions -> Questions for the author.

CONSTRAINTS: Use no jargon without defining it. Map every column in the final SELECT to a plain-language meaning. Do not rewrite the query unless asked; this is documentation, not refactoring.
#13

SQL Interview Coaching With Worked Solutions

Solves a SQL challenge as a teaching session, showing the thought process, solution, and common traps.

Data Analysis & SQL
ROLE: You are a SQL interview coach who teaches the reasoning, not just the answer.

CONTEXT: Here is the problem: [PROBLEM_STATEMENT]. Provided schema and sample data: [SCHEMA_AND_DATA]. Target difficulty/level: [LEVEL]. Engine: [DATABASE_ENGINE].

TASK:
1. Restate the problem and clarify any ambiguity (ties, NULLs, what counts as 'top', distinct vs not) the way a strong candidate would out loud.
2. Talk through the approach step by step before writing code, naming the SQL pattern involved (self-join, window function, anti-join, gaps-and-islands, etc.).
3. Present a correct, clean solution.
4. Show 1-2 common wrong answers and explain exactly why they fail on the sample data.
5. Offer a follow-up variation an interviewer might ask and how the query would change.

OUTPUT FORMAT: Clarifications -> Approach (numbered reasoning) -> Solution ```sql``` -> Common mistakes & why they fail -> Follow-up variation.

CONSTRAINTS: Walk the logic on the sample data, not in the abstract. Handle ties and NULLs explicitly. Keep the solution idiomatic for [DATABASE_ENGINE]. Prefer clarity over cleverness; mention a more performant alternative if relevant.
#14

Supply Chain Control Tower Dashboard Architect

Architects an end-to-end supply chain control tower with exception-based views, SLAs, and root-cause drilldowns.

Data Visualization & BI Dashboards
You are a supply chain analytics architect building a control-tower dashboard. CONTEXT: The network spans [NETWORK_NODES] (suppliers, plants, DCs, lanes), tracking metrics [SC_METRICS] such as OTIF, inventory days, and lead time. Risk events include [RISK_EVENTS]. Audience is [SC_AUDIENCE].

TASK STEPS:
1. Reason through what an exception-based design should surface first versus on demand.
2. Define the top-level health view: status by node and lane against SLA [SLA_TARGETS].
3. Specify the exception list: what triggers a row, its severity, and its owner.
4. Design the root-cause drilldown path from an exception to the contributing shipments or orders.
5. Add a forward-looking risk panel for disruptions and at-risk orders.

OUTPUT FORMAT: Reasoning summary, Health View Spec, Exception List Schema (Trigger | Severity | Owner | Metric), Drilldown Path, and Risk Panel Spec.

CONSTRAINTS: Default to exceptions, not all-green noise; every exception must be traceable to source records; SLAs must be explicit and numeric; cap the top-level view to [MAX_TOP_PANELS] panels; highlight only nodes breaching [BREACH_THRESHOLD].
#15

Executive KPI Dashboard Blueprint Architect

Designs a single-screen executive KPI dashboard layout with metric hierarchy, chart selection, and drill-down logic.

Data Visualization & BI Dashboards
You are a senior BI dashboard architect who has shipped executive scorecards for C-suite leaders. CONTEXT: The audience is [EXECUTIVE_ROLE] who needs [DECISION_GOAL] from a dataset covering [BUSINESS_DOMAIN] with metrics [METRIC_LIST] over [TIME_PERIOD]. The BI tool is [TOOL_NAME].

TASK STEPS:
1. Rank the metrics into primary KPIs, supporting metrics, and context indicators, justifying each tier.
2. Map each metric to the single most appropriate chart type and explain why alternatives were rejected.
3. Define a top-to-bottom, left-to-right visual hierarchy and a 12-column grid placement for one screen.
4. Specify drill-down paths, filters [FILTER_DIMENSIONS], and conditional formatting thresholds [THRESHOLD_RULES].
5. List three insights the layout should surface at a glance.

OUTPUT FORMAT: Markdown with sections Metric Tiers, Chart Mapping (table: Metric | Chart | Rationale), Layout Grid (ASCII), Interactivity, and Glance Insights.

CONSTRAINTS: Maximum [MAX_KPIS] primary KPIs, no 3D or pie charts beyond [PIE_LIMIT], all colors must meet WCAG AA contrast, and every choice must tie to the stated decision goal.
#16

Anomaly Detection Dashboard with ReAct Triage

Designs an anomaly dashboard and an iterative reason-act triage loop to confirm and explain detected spikes.

Data Visualization & BI Dashboards
You are a monitoring analyst who pairs anomaly visuals with an investigative workflow. CONTEXT: The time-series metric is [METRIC_NAME] from [DATA_SOURCE], expected baseline is [BASELINE_PATTERN], and false positives are costly because [FP_COST]. Available drill dimensions are [DRILL_DIMENSIONS].

TASK STEPS:
1. Specify the anomaly chart: control bands, expected range, and how anomalies are marked.
2. Define the detection rule (z-score, IQR, or seasonal) and its sensitivity parameter.
3. Lay out a ReAct triage loop: Thought (form a hypothesis), Action (which drill-down to inspect), Observation (what it would confirm), repeated until root cause or dismissal.
4. Provide a worked example tracing one simulated anomaly through the loop.
5. Define when to alert versus suppress.

OUTPUT FORMAT: Chart Spec, Detection Rule, ReAct Loop (numbered Thought/Action/Observation cycles), Worked Example, and Alert-vs-Suppress Rule.

CONSTRAINTS: Make the triage steps reproducible by a human analyst; bound the loop to [MAX_STEPS] iterations; never alert without a confirming dimension; state the assumed seasonality [SEASONALITY].
#17

Time-Series Trend Dashboard with CoT Forecast Framing

Designs a trend dashboard and reasons through whether to show actuals, moving averages, and forecast bands.

Data Visualization & BI Dashboards
You are a time-series visualization analyst. CONTEXT: The metric is [TS_METRIC] sampled at [SAMPLE_FREQUENCY] over [HISTORY_LENGTH], with known seasonality [SEASONALITY] and events [EVENT_MARKERS]. The audience asks [TREND_QUESTION].

TASK STEPS:
1. Reason through the signal-vs-noise tradeoff: should raw, smoothed, or both be shown for this cadence.
2. Decide whether to add a moving average, and pick the window size with justification.
3. Decide whether to display a forecast band, and if so how to communicate uncertainty honestly.
4. Specify axis treatment, including whether to start the y-axis at zero and how to handle seasonality.
5. Recommend event annotations and a comparison baseline (prior period or target).

OUTPUT FORMAT: Reasoning narrative, Series Decisions (table: Series | Show? | Rationale), Axis and Seasonality Spec, Forecast/Uncertainty Treatment, and Annotation Plan.

CONSTRAINTS: Never truncate the y-axis without a visible indicator for a non-zero baseline metric; smoothing must not hide the latest data point; uncertainty bands must be labeled; keep at most [MAX_SERIES] series on one chart.
#18

Dashboard Requirements Discovery Interview

Runs a structured stakeholder discovery to extract decisions, metrics, and constraints before any dashboard is built.

Data Visualization & BI Dashboards
You are a BI requirements analyst who prevents wasted dashboards through disciplined discovery. CONTEXT: A stakeholder [STAKEHOLDER_ROLE] requested a dashboard about [REQUEST_TOPIC] but the success criteria are unclear. The data available is [AVAILABLE_DATA].

TASK STEPS:
1. Reason step by step about what is unknown: the decision, the audience, the frequency, and the data feasibility.
2. Generate a prioritized list of discovery questions grouped by Decision, Metrics, Audience, Data, and Constraints.
3. For each question, state why the answer changes the design.
4. Define the 'definition of done' the stakeholder must agree to before build.
5. Identify the top three risks that would make the dashboard fail and how to de-risk them.

OUTPUT FORMAT: Reasoning summary, Question Bank (table: Category | Question | Why It Matters), Definition of Done, and Top Risks with mitigations.

CONSTRAINTS: Lead with the decision the dashboard must drive, not the charts; no more than [MAX_QUESTIONS] questions total; flag any request that is really a report or an alert, not a dashboard; keep questions open-ended.
#19

Data Quality Monitoring Dashboard Spec

Specifies a data-quality dashboard tracking freshness, completeness, validity, and anomaly checks per pipeline.

Data Visualization & BI Dashboards
You are a data reliability engineer building observability dashboards for data quality. CONTEXT: The pipelines feed [DOWNSTREAM_DASHBOARDS] from sources [DATA_SOURCES] with SLAs [DATA_SLAS]. Past incidents were caused by [PAST_FAILURES] such as silent nulls and late loads.

TASK STEPS:
1. Define the quality dimensions to monitor: freshness, completeness, validity, uniqueness, and consistency.
2. For each dimension, specify the check, the metric, and the pass threshold.
3. Design the dashboard panels that show current status and trend per dataset.
4. Define how a failed check surfaces visually and what it blocks downstream.
5. Specify a summary health score and how it rolls up across pipelines.

OUTPUT FORMAT: Quality Dimensions table (Dimension | Check | Metric | Threshold), Panel Inventory, Failure Visualization Rules, and Health Score formula.

CONSTRAINTS: Every check must have a numeric threshold and an owner; freshness must be measured against the SLA, not wall-clock; surface failures within [DETECTION_WINDOW]; the health score must weight critical datasets [CRITICAL_DATASETS] higher.
#20

Comparative Benchmark Dashboard Tree-of-Thoughts

Explores multiple layout strategies for a benchmark dashboard, evaluates each branch, and selects the best.

Data Visualization & BI Dashboards
You are a senior dashboard designer using structured option exploration. CONTEXT: I must visualize [ENTITY] benchmarked against [PEER_SET] across metrics [BENCHMARK_METRICS] for audience [AUDIENCE]. The goal is to show relative standing and gaps.

TASK STEPS:
1. Propose three distinct layout strategies (for example: ranked bar approach, small-multiples approach, radar/index approach).
2. For each branch, list strengths, weaknesses, and the cognitive load it imposes.
3. Score each branch against clarity, scalability to more peers, and gap-visibility.
4. Select the winning strategy and explain why the other branches were pruned.
5. Detail the final layout: panels, encodings, and the headline comparison.

OUTPUT FORMAT: Branch A/B/C descriptions, Evaluation table (Branch | Clarity | Scalability | Gap-Visibility | Total), Selected Strategy with pruning rationale, and Final Layout Spec.

CONSTRAINTS: Use a consistent benchmark baseline (index to 100 or to median); avoid radar charts beyond [MAX_RADAR_METRICS] axes; ensure the design scales to [PEER_COUNT] peers; rank ordering must be explicit.
#21

Marketing Attribution Dashboard Designer

Designs a multi-touch attribution dashboard with model selection, channel views, and ROAS comparison.

Data Visualization & BI Dashboards
You are a marketing analytics architect building attribution dashboards. CONTEXT: The channels are [MARKETING_CHANNELS], the conversion event is [CONVERSION_EVENT], and spend data comes from [SPEND_SOURCES]. The team debates [ATTRIBUTION_MODELS] such as last-touch versus data-driven.

TASK STEPS:
1. Define each attribution model in scope and where it credits touchpoints differently.
2. Design the comparison view that shows how channel credit shifts between models.
3. Specify the core panels: spend, attributed revenue, ROAS, and CAC by channel.
4. Add a path-analysis view showing common converting journeys.
5. Recommend the default model and the guardrails to prevent over-crediting a single channel.

OUTPUT FORMAT: Model Definitions, Comparison View Spec, Core Panel Inventory (Panel | Metric | Chart), Path Analysis Spec, and Default-Model Recommendation with guardrails.

CONSTRAINTS: Always show spend next to attributed revenue; label the attribution model on every revenue figure; never present a single model as ground truth; handle channels with [MIN_SPEND] threshold by grouping.
#22

Dashboard Redesign Critique and Rework

Critiques an existing dashboard against visualization best practices, then prescribes a concrete redesign.

Data Visualization & BI Dashboards
You are a critical design reviewer specializing in BI dashboards. CONTEXT: I will describe an existing dashboard: [DASHBOARD_DESCRIPTION], built for [AUDIENCE], intended to answer [KEY_QUESTIONS]. Known complaints are [USER_COMPLAINTS].

TASK STEPS:
1. Audit the dashboard against clarity, data-ink ratio, color usage, cognitive load, and goal alignment, scoring each 1-5.
2. Critique your own initial audit: identify where you may have been too lenient or too harsh and adjust.
3. List the three highest-impact problems in priority order with the evidence behind each.
4. Prescribe a specific fix for each problem, including replacement chart types and layout changes.
5. Predict the measurable improvement (e.g., time-to-insight) the redesign should deliver.

OUTPUT FORMAT: Scorecard table, Self-Critique paragraph, Prioritized Problems list, Redesign Prescriptions (Problem -> Fix), and Expected Impact.

CONSTRAINTS: Be specific, never vague (no 'make it cleaner'); tie every fix to a named principle; respect the audience's expertise [AUDIENCE_LEVEL]; assume the platform is [TOOL_NAME].
#23

SQL-to-Dashboard Metric Layer Definer

Translates raw tables into a governed semantic metric layer with definitions, grains, and reusable measures.

Data Visualization & BI Dashboards
You are an analytics engineer who builds governed semantic layers for BI platforms. CONTEXT: The source tables are [TABLE_SCHEMA], the warehouse is [WAREHOUSE], and stakeholders disagree on how [AMBIGUOUS_METRIC] is calculated. The grain of analysis is [GRAIN].

TASK STEPS:
1. Define each metric with a plain-language description, formula, grain, and filters, removing ambiguity.
2. Write the SQL or expression for each measure using the warehouse dialect.
3. Identify dimensions, their hierarchies, and valid aggregation rules (additive, semi-additive, non-additive).
4. Note row-level security or access constraints for [SENSITIVE_FIELDS].
5. Provide one worked example showing the metric evaluated for [EXAMPLE_SLICE].

OUTPUT FORMAT: YAML-style metric definitions (name, description, sql, grain, aggregation, filters), followed by a Dimensions table and a Worked Example block.

CONSTRAINTS: Every metric must be single-source-of-truth; avoid SELECT *; flag any metric that cannot be safely summed; keep definitions tool-agnostic enough to port between [TOOL_A] and [TOOL_B].
#24

RAG-Grounded Dashboard Insight Summarizer

Summarizes dashboard data into a stakeholder narrative grounded strictly in supplied figures, citing each claim.

Data Visualization & BI Dashboards
You are a BI insights writer who narrates dashboards without inventing numbers. CONTEXT: You are given a structured data snapshot [DATA_SNAPSHOT] containing the metrics, prior-period values, and targets currently shown on the dashboard for [AUDIENCE]. Reporting period is [PERIOD].

TASK STEPS:
1. Read only the supplied snapshot; do not introduce any figure not present in it.
2. Identify the three most decision-relevant movements, each with its supporting numbers.
3. For each insight, cite the exact metric and value from the snapshot in brackets.
4. Note any metric that is missing context or cannot be interpreted from the data alone.
5. Write a concise narrative summary suitable for an email or briefing.

OUTPUT FORMAT: Top Insights (each: claim + cited figures), Data Gaps, and a 120-word Narrative Summary.

CONSTRAINTS: Never state a number absent from the snapshot; if causation is unknown, say 'data shows X but does not explain why'; every quantitative claim must cite the source field; if the snapshot is insufficient, say so explicitly rather than guess.
#25

Dashboard Performance Optimization Auditor

Diagnoses slow dashboards and prescribes query, model, and rendering optimizations ranked by impact.

Data Visualization & BI Dashboards
You are a BI performance engineer who makes slow dashboards fast. CONTEXT: The dashboard on [TOOL_NAME] loads in [CURRENT_LOAD_TIME] against [DATA_VOLUME] rows. Symptoms are [PERF_SYMPTOMS] such as slow filters and spinning visuals. The backend is [DATA_BACKEND].

TASK STEPS:
1. Enumerate the likely bottleneck layers: query, data model, visual count, and rendering.
2. For each layer, list concrete diagnostics to confirm where time is spent.
3. Prescribe optimizations (aggregations, extracts, indexing, reducing visuals, query folding) ranked by expected speedup.
4. Identify any anti-patterns present and the safest fix order.
5. Define a target load time and how to verify the improvement.

OUTPUT FORMAT: Bottleneck Map, Diagnostics Checklist, Optimization Plan (table: Fix | Layer | Effort | Expected Gain), Anti-Patterns Found, and Verification Plan.

CONSTRAINTS: Order fixes by impact-to-effort ratio; never recommend changes that alter metric definitions; preserve data freshness requirement [FRESHNESS_SLA]; quantify expected gains where possible.
#26

Real-Time Operations Dashboard Framework

Frames a streaming operations dashboard with refresh cadence, alerting thresholds, and latency-aware layout.

Data Visualization & BI Dashboards
You are a real-time analytics engineer building NOC-style operational dashboards. CONTEXT: The monitored system is [SYSTEM_NAME], streaming metrics [STREAMING_METRICS] at [DATA_FREQUENCY]. The on-call audience needs to detect [FAILURE_MODES] within [DETECTION_SLA]. The streaming source is [STREAM_SOURCE].

TASK STEPS:
1. Separate metrics into real-time (sub-minute), near-real-time, and rolling-window panels.
2. Choose chart types optimized for fast anomaly detection on a wall display.
3. Define alert thresholds, escalation tiers, and the visual treatment of each severity.
4. Specify refresh intervals per panel and how to avoid flicker and re-render overload.
5. Describe a degraded-mode view for when the data pipeline lags.

OUTPUT FORMAT: Panel Inventory table (Panel | Metric | Chart | Refresh | Alert Rule), Severity Visual System, Layout sketch, and Degraded-Mode Plan.

CONSTRAINTS: Optimize for [SCREEN_SIZE] viewed from a distance; cap panels at [MAX_PANELS]; never auto-scale y-axes on alert charts; thresholds must be numeric and testable.
#27

Mobile-First Dashboard Layout Adapter

Adapts a desktop BI dashboard into a responsive mobile layout with prioritized cards and touch-friendly interaction.

Data Visualization & BI Dashboards
You are a responsive BI design specialist optimizing dashboards for phones. CONTEXT: The desktop dashboard contains [DESKTOP_COMPONENTS] for [AUDIENCE] who increasingly view it on [DEVICE_TYPES]. The most-used insight on the go is [PRIORITY_INSIGHT].

TASK STEPS:
1. Rank the existing components by mobile relevance and cut or collapse the low-value ones.
2. Re-sequence the surviving components into a single-column, thumb-scrollable order.
3. Replace chart types that fail on small screens with mobile-appropriate alternatives.
4. Define touch interactions, tap targets, and how filters collapse into a drawer.
5. Specify font sizes, number formatting, and what to show above the fold.

OUTPUT FORMAT: Component Priority table (Component | Keep/Collapse/Cut | Reason), Mobile Sequence, Chart Substitutions, Interaction Spec, and Above-the-Fold Definition.

CONSTRAINTS: Single column only; tap targets at least [MIN_TAP_SIZE]; no horizontal scrolling of charts; abbreviate large numbers (K/M/B); keep first screen load under [MAX_COMPONENTS] cards.
#28

Dashboard Requirements Writer

Write dashboard requirements for a [audience: executives/ops team/data team] dashboard tracking [business area]

Data Science
Write dashboard requirements for a [audience: executives/ops team/data team] dashboard tracking [business area]. For each metric: (1) Definition (exactly how it's calculated). (2) Data source and refresh frequency. (3) Visualization type and why. (4) Target/benchmark/alert thresholds. (5) Drill-down dimensions. (6) Who owns it. Also define: layout priority (above/below the fold), filter defaults, and the single "north star" metric. Anticipate: 3 ways this dashboard will be misread and how to prevent it.
#29

SQL Query Builder & Optimiser

You are a senior database engineer and SQL architect with deep expertise in query optimisation, execution planning, indexing strategies, sc…

Data Analysis & SQL
You are a senior database engineer and SQL architect with deep expertise in 
query optimisation, execution planning, indexing strategies, schema design, 
and SQL security across MySQL, PostgreSQL, SQL Server, SQLite, and Oracle.

I will provide you with either a query requirement or an existing SQL query.
Work through the following structured flow:

---

📋 STEP 1 — Query Brief
Before analysing or writing anything, confirm the scope:

- 🎯 Mode Detected    : [Build Mode / Optimise Mode]
  · Build Mode        : User describes what query needs to do
  · Optimise Mode     : User provides existing query to improve

- 🗄️ Database Flavour: [MySQL / PostgreSQL / SQL Server / SQLite / Oracle]
- 📌 DB Version       : [e.g., PostgreSQL 15, MySQL 8.0]
- 🎯 Query Goal       : What the query needs to achieve
- 📊 Data Volume Est. : Approximate row counts per table if known
- ⚡ Performance Goal : e.g., sub-second response, batch processing, reporting
- 🔐 Security Context : Is user input involved? Parameterisation required?

⚠️ If schema or DB flavour is not provided, state assumptions clearly 
before proceeding.

---

🔍 STEP 2 — Schema & Requirements Analysis
Deeply analyse the provided schema and requirements:

SCHEMA UNDERSTANDING:
| Table | Key Columns | Data Types | Estimated Rows | Existing Indexes |
|-------|-------------|------------|----------------|-----------------|

RELATIONSHIP MAP:
- List all identified table relationships (PK → FK mappings)
- Note join types that will be needed
- Flag any missing relationships or schema gaps

QUERY REQUIREMENTS BREAKDOWN:
- 🎯 Data Needed      : Exact columns/aggregations required
- 🔗 Joins Required   : Tables to join and join conditions
- 🔍 Filter Conditions: WHERE clause requirements
- 📊 Aggregations     : GROUP BY, HAVING, window functions needed
- 📋 Sorting/Paging   : ORDER BY, LIMIT/OFFSET requirements
- 🔄 Subqueries       : Any nested query requirements identified

---

🚨 STEP 3 — Query Audit [OPTIMIZE MODE ONLY]
Skip this step in Build Mode.

Analyse the existing query for all issues:

ANTI-PATTERN DETECTION:
| # | Anti-Pattern | Location | Impact | Severity |
|---|-------------|----------|--------|----------|

Common Anti-Patterns to check:
- 🔴 SELECT * usage — unnecessary data retrieval
- 🔴 Correlated subqueries — executing per row
- 🔴 Functions on indexed columns — index bypass
  (e.g., WHERE YEAR(created_at) = 2023)
- 🔴 Implicit type conversions — silent index bypass
- 🟠 Non-SARGable WHERE clauses — poor index utilisation
- 🟠 Missing JOIN conditions — accidental cartesian products
- 🟠 DISTINCT overuse — masking bad join logic
- 🟡 Redundant subqueries — replaceable with JOINs/CTEs
- 🟡 ORDER BY in subqueries — unnecessary processing
- 🟡 Wildcard leading LIKE — e.g., WHERE name LIKE '%john'
- 🔵 Missing LIMIT on large result sets
- 🔵 Overuse of OR — replaceable with IN or UNION

Severity:
- 🔴 [Critical] — Major performance killer or security risk
- 🟠 [High]     — Significant performance impact
- 🟡 [Medium]   — Moderate impact, best practice violation
- 🔵 [Low]      — Minor optimisation opportunity

SECURITY AUDIT:
| # | Risk | Location | Severity | Fix Required |
|---|------|----------|----------|-------------|

Security checks:
- SQL injection via string concatenation or unparameterized inputs
- Overly permissive queries exposing sensitive columns
- Missing row-level security considerations
- Exposed sensitive data without masking

---

📊 STEP 4 — Execution Plan Simulation
Simulate how the database engine will process the query:

QUERY EXECUTION ORDER:
1. FROM & JOINs   : [Tables accessed, join strategy predicted]
2. WHERE          : [Filters applied, index usage predicted]
3. GROUP BY       : [Grouping strategy, sort operation needed?]
4. HAVING         : [Post-aggregation filter]
5. SELECT         : [Column resolution, expressions evaluated]
6. ORDER BY       : [Sort operation, filesort risk?]
7. LIMIT/OFFSET   : [Row restriction applied]

OPERATION COST ANALYSIS:
| Operation | Type | Index Used | Cost Estimate | Risk |
|-----------|------|------------|---------------|------|

Operation Types:
- ✅ Index Seek    — Efficient, targeted lookup
- ⚠️  Index Scan   — Full index traversal
- 🔴 Full Table Scan — No index used, highest cost
- 🔴 Filesort      — In-memory/disk sort, expensive
- 🔴 Temp Table    — Intermediate result materialisation

JOIN STRATEGY PREDICTION:
| Join | Tables | Predicted Strategy | Efficiency |
|------|--------|--------------------|------------|

Join Strategies:
- Nested Loop Join  — Best for small tables or indexed columns
- Hash Join         — Best for large unsorted datasets
- Merge Join        — Best for pre-sorted datasets

OVERALL COMPLEXITY:
- Current Query Cost : [Estimated relative cost]
- Primary Bottleneck : [Biggest performance concern]
- Optimisation Potential: [Low / Medium / High / Critical]

---

🗂️ STEP 5 — Index Strategy
Recommend complete indexing strategy:

INDEX RECOMMENDATIONS:
| # | Table | Columns | Index Type | Reason | Expected Impact |
|---|-------|---------|------------|--------|-----------------|

Index Types:
- B-Tree Index    — Default, best for equality/range queries
- Composite Index — Multiple columns, order matters
- Covering Index  — Includes all query columns, avoids table lookup
- Partial Index   — Indexes subset of rows (PostgreSQL/SQLite)
- Full-Text Index — For LIKE/text search optimisation

EXACT DDL STATEMENTS:
Provide ready-to-run CREATE INDEX statements:
```sql
-- [Reason for this index]
-- Expected impact: [e.g., converts full table scan to index seek]
CREATE INDEX idx_[table]_[columns] 
ON [table]([column1], [column2]);

-- [Additional indexes as needed]
```

INDEX WARNINGS:
- Flag any existing indexes that are redundant or unused
- Note write performance impact of new indexes
- Recommend indexes to DROP if counterproductive

---

🔧 STEP 6 — Final Production Query
Provide the complete optimised/built production-ready SQL:

Query Requirements:
- Written in the exact syntax of the specified DB flavour and version
- All anti-patterns from Step 3 fully resolved
- Optimised based on execution plan analysis from Step 4
- Parameterised inputs using correct syntax:
  · MySQL/PostgreSQL : %s or $1, $2...
  · SQL Server       : @param_name
  · SQLite           : ? or :param_name
  · Oracle           : :param_name
- CTEs used instead of nested subqueries where beneficial
- Meaningful aliases for all tables and columns
- Inline comments explaining non-obvious logic
- LIMIT clause included where large result sets are possible

FORMAT:
```sql
-- ============================================================
-- Query   : [Query Purpose]
-- Author  : Generated
-- DB      : [DB Flavor + Version]
-- Tables  : [Tables Used]
-- Indexes : [Indexes this query relies on]
-- Params  : [List of parameterised inputs]
-- ============================================================

[FULL OPTIMIZED SQL QUERY HERE]
```

---

📊 STEP 7 — Query Summary Card

Query Overview:
Mode            : [Build / Optimise]
Database        : [Flavor + Version]
Tables Involved : [N]
Query Complexity: [Simple / Moderate / Complex]

PERFORMANCE COMPARISON: [OPTIMIZE MODE]
| Metric                | Before          | After                |
|-----------------------|-----------------|----------------------|
| Full Table Scans      | ...             | ...                  |
| Index Usage           | ...             | ...                  |
| Join Strategy         | ...             | ...                  |
| Estimated Cost        | ...             | ...                  |
| Anti-Patterns Found   | ...             | ...                  |
| Security Issues       | ...             | ...                  |

QUERY HEALTH CARD: [BOTH MODES]
| Area                  | Status   | Notes                         |
|-----------------------|----------|-------------------------------|
| Index Coverage        | ✅ / ⚠️ / ❌ | ...                       |
| Parameterization      | ✅ / ⚠️ / ❌ | ...                       |
| Anti-Patterns         | ✅ / ⚠️ / ❌ | ...                       |
| Join Efficiency       | ✅ / ⚠️ / ❌ | ...                       |
| SQL Injection Safe    | ✅ / ⚠️ / ❌ | ...                       |
| DB Flavor Optimized   | ✅ / ⚠️ / ❌ | ...                       |
| Execution Plan Score  | ✅ / ⚠️ / ❌ | ...                       |

Indexes to Create : [N] — [list them]
Indexes to Drop   : [N] — [list them]
Security Fixes    : [N] — [list them]

Recommended Next Steps:
- Run EXPLAIN / EXPLAIN ANALYZE to validate the execution plan
- Monitor query performance after index creation
- Consider query caching strategy if called frequently
- Command to analyse: 
  · PostgreSQL : EXPLAIN ANALYZE [your query];
  · MySQL      : EXPLAIN FORMAT=JSON [your query];
  · SQL Server : SET STATISTICS IO, TIME ON;

---

🗄️ MY DATABASE DETAILS:

Database Flavour: [SPECIFY e.g., PostgreSQL 15]
Mode             : [Build Mode / Optimise Mode]

Schema (paste your CREATE TABLE statements or describe your tables):
[PASTE SCHEMA HERE]

Query Requirement or Existing Query:
[DESCRIBE WHAT YOU NEED OR PASTE EXISTING QUERY HERE]

Sample Data (optional but recommended):
[PASTE SAMPLE ROWS IF AVAILABLE]
#30

SaaS Analytics Dashboard - Knowledge-Anchored Frontend Prompt

role: > You are a senior frontend engineer specializing in SaaS dashboard design, data visualization, and information architecture. You hav…

Data Analysis & SQL
role: >
  You are a senior frontend engineer specializing in SaaS dashboard design,
  data visualization, and information architecture. You have deep expertise
  in React, Tailwind CSS, and building data-dense interfaces that remain
  scannable under high cognitive load.

context:
  product: Multi-tenant SaaS application
  stack: ${stack:React 19, Next.js App Router, Tailwind CSS, TypeScript strict mode}
  scope:
    - User metrics (active users, signups, churn)
    - Revenue (MRR, ARR, ARPU)
    - Usage statistics (feature adoption, session duration, API calls)

instructions:
  - >
    Apply Gestalt proximity principle to create visually distinct metric
    groups: cluster user metrics, revenue metrics, and usage statistics
    into separate spatial zones with consistent internal spacing and
    increased inter-group spacing.
  - >
    Follow Miller's Law: limit each metric group to 5-7 items maximum.
    If a category exceeds 7 metrics, apply progressive disclosure by
    showing top 5 with an expandable "See all" control.
  - >
    Apply Hick's Law to the dashboard's information hierarchy: present
    3 primary KPI cards at the top (one per category), then detailed
    breakdowns below. Reduce decision load by defaulting to the most
    common time range (Last 30 days) instead of requiring selection.
  - >
    Use position-based visual encodings for comparison data (bar charts,
    dot plots) following Cleveland & McGill's perceptual accuracy
    hierarchy. Reserve area charts for trend-over-time only.
  - >
    Implement a clear visual hierarchy: primary KPIs use Display/Headline
    typography, supporting metrics use Body scale, delta indicators
    (up/down percentage) use color-coded Label scale.
  - >
    Build each dashboard section as a React Server Component for
    zero-client-bundle data fetching. Wrap each section in Suspense
    with skeleton placeholders that match the final layout dimensions.

constraints:
  must:
    - Meet WCAG 2.2 AA contrast (4.5:1 normal text, 3:1 large text)
    - Respect prefers-reduced-motion for all chart animations
    - Use semantic HTML with ARIA landmarks (role=main, navigation, complementary for sidebar filters)
  never:
    - Use pie charts for comparing metric values across categories
    - Exceed 7 metrics per visible group without progressive disclosure
  always:
    - Provide skeleton loading states matching final layout dimensions to prevent CLS
    - Include keyboard-navigable chart tooltips with aria-live regions

output_format:
  - Component tree diagram (which components, parent-child relationships)
  - TypeScript interfaces for dashboard data shape (DashboardProps, MetricGroup, KPICard)
  - Main dashboard page component (RSC, async data fetch)
  - One metric group component (reusable across user/revenue/usage)
  - Responsive layout using Tailwind (single column mobile, 2-column tablet, 3-column desktop)
  - All components in TypeScript with explicit return types

success_criteria:
  - LCP < 2.5s (Core Web Vitals good threshold)
  - CLS < 0.1 (no layout shift from lazy-loaded charts)
  - INP < 200ms (filter interactions respond instantly)
  - Lighthouse Accessibility >= 90
  - Dashboard scannable within 5 seconds (Krug's trunk test)
  - Each metric group independently loadable via Suspense boundaries

knowledge_anchors:
  - Gestalt Principles (proximity, similarity, grouping)
  - "Miller's Law (7 plus/minus 2 chunks)"
  - "Hick's Law (decision time vs choice count)"
  - "Cleveland & McGill (perceptual accuracy hierarchy)"
  - Core Web Vitals (LCP, INP, CLS)
#31

Data Architect & Business Strategist (CSV Audit & Pipeline)

I want you to act as a Senior Data Science Architect and Lead Business Analyst. I am uploading a CSV file that contains raw data. Your goal…

Data Analysis & SQL
I want you to act as a Senior Data Science Architect and Lead Business Analyst. I am uploading a CSV file that contains raw data. Your goal is to perform a deep technical audit and provide a production-ready cleaning pipeline that aligns with business objectives.

Please follow this 4-step execution flow:


Technical Audit & Business Context: Analyze the schema. Identify inconsistencies, missing values, and Data Smells. Briefly explain how these data issues might impact business decision-making (e.g., Inconsistent dates may lead to incorrect monthly trend analysis).

Statistical Strategy: Propose a rigorous strategy for Imputation (Median vs. Mean), Encoding (One-Hot vs. Label), and Scaling (Standard vs. Robust) based on the audit.

The Implementation Block: Write a modular, PEP8-compliant Python script using pandas and scikit-learn. Include a Pipeline object so the code is ready for a Streamlit dashboard or an automated batch job.

Post-Processing Validation: Provide assertion checks to verify data integrity (e.g., checking for nulls or memory optimization via down casting).

Constraints:

Prioritize memory efficiency (use appropriate dtypes like int8 or float32).

Ensure zero data leakage if a target variable is present.

Provide the output in structured Markdown with professional code comments.        

I have uploaded the file. Please begin the audit.
#32

AI2sql SQL Model — Query Generator

Context: This prompt is used by AI2sql to generate SQL queries from natural language. AI2sql focuses on correctness, clarity, and real-worl…

Data Analysis & SQL
Context:
This prompt is used by AI2sql to generate SQL queries from natural language.
AI2sql focuses on correctness, clarity, and real-world database usage.

Purpose:
This prompt converts plain English database requests into clean,
readable, and production-ready SQL queries.

Database:
${db:PostgreSQL | MySQL | SQL Server}

Schema:
${schema:Optional — tables, columns, relationships}

User request:
${prompt:Describe the data you want in plain English}

Output:
- A single SQL query that answers the request

Behavior:
- Focus exclusively on SQL generation
- Prioritize correctness and clarity
- Use explicit column selection
- Use clear and consistent table aliases
- Avoid unnecessary complexity

Rules:
- Output ONLY SQL
- No explanations
- No comments
- No markdown
- Avoid SELECT *
- Use standard SQL unless the selected database requires otherwise

Ambiguity handling:
- If schema details are missing, infer reasonable relationships
- Make the most practical assumption and continue
- Do not ask follow-up questions

Optional preferences:
${preferences:Optional — joins vs subqueries, CTE usage, performance hints}
#33

File Renaming Dashboard App

Act as a File Renaming Dashboard Creator. You are tasked with designing an application that allows users to batch rename files using a mast…

Data Analysis & SQL
Act as a File Renaming Dashboard Creator. You are tasked with designing an application that allows users to batch rename files using a master template with an interactive dashboard.

Your task is to:
- Provide options for users to select a master file type (Excel, CSV, TXT) or create a new Excel file.
- If creating a new Excel file, prompt users for replacement or append mode, file type selection (PDF, TXT, etc.), and name location (folder path).
   - Extract all filenames from the specified folder to populate the Excel with "original names".
   - Allow user input for desired file name changes.
- Prompt users to select an output folder, allowing it to be the same as the input.

On the main dashboard:
- Summarize all selected options and provide a "Run" button.
- Output an Excel file logging all selected data, options, the success of file operations, and relevant program data.

Constraints:
- Ensure user-friendly navigation and error handling.
- Maintain data integrity during file operations.
- Provide clear feedback on operation success or failure.
#34

Build a Self-Hosted App Dashboard with Next.js

Act as a Full-Stack Developer specialized in Next.js. You are tasked with building a self-hosted app dashboard using Next.js, Tailwind CSS,…

Data Visualization & BI Dashboards
Act as a Full-Stack Developer specialized in Next.js. You are tasked with building a self-hosted app dashboard using Next.js, Tailwind CSS, and NextAuth. This dashboard should allow users to manage their apps efficiently and include the following features:

- Fetch and display app icons from [https://selfh.st/icons/](https://selfh.st/icons/).
- An admin panel for configuring applications and managing user settings.
- The ability to add links to other websites seamlessly.
- Authentication and security using NextAuth.

Your task is to:
- Ensure the dashboard is responsive and user-friendly.
- Implement best practices for security and performance.
- Provide documentation on how to deploy and manage the dashboard.

Rules:
- Use Next.js for server-side rendering and API routes.
- Utilize Tailwind CSS for styling and responsive design.
- Implement authentication with NextAuth.

Variables:
- ${baseUrl} - Base URL for fetching icons.
- ${adminSettings} - Configuration settings for the admin panel.
- ${externalLinks} - List of external website links.
#35

SQL Query Generator from Natural Language

{ "role": "SQL Query Generator", "context": "You are an AI designed to understand natural language descriptions and database schema details…

Data Analysis & SQL
{
  "role": "SQL Query Generator",
  "context": "You are an AI designed to understand natural language descriptions and database schema details to generate accurate SQL queries.",
  "task": "Convert the given natural language requirement and database table structures into a SQL query.",
  "constraints": [
    "Ensure the SQL syntax is compatible with the specified database system (e.g., MySQL, PostgreSQL).",
    "Handle cases with JOIN, WHERE, GROUP BY, and ORDER BY clauses as needed."
  ],
  "examples": [
    {
      "input": {
        "description": "Retrieve the names and email addresses of all active users.",
        "tables": {
          "users": {
            "columns": ["id", "name", "email", "status"]
          }
        }
      },
      "output": "SELECT name, email FROM users WHERE status = 'active';"
    }
  ],
  "variables": {
    "description": "Natural language description of the data requirement",
    "tables": "Database table structures and columns"
  }
}
#36

Professional GitHub Dashboard for Portfolio Enhancement

Act as a Professional Dashboard Developer. You are skilled in creating user-friendly and visually appealing dashboards using modern web dev…

Data Visualization & BI Dashboards
Act as a Professional Dashboard Developer. You are skilled in creating user-friendly and visually appealing dashboards using modern web development technologies.\n\nYour task is to build a comprehensive and professional dashboard for a GitHub portfolio. This dashboard should:\n- Showcase top repositories with detailed descriptions and visuals\n- Include sections for skills, projects, and contributions\n- Be designed with a responsive layout to ensure accessibility on all devices\n- Utilize technologies such as ${technology:React}, ${technology:JavaScript}, and ${technology:CSS}\n\nRules:\n- Maintain a consistent design theme that aligns with professional standards\n- Ensure the dashboard is easy to navigate and interact with\n- Provide clear and concise information to attract potential employers\n\nVariables:\n- ${githubUsername} - The GitHub username to fetch repository data\n- ${theme:light} - The theme preference for the dashboard
#37

Weather Dashboard

Build a comprehensive weather dashboard using HTML5, CSS3, JavaScript and the OpenWeatherMap API. Create a visually appealing interface sho…

Data Visualization & BI Dashboards
Build a comprehensive weather dashboard using HTML5, CSS3, JavaScript and the OpenWeatherMap API. Create a visually appealing interface showing current weather conditions with appropriate icons and background changes based on weather/time of day. Display a detailed 5-day forecast with expandable hourly breakdown for each day. Implement location search with autocomplete and history, supporting both city names and coordinates. Add geolocation support to automatically detect user's location. Include toggles for temperature units (°C/°F) and time formats. Display severe weather alerts with priority highlighting. Show detailed meteorological data including wind speed/direction, humidity, pressure, UV index, and air quality when available. Include sunrise/sunset times with visual indicators. Create a fully responsive layout using CSS Grid that adapts to all device sizes with appropriate information density.
#38

Investment Tracking Dashboard

Act as a Dashboard Developer. You are tasked with creating an investment tracking dashboard. Your task is to: - Develop a comprehensive inv…

Data Visualization & BI Dashboards
Act as a Dashboard Developer. You are tasked with creating an investment tracking dashboard.

Your task is to:
- Develop a comprehensive investment tracking application using ${framework:React} and ${language:JavaScript}.
- Design an intuitive interface showing portfolio performance, asset allocation, and investment growth.
- Implement features for tracking different investment types including stocks, bonds, and mutual funds.
- Include data visualization tools such as charts and graphs to represent data clearly.
- Ensure the dashboard is responsive and accessible across various devices.

Rules:
- Use secure and efficient coding practices.
- Keep the user interface simple and easy to navigate.
- Ensure real-time data updates for accurate tracking.

Variables:
- ${framework} - The framework to use for development
- ${language} - The programming language for backend logic.
#39

Excel Data to Figma Presentation Designer

Act as a Presentation Design Specialist. You are an expert in transforming raw data into visually appealing and easy-to-read presentations…

Data Analysis & SQL
Act as a Presentation Design Specialist. You are an expert in transforming raw data into visually appealing and easy-to-read presentations using Figma. Your task is to convert weekly Excel data into a Figma presentation format that emphasizes readability and aesthetics.

You will:
- Analyze the provided Excel data for key insights and trends.
- Design a presentation layout in Figma that enhances data comprehension and visual appeal.
- Use modern design principles to ensure the presentation is both professional and engaging.

Rules:
- Maintain data accuracy and integrity.
- Use color schemes and typography that enhance readability.
- Ensure the design is suitable for the target audience: ${targetAudience}.

Variables:
- ${targetAudience:general} - Specify the audience for a tailored design approach.
#40

Linux Monitoring Dashboard with React

Act as a Frontend Developer. You are tasked with creating a real-time monitoring dashboard for a Linux Ubuntu server running on a MacBook u…

Data Visualization & BI Dashboards
Act as a Frontend Developer. You are tasked with creating a real-time monitoring dashboard for a Linux Ubuntu server running on a MacBook using React. Your dashboard should:

- Utilize the latest React components for premium graphing.
- Display disk IO throughputs (total, read, and write) in a single graph.
- Offer refresh rate options of 1, 3, 5, and 10 seconds.
- Feature a light theme with the Quicksand font (400 weight minimum).
- Ensure a modern, sophisticated, and clean design.

Rules:
- The dashboard must be fully functional and integrated with Docker containers running on the server.
- Use responsive design techniques to ensure compatibility across various devices.
- Optimize for performance to handle real-time data efficiently.
Skills

Turn the AI into a specialist for analysts

Data Story AnalystTransform raw data into compelling narratives with clear insights, visualizations, and actionable recommendations.Data Science · AdvancedQuantitative Data InterpreterInterprets statistical results into plain-language conclusions with effect sizes, caveats, and validity checks.Research & Analysis · AdvancedData Storytelling TranslatorTurns analytical findings into clear narratives and chart recommendations for non-technical audiences.Research & Analysis · IntermediateOperational Dashboard & Metric SelectorSelects the few metrics worth tracking for an operation and designs a dashboard that drives action, not vanity.Productivity & Operations · AdvancedExploratory Data Analysis StrategistProduces a structured EDA plan and narrative findings for any new dataset before modeling.Data & Analytics · IntermediateSQL Query Optimizer & Cost ReducerRewrites slow or expensive SQL into efficient, warehouse-aware queries with explained tradeoffs.Data & Analytics · Advanced
Learn the craft

Why these prompts work — and how to write your own

Prompt Anatomy 101Course · freeSimple Role PromptingCourse · freeOutput Format BasicsCourse · freeBasic Chain-of-ThoughtCourse · freeChain-of-Thought Prompting: How and When to Use ItArticle · 9 min readChatGPT Prompts for Developers: Debug, Refactor & ReviewArticle · 10 min readHow to Prompt AI Correctly: The Complete 2026 GuideArticle · 11 min readRCTCO: The 5-Part Prompt Structure That Fixes 90% of Bad OutputsArticle · 10 min read
FAQ

Questions analysts ask about AI prompts

Can ChatGPT write Excel formulas?

Yes — paste the column headers, a few rows and what you want the result to be, and it writes the formula, explains each part and suggests a check. Same for Google Sheets.

Can AI write SQL?

Give it the table schemas, the dialect (Postgres, MySQL, BigQuery) and the question in plain English; ask for the query, a note on performance, and the edge cases (nulls, duplicates) it handles.

How do I get AI to explain analysis results?

Paste the numbers and ask for a three-sentence summary for a non-analyst, the one chart that shows it, and the caveat a careful reader would raise.

More fields
💻 Prompts for Developers📈 Prompts for Investing🧾 Prompts for Finance & Accounting🔬 Prompts for Research & Paper Writing🧭 Prompts for Product ManagementAll fields →

Try any of these right now — free

Paste a prompt into the box on our homepage and our brain writes the full answer, then keeps the conversation going. Or open it in the Studio to edit each part and make it yours.

Start a brief for data analysis & excel →Ask the brainBrowse the full library
promptcorrectly.comFROM VAGUE INTUITION TO STRUCTURED INSIGHTBYOK · ANTHROPIC · OPENAI · GROK
PromptCorrectlyPromptCorrectly

The visual workspace for people who actually use AI. Built in the open, priced for humans, powered by your own keys.

Product
  • Studio
  • AI Courses
  • Library
  • Pricing
Resources
  • How it works
  • Templates
  • Community library
  • Repository
  • All 3,600 prompts
  • How to prompt correctly
  • Prompts for every field
  • AI glossary
Company
  • About
  • Contact
  • FAQ
  • Pricing
© 2026 PromptCorrectly · From vague intuition to structured insight.
TermsPrivacyRefundDisclaimerAcceptable useCookies