AddThisFeature

AI Trend Analysis

Explain what a chart is actually showing, in sentences backed by computed numbers.

involved AI Analysis & Search

What it adds

A written summary attached to a time series or metric set, describing direction, magnitude, and comparison period.

What your agent is told to do

5
  1. 1

    Compute every number in ordinary code before the model is involved: the change, the rate, the comparison period, the baseline, the seasonal adjustment. The model writes prose about figures it is given and must never produce a figure of its own.

  2. 2

    State the comparison window and the time zone in the summary text, resolved from the workspace's configured zone rather than the server's. A change described as week over week is meaningless without saying which weeks.

  3. 3

    Instruct the model to describe what the data shows and to stop there. Do not let it assert causes, attribute movement to campaigns or releases, or predict what happens next.

  4. 4

    Detect the conditions under which a summary should not be written — too few data points, a gap in collection, a tracking change mid-window — and skip generation with a plain explanation rather than narrating noise.

  5. 5

    This entry owns the routine explanation of a normal series. Explaining a specific outlier belongs to AI Anomaly Explanation, and describing projected future values belongs to AI Forecast Narrative. Share the same computed-metrics layer across all three and do not let this feature drift into either.

Edge cases it handles

8
  • Every figure that appears in the prose must have come from the deterministic calculation. Cross-check the numbers in the generated text against the computed values and reject the summary if they disagree, because a wrong number in a confident sentence is the worst possible output.
  • A seasonal pattern, a recurring weekly cycle, and a genuine trend all look like movement. Feed the model the seasonally adjusted view alongside the raw one and require it to say which it is describing.
  • A single large spike can dominate an average and make a flat series look like growth. Identify outliers in code and tell the model they are outliers so it does not describe a one-off as a trend.
  • Sparse periods, missing days, and a metric whose definition or tracking changed mid-window must suppress the summary or carry an explicit caveat, not be silently averaged over.
  • Causal language must be blocked. A summary claiming the drop was caused by anything is stating something the data cannot support and must be treated as a defect.
  • The summary must be cached against the exact data window and filter set that produced it, or a user changing the date range will read last week's prose above this week's chart.
  • If the model times out or returns truncated text, show the chart alone. A half-finished sentence under a graph is worse than silence.
  • Regenerating a summary on every filter change on a dashboard is a runaway cost. Generate on demand or on a schedule, with a per-workspace ceiling.

Definition of done

9
  • All numbers in the summary come from deterministic calculation and are verified to match the underlying computation.
  • The comparison period and time zone are stated explicitly in the text.
  • Trend, seasonality, and one-off spikes are distinguished rather than conflated.
  • Sparse, incomplete, or definition-changed data suppresses the summary or produces an explicit caveat.
  • No summary asserts a cause for the movement it describes.
  • Summaries are cached against the data window and filters that produced them, and generation is rate-limited.
  • A model timeout or truncated response leaves the chart rendered with no summary.
  • The feature matches the existing design system.
  • No existing functionality is broken.

Related features

How it works

  1. 1

    Copy the link

    Grab the Markdown instruction URL for this feature.

  2. 2

    Give it to your AI

    Paste it into Claude Code, Cursor, v0, Lovable — whatever you build with.

  3. 3

    It inspects, then implements

    Your agent reads your existing app first, then adds the feature to fit it.

Works with your stack

These instructions are written to adapt. They tell the agent to detect your framework, match your existing design system, and reuse what you already have — rather than assuming a particular stack.

Need it tighter than that? Customize the feature and tell it exactly what you're running.