Department for Transport turns to AI

The Department for Transport (DfT) is turning to artificial intelligence (AI) to help it deal with the mountain of correspondence it has to deal with.

The department receives around 70,000 items of correspondence a year of various types, usually requiring a response. Examples include questions from MPs and emails or letters from the public. While the department says it’s very good at dealing with them, it wanted to do better and improve internal processes.

Writing in a blog post, Zach Arundel from the DfT Lab said: “Let’s say each bit takes ten minutes to log, draft a response, and get out the door, that’s about 12,000 hours a year. And that’s a conservative estimate.

“DfT invests in being accountable, open and accessible and we take pride in answering correspondence as promptly as possible. But could we do even better by making smarter use of technology? That’s what the DfT Lab  set out to investigate – could we develop a system to improve our performance and reduce the time and cost? We started out by designing a basic working piece of software to do this, called a prototype.”


Pain points

Two major pain points were identified by the team tasked with finding a solution to the admin burden. The first was in transposing data (name, address, etc) from a scanned bit of mail to a database. This takes time and can easily introduce errors. The second problem is that it’s hard to know who to allocate each bit of correspondence to. This can be a challenge because:

  • people change jobs
  • some correspondence needs answers from a number of different teams
  • sometimes letters are about unusual topics that are difficult to place


Machine learning

The post goes on to explain that machine learning was identified as the solution.

“The first problem is quite easy to solve,” said Arundel. “We fed our scanned images to the Google Cloud Vision API. This recognises the text and converts it into a digital form which is readable by other programs. For the prototype we made up a set of test data with publicly available names, addresses, emails etc. (for example from the Parliament website). For the finished article we would need of course to assess how securely sensitive data could be stored.

“We then used something called the Stanford Named Entity Recognizer, which is brilliant at identifying people’s names, to capture who it’s from and who it’s to. Then we used some regular expressions to capture dates, email addresses and reference numbers.”

This automatically filled in the required fields, as well as pulling information about the sender’s job from Parliament’s API, saving time and reducing errors.

Solving the second problem was more complicated as the DfT wanted to train the machine to know which team in the department should answer each letter.

“To begin with, we focused on parliamentary questions (PQs) because they’re quite short and already available in a digital format,” explained Arundel. “We used about 5,000 of them to train a neural network to recognise PQs and allocate them correctly.

“A neural network is a simple model of the human brain: a network of switches that fire depending on the intensity of their input. We train this network by inputting our PQs, and the computer tweaks the sensitivity of our switches to get the right result consistently. It’s a cool name for a deceptively simple concept.

“In practice, we don’t need to know too much about how the neural net arranges itself, we just need to know if it works! And after some head scratching it did, with about 90% accuracy.”


Further development

In an attempt to drive the 90% figure higher, further machine training was carried out.

“We focused on PQs, as the data was easy to get hold of, and with some small(ish) tweaks, our models could reliably sort all the correspondence the department gets,” said Arundel. “Right now, our machine sorts into teams, which is easy compared to the real requirement – routing the correspondence to the right person for drafting – and that’s where our current models fall down. Machine learning relies on big data sets to train, with thousands and thousands of entries. Most of us respond to less than 10 bits of correspondence a year.

“I’m confident that, with a bit of data massaging, we could improve our accuracy and match PQs with people, but that’s a problem for another time.”

Now that the prototype is complete the DfT Lab is working with the private office correspondence team to explore how to take the technology forward.

Arundel concluded by saying: “According to the government’s independent review ‘Growing the artificial intelligence industry in the UK’, the government will need to ensure that staff have the skills and practical tools needed to recognise and realise how AI can help them deliver their responsibilities and objectives.

“It’s ambitious, but true. Machine learning isn’t just for academics or Google – it’s a tool for everyone. And it doesn’t have to be complicated.”

Related reading