From 2af817b9dbb6ff115a951d9f0201f32307dac467 Mon Sep 17 00:00:00 2001 From: Brad Stein Date: Tue, 27 Jan 2026 23:57:36 -0300 Subject: [PATCH] atlasbot: speed up fast mode --- services/comms/atlasbot-deployment.yaml | 2 +- services/comms/scripts/atlasbot/bot.py | 57 +++++++++++++++---------- 2 files changed, 35 insertions(+), 24 deletions(-) diff --git a/services/comms/atlasbot-deployment.yaml b/services/comms/atlasbot-deployment.yaml index 26699b3..b9b8ea7 100644 --- a/services/comms/atlasbot-deployment.yaml +++ b/services/comms/atlasbot-deployment.yaml @@ -16,7 +16,7 @@ spec: labels: app: atlasbot annotations: - checksum/atlasbot-configmap: manual-atlasbot-83 + checksum/atlasbot-configmap: manual-atlasbot-84 vault.hashicorp.com/agent-inject: "true" vault.hashicorp.com/role: "comms" vault.hashicorp.com/agent-inject-secret-turn-secret: "kv/data/atlas/comms/turn-shared-secret" diff --git a/services/comms/scripts/atlasbot/bot.py b/services/comms/scripts/atlasbot/bot.py index dd6ea2e..9108478 100644 --- a/services/comms/scripts/atlasbot/bot.py +++ b/services/comms/scripts/atlasbot/bot.py @@ -3201,28 +3201,37 @@ def _open_ended_multi( state: ThoughtState | None = None, ) -> str: model = _model_for_mode(mode) - angle_count = 2 if mode == "fast" else 4 - insight_count = 2 if mode == "fast" else 4 - total_steps = 2 + angle_count + 2 + (1 if mode == "deep" else 0) + if mode == "fast": + angle_count = 1 + insight_count = 1 + total_steps = 2 + else: + angle_count = 4 + insight_count = 4 + total_steps = 2 + angle_count + 2 + 1 if state: state.total_steps = total_steps - angles = _open_ended_plan( - prompt, - fact_pack=fact_pack, - history_lines=history_lines, - count=angle_count, - state=state, - model=model, - ) - insights = _open_ended_insights( - prompt, - fact_pack=fact_pack, - fact_meta=fact_meta, - history_lines=history_lines, - count=insight_count, - state=state, - model=model, - ) + + angles: list[dict[str, Any]] = [] + insights: list[dict[str, Any]] = [] + if mode != "fast": + angles = _open_ended_plan( + prompt, + fact_pack=fact_pack, + history_lines=history_lines, + count=angle_count, + state=state, + model=model, + ) + insights = _open_ended_insights( + prompt, + fact_pack=fact_pack, + fact_meta=fact_meta, + history_lines=history_lines, + count=insight_count, + state=state, + model=model, + ) seeds = _seed_insights(fact_lines, fact_meta, limit=max(4, insight_count)) insight_candidates = insights + seeds subjective = _is_subjective_query(prompt) @@ -3261,7 +3270,7 @@ def _open_ended_multi( ) candidates: list[dict[str, Any]] = [] - step = 3 + step = 1 if mode == "fast" else 3 for angle in angle_inputs[:angle_count]: candidates.append( _open_ended_candidate( @@ -3308,8 +3317,10 @@ def _open_ended_multi( def _open_ended_total_steps(mode: str) -> int: - angle_count = 2 if mode == "fast" else 4 - return 2 + angle_count + 2 + (1 if mode == "deep" else 0) + if mode == "fast": + return 2 + angle_count = 4 + return 2 + angle_count + 2 + 1 def _open_ended_fast(