wren sees every area and reads the command plain

Shown only the wired areas, the model took "turn on the bathroom light"
for the living room's light and "the office light" for the kitchen's,
both above 0.93: 5 of the 28 recorded 7B commands switched a wrong light.
Every area is shown now, with a light each, so such a call names an
unwired device and goes on to `unhandled`.

With every area shown, a transcript's "Turn on the kitchen light." fell
to 0.80. The command is passed lower case without sentence marks, as the
model was trained, which brings it to 0.99.
This commit is contained in:
Melvin Strobl
2026-10-20 08:34:07 +02:00
parent 1a8f6875c4
commit f1452f3119
3 changed files with 25 additions and 7 deletions
+8 -1
View File
@@ -11,7 +11,7 @@ import pytest
from fluksio.flow.messages import DType, MessageSpec
from fluksio.flow.nodes.base import Node
from fluksio.flow.nodes.wren import CANT, WrenNode, _value
from fluksio.flow.nodes.wren import CANT, WrenNode, _plain, _value
from fluksio.flow.pipeline import Pipeline
@@ -72,6 +72,11 @@ def test_only_the_prompt_wakes_it(fake_wren):
}
def test_the_model_reads_the_command_plain():
assert _plain("Turn on the kitchen light.") == "turn on the kitchen light"
assert _plain("Heat it to 22.5, please!") == "heat it to 22.5 please"
@pytest.mark.parametrize(
("tool", "args", "dtype", "value"),
[
@@ -114,6 +119,8 @@ def test_applied_calls_reach_their_targets(fake_wren):
("house.living_room_setpoint", True),
("", False),
]
# Areas nothing is wired to are shown too, so a call can name them.
assert set(fake_wren.houses[0].areas) == set(fake_wren.AREAS)
living = fake_wren.houses[0].areas["living room"]
assert [(d.kind, d.state) for d in living] == [
("light", "off"),