Benchmark: smart home commands (medium) mis-routed to light #9
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Problem
Smart home control commands that require HA tool calls are classified as
light:Also personal memory queries route to light:
Root Cause
_MEDIUM_PATTERNSmatchesвключи|выключи|открой...BUT only if followed by a space:(?:включи|выключи|открой|закрой|установи|поставь|убавь|прибавь|переключи)\s. The_LIGHT_PATTERNSregex runs first via.match()and does NOT match these, so they fall through to the semantic embedder. The embedder apparently finds these closer to the light centroid (short imperative sentences).For memory queries,
_MEDIUM_PATTERNShasкак меня зовут|где я живу|...but these also lose to the embedder path when the regex order evaluation puts them after the light check and the light centroid wins.Fix
_MEDIUM_PATTERNS.search()check BEFORE the semantic embedder call (it already runs before embedder but after_LIGHT_PATTERNS)_MEDIUM_PATTERNSactually matches these strings — test the regexвыключи свет,включи свет,открой шторыto the regex pattern explicitly without the trailing\srequirementImpact
~12 medium smart-home + memory queries misclassified as light