[Feat] Confidence-gated deferral: hand low-confidence browser steps to the chat model and measure the trade-off

Offen
#94 2 Kommentare 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen

Maintainer antworten meist innerhalb von 1 Tag

@githubergsx arbeitet bereits daran.

Seit 31.10.2026.

  • #107 von @githubergsx — offen

Bewertung

Schwierigkeit
5/5
Geschätzter Aufwand
Über eine Woche
Anfängerfreundlichkeit
25/100
Issue-Typ
Feature
Klarheit
Klar beschrieben
Aktivitätsstatus
Aktiv
Tech-Stack
python
Bereich
ai-infra-agents

Rechercherichtung

Start with s1a/browser/decision_model.py and trace how browser steps use confidence, pass candidates, and call the fallback chat model; read the related issues #89, #91, and #63 for context. The scope also calls for an offline calibration helper, tests with fakes, and a live comparison recorded under docs/results/. Done means the off by default behavior stays unchanged, deferrals are auditable and validated, and the results report success, wall time, cost, and deferral rate.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Beschreibung

enhancement

Why

The README's pitch is that a System 1 decision model answers each step with probabilities, so "calling code can act above a threshold and escalate below it". In the browser front today nothing does that: BrowserDecisionModel (s1a/browser/decision_model.py) always acts on the decision model's top choice, and the wrapped chat model (fallback) is only used for non-browser turns, typed values and the bounded-recovery plan. The per-step confidence is recorded but never used.

Recent work shows the gate is where most of the cost/quality trade-off sits:

#89 lists exactly this as its follow-up ("Adding a confidence gate or System-2 fallback ... once the number means one thing"), and #91 makes confidence = max_k p_k on every backend, so the number is now comparable across Jev, Laya, CLM and Cua.

Proposed scope (one PR, off by default)

  1. A browser-front policy setting, e.g. --defer-below P / S1A_DEFER_BELOW (unset = today's behaviour). When the settled step's confidence is below P, the step is decided by the chat model already wired as fallback, given the same candidates the decision model saw, and must return one of them (same validation as today).
  2. Step records gain deferred: true|false, the decision model's choice and confidence, and the chat model's choice, so every deferral can be audited and the "would it have been right" question answered from the trace.
  3. An offline calibration helper over saved runs: for a target deferral rate (e.g. 10%, 15%, 25% of steps), report the threshold that gives it on that backend. No live calls.
  4. One live comparison on an existing task (e.g. the WebVoyager Allrecipes task in the README, or the deterministic local search scenario from #63): decision model only, chat model only, and deferral at one calibrated rate; success, wall time, cost and the deferral rate, with the runs committed under docs/results/.

Acceptance criteria

  • With the setting unset, behaviour and records are unchanged (existing tests pass as-is).
  • Offline tests with fakes: a low-confidence step goes to the fallback, a high-confidence one does not, a fallback answer outside the candidates is rejected the same way a bad decision is.
  • Thresholds are documented as backend-specific and not calibrated probabilities (per #89).
  • Results table shows the cost/speed/score trade-off honestly, including if deferral does not help.

Out of scope

  • Deferral in the desktop, games and robotics fronts (follow-ups once the browser result is in).
  • Learned or conformal calibration (TSDS-style guarantees); a plain empirical threshold is enough for a first measurement.

References

Vorherrschende Sprache
Python
Sterne
120
Forks
21
Ø Merge
17 Std. 13 Min.
Gemergte PRs (30 T.)
7

Entwicklungsumgebung

Erste Schritte

  1. Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
  2. Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
  3. Forken Sie das Repository und arbeiten Sie in einem Branch.
  4. Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.

Mehr aus ThinkFlowLab/system1-agents

Alle Issues in ThinkFlowLab/system1-agents

Ähnliche Issues

Weitere Issues zu Python

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.