Manaz Afzal
Non-profit & Public Sector · Correspondence routing

Getting each letter to the department that will answer it, first time

A correspondence router for a ministerial or whole-of-government unit, tested on 30,000 written questions from 2026, including a machinery-of-government change mid-year.

88%routed to the answering department; keyword rules 57%
84%routed without a person at 94% accuracy
91%of the rest have the answer in the top two suggestions
81%right for a newly merged department after a one-line remap

Executive summary

A text router sends 88% of new correspondence to the department that answers it, against 57% for keyword rules, and handles 84% of items without a person at 94% accuracy.

88%routed to the answering department; keyword rules 57%
84%routed without a person at 94% accuracy
81%right for a newly merged department after a one-line remap

Situation

A correspondence unit reads and assigns every item by hand; keyword rules break on unusual phrasing and go stale when portfolios change.

Approach

A classifier fitted on 90,000 past routing decisions and tested on 30,000 items from a later year, against keyword rules and a subject-heading lookup.

Result

88% routed correctly; a 0.8 confidence bar routes 84% automatically at 94%; a mid-year department merger handled with a one-line remap.

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.

New itemLetter, email orquestion textClassifierDepartment andconfidence scoreRouteConfident items tothe team queueTriage officerThe rest, with twosuggestions
Every officer decision feeds the next refit, so the router learns new portfolios and phrasing.

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.

Keyword rules by departmenthand-written terms, 16 departments57%Heading lookupdepartment last used for the same heading56%Text classifierTF-IDF and logistic regression, with confidence88%Linear SVMsame features, no confidence score89%

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.

85%90%95%100%40%50%60%70%80%90%100%Accuracy on auto-routed questionsBar at 0.8: 84% routedat 94.1% accuracyShare routed without a person
Confidence barRouted automaticallyAccuracy, auto-routedAccuracy of best guess on the rest
0.595%90.8%43%
0.788%93.0%54%
0.884%94.1%59%
0.977%95.5%64%
Keyword rulesClassifierHealth and Social Care95%Defence94%Housing, Communities & Local Govt96%Home Office89%Environment, Food & Rural Affairs98%Treasury79%Transport92%Education92%Cabinet Office75%Foreign, Commonwealth & Development96%Business, Innovation, Science & Trade81%Work and Pensions82%
Keyword rules work for departments with distinctive vocabulary, such as health and environment, and fail for housing, Treasury and the Home Office, where questions span many topics.

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.

Before the remapthe merged department did not exist when the model was fitted0%After a one-line remapold Business and Trade or Science routes point to the merged department81%
Every machinery-of-government change becomes a mapping entry on the day it takes effect, and the next weekly refit learns the new department from officers’ decisions.

The remaining errors are mostly genuine overlaps: questions answered by one department that another could have taken.

Answered byRouted toQuestions
Science, Innovation and TechnologyBusiness, Innovation, Science & Trade143
Cabinet OfficeBusiness, Innovation, Science & Trade142
Business and TradeBusiness, Innovation, Science & Trade127
Work and PensionsEducation112
Culture, Media and SportBusiness, Innovation, Science & Trade70
TreasuryBusiness, Innovation, Science & Trade68
75%80%85%90%4k9k22k45k90kLinear SVMPast questions used to fit (most recent first)
Accuracy rises with history and flattens: a year of past routing decisions is enough to start.

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

Financial impact

About 2,230 triage hours a year returned to the unit

The gain is triage officer time on items the router assigns with confidence, plus fewer misrouted items bouncing between teams. Item counts and handling time are assumptions.

InputValueSource
Items a year40,000 ministerial or whole-of-government unit
Officer minutes to read and assign4
Share routed automatically84%Measured confidence bar 0.8
Accuracy on those items94.1%Measured
Loaded officer cost an hourA$75

Calculation

  1. Items routed without a person33,457
  2. Officer hours returned2,230
  3. Value of those hoursA$167,287

Annual valueA$167,287

Fewer misrouted items and faster handling of deadline items are further gains and are not counted here.

Implementation and rollout

Six weeks from case export to live routing

  1. Weeks 1 to 2

    Export and fit

    A year of items and final assignments from the case system; router fitted and tested on the latest months.

    Unit manager, Manaz

  2. Week 2

    Set the bar

    Confidence bar agreed with the unit; deadline flags defined.

    Unit manager, triage lead

  3. Weeks 3 to 6

    Shadow run

    Router suggests, officers decide; disagreements reviewed weekly.

    Triage officers, Manaz

  4. Week 7 onward

    Live routing

    Confident items routed automatically; mapping entry on any portfolio change; weekly refit.

    Unit, Manaz on support

Tools

Dynamics 365 or Salesforce case management, Objective or Content Manager records, Outlook shared mailboxes or Microsoft Graph, Python, scikit-learn

Team

  • Correspondence unit manager owns the confidence bar and routing policy
  • Triage officers review low-confidence items and correct routes
  • Departmental liaison officers confirm portfolio changes
  • Manaz router, case-system integration and weekly refit

The timeline is a plan for a typical engagement; it depends on data access and how many systems are involved.

Risks and mitigations

What could go wrong in production, and the control for each

RiskMitigation
Portfolio changesA dated mapping entry on the day of the change; weekly refit learns the new structure.
Personal information in correspondenceRouter runs inside the unit’s environment and stores no text outside the case system.
Cross-portfolio itemsLow confidence sends them to an officer with the top two suggestions.
Messier text than the test bedRefitted and tested on the unit’s own history before go-live.

Key takeaways

Key takeaways

  • Past routing decisions route 88% of new items correctly; keyword rules 57%.
  • A confidence bar turns accuracy into a workload choice for the unit.
  • Machinery-of-government changes are a mapping entry, then a refit.
  • A year of history is enough to start.