# Demand forecasting explained

Flowlity uses probabilistic forecasting to predict future demand. Unlike a single-point forecast, probabilistic forecasting produces a range of likely outcomes — a **confidence interval** — that reflects the uncertainty inherent in any prediction. This gives planners a more realistic picture of what to expect and feeds directly into inventory optimization.

### How it works

The forecasting engine (powered by the Forecast Agent) runs weekly and learns continuously from your data. It combines several inputs:

* **Cleaned past demand** — Historical demand after Flowlity has removed anomalies, noise, and **price and promotion effects**. Demand is normalized to the last observed base price so that promotional spikes do not distort the baseline forecast — this produces a more accurate estimate of underlying demand and enables Flowlity to properly measure the true uplift of promotions. The Demand Anomaly Agent handles this cleaning automatically.
* **Raw past demand** — The original, unmodified demand data from your system, kept for reference.
* **Similar products** — For new or sparse items, the Product Similarity Agent identifies analogous products whose history helps bootstrap a reliable forecast.
* **Seasonality** — When enabled, the model captures recurring seasonal patterns.
* **Forecast events** — Promotions, launches, or market shifts that you define in [Forecast events settings](/settings/forecast-events.md).

### Reading the forecast in the Demand module

In the product detail view of the [Demand](/modules/demand.md) module, you can toggle several forecast-related series:

* **Flowlity forecast** — The AI-generated probabilistic forecast, shown with a shaded confidence interval.
* **Final forecast** — The value actually used downstream in Planning. This is either the Flowlity forecast or your manual override ("My forecast").
* **My forecast** — Where you can manually override the AI forecast for any period.

When "My forecast" has a value for a period, it replaces the Flowlity forecast as the final forecast for that period.

### Forecast accuracy

The **Forecast accuracy** view in the Demand module lets you compare past forecasts against actual demand. This helps you identify products where the AI performs well and products that may benefit from manual adjustments or additional data (e.g. forecast events, similar products). See the [Metrics glossary](/concepts/metrics-glossary.md) for detailed definitions of accuracy metrics (MAPE, MAE, FVA) and how to interpret them.

### Agents involved

* **Forecast Agent** — Powers the probabilistic forecasting engine. Runs weekly.
* **Demand Anomaly Agent** — Cleans historical demand by detecting and replacing outliers, shortages, and promotional spikes. Runs weekly.
* **Product Similarity Agent** — Finds the top 5 most similar products to improve forecasts for new or sparse items. Runs weekly.

### Related pages

* [Forecast events and demand adjustments](/concepts/forecast-events.md) — How events and anomaly corrections modify the forecast.
* [Demand](/modules/demand.md) — Where you view and adjust forecasts.
* [Agents](/modules/agents.md) — Monitor the Forecast, Demand Anomaly, and Similarity agents.
* [Products](/settings/products.md) — Configure forecast strategy per product.
* [Investigate and fix demand anomalies](/how-tos/investigate-demand-anomalies.md) — Step-by-step guide.
* [Metrics glossary](/concepts/metrics-glossary.md) — Definitions of MAPE, MAE, FVA, and demand predictability.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.flowlity.com/concepts/demand-forecasting.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
