A help-desk agent that follows the rules page it is given
Halo Competition, track ft-hf, model Qwen/Qwen3-4B-Instruct-2507. Team lead: @ofirkris
What and why
A help-desk agent can look things up and change records with tools. The tools do whatever they are told. The rules (who may cancel, how late, how often) are a page of text in the prompt, and they differ from desk to desk and from day to day. The useful behaviour is: read this page, look up the records that decide the request, make only the changes the page allows, and report exactly what was done.
The untrained 4B model does this badly. With the plain rules page it mostly talks instead of acting. With a long guidance text and a reminder loop it reaches about half of the tasks. We post-trained it with Halo SFT (LoRA) on synthetic desks so that the plain rules page is enough, and we test it on desks it never saw.
Task and grading
One episode is one customer message with one or two requests. The agent gets the rules page as the system prompt and the desk's tools. An episode counts as a success only if both hold:
- the final data equals the gold data (allowed changes made, barred changes not made), and
- the last line of the reply,
OUTCOME: <id>=done, <id>=declined, matches what was allowed.
Everything is graded by code. There is no judge model.
Data
All training rows come from a generator in this repository (competition/entry/factory.py) and a scripted agent that plays each episode (factory_agent.py). No model wrote the desk rows.
- 16 themed desks share one schema (a person, their records, a linked resource; cancel, move, book). 12 themes are for training, 4 are held out.
- Every episode draws its own rules page: which conditions each rule has, their values and one of two wordings. So the list of things to check cannot be memorised per action.
- The scripted agent first copies each sentence of the rule from the page, word for word, then checks them one by one with the values it read from tool results, then acts.
- Final training file: 4,800 factory episodes plus 437 "keep" rows. A keep row is an everyday instruction from
databricks/databricks-dolly-15kwith the base model's own answer, so the tuned model keeps answering ordinary requests the way the base model does (make_keep_rows.py).
Half of all requests must be declined. A policy that does everything, or nothing, fails.
Training
Halo SFT, LoRA rank 64 on attention and MLP projections, 2 epochs, learning rate 1e-4, seed 42, loss on assistant turns only. Config: competition/entry/sft_desk_qwen3_4b_lora.yaml. One GPU, about 85 minutes.
Results
Headline: a desk nothing was trained on and nothing was tuned on (a gym: class bookings, cancellations, membership freezes). It was written before the final model and no model was run on it until the final measurement. 108 tasks, 3 sampling seeds, plain rules page, same command for both models.
| Gym desk, task success | Base model | Tuned model |
|---|---|---|
| Plain rules page, mean of 3 seeds | 18.2% | 58.6% |
| By seed | 18.5, 17.6, 18.5 | 62.0, 57.4, 56.5 |
| Allowed requests done | 6.9% | 61.4% |
| Barred requests left alone | 92.1% | 94.2% |
The difference is 40.4 points, 95% bootstrap interval over tasks 32.1 to 49.1. The base model with its guidance text and one reminder reaches 37.7% on the same tasks (38.0, 35.2, 39.8); the tuned model with the plain page is 21.0 points above that (13.0 to 29.3) and uses fewer tokens per episode (7,038 in and 326 out against 10,990 and 499).
Further points (216 tasks, one sampling seed, 95% bootstrap intervals over tasks where given):
| Set | Untrained best | Tuned, plain page | Difference |
|---|---|---|---|
| Four held-out desk themes | 47.2 | 99.1 | +51.9 (44.9 to 58.3) |
| Library desk, hand-written, never trained on, used during development | 53.7 | 91.2 | +37.5 (30.1 to 44.9) |
| Held-out themes with rule kinds no training row shows | 68.5 | 78.2 | +9.7 (1.9 to 17.1) |
"Untrained best" is the base model with a guidance text and one reminder, the strongest setting we found for it. The tuned model gets the plain page and no reminder.
Does it read the record before it decides? On the library desk a request counts as "supported" only if it is right and every record that decides it was read with a tool before the change: untrained best 42.3%, tuned 83.8%. On the gym desk: base 39.9% (plain page), tuned 57.3%.
General ability (200 GSM8K test items, 120 reply-form instructions, 116 single tool calls with unrelated tools, one seed): math 91.0 base, 92.5 tuned; reply form 95.0 and 94.2; tool calls 84.5 and 81.9.
What does not work
- New bookings on the gym desk mostly fail (24% of allowed booking tasks succeed). The customer says "the Lane Swim class", the model searches for "Lane Swim class", the lookup finds nothing, and it gives up instead of trying the shorter name.
- On the library desk it wrongly declines some allowed requests (85.7% of allowed requests are done).
- Rule kinds it never trained on improve only a little (+9.7 points). It reads the new sentence but often applies it wrongly.
- Single tool calls outside the desk drop from 84.5% to 81.9% (3 items of 116).
- Every desk comes from our own generator and one author. There is no slice from real help-desk logs.
- Requests are single messages. There is no second customer turn, no pushback, no tool errors.
- The further points are one sampling seed, and everything is one training seed.
How to reproduce
python competition/entry/run_desk2.py --model Qwen/Qwen3-4B-Instruct-2507 --revision cdbee75f17c01a7cc42f958dc650907174af0554 --adapter kriss/qwen3-4b-helpdesk-rules-lora --desk gym --n 108 --conditions plain --out /tmp/desk_evalDrop --adapter for the base model. Training rows: python competition/entry/make_sft_rows.py --desk factory --n 4800 --seed 400000 --out rows.jsonl, then python competition/entry/make_keep_rows.py --model Qwen/Qwen3-4B-Instruct-2507 --n 640 --out keep.jsonl and append. Training: python scripts/training/sft.py competition/entry/sft_desk_qwen3_4b_lora.yaml.
Third-party materials
- Base model:
Qwen/Qwen3-4B-Instruct-2507. - GSM8K (test split) for the math part of the general check.
databricks/databricks-dolly-15kfor the instructions of the keep rows.- Halo 1.3.0 for training.
Platforms used
None of the partner platforms. Training and evaluation ran on one B200 GPU of our own.