Skip to content

Improve the exploration and findings of agents using the flexviz-explore skill #78

Open

Description

@jvdd

Goal

Agents that use the flexviz-explore skill should find more meaningful events in the data, and report them so the human can check them: which column, when, how large, and in which view.

Evidence

The burst_found gate in tests/agent_eval checks that the findings name the burst column and a time inside the burst window. On implicit-channels on 2026-09-23 it passed 1 of 5 runs with the skill of PR #77, and 1 of 3 with the skill on main. Before that it failed 7 of 19 runs on 2026-09-19, in both arms.

In the failing runs the agent stops at global per-column statistics. That shows which column is odd (sensor_7: std 4, max 24). But it dilutes a local event (4% of the rows) and never gives a time. The runs that passed happened to group by day. The skill's only analysis guidance is one sentence in step 8.

First idea: an "events" step before the first findings

One lazy pass that buckets the time axis (about 300 buckets) and computes row count, mean and std per numeric column. A bucket far from the column's median bucket, measured in median absolute deviations, is an event:

  • a level shift (mean);
  • a variance burst (std);
  • a flatline (std near 0);
  • a gap (few rows).

A prototype on the eval fixture found the sensor_7 burst: flagged from 09:03 to 20:10 on 2024-01-02, truth 09:20 to 20:26. It took 40 ms at 1M rows and 189 ms at 10M rows, and returned about 300 rows. Two lessons from the prototype:

  • Alias the min/max expressions of the time column, or Polars reports a duplicate output name.
  • Drop the partial first and last bucket, or the row count raises a false alarm.
lo, hi = lf.select(lo=pl.col(t).min(), hi=pl.col(t).max()).collect().row(0)
every = f"{max(1, int((hi - lo).total_seconds() / 300))}s"
b = (lf.group_by(pl.col(t).dt.truncate(every).alias("bucket"))
       .agg(pl.len().alias("rows"),
            *[pl.col(c).mean().alias(f"{c}|mean") for c in cols],
            *[pl.col(c).std().alias(f"{c}|std") for c in cols])
       .sort("bucket").collect(engine="streaming"))
b = b.slice(1, b.height - 2)  # first and last buckets are partial

Other directions

  • A reporting rule. Each finding names the column, the time window, and the size against the baseline, for example "sensor_7 is up by about 20 from 2024-01-02 09:20 to 20:26 (fv:2)".
  • Show the event. Record an entry zoomed to the window, so the human sees it. With linked axes, one zoom moves every linked time figure. Today the agent has to read figure uids from dash.to_spec() and set every linked key by hand. A viewport argument on share_url (for example viewport={"timestamp": (a, b)}) would make this one call.
  • Beyond time series. Cross-channel changes (correlation shifts), category mixes that drift over time, and outliers in histogram tails.

Measuring it

Keep the skill short. Measure every change against the reference arm, with 3 runs on implicit-channels, implicit-sensors and contextual-pump. Check holdout-implicit-logger too, without tuning on it. Run negative-tiny once to check that small data does not trigger the step. The first round costs about $5–7 and takes 25–35 minutes.

Activity

  1. added
    enhancement
    on Sep 23, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancement

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions