AI Anomaly Explanation
When a metric moves strangely, show which segments and events moved with it.
What it adds
An explanation attached to a detected outlier, naming the contributing segments, the baseline, and the magnitude.
What your agent is told to do
5
What your agent is told to do
5-
1
Detect the anomaly in code, not with the model. Define the baseline, the threshold, and the window with deterministic rules, and only invoke the model once something has already been flagged as unusual.
-
2
Do the segment comparison in code as well: break the flagged period down by the dimensions the app already supports, compute each segment's contribution, and hand the model the ranked contributions to describe.
-
3
Require the explanation to state the exact period, the baseline it was compared against, and the size of the deviation in the metric's own units. An explanation without those three is not checkable.
-
4
Word every finding as a correlation. The output may say which segments moved together with the anomaly; it must not say one caused the other, and the instruction to the model should say so directly.
-
5
Anomaly detection thresholds and the segment contribution calculation are shared with AI Trend Analysis, which owns the routine summary of a normal series. Build the metric computation once and let this feature consume it rather than defining a second baseline that disagrees with the first.
Edge cases it handles
8
Edge cases it handles
8- Segment comparisons must respect the viewer's data access. Building a contribution table across segments the user is not permitted to see leaks restricted data through the explanation even though the underlying screens are locked.
- Correlation presented as cause will be acted on. If two segments moved together, say so in those terms and do not let the model promote a coincidence into an explanation of why.
- When no segment explains a meaningful share of the deviation, the correct output is inconclusive. Return that plainly rather than naming the largest segment by default, which is usually just the biggest segment.
- The exact window, the baseline, and the magnitude must appear in the output. An explanation that says traffic dropped sharply without saying from what, to what, and when cannot be verified or dismissed.
- A metric that is simply low-volume will trip a naive threshold constantly. Require a minimum absolute volume before an anomaly is eligible for explanation, or the feature becomes a noise generator.
- A deployment, a pricing change, or a tracking change can produce a step that is real but not interesting. Let operators mark known events so the explanation can reference them instead of hunting for a segment.
- The model may be unavailable exactly when an incident is unfolding. The detected anomaly, its baseline, and its magnitude must still be shown from the deterministic layer with the prose absent.
- Explanations must be generated once per detected anomaly and stored, not recomputed each time someone opens the dashboard.
Definition of done
9
Definition of done
9- Anomalies are detected by deterministic rules before any model call is made.
- Segment contributions are computed in code and restricted to segments the viewer is permitted to see.
- Every explanation states the period, the baseline, and the magnitude of the deviation.
- Findings are worded as correlations and contain no causal claims.
- Weak or diffuse evidence produces an explicit inconclusive result.
- The anomaly, baseline, and magnitude remain visible when the model is unavailable.
- Each anomaly is explained once and the result is stored rather than regenerated per view.
- The feature matches the existing design system.
- No existing functionality is broken.
Related features
Retrieval-Augmented Generation
Retrieval-Augmented Generation
Ground AI answers in the app's own content by retrieving source passages first.
What it does
A retrieval layer that selects permitted passages from app content and supplies them to the model as cited evidence.
How it works
- 1 Decide which content is answerable from and treat everything else as out of scope. A retrieval feature pointed at the whole database returns confident answers about records nobody meant to expose.
- 2 Apply the requesting user's tenant, record, and field permissions during retrieval, before any passage is assembled into a request. Filtering the answer afterwards is too late — the content has already crossed the boundary.
- 3 Chunk on the content's own structure — sections, headings, rows, message boundaries — and carry enough surrounding context in each chunk that it still means something on its own.
Copy the prompt
No account needed
Add this feature to my app:
https://addthisfeature.com/x/retrieval-augmented-generation
AI Dashboard Insights
AI Dashboard Insights
Explain what actually changed on a dashboard, in the viewer's own filters and period.
What it does
A short generated commentary attached to a dashboard, describing the movements that matter under the filters currently applied.
How it works
- 1 Compute the numbers first, in the app, using the dashboard's existing queries with the viewer's active filters. Pass the model the computed figures and let it write the wording, never the raw rows to add up itself.
- 2 State the period and the comparison period explicitly in every insight. A sentence saying signups are up is meaningless without saying up against what.
- 3 Filter the input to metrics the viewer is permitted to see before it reaches the model. A commentary that mentions revenue to someone whose dashboard hides revenue is a permissions leak.
Copy the prompt
No account needed
Add this feature to my app:
https://addthisfeature.com/x/ai-dashboard-insights
AI Trend Analysis
AI Trend Analysis
Explain what a chart is actually showing, in sentences backed by computed numbers.
What it does
A written summary attached to a time series or metric set, describing direction, magnitude, and comparison period.
How it works
- 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 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 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.
Copy the prompt
No account needed
Add this feature to my app:
https://addthisfeature.com/x/ai-trend-analysis
How it works
-
1
Copy the link
Grab the Markdown instruction URL for this feature.
-
2
Give it to your AI
Paste it into Claude Code, Cursor, v0, Lovable — whatever you build with.
-
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.