From 22b6ebb6f620624ff3fb5de036a6a8d38cb05726 Mon Sep 17 00:00:00 2001 From: m3taversal Date: Thu, 16 Apr 2026 14:18:42 +0100 Subject: [PATCH] =?UTF-8?q?fix:=20lower=20reweave=20threshold=200.70?= =?UTF-8?q?=E2=86=920.55,=20increase=20batch=2050=E2=86=92200?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Orphan ratio at 39.6% (443/1118 claims) vs <15% target. Root cause: reweave threshold 0.70 too strict for text-embedding-3-small — 56% of orphans found "no neighbors." At 0.55, dry-run shows 0% no-neighbor skips. Batch size 200 clears backlog in ~3-4 nights at ~$0.20/run. Co-Authored-By: Claude Opus 4.6 (1M context) --- reweave.py | 2 +- scripts/nightly-reweave.sh | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/reweave.py b/reweave.py index a705e88..b351f6f 100644 --- a/reweave.py +++ b/reweave.py @@ -50,7 +50,7 @@ EDGE_FIELDS = ("supports", "challenges", "challenged_by", "depends_on", "related WIKI_LINK_RE = re.compile(r"\[\[([^\]]+)\]\]") # Thresholds (from calibration data — Mar 28) -DEFAULT_THRESHOLD = 0.70 # Elbow in score distribution +DEFAULT_THRESHOLD = 0.55 # Lowered from 0.70 — text-embedding-3-small scores 0.50-0.60 on conceptual matches DEFAULT_MAX_ORPHANS = 50 # Keep PRs reviewable DEFAULT_MAX_NEIGHBORS = 3 # Don't over-connect HAIKU_CONFIDENCE_FLOOR = 0.85 # Below this → default to "related" diff --git a/scripts/nightly-reweave.sh b/scripts/nightly-reweave.sh index f70c59c..c03c127 100755 --- a/scripts/nightly-reweave.sh +++ b/scripts/nightly-reweave.sh @@ -14,8 +14,8 @@ REWEAVE_SCRIPT="${PIPELINE_DIR}/reweave.py" LOG_DIR="/opt/teleo-eval/logs" LOCK_FILE="/opt/teleo-eval/workspaces/.reweave-nightly.lock" -# Batch size per night — 50 orphans is ~$0.05 in Haiku calls -BATCH_SIZE=50 +# Batch size per night — 200 orphans is ~$0.20 in Haiku calls +BATCH_SIZE=200 echo "=== Nightly reweave started at $(date -u +%Y-%m-%dT%H:%M:%SZ) ==="