The problem
A minister’s office or a whole-of-government correspondence unit receives letters and written questions that have to reach the department that will answer them. Each wrong first hand-off costs days against the response standard. Governments that use automated triage report hours saved each day, and faster responses where routing and escalation run on rules people can check.
I built a router that suggests the answering department with a confidence bar, and tested it on a year of written questions that included a machinery-of-government change.
- Team
- Ministerial correspondence unit, parliamentary services, triage officers, departmental liaison officers
- Scale
- Tens of thousands of items a year across many portfolios
- Systems
- Dynamics 365 or Salesforce case management, Objective or Content Manager records, Outlook shared mailboxes
- Measure
- Items routed to the answering team first time; share needing a person; time to first assignment
The test bed
UK parliamentary written questions are a large, open record of government correspondence routing: each question is tabled, routed to a department and answered, and the answering department is published. Commons questions open by naming the minister addressed. I stripped that opening so the classifier sees only what a correspondence unit sees in a letter: the question and its subject heading.
- Questions
- 120,000 answered written questions tabled from 2023 to November 2026
- Destinations
- 23 answering departments and bodies
- Fitting set
- 90,000 questions tabled 2023 to 2025
- Test set
- 30,000 questions tabled in 2026, never used to fit anything
What I built
A router that reads each new item, proposes the answering department with a confidence score, and sends confident items straight to that team’s queue. Items below the confidence bar go to a triage officer with the top two suggestions, which contain the right answer 91% of the time. Items with a fixed deadline are flagged so they jump the queue.
Results
On 2026 questions the classifier routed 88% to the department that answered them. Hand-written keyword rules managed 57%, and a lookup on the subject heading 56%. The largest single department took 14% of questions, so sending everything there would be right one time in seven.
A confidence bar sets the workload
At a bar of 0.8 the router handles 84% of items on its own at 94.1% accuracy, and triage officers see the remaining 16%. The bar is a policy choice for the unit: higher means fewer errors and more items for people.
| Confidence bar | Routed automatically | Accuracy, auto-routed | Accuracy of best guess on the rest |
|---|---|---|---|
| 0.5 | 95% | 90.8% | 43% |
| 0.7 | 88% | 93.0% | 54% |
| 0.8 | 84% | 94.1% | 59% |
| 0.9 | 77% | 95.5% | 64% |
When portfolios change
In mid-2026 the Department for Business and Trade and the Department for Science, Innovation and Technology were brought together as the Department for Business, Innovation, Science and Trade. The router had never seen the new department, so it routed none of its 1,510 questions correctly. A one-line remap, effective from the date of the change, sends anything the router would have given to either old department to the merged one. With that remap, 81% of the merged department’s questions were routed correctly, before any refit.
The remaining errors are mostly genuine overlaps: questions answered by one department that another could have taken.
| Answered by | Routed to | Questions |
|---|---|---|
| Science, Innovation and Technology | Business, Innovation, Science & Trade | 143 |
| Cabinet Office | Business, Innovation, Science & Trade | 142 |
| Business and Trade | Business, Innovation, Science & Trade | 127 |
| Work and Pensions | Education | 112 |
| Culture, Media and Sport | Business, Innovation, Science & Trade | 70 |
| Treasury | Business, Innovation, Science & Trade | 68 |
Data and method
- Data
- UK Parliament Written Questions API, Open Parliament Licence; question text, subject heading, answering body, dates and named-day flag. No member names are used or shown.
- Preparation
- The opening that names the addressed minister removed from Commons questions; renamed departments merged to their current names; bodies with fewer than 250 questions grouped together
- Split
- Fitted on questions tabled 2023 to 2025; tested on 2026
- Methods
- Keyword rules written per department; subject-heading lookup; TF-IDF on text and heading with logistic regression and with a linear SVM
- Measures
- Share routed to the answering department; macro F1; accuracy and coverage at confidence bars; accuracy for the merged department before and after remapping
Limitations
- Parliamentary questions are written by professionals and are shorter and clearer than public correspondence. A unit’s own items will be messier, so the router is refitted on its own history before go-live.
- The answering department is the department that answered, which is sometimes a transfer. A small share of “errors” are questions another department could have answered.
- Lords questions name no minister and are harder to route: 81% against 89% for Commons.
- Personal information in real correspondence is handled inside the unit’s environment; the router stores no text outside the case system.
How I would take it live
- Export a year of items and their final assignments from Dynamics 365, Salesforce or the shared mailbox
- Fit the router, agree the confidence bar with the unit manager, and run it in shadow for four weeks
- Route confident items automatically; show officers the top two suggestions on the rest; flag deadline items
- Add a mapping entry on the day of any portfolio change and refit weekly from officers’ decisions