Skip to main content
Lesson 12 of 14 · ChatGPT for Data Analysis

Recurring Analysis Pipeline

Lesson 12 of 14 Updated November 5, 2026 Intermediate
On this page
  1. Industrialize Your Analyses with ChatGPT
  2. What Is an Analysis Pipeline
  3. Create Your Pipeline Prompt
  4. Save and Reuse the Pipeline
  5. Manage History
  6. Automated Quality Control
  7. Measure Time Savings
  8. Your Turn
  9. Key Takeaways

Industrialize Your Analyses with ChatGPT

Running a one-off analysis is fine. Reproducing it every week without effort is better. This lesson teaches you how to build a recurring analysis pipeline: a standardized process you rerun with every new dataset, without starting from scratch or rediscovering your own methodological choices.

What Is an Analysis Pipeline

A pipeline is a sequence of steps that repeats with every iteration. The benefit isn’t just time saved. By locking down the steps, you guarantee that this week’s figure is truly comparable to last week’s, because it was produced the same way—same deduplication rule, same handling of empty rows, same scope. Without this discipline, a 5% variation might just be the trace of cleaning done differently.

A five-step pipeline Five steps repeated at every iteration: import the file; validate structure and types; clean with the same rules; analyze KPIs and trends; produce the report, with charts and alerts. PIPELINE A five-step pipeline 1 Import The file 2 Validate Structure 3 Clean Same rules 4 Analyze KPIs 5 Report And alerts The same steps at every iteration: figures remain comparable.
Method from this lesson.

Create Your Pipeline Prompt

The secret to an effective pipeline lies in a master prompt that encodes the entire logic of the analysis. You can easily test the right level of precision: your prompt must be explicit enough for a colleague to run it in your place while you’re on vacation, including expected columns and alert thresholds.

WEEKLY PIPELINE — SALES ANALYSIS

STEP 1: VALIDATION
- Check that the file contains the expected columns:
  date, order_id, region, product, category, quantity, amount_excl_tax, amount_incl_tax
- Flag any missing or renamed columns
- Display: number of rows, period covered, columns detected

STEP 2: CLEANING
- Remove duplicates based on order_id
- Isolate negative amounts (credits, returns) and report them separately
- Convert dates to YYYY-MM-DD format
- Remove rows where amount_incl_tax is empty

STEP 3: KPIs
- Total revenue (incl. tax)
- Number of orders
- Average basket size
- Top 5 products by revenue
- Top 3 regions by revenue
Each KPI with variation vs. previous week

STEP 4: CHARTS
- Daily revenue curve (last 7 days)
- Bar chart of revenue by region
- Pie chart of distribution by category

STEP 5: ALERTS
- Products with revenue down more than 20% vs. previous week
- Regions below 80% of weekly target
- Volume anomalies (>3 standard deviations from the mean)

Format: everything in a single response, including charts.

Every cleaning rule must be a business decision, not a reflex: a negative amount is often a credit, and turning it into a sale would inflate your revenue. Similarly, two sales of the same product, on the same day, in the same region, are generally two distinct sales—hence deduplication based on the order number.

Save and Reuse the Pipeline

This prompt is only valuable if it survives the conversation where you wrote it. Custom GPTs, long used for this role, are retiring on December 11, 2026, in favor of plugins and skills. The simplest solution now is Projects:

  1. Create a project named “Weekly Sales Report”
  2. Paste your pipeline prompt into the project instructions
  3. Every Monday, open a new conversation within the project and attach the week’s file
  4. Review the quality checks before reading the report

If you need to share the method with someone who doesn’t have access to the project, save the prompt in a text file that you attach along with the data:

The file pipeline_weekly.txt contains my analysis instructions.
Execute them on the attached data file.

A scheduled task can remind you of the Monday appointment; however, it cannot access files within a project, so data import remains manual.

Manage History

A pipeline without memory starts from zero every week and deprives you of any comparison: you get seven successive snapshots, never a movie. Therefore, maintain a tracking file that you reload with every iteration.

After the analysis, add this week's KPIs
to the history file "kpis_history.csv" that I provide.
The columns are: week, total_revenue, num_orders, avg_basket.
Export the updated file.

Week after week, this history enriches itself, and comparisons gain meaning. After six months, this small CSV of a few kilobytes is worth more than any of the isolated reports that fed it: only it allows you to say that a drop is an inflection point, not an accident.

Automated Quality Control

There remains a risk inherent to any automated analysis: producing an impeccable report from an incomplete file. An export interrupted at 80%, a region missing because its upload failed, and you are seriously commenting on a drop that doesn’t exist. Safeguards placed before the analysis neutralize this scenario.

QUALITY CHECKS (before analysis):
- Is the number of rows consistent with previous weeks (±20%)?
- Are all expected regions present?
- Do the dates cover exactly 7 days?
- Does no amount exceed €100,000 (alert threshold)?

If a check fails: STOP, display the alert, and wait for my confirmation.

The stop instruction is the most important part of this block. Without it, ChatGPT politely signals the problem in a paragraph, then proceeds with the full analysis—and it is this analysis, not the warning, that you will end up sharing.

Measure Time Savings

Measure the gain on your own numbers rather than assuming it: time a manual iteration—import, cleaning, KPIs, charts, writing—then an iteration with the pipeline, including verification. The time freed up doesn’t disappear: it shifts to the only part the machine won’t do for you, interpretation.

Your Turn

Your first pipeline.

  1. Write your master prompt in five steps: validation, cleaning, KPIs, charts, alerts
  2. Add quality checks with the stop instruction
  3. Create a project and paste the prompt into its instructions
  4. Run it on the week’s file, along with the history file
  5. Time the iteration, including verification, and compare it with the manual method

Official sources: Projects in ChatGPT · Custom GPT retirement and migration FAQ · Scheduled tasks in ChatGPT · Data analysis with ChatGPT (OpenAI Help Center)

Key Takeaways

  • A pipeline is a structured prompt that encodes the entire logic of your recurring analysis
  • Store your pipelines in project instructions: Custom GPTs are retiring on December 11, 2026
  • Integrate quality checks to detect problematic files before analysis
  • Maintain a history file to enrich comparisons over time
  • Measure time savings on your own iterations, including verification