Dispatch

Teaching a small AI model to use tools reliably

Dispatch is an AI assistant for an IT help desk. When an employee writes in, it has to pick the right action, such as resetting a password or logging a problem, and fill in the details correctly. It runs on a small, free, open AI model. Out of the box that model gets 36.3% of requests right. This project measures that, teaches the model, and measures again. All of it ran on one laptop.

Before teaching
36.3%
of 300 requests handled correctly
After teaching
99.3%
after practice with scoring
Whole tasks completed
92%
of 50 start-to-finish tasks
Response time
448 ms
typical reply, on a laptop

How the project works

  1. 1Measure

    Give the model 300 requests it has never seen and count how many it handles correctly.

  2. 2Teach

    Train it with worked examples first, then try two further methods on top of that.

  3. 3Measure again

    Same 300 requests, same automatic scoring, so the comparison is fair.

  4. 4Put it to work

    Let it handle whole tasks from start to finish using real tools.

How often the model gets it right

Out of 300 requests the model had never seen. "Right" means the correct action with every detail correct, or a plain reply when no action was needed. A program does the scoring, so there is no judgement call.

Out of the boxThe model exactly as downloaded.
36.3%
After learning from examplesShown 2,500 requests with the correct response to each.
98%+61.7 points
After learning from comparisonsShown pairs of responses, one better and one worse, and taught to prefer the better one.
98.7%+62.4 points
After practice with scoringTried each request several times; every attempt was scored automatically and the best ones were reinforced.
99.3%+63 points

A closer look

The same test, broken into the separate things the model has to get right.

What was measuredBeforeExamplesComparisonsPractice
Got it completely right
the headline number
36.3%98%98.7%99.3%
Picked the right tool
when a tool was needed
43.8%100%100%100%
Right tool and every detail right
the correct person, system, date and so on
24.3%97.1%98.1%99%
Wrote the request in a usable format
software could read what the model wrote
76.7%100%100%100%
Knew when not to use a tool
asked a question or just replied instead
64.4%100%100%100%
Typical response time
thousandths of a second, on a laptop
399 ms446 ms449 ms448 ms
Finished a whole task
50 tasks, several steps each, using real tools
12%88%92%92%

Columns: Before = out of the box; Examples = after learning from examples; Comparisons = after learning from comparisons; Practice = after practice with scoring.

Does it hold up on messier requests?

Real people make typos, use slang, and ask for things in new ways. A second set of 200 rougher requests checks how much accuracy slips. One tool was also changed after training, to see whether the model adapts.

Out of the box-4.3 points
Clean
36.3%Messy
32%
After learning from examples-16.5 points
Clean
98%Messy
81.5%
After learning from comparisons-17.7 points
Clean
98.7%Messy
81%
After practice with scoring-17.3 points
Clean
99.3%Messy
82%

Which kinds of request are hard

How often each kind of request was handled correctly. Some tasks take several steps; each step is scored separately.

Kind of requestHow manyBeforeExamplesComparisonsPractice
Check a laptop or phone15100%100%100%100%
Check a software licence1573.3%100%100%100%
Decline an off-topic request1471.4%100%100%100%
Ask for a missing detail280%100%100%100%
Log a new problem2114.3%100%100%100%
Escalate an open problem147.1%100%100%100%
Multi-step callback booking: step 1, find the person190%100%100%100%
Multi-step callback booking: step 2, do the task190%78.9%94.7%100%
Multi-step callback booking: step 3, report back19100%100%100%100%
Multi-step device check: step 1, find the person140%100%100%100%
Multi-step device check: step 2, do the task140%100%100%100%
Multi-step device check: step 3, report back14100%100%100%100%
Multi-step licence check: step 1, find the person633.3%100%100%100%
Multi-step licence check: step 2, do the task60%100%100%100%
Multi-step licence check: step 3, report back6100%100%100%100%
Multi-step password reset: step 1, find the person922.2%100%100%100%
Multi-step password reset: step 2, do the task90%100%100%100%
Multi-step password reset: step 3, report back9100%100%100%100%
Look up an employee10100%100%100%100%
Reset a password175.9%100%100%100%
Book a callback137.7%84.6%76.9%84.6%
Find a how-to guide955.6%100%100%100%

What went wrong, when it went wrong

Every wrong reply, sorted by the kind of mistake.

Out of the box191 of 300 wrong
Picked the wrong tool 69Replied in words when it should have used a tool 49Used a tool when it should have just replied 32Filled in a value that isn't allowed 29Right tool, wrong details 12
After learning from examples6 of 300 wrong
Right tool, wrong details 6
After learning from comparisons4 of 300 wrong
Right tool, wrong details 4
After practice with scoring2 of 300 wrong
Right tool, wrong details 2

What each round of teaching took

Only a small slice of the model is changed in each round. The rest stays exactly as downloaded, which is why this fits on a laptop.

RoundMinutesMemory usedShare of model changed
Examples6511.64 GB1.75%
Comparisons34.811.54 GB1.75%
Practice210.119.62 GB1.75%

For the comparisons round, a larger AI model running on the same laptop acted as the judge, picking the better of two replies 54 times. Its choices were double-checked against a fixed checklist on 40 pairs and matched 55% of the time.

Watching the model learn

Recorded live during training. For the first two rounds the line shows how far off the model's answers were. For the practice round it shows the average score its attempts earned.

After learning from examples
How far off its answers were
start: 0.4149lower is betterend: 0.0039
After learning from comparisons
How far off its answers were
start: 0.7209lower is betterend: 0.2186
After practice with scoring
Average score per attempt
start: 0.9051higher is betterend: 0.9198

How much teaching does it need?

The same first round of teaching, repeated with fewer examples each time. Everything else was kept the same, and every version took the same tests.

0%25%50%75%100%36.3%none79.7%25088.3%50094%1,00098%2,500Teaching examples (each step roughly doubles)
Test requests Messy requests
ExamplesTestMessyMinutes
None36.3%32%-
25079.7%63.5%6.2
50088.3%66%12.4
1,00094%79%25.3
2,50098%81.5%65

With 250 examples the model got 79.7% of test requests right after 6.2 minutes of training. With 2,500 it got 98%, after 65 minutes. On messy requests it went from 63.5% to 81.5%.

What went wrong along the way, and what was done about it

Not everything worked first time. These are the problems the measurements caught.

One round of teaching made the model worse

The first try at learning from comparisons dropped accuracy from 98% to 58.3%. The model had stopped finishing its requests properly, so 123 of 300 replies could not be read. The automatic scoring caught it straight away. The second try keeps rewarding complete, correct answers while it learns, and scores 98.7%.

The assistant sometimes did the same thing twice

On simple one-step tasks it would repeat an action it had just carried out, such as resetting a password twice, before replying. A safety check now blocks an exact repeat. Whole tasks completed went from 80% to 88% for the examples-trained model and from 78% to 92% for the practice-trained one. The root cause is a gap in the teaching examples, which had no simple tasks ending in a reply.

The AI judge was not a reliable judge

When a larger AI model was asked to pick the better of two replies, its choices matched a fixed checklist only 55% of the time, and it picked whichever reply was shown first 25.9% of the time, where an unbiased judge would be near 50%. Its opinions were used for only 54 of 634 comparisons. The rest were decided by code.

Shrinking the model too far costs accuracy

A half-size copy scores 99.3%, the same as full size (99.3%). A quarter-size copy is faster but drops to 89.3%. Half size is the sensible choice here.

Running it on a laptop

The finished model can be shrunk to take less space and answer faster. The question is how much accuracy that costs.

Standard software
452 ms per reply
63.5 word-pieces per second
Software built for Apple chips
221 ms per reply
132.4 word-pieces per second
Copy of the modelFile sizeGets it rightSpeed
Full size1000 MB99.3%132.4/s
Half size568 MB99.3%154.1/s
Quarter size321 MB89.3%177.2/s

What happens when several people ask at once:

People asking at onceReplies per secondTypical wait
13.610.3 s
46.150.7 s
168.511.7 s
328.783.6 s

Making training fit on a laptop

Training needs far more memory than answering. The same short training job was run four ways to see what each trick saves and what it costs in speed.

ApproachMemory usedSeconds per step
The setting used10.55 GB6.142
Fewer examples at a time7.24 GB5.792
Recompute instead of remember10.55 GB6.136
Less precise numbers9.92 GB6.079

The eight things the assistant can do

Each one is a “tool”: a specific action the assistant can ask the help desk system to carry out.

  • Look up an employee
    Find an employee record by work email. Returns employee_id, name, department and device_id.
  • Check a laptop or phone
    Get health and warranty status for a company device.
  • Reset a password
    Reset an employee's password for one system and send a temporary password.
  • Log a new problem
    Open a new IT support ticket.
  • Escalate an open problem
    Escalate an existing ticket to the tier-2 team.
  • Find a how-to guide
    Search the IT knowledge base for how-to articles.
  • Check a software licence
    Check whether an employee holds a licence for a software product.
  • Book a callback
    Book a phone callback from a technician.

What to keep in mind

  • The requests are made up. The company, employees and requests are all invented: 2,500 for teaching, 300 held back for testing, and 200 messier ones. No real person's data was used.
  • The test is fair. The model is tested on employees and details it never saw while learning.
  • Scoring is automatic. A program checks every reply, so results are repeatable and nobody's opinion is involved.
  • Real conversations are messier. Made-up requests are tidier than real ones. The messy set is the closest stand-in.
  • This is laptop scale. A production system would use larger models on dedicated servers. The method is the same.

For technical readers

The plain names on this page, and what they are called in the field.

The model
Qwen/Qwen2.5-0.5B-Instruct, an open-weight language model with about half a billion parameters.
After learning from examples
Supervised fine-tuning (SFT) with LoRA adapters, using Hugging Face TRL's SFTTrainer.
After learning from comparisons
Direct Preference Optimization (DPO). Pairs come from mined errors and from a local AI judge (RLAIF).
After practice with scoring
Group Relative Policy Optimization (GRPO), a reinforcement-learning method. The reward is deterministic validator code.
Automatic scoring
Deterministic validators: output parsing, JSON Schema validation, tool and argument matching.
Messier requests
A drift set: unseen phrasings, noise, and a schema change, to estimate degradation after deployment.
Whole tasks with real tools
An agent loop over a Model Context Protocol (MCP) server, with an allow-list and schema checks before execution.
Shrinking the model
Quantization to 8-bit and 4-bit weights, served with MLX behind an OpenAI-compatible API.
Run tracking
Every training and evaluation run is logged to MLflow. PyTorch, Transformers, PEFT and Accelerate underneath.

Results generated 2026-11-19 10:43:00 from code version daf7499.