renancloudwalk
|
f35cdb9696
|
feat(swarm): real bias-fix prompt (gate 13) on GLM-5.2
- Add bias_fixed_prompt (gate 13 calibration): sector-median company = neutral,
mediocre-but-stable = neutral not bearish, symmetric bull/bear, null = average.
- Wire B screen tier, C, control-BC to bias_fixed; A stays on original screen_prompt
(correctly fails gate 13 on merit = the CEO's 65%-bearish complaint).
- Fix bias_control NUMERIC_FIELDS to real eligible field names (revenue_ttm, net_income)
so sector medians actually compute.
- Live evidence (captured, GLM-5.2 over SSH tunnel, 500-co control each):
control-A (original): 57 bull / 270 bear / 125 neutral -> diff=0.651 (FAIL, bearish)
control-BC (fixed): 14 bull / 68 bear / 402 neutral -> diff=0.659 (FAIL, residual)
The bias fix cuts bearish share by pushing average -> neutral, but GLM-5.2 still
emits ~5:1 bear:bull on the directional calls it commits to. Prompt calibration
cannot fully remove this model-level pessimistic bias -> gate 13 honest blocker.
- bias_control tests updated to new field names (64 pass).
|
2026-07-16 07:43:37 -03:00 |
renancloudwalk
|
7adc361249
|
feat(swarm): v15 parallel run + gate-25 deepdive SQL + gate-23 token count + gate-8 examples
- tools/parallel_run_v15.sh: run A/B/C/controls concurrently with shared concurrency budget (~152) over the SSH tunnel; ~2.7x faster than sequential
- backend/sql/deepdive_universe.sql: gate-25 Tier-2 top-N-by-market-cap deep-dive universe, deterministic, null-safe
- tests/test_sql_contracts.py: deepdive_universe.sql contract test
- run_tiered_swarm.py: gate-23 record screen_dossier_token_count (B,C)
- backend/scripts/extract_examples.py + tests/test_extract_examples.py: gate-8 curated example extractor (flip/tie-break/opposing roles)
- tools/live_run_v15.sh, make_acceptance_v15.sh: live + acceptance helpers
34 targeted tests pass.
|
2026-07-16 07:18:52 -03:00 |
renancloudwalk
|
b0e9138500
|
feat(swarm): tiered A/B/C stock-opinions tier + gate-19 winner (rubric v15)
- run_tiered_swarm.py: variants A (flat reference), B (tiered: N deep-dive x6
roles 2-round+gossip + screen 1-round no-gossip, 6000-agent budget), C (pure
screen 5143 one-per-company), plus bias-control runs; deterministic tier
assignment (top market-cap + prior-run promotion flags), promotion file,
per-company consensus tie-break (confidence then agent_id), adversarial
peer routing, opinion schema score 0-10 / confidence 0-1.
- winner.py: gate-19 winner function — calibration (g13/g20), tiered-quality
(g18 beat baseline, g21 discrimination r cross-tier no-averaging-confound),
pick B if it proves quality else C, A never ships.
- adversarial_router.py: opposite-view routing (g14) + plain reinforcing router.
- bias_control.py: synthetic neutral dossiers + McNemar symmetry (g13).
- sql/dossier_screen.sql (8-quarter trend) and dossier_deepdive.sql (strict
superset + top holders + ownership trend) + contract tests.
- 60 tests pass (dry-run machinery end-to-end; live run is a named checkpoint).
|
2026-07-16 06:53:02 -03:00 |