From 487eca09f373264ac1ad3d2e549b94ef6a77fc38 Mon Sep 17 00:00:00 2001 From: Rockford lhotka Date: Tue, 31 Mar 2026 11:40:58 -0500 Subject: [PATCH 1/2] Widen tier routing bands to reduce Balanced over-capture MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Low ceiling 0.15→0.25 and Balanced ceiling 0.46→0.55 so simple prompts (especially operational/tool-use) route Low more often and High requires denser complexity signals. Added low-signal keywords for greetings and common tool-use patterns (check my, send a, remind me, etc.). Co-Authored-By: Claude Opus 4.6 (1M context) --- src/RockBot.Llm/KeywordTierSelector.cs | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/src/RockBot.Llm/KeywordTierSelector.cs b/src/RockBot.Llm/KeywordTierSelector.cs index 377827d..451dc83 100644 --- a/src/RockBot.Llm/KeywordTierSelector.cs +++ b/src/RockBot.Llm/KeywordTierSelector.cs @@ -20,8 +20,8 @@ namespace RockBot.Llm; public sealed class KeywordTierSelector : ILlmTierSelector { // ── Compiled defaults ───────────────────────────────────────────────────── - private const double DefaultLowCeiling = 0.15; - private const double DefaultBalancedCeiling = 0.46; + private const double DefaultLowCeiling = 0.25; + private const double DefaultBalancedCeiling = 0.55; // ── Complexity signals → push toward High tier ─────────────────────────── private static readonly string[] DefaultHighSignalKeywords = @@ -44,10 +44,16 @@ public sealed class KeywordTierSelector : ILlmTierSelector // ── Simplicity signals → push toward Low tier ──────────────────────────── private static readonly string[] DefaultLowSignalKeywords = [ - "what is", "what's", "who is", "who was", "when was", "where is", + "what is", "what's", "who is", "who was", "when was", "when is", + "where is", "what time", "what day", "define", "definition of", "spell", "translate", "capital of", "how many", "list the", "give me a list", "yes or no", "true or false", "convert", "format", + // Conversational / greeting patterns + "hello", "hey", "thanks", "thank you", "good morning", "good afternoon", + // Simple operational / tool-use patterns + "check my", "send a", "send an", "remind me", + "tell me about", "show me", "look up", ]; private static readonly EffectiveConfig Defaults = new( From 5323458ff838d009b010c1dffa7d99e359b623e5 Mon Sep 17 00:00:00 2001 From: Rockford lhotka Date: Tue, 31 Mar 2026 11:43:39 -0500 Subject: [PATCH 2/2] Allow low-signal keywords to subtract from length score Change keyword score floor from 0.0 to -0.15 so low-signal keywords can actively pull verbose-but-simple prompts into the Low tier, not just cancel out high-signal matches. Enables the dream pass to push operational prompts into Low regardless of word count. Co-Authored-By: Claude Opus 4.6 (1M context) --- src/RockBot.Llm/KeywordTierSelector.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/RockBot.Llm/KeywordTierSelector.cs b/src/RockBot.Llm/KeywordTierSelector.cs index 451dc83..0dfb390 100644 --- a/src/RockBot.Llm/KeywordTierSelector.cs +++ b/src/RockBot.Llm/KeywordTierSelector.cs @@ -231,7 +231,7 @@ private static double ComputeScore(string prompt, EffectiveConfig config, }; // Keyword component (0 – 0.35) - var keywordScore = Math.Clamp(complexSignals * 0.10 - simplexSignals * 0.08, 0.0, 0.35); + var keywordScore = Math.Clamp(complexSignals * 0.10 - simplexSignals * 0.08, -0.15, 0.35); // Structural indicators (0 – 0.25) var structureScore = 0.0;