Time Series Forecasting AI Prompts for Data Scientists
TL;DR
- AI prompts help data scientists systematically approach time series forecasting problems with structured methodologies
- Prompt frameworks cover data exploration, model selection, feature engineering, and forecasting workflow design
- The key is providing comprehensive temporal context and domain knowledge for accurate forecasting guidance
- AI-assisted forecasting complements but does not replace statistical expertise and model validation rigor
Introduction
Time series forecasting sits at the intersection of statistical rigor and practical prediction. The domain expert understands why patterns exist. The data scientist chooses appropriate methods. The engineer deploys scalable solutions. Getting any step wrong produces forecasts that fail in production.
The evolution from classical statistical methods like ARIMA to AI-driven models has introduced new complexity: how do you communicate intent to models that don’t consume traditional feature vectors? Prompt engineering for time series is emerging as the bridge between human intent and model capability.
AI prompting offers data scientists structured frameworks for approaching forecasting problems systematically. By providing comprehensive temporal context and domain knowledge, AI helps navigate the decisions that determine whether forecasts perform in production or quietly accumulate prediction error.
Table of Contents
- The Time Series Forecasting Challenge
- Data Exploration Prompts
- Model Selection Prompts
- Feature Engineering Prompts
- Model Development Prompts
- Forecasting Workflow Prompts
- Model Validation Prompts
- FAQ
- Conclusion
The Time Series Forecasting Challenge
Time series forecasting challenges differ from standard supervised learning in fundamental ways. Temporal dependence means observations aren’t independent. Future values depend on past values in structured ways. This creates both opportunity—patterns to exploit—and complexity—patterns that can mislead.
The classic challenge is stationarity: many time series exhibit trends or seasonality that violate stationarity assumptions. A forecast that ignores non-stationarity extrapolates trends beyond reasonable bounds. A forecast that over-differences loses signal.
The modern challenge is model selection. Classical methods (ARIMA, Exponential Smoothing) provide interpretability and theoretical foundations. Modern methods (Prophet, Neural Prophet, Transformer-based) provide flexibility and handles on complex patterns. Hybrid approaches combine classical insights with modern capacity.
AI helps by providing structured decision frameworks that guide method selection, feature engineering, and validation. The goal is systematic thinking that produces robust forecasts, not black-box prediction.
Data Exploration Prompts
Understand your temporal data before selecting methods.
Temporal Pattern Identification
Explore temporal patterns in [DATASET_NAME].
Data overview:
- Time range: [START] to [END]
- Frequency: [DAILY/WEEKLY/MONTHLY/etc]
- Number of observations: [COUNT]
- Number of series (if multivariate): [COUNT]
Initial pattern observations:
- Visible trends: [YES/DESCRIPTION]
- Visible seasonality: [YES/DESCRIPTION]
- Visible cycles: [YES/DESCRIPTION]
- Irregular fluctuations: [YES/DESCRIPTION]
Generate:
1. Pattern summary:
| Pattern Type | Present? | Strength | Description |
2. Stationarity assessment:
- Visual inspection results: [NOTES]
- Statistical test recommendations: [TESTS_TO_RUN]
- Concern level: [LOW/MEDIUM/HIGH]
3. Heteroscedasticity check:
- Variance stability: [STABLE/CHANGING]
- Transformation recommendations: [IF_NEEDED]
4. Outlier analysis:
- Apparent outliers: [LIST/DATES]
- Potential causes: [INVESTIGATE]
- Treatment options: [LIST]
5. Missing data assessment:
- Missing patterns: [RANDOM/SYSTEMATIC]
- Extent: [PERCENTAGE]
- Imputation recommendations: [APPROACH]
Time Series Decomposition Analysis
Perform decomposition analysis on [SERIES_NAME].
Series characteristics:
- Trend behavior: [INCREASING/DECREASING/STABLE]
- Seasonal pattern: [PRESENCE/ABSENCE]
- Cycle length if present: [ESTIMATE]
Data quality:
- Missing values: [YES/NO/PERCENTAGE]
- Outliers: [YES/NO]
- Structural breaks: [YES/NO]
Decomposition objectives:
- Understanding components: [PRIMARY]
- Forecasting preparation: [PRIMARY]
- Anomaly detection: [PRIMARY]
Generate:
1. Decomposition approach recommendation:
Additive vs. Multiplicative:
- Choice rationale: [WHY]
- When each appropriate: [GUIDANCE]
Classical vs. STL:
- Classical: [WHEN]
- STL (Seasonal-Trend Loess): [WHEN]
2. Component extraction:
- Trend extraction method: [WHAT]
- Seasonal period selection: [JUSTIFICATION]
- Residual analysis: [WHAT_TO_LOOK_FOR]
3. Decomposition validation:
- Component interpretability: [CHECK]
- Residual characteristics: [SHOULD_BE_NOISE]
- Reconstruction error: [LOW/HIGH]
4. Feature engineering readiness:
- Components as features: [USE_CASE]
- Detrended series: [USE_CASE]
- Deseasonalized series: [USE_CASE]
Cross-Correlation Exploration
Explore lead-lag relationships for multivariate forecasting.
Target series: [WHAT_YOU'RE_FORECASTING]
Candidate predictor series: [POTENTIAL_CAUSES]
Time ranges:
- Target: [START:END]
- Predictors: [START:END]
Generate:
1. Correlation analysis:
| Predictor | Lag 0 | Lag 1 | Lag 2 | Lag 3 | Peak Lag |
2. Lead-lag interpretation:
- Predictor leads target: [YES/NO/UNCERTAIN]
- How much lead time: [LAG_ESTIMATE]
- Actionable forecasting use: [YES/NO]
3. Granger causality assessment:
- Statistically significant: [YES/NO]
- Practical significance: [DISCUSSION]
- Caveats: [WARNINGS]
4. Synchronous vs. asynchronous relationships:
- Same-time correlation: [STRENGTH]
- Delayed relationship: [LAG]
- Leading indicator potential: [ASSESSMENT]
5. Data alignment check:
- Frequency mismatch: [YES/NO]
- Time zone differences: [YES/NO]
- Holiday calendar differences: [YES/NO]
Model Selection Prompts
Choose appropriate methods based on data characteristics and objectives.
Method Selection Framework
Select appropriate forecasting methods for [SERIES_NAME].
Series characteristics:
- Length: [OBSERVATIONS]
- Frequency: [GRANULARITY]
- Patterns present: [TREND/SEASONAL/CYCLIC]
- Stationarity: [STATIONARY/NON_STATIONARY]
Forecast requirements:
- Horizon: [HOW_FAR_AHEAD]
- Frequency: [SAME_AS_DATA?]
- Uncertainty quantification: [NEEDED?]
- Interpretability: [REQUIRED?]
Computational constraints:
- Training time budget: [LIMIT]
- Inference time budget: [LIMIT]
- Memory constraints: [LIMIT]
Generate:
1. Method recommendation matrix:
| Method | Strengths | Limitations | Fit Score |
Consider:
- ARIMA/SARIMA: Classical, interpretable, stationary-dependent
- Exponential Smoothing (ETS): Simple, good baseline, handles trend/seasonality
- Prophet: Handles holidays/change points, decomposable, scalable
- Neural methods (N-BEATS, PatchTST): Complex patterns, data-hungry
- Transformer-based: Long horizons, multi-modal, needs tuning
- Hybrid approaches: Combines classical + neural strengths
2. Recommended starting approach:
- Primary method: [WHY]
- Baseline comparison: [WHICH]
- Ensemble candidate: [WHY]
3. Data preparation requirements:
- Stationarity treatment: [WHAT]
- Seasonality handling: [HOW]
- Feature engineering: [WHAT]
4. Quick validation plan:
- Holdout strategy: [HOW]
- Error metrics: [LIST]
- Minimum acceptable performance: [THRESHOLD]
Model Family Comparison
Compare [MODEL_FAMILY_A] vs [MODEL_FAMILY_B] for [FORECASTING_PROBLEM].
Model A: [DESCRIPTION/ASSUMPTIONS]
Model B: [DESCRIPTION/ASSUMPTIONS]
Data characteristics:
[FROM_PRIOR_ANALYSIS]
Business context:
- Forecast user: [WHO]
- Decision依赖于forecast: [HOW]
- Cost of forecast error: [ASSESSMENT]
Generate:
1. Theoretical comparison:
| Aspect | Model A | Model B |
- Assumption requirements
- Data requirements
- Interpretability
- Computational cost
- Handles missing data
- Uncertainty quantification
2. Empirical comparison plan:
- Same training/test split: [ENSURE]
- Same feature engineering: [ENSURE]
- Error metric alignment: [ENSURE]
3. Business fit assessment:
| Criterion | Model A | Model B | Weight |
4. Recommendation with rationale:
- Winner: [WHICH]
- Situations to prefer A: [WHEN]
- Situations to prefer B: [WHEN]
- Hybrid potential: [EXPLORE?]
Feature Engineering Prompts
Create informative features that capture temporal signal.
Temporal Feature Engineering
Develop temporal features for [SERIES_NAME].
Existing features (if any): [LIST]
Series characteristics:
- Time granularity: [GRANULARITY]
- Calendar regularities: [PATTERNS]
- Domain knowledge: [WHAT_YOU_KNOW]
Generate:
1. Calendar-based features:
DateTimeIndex features:
- Year: [USE?]
- Quarter: [USE?]
- Month: [USE?]
- Week of year: [USE?]
- Day of month: [USE?]
- Day of week: [USE?]
- Is weekend: [USE?]
- Hour of day (if applicable): [USE?]
Calendar-based:
- Month start/end: [USE?]
- Quarter start/end: [USE?]
- Year start/end: [USE?]
- Business day indicator: [USE?]
- Holiday indicators: [SPECIFY_HOLIDAYS]
2. Lag features:
- Direct lags: [1, 2, 3, ...]
- Seasonal lags: [PERIOD, 2*PERIOD, ...]
- Rolling window lags: [MEAN_7, MEAN_14, ...]
3. Difference features:
- First difference: [USE?]
- Seasonal difference: [USE?]
- Second difference: [USE?]
4. Trend features:
- Linear trend: [USE?]
- Piecewise linear: [USE?]
- Polynomial: [USE?]
5. Interaction features:
- Month x DayOfWeek: [IF_RELEVANT]
- Holiday x Weekend: [IF_RELEVANT]
External Variable Integration
Integrate external variables for [FORECASTING_PROBLEM].
Target series: [WHAT]
External candidates: [LIST]
Data availability:
| Variable | Frequency | Available Lag | Quality |
Domain knowledge:
[WHAT_CAUSES_FLUCTUATIONS_IN_TARGET]
Generate:
1. Causal mechanism assessment:
| Variable | Mechanism | Lag | Strength | Available in Forecast Horizon? |
2. Feature preparation:
- Alignment: [HOW_TO_ALIGN]
- Missing handling: [APPROACH]
- Normalization: [IF_NEEDED]
3. Leading indicator analysis:
- Which variables predict target: [IDENTIFIED]
- Lead time: [HOW_MUCH]
- Reliability: [ASSESSMENT]
4. Integration approach:
- Direct feature inclusion: [HOW]
- Hierarchical reconciliation: [IF_MULTI-SERIES]
- Prophet-style holidays: [IF_APPLICABLE]
5. Collinearity and redundancy:
- Redundant variables: [IDENTIFY]
- Dimension reduction if needed: [METHOD]
Model Development Prompts
Build and tune forecasting models systematically.
ARIMA Development Workflow
Develop ARIMA model for [SERIES_NAME].
Series: [DATA_DESCRIPTION]
Stationarity status: [KNOWN_FROM_PRIOR]
Seasonal period: [IF_APPLICABLE]
Generate:
1. Preprocessing:
- Differencing needed: [ORDERS]
- Transformation (log/Box-Cox): [IF_NEEDED]
- Outlier treatment: [IF_NEEDED]
2. ARIMA order selection:
ACF/PACF analysis:
- ACF behavior: [DECAYS/SHUTS_OFF/SINUSOIDAL]
- PACF behavior: [CUTS_OFF/SINUSOIDAL]
- Interpretation: [AR_ORDER, MA_ORDER]
AIC/BIC comparison:
| Model | AIC | BIC | Parameters |
Residual diagnostics:
- Ljung-Box test: [RESULT]
- Normality: [RESULT]
- Heteroscedasticity: [RESULT]
3. Final model specification:
- Order (p,d,q): [SELECTED]
- Seasonal order (P,D,Q,s): [IF_APPLICABLE]
- Formula: [WRITE_OUT]
4. Diagnostic checks:
- Residual ACF: [PLOT_DESCRIPTION]
- QQ-plot: [NORMAL?]
- Forecast bias: [CHECK]
5. Forecast generation:
- Horizon: [HOW_FAR]
- Prediction intervals: [WIDTH]
- Assumptions validated: [YES/NO]
Neural Forecasting Development
Develop neural forecasting model for [SERIES_NAME].
Model type options:
- N-BEATS: [GOOD_FOR_UNIVARIATE/INTERPRETABLE]
- PatchTST: [GOOD_FOR_TRANSFORMER/BENCHMARK]
- Informer: [GOOD_FOR_LONG_HORIZONS]
- Autoformer: [GOOD_FOR_DECOMPOSITION]
- TimesNet: [GOOD_FOR_MULTI-PATTERN]
Data characteristics:
- Training set size: [OBSERVATIONS]
- Number of series: [UNIVARIATE/MULTIVARIATE]
- Pattern complexity: [ASSESSMENT]
Compute resources:
- GPU available: [YES/NO]
- Training time budget: [LIMIT]
- Batch size constraints: [LIMIT]
Generate:
1. Model selection rationale:
- Recommended model: [WHY]
- Alternatives if this fails: [LIST]
- Baseline to beat: [WHAT]
2. Architecture configuration:
- Lookback window: [HOW_FAR_TO_LOOK]
- Forecast horizon: [HOW_FAR_TO_PREDICT]
- Hidden dimensions: [RECOMMENDATION]
- Number of layers: [RECOMMENDATION]
3. Training setup:
- Loss function: [MSE/QUANTILE/OTHER]
- Optimizer: [ADAM/ADAMW/OTHER]
- Learning rate schedule: [APPROACH]
- Early stopping: [PATIENCE]
4. Hyperparameter tuning plan:
- Key parameters to tune: [LIST]
- Search strategy: [GRID/RANDOM/BAYESIAN]
- Validation strategy: [TIME_SERIES_CV?]
5. Performance benchmarks:
- Baseline MAE/MSE: [FROM_SIMPLE_MODEL]
- Target improvement: [PERCENTAGE]
- Interpretability requirements: [YES/NO]
Forecasting Workflow Prompts
Design end-to-end forecasting workflows for production.
Production Forecasting Pipeline
Design production forecasting pipeline for [USE_CASE].
Forecast requirements:
- Output frequency: [HOW_OFTEN]
- Forecast horizon: [HOW_FAR]
- Latency requirement: [FAST?]
- Freshness requirement: [HOW_CURRENT]
Data pipeline:
- Data sources: [LIST]
- Data frequency: [HOW_OFTEN]
- Data latency: [DELAY]
- Aggregation level: [GRANULARITY]
Integration:
- Downstream consumers: [WHO]
- API vs batch: [APPROACH]
- Alerting on forecast drift: [NEEDED?]
Generate:
1. Pipeline architecture:
| Stage | Input | Output | Processing | Latency |
2. Scheduling design:
- Data extraction: [WHEN]
- Feature computation: [WHEN]
- Model inference: [WHEN]
- Quality checks: [WHEN]
- Publishing: [WHEN]
3. Data freshness handling:
- Missing data strategy: [APPROACH]
- Backfill approach: [HOW]
- Drift detection: [METHODS]
4. Quality assurance:
- Forecast range checks: [RULES]
- Comparison to baseline: [WHAT]
- Anomaly flags: [THRESHOLDS]
5. Monitoring and alerting:
- Forecast accuracy tracking: [METRIC]
- Data quality monitoring: [WHAT]
- Alert routing: [HOW]
Ensemble Forecast Development
Build ensemble forecasting system for [SERIES_NAME].
Component models:
- Model 1: [TYPE/DESCRIPTION]
- Model 2: [TYPE/DESCRIPTION]
- Model 3: [TYPE/DESCRIPTION]
Ensemble objectives:
- Reduce variance: [YES/NO]
- Improve accuracy: [YES/NO]
- Handle model disagreement: [YES/NO]
Training data:
- Series length: [OBSERVATIONS]
- Train/validation split: [HOW]
Generate:
1. Ensemble method selection:
| Method | How It Combines | Best For | Risk |
- Simple average: [DESCRIPTION]
- Weighted average: [DESCRIPTION]
- Stacking: [DESCRIPTION]
- Selection (pick best): [DESCRIPTION]
2. Weight optimization:
- Method: [HOW]
- Validation strategy: [TIME_SERIES_CV]
- Reoptimization frequency: [WHEN]
3. Disagreement handling:
- When models agree: [USE_ENSEMBLE]
- When models disagree: [PICK_BEST/USE_WIDER_INTERVALS]
- Conflict threshold: [WHEN]
4. Performance assessment:
- Ensemble vs. components: [COMPARE]
- Variance reduction: [MEASURED?]
- Forecast stability: [MEASURED?]
5. Production considerations:
- Computational cost: [INCREASE]
- Interpretability impact: [WHAT]
- Debugging complexity: [INCREASE]
Model Validation Prompts
Validate forecasting models rigorously before deployment.
Time Series Cross-Validation
Implement time series cross-validation for [MODEL_NAME].
Model: [DESCRIPTION]
Series: [SERIES_NAME]
Cross-validation strategy:
- Number of folds: [RECOMMEND_5+]
- Minimum training size: [ENSURE_ENOUGH_DATA]
- Forecast horizon per fold: [WALK_FORWARD]
Error metrics:
- Point forecast accuracy: [MAE/MSE/RMSE]
- Interval accuracy: [COVERAGE]
- Distribution accuracy: [IF_QUANTILES]
Generate:
1. CV structure:
| Fold | Train End | Test Start | Test End | Train Size |
2. Rolling window vs. expanding window:
- Rolling: [WHEN_APPROPPRIATE]
- Expanding: [WHEN_APPROPPRIATE]
- Chosen approach: [WHY]
3. Error analysis across folds:
| Fold | MAE | RMSE | MAPE | Coverage | Notes |
4. Stability assessment:
- Error variation across folds: [STABLE?]
- Error pattern by horizon: [TREND?]
- Seasonal variation in errors: [PATTERN?]
5. Validation conclusions:
- Expected out-of-sample performance: [ESTIMATE]
- Confidence in forecast: [ASSESSMENT]
- Minimum acceptable performance: [THRESHOLD]
Residual Diagnostics
Perform residual diagnostics for [MODEL_NAME] on [SERIES_NAME].
Residuals from model: [CALCULATED]
Diagnostic objectives:
- Check model adequacy: [YES]
- Identify systematic errors: [YES]
- Guide model improvement: [YES]
Generate:
1. Residual characteristics:
- Mean: [SHOULD_BE_ZERO]
- Standard deviation: [RECORD]
- Skewness: [SHOULD_BE_ZERO]
- Kurtosis: [SHOULD_BE_NORMAL]
2. Temporal structure in residuals:
- ACF of residuals: [PLOT/PATTERN]
- Ljung-Box test: [RESULT]
- Interpretation: [ARE_RESIDUALS_WHITE_NOISE?]
3. Heteroscedasticity check:
- Residuals vs. fitted: [PATTERN?]
- ARCH-LM test: [RESULT]
- If heteroscedastic: [GARCH?]
4. Outlier analysis:
- Large residuals: [LIST]
- Potential causes: [INVESTIGATE]
- Treatment options: [LIST]
5. Model improvement recommendations:
- Systematic errors identified: [LIST]
- Missing structure: [WHAT]
- Next steps: [PRIORITIZED]
FAQ
When should I use classical statistical methods versus neural network methods?
Classical methods (ARIMA, Exponential Smoothing) excel when data is limited, patterns are simple, and interpretability matters. Neural methods excel when data is abundant, patterns are complex, and accuracy outweighs interpretability. Start with classical methods as baselines. Add neural methods when baselines fail and you have sufficient data.
How do I handle multiple related time series?
Consider hierarchical forecasting if series aggregate (product hierarchies, geographic hierarchies). Pool information across series when they share patterns. Use global models when series are too short individually but sufficient in aggregate. Prophet, N-BEATS, and Transformer-based models handle multi-series training well.
What is the minimum data required for reliable forecasting?
Rules of thumb: at least 50 observations for classical methods, 200+ for neural methods. Seasonal patterns require at least 2-4 complete seasonal cycles. For rare events, survival analysis or specialized count models may be more appropriate than standard forecasting.
How do I incorporate domain knowledge into forecasting?
Domain knowledge shapes feature engineering, model selection, and forecast adjustment. Encode known causal factors as features. Constrain forecasts within domain-relevant bounds. Override model forecasts when domain experts know factors the model cannot capture. Document overrides and monitor their accuracy.
When should I update my forecasting models?
Retrain when data patterns shift (concept drift), when forecast accuracy degrades, or when new data substantially changes model inputs. Set up automated monitoring for accuracy degradation. For stable patterns, monthly or quarterly retraining suffices. For volatile data, consider online learning approaches.
Conclusion
Time series forecasting demands systematic approaches that balance statistical rigor with practical constraints. The frameworks in these prompts help data scientists navigate model selection, feature engineering, and validation systematically—reducing ad-hoc decisions that produce fragile forecasts.
AI prompting helps by encoding forecasting best practices into reusable structures. The goal is not to automate judgment but to ensure that judgment happens systematically, with appropriate consideration of data characteristics, business requirements, and model limitations.
Invest in understanding your data before choosing methods. A simple ARIMA on well-prepared data outperforms a neural network on poorly-understood data. Build from baselines, validate rigorously, and deploy incrementally. The forecast that reaches production and actually gets used beats the theoretically perfect forecast that never leaves the notebook.