Sub topic 11
Analytics: automated insights and trend explanations
This chapter assumes you know what a dashboard and a metric are. It also assumes you have read the chapter on anomaly detection, because automated insights start from a detected change and then try to explain it. You should also know, at a basic level, what a large language model (LLM) does.
What an automated insight is
An automated insight is a short finding that the platform writes for you without being asked. A typical example is "Signups rose 12% this week, mostly from paid search in Germany." Three steps produce it:
- Detect. A statistical check finds a metric that moved more than normal, as in the anomaly detection chapter.
- Explain. The system splits the change by dimensions such as channel, country, or device, and finds which slices account for most of the movement.
- Narrate. A template or an LLM turns the numbers into a sentence.
The first two steps are ordinary calculation. Only the third step usually involves a language model. This matters for trust: the numbers can be checked, and the wording is where errors can creep in.
How the explanation step works
The common technique is contribution analysis. For each slice, compare its value in the current period with the previous period, then see how much of the total change that slice explains.
last_week = {"search": 400, "email": 300, "social": 300}
this_week = {"search": 520, "email": 305, "social": 295}
total_change = sum(this_week.values()) - sum(last_week.values())
print(f"Total change: {total_change}")
contributions = {
channel: this_week[channel] - last_week[channel]
for channel in last_week
}
for channel, change in sorted(
contributions.items(), key=lambda item: abs(item[1]), reverse=True
):
share = change / total_change
print(f"{channel}: {change:+d} ({share:.0%} of the total change)")Total change is 120, and search accounts for +120, which is 100% of it. Social is slightly negative, so its share is -4%. Shares can exceed 100% or go negative when slices move in opposite directions. That is normal, not a bug.
Trend explanations and forecasts
Platforms also separate a time series into parts: a long-term trend, a repeating seasonal pattern (for example weekly cycles), and leftover noise. An explanation such as "the dip is a normal weekend pattern" comes from this split. A forecast extends the trend and seasonality forward and usually shows a range, not a single number.
Common errors
- Correlation read as cause. "Search drove the increase" means search contributed most of the change. It does not mean search caused it. A price change or a holiday may be the real cause, and the platform may not have that data.
- Too many comparisons. If the system checks hundreds of slices, some will look unusual by chance. Insights from tiny slices often disappear next week.
- Small samples. A 50% rise from 4 to 6 signups is a real number but a weak finding.
- Fluent but wrong narration. An LLM can write a confident sentence that overstates the data. Check the sentence against the table behind it.
- Missing context. The system does not know about your campaign calendar, a tracking outage, or a changed metric definition unless that data is connected.
Where to keep a person involved
Reading an insight is low risk. Acting on one, such as shifting budget, is not. Treat insights as leads for investigation. Keep a human decision between an insight and any spend or customer-facing change.
Exercise
A platform reports "Revenue fell 8% because of mobile users in Spain." The breakdown shows Spain mobile had 9 orders last week and 5 this week. Name two reasons to be cautious before acting.
Show answer
First, the sample is tiny, so a change of 4 orders can easily be random noise. Second, "because of" claims a cause, but contribution analysis only shows where the change occurred. A tracking problem, a holiday, or a stock issue could explain it. Check the larger slices and known events before acting.