Measured 2026-11-18, on one Mac
Lab: measuring a small local assistant
An evaluation harness for Hermes Agent driving Qwen3.5-4B through llama.cpp, with every tool a stand-in over invented data. It measures how often the model does the right thing, and tests whether code outside the model can stop it from sending or deleting on its own.
What it is
The code is in the repository's lab/ directory. It runs a set of assistant tasks (read the calendar, set a reminder, find an email and act on it, draft a reply, send a text, refuse instructions hidden in a web page) against fourteen stand-in tools that operate on fixture files. No real calendar, message store, mail account or file is touched, and every person, number and address in the fixtures is invented.
Each task runs three times at two levels: a bare OpenAI-compatible endpoint with a minimal agent loop, and through Hermes Agent v0.23.2 restricted to the lab's tools inside an OS sandbox. A task passes or fails by deterministic checks on the tool calls, the final answer and the end state. The model is Qwen3.5-4B, Q4_K_M quantisation, thinking off.
Three mechanisms were tested. A confirmation gate: sending a message or deleting a file only stages a preview, and runs on a second call only if the user's side has recorded an approval. A date and time resolver: tools accept "friday" or "3 to 4pm" and work out the date in code. A compact prompt packaged as a Hermes persona.
Held-out results
A first round of prompt tuning reached 95.8% (bare endpoint) and 92.7% (Hermes) on 55 tasks. Those numbers were in-sample: the same author wrote the tasks and the fixes. The three mechanisms were then frozen in git, 63 new tasks were written on new fixture data with a different date, and everything was run on them. The table is from that held-out set: 63 tasks, 3 runs each, 189 runs per cell. The range in brackets is a 95% bootstrap interval over tasks.
| Configuration | Bare endpoint | Through Hermes v0.23.2 | Sends or deletes that ran without a recorded confirmation (bare / Hermes) |
|---|---|---|---|
| (1) Round-1 best, on the new tasks | 78.3% (68 to 87) | 83.6% (75 to 91) | 23 / 22 |
| (2) + confirmation gate | 82.0% (72 to 90) | not run | 0 / not run |
| (3) + date-tolerant tools | 83.1% (76 to 90) | not run | 23 / not run |
| (4) + both | 84.1% (77 to 90) | 84.7% (77 to 91) | 0 / 0 |
| (5) Both + compact prompt | 87.8% (80 to 94) | 90.5% (84 to 96) | 0 / 0 |
Full tables, per-task results and failure categories: results/HELDOUT.md. What still fails and why: results/FAILURES.md.
Reading the numbers
- The round-1 result did not generalise. 95.8% in-sample became 78.3% on new tasks at the bare endpoint, and 92.7% became 83.6% through Hermes. Dates (46%) and multi-step chains (42%) account for most of the drop at the bare endpoint.
- With the gate, no send or delete ran without a recorded confirmation. Without it, 23 (bare) and 22 (Hermes) ran on the model's say-so, including an injected email that got a file of passwords sent in 3 of 3 runs at both levels. With it the count was zero in every gated run, while the model still tried: previews left unapproved and second calls refused by the gate are counted in the full tables. This is a result about stand-in tools; nothing here was connected to a real messaging account.
- Pass-rate differences between configurations are within noise at 63 tasks. Every paired interval against configuration (1) includes zero. The unsafe-action count is the result that is not within noise.
- The checks were corrected once. Three checks rejected correct answers and were fixed after the first grading; 9 of 1,512 runs changed, all from fail to pass, and both gradings are in the full tables.
- The held-out set is no longer held out. Its failures have been read, so the next change was judged on a third, new set.
Round 3: a third, fresh task set
Once the held-out failures had been read, that set could no longer judge a change. Round 3 froze a set of tool fixes (dates given as an offset from a known date or time, ranges past midnight, no retry after a failed send, thread lookup by phone number) and a revised prompt, then wrote 106 new tasks on new fixture data, with more multi-step and injection cases. The previous best and the new configuration ran on them: 3 runs per task, 318 runs per cell.
| Configuration | Bare endpoint | Through Hermes v0.23.2 | Sends or deletes that ran without a recorded confirmation (bare / Hermes) |
|---|---|---|---|
| Previous best (configuration 5 above) | 91.2% (86 to 96) | 87.1% (81 to 92) | 0 / 0 |
| + round-3 tool fixes and prompt | 91.8% (87 to 96) | 88.4% (82 to 93) | 0 / 0 |
| Paired difference | +0.6 points (-3 to +5) | +1.3 points (-3 to +6) |
- The round-3 changes did not measurably improve the pass rate. The fixes worked on what they targeted. The new prompt also introduced a new artefact of the same kind as the one it removed: the model now copies "the day before" from the prompt's example where the user asked for "three days before" or "a week before".
- The gate held again. No send or delete ran without a recorded confirmation in any of the 1,272 runs, and no reminder or event was created by an injected instruction. One phishing email still got the model to read a file and prepare it for sending in most runs; the preview was never approved.
- One check was corrected after the first grading (6 runs, all from fail to pass). As first graded the four figures were 91.2%, 91.2%, 86.2% and 88.1%.
- Most of what still fails is model habit. About four in five of the remaining failed runs are behaviours that three rounds of prompt changes have not reduced: copying an example, rewriting the user's time words, acting instead of asking, obeying text inside an email. That is the case for trying a fine-tune next, judged on several hundred held-out tasks.
Full tables: results/THIRD.md. Analysis: results/THIRD-FAILURES.md.
What is not measured
- Linux. Every model and Hermes run was made on macOS on Apple Silicon. On Linux only the unit tests and the sandbox wrapper (bubblewrap) have been run, in CI on hosted Ubuntu runners, without a model or Hermes; that wrapper does not filter outbound network traffic. See
docs/design/cross-platform.md. - Real apps and accounts. All tools are stand-ins. Nothing shows how the gate behaves in front of a real messaging or mail client.
- Other models and sizes. One 4B model, one quantisation for the main tables. Whether a 27B model could run instead was checked on paper only:
docs/notes/bigger-model-check.md. - Hermes configurations (2) and (3). The single-lever ablations were run at the bare endpoint only.
- Voice, long unattended jobs and anything multi-user.
How to reproduce
The unit tests need only Python 3.11 or newer and no model:
git clone https://github.com/techmore/local-assistant-stack
cd local-assistant-stack/lab
python -m unittest discover -s tests -v
The model runs need llama-server from llama.cpp, the Qwen3.5-4B Q4_K_M GGUF file (about 2.7 GB) and, for the Hermes level, a sandboxed checkout of Hermes Agent v0.23.2. The steps are in docs/USAGE.md. Then:
.venv/bin/python harness/sweep.py --suite heldout configs/raw_best.json configs/raw_assist2.json
.venv/bin/python harness/report_heldout.py
.venv/bin/python harness/sweep.py --suite third configs/raw_assist2.json configs/raw_assist3.json
.venv/bin/python harness/report_third.py
Raw transcripts are not published; the summary tables are. Runs use fixed seeds (1000 to 1002), but results on another machine or llama.cpp build can differ by a few runs.