Skip to content

Feedback loop: user verdicts on findings for false-positive learning #74

@andthattoo

Description

@andthattoo

Summary

Findings currently flow one direction: agent -> user. Users have no way to signal whether a finding was useful, a false positive, or irrelevant. Adding a feedback mechanism is the highest priority learning feature — without user signal, cross-run memory and style preferences have nothing meaningful to learn from.

Goals

  • Let users mark each finding with a verdict: false positive, accepted, or won't fix
  • Aggregate verdicts into a per-org FeedbackProfile keyed by (org, vulnerability_class)
  • Use the profile to suppress known noise, calibrate severity, and track precision over time

Proposed Changes

1. user_verdict field on ExploitRecord

Add an enum field to the existing ExploitRecord schema:

class UserVerdict(str, Enum):
    PENDING = "pending"
    FALSE_POSITIVE = "false_positive"
    ACCEPTED = "accepted"
    WONT_FIX = "wont_fix"

2. FeedbackProfile model

A new model that aggregates verdicts across runs for an org:

  • Per vulnerability class: total count, FP count, average user-assigned severity
  • Suppression rules derived from repeated FP verdicts (e.g. "stop reporting informational gas optimizations for this org")
  • Precision tracking: FP rate over sliding window of N runs

3. Profile-aware prompt injection

Feed the FeedbackProfile into analyzer/verifier prompts as few-shot examples of what to skip or emphasize:

  • Analyzer prompt: "These vulnerability classes have been consistently marked as false positives for this org: ..."
  • Verifier prompt: "Severity calibration — this team typically downgrades reentrancy from critical to medium"

4. Precision metrics

Surface to the user: "Your false positive rate dropped from 40% to 15% over 10 runs" — this is what makes users feel the product learning.

Context

  • State infrastructure already in place: LocalStateManager, ExploitRecord, RunRecord
  • This is the recommended first step from the product learning roadmap (docs/product-learning.md)
  • Cross-run memory ( feat: Some big changes #2) and fix style preferences (feat: proper packaging #3) depend on this signal

Metadata

Metadata

Assignees

Labels

No labels
No labels
No fields configured for Feature.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions