Skip to content
This repository was archived by the owner on Nov 25, 2026. It is now read-only.
This repository was archived by the owner on Nov 25, 2026. It is now read-only.

Trigger evals: confusion matrix, precision/recall/F1 and flake rate #143

Open

Description

@CloneOfAlex

Describe your idea

Have run_triggers.py report a confusion matrix over should / should-not queries, plus precision, recall, F1 and a per-query flake rate.

Why is this needed?

Description optimisation needs one number to drive. A raw pass count hides the trade-off between over-triggering and under-triggering, and a query that triggers 1 of 3 times is unstable rather than a pass.

How should it work?

  • summary.matrix = {tp, fp, tn, fn, error}, precision, recall, f1.
  • Per query: flake = min(rate, 1 - rate), flagged when above 0.2.
  • --min-f1 threshold for CI gating.
  • The description-optimisation reference uses F1, not pass count, as its objective.

PR

Happy to help implement this if the direction is agreed.

Activity

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

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions