Six Prompts That Read Your Time Series Better Than the Chart — Trend, Seasonality, Anomalies and the Breakpoint You Keep Missing

Your weekly revenue chart has a dip in week 34. Someone in the meeting says "seasonality" and the thread dies. Two months later the number never recovers and you realise it was a breakpoint, not a season. An LLM can catch that in a minute — but only if you ask it correctly.

This is a set of prompts for practitioners working with time series: product metrics, logs, IoT sensors, revenue. Each one is shown with an input, the answer you should expect, and the failure mode where the model confidently lies. The prompts for time series analysis below assume you paste the data or its summary into the chat, not just describe it.

Prompt 1: Decompose without the model guessing the period

Most people write "break this into trend and seasonality" and get back a plausible-looking split with a period the model invented. Force it to justify the period first.

Prompt:

You are given a time series: {paste CSV or summary: length, frequency, min, max, first 10 and last 10 points}. Frequency is {hourly/daily/weekly}. Before decomposing: 1) propose the seasonal period based on the frequency and what the metric is (business cycle, not just data shape); 2) state what evidence in the data supports it; 3) only then describe trend, seasonal amplitude and residual noise. If the series is shorter than 2 full seasonal cycles, say so and refuse to estimate seasonality.

More on the topic: “Data Science Prompts That Actually Work: 12 Recipes from EDA to Feature Engineering That Turn an LLM Into a Real Analyst Partner”.

Input example: 104 weekly revenue points. Expected answer: period 52, amplitude roughly 8-12% of level, trend up with a plateau after week 70. The failure mode: with 30 weekly points the model happily reports "annual seasonality" from 0.6 of a cycle.

Prompt 2: Separate an anomaly from an outlier

An anomaly is a point that breaks the process; an outlier is a point that breaks the chart. The distinction decides whether you page someone at 3 a.m. More on the topic: “Your Excel Chart Is Not an Analysis: LLM Prompts That Hunt Anomalies Before You Draw Anything”.

Prompt:

For each flagged point below, classify it as (a) isolated outlier, (b) level shift, (c) trend change, or (d) seasonal shift. For each: what would confirm your classification with two more data points, and what would falsify it. Do not classify a point as an anomaly if the same calendar position moved last year.

More on the topic: “Data Science and Machine Learning: A Realistic Step-by-Step Plan — Python, Statistics, Models and Getting Them Into Production”.

Input example: a spike at a sensor reading of 41.2 against a baseline of 22-24, followed by return to baseline. Expected: isolated outlier, confirm by checking the raw log for a reset event. The failure mode: the model calls a Black Friday spike an anomaly because it never looked at the calendar. More on the topic: “From Raw HTML to a Clean DataFrame: 14 LLM Prompts That Turn a Text Model Into a Data Extraction Engineer”.

Give the model the calendar, not just the numbers Paste public holidays and known campaign dates alongside the series. Most misclassified spikes are explained by a date the model simply did not have.

Prompt 3: Find the change point and prove it

This is where LLMs are weakest and most confident. A change point asks "when did the process change", and the model tends to answer with the largest single jump instead. More on the topic: “Making LLMs Speak Pandas and Polars: Prompts That Clean, Join, and Speed Up Your DataFrames Without Eating RAM”.

Prompt:

Candidate change points are listed below with a mean before and after over a 6-point window. For each candidate, argue whether it is a genuine change point or a seasonal shift, using the same calendar window one year earlier if available. Rank by confidence and name the test you would run in code (CUSUM, Chow, Bayesian online change point detection) to settle it.

More on the topic: “A/B Testing That Survives Scrutiny: Prompts That Make an LLM Your Statistician, Not Your Cheerleader”.

Input example: a step from 24 to 31 in mean daily active users at day 140, with the same step visible at day 140 of the previous year. Expected: seasonal shift, low confidence, verify against last year. The failure mode: the model reports a change point at the single maximum of the series.

Prompt 4: Pick a forecasting model with a reason, not a vibe

Prompt:

Series: {length, frequency, presence of trend, seasonality, missing values}. Recommend one of ARIMA/SARIMA, Prophet, or gradient boosting on lag features. Give: why this one, what it will get wrong on this series, minimum data length, and how to handle missing values. Do not recommend a model that needs more history than the series has.

Input example: 18 months of weekly data with strong annual seasonality and two gaps. Expected: SARIMA or Prophet, not gradient boosting — there is not enough history for lag features to learn the annual cycle. The failure mode: the model recommends XGBoost because it is popular, on a series with 78 points.

Prompt 5: Build a holdout that does not leak the future

The most expensive mistake in forecasting is a random train/test split on time data. The model will happily accept it.

Prompt:

Design a backtest for this series: rolling origin with a fixed horizon of {h} steps, at least 3 folds. Specify exactly which rows go into train and test for each fold, and list three ways a random split would inflate the score here. Then compute nothing — just give me the split plan.

Input example: 104 weekly points, horizon 8. Expected: folds ending at weeks 72, 80, 88, 96, each test set strictly after its train set. The failure mode: the model proposes train_test_split(shuffle=True) and calls it fine.

The one rule the LLM must never bend Every test point must come after every train point in that fold. If the model's split plan violates this, discard the whole answer — the score is meaningless regardless of what it equals.

Prompt 6: Ask what the model cannot see

Prompt:

Given this series and my conclusion that {your hypothesis}, list what you cannot verify from the data alone: external events, data pipeline changes, definition changes in the metric. For each, name the source I should check.

Input example: a metric that doubled after a dashboard migration. Expected answer: check whether the metric definition changed in the pipeline, not the business. This prompt catches the class of error no statistical test finds. More on the topic: “BI Analytics and Dashboards: What to Know Before You Start — Requirements, Pitfalls, and Real Practice”.

Where the LLM earns its place, and where it does not

The model is good at framing: choosing a period, naming a test, designing a backtest, listing falsification checks. It is bad at arithmetic on long series — it will misread a 200-point array and invent a peak. Run the decomposition, CUSUM and backtest in code; use the LLM to decide what to run and how to interpret it.

A practical division: paste the summary and a chart description into the chat, get the plan, then execute it in pandas or statsmodels and bring the numbers back for interpretation. For a deeper look at why the standard models fail on real series, see "Time Series Analysis: Why Prophet and ARIMA Break Where You Least Expect It".

If your series comes from sensors or device logs rather than a database, the log-reading prompts in "When the Board Blinks Wrong: Two Ways to Point an LLM at Arduino, ESP32 and IoT — Spec-First Sketching vs Log-Driven Autopsy" cover the raw-input side.

Start with prompt 3. If the model cannot tell a breakpoint from a seasonal shift on your data, every forecast built on top of it is decoration.

← All posts

Ask AI about this article

Ask a question about this article — ASI Biont will answer based on its text.