Legislation as code: the government’s AI projects

Artificial intelligence is now an integral part of many organisations across the globe. And if a recent government showcase of digital projects is anything to go by, our government is all-in on AI too.

The day-long showcase, of digital projects running across various government agencies, was held on 12 November at the head office of the Ministry of Business, Innovation and Employment (MBIE). I went along to check it out.

One project that caught my eye was a conversational AI bot called Tai, which has just completed a proof of concept trial for food exporting. Four different government agencies co-ordinated to develop Tai: Ministry for Primary Industries (MPI), Customs New Zealand, IRD and MBIE. Indeed, the bot was designed expressly to be an interface between different government agencies.

When Tai was announced in October, the AI-powered chatbot was positioned as a “he.” Tai is “a 25 year old New Zealander who can navigate his way through complex information across multiple government websites, and provide you with answers to your questions in the blink of an eye,” stated the MBIE press release.

But of course Tai isn’t human; and in fact cannot even talk. It’s a text chatbot, similar to the automated instant messenger apps you increasingly find on commercial websites. Telecommunications company Spark, for example, has a chatbot called “Ivy” who can answer simple, FAQ-type questions – such as “how do I find my account number?”

Tai is a bit more ambitious because it aims to cover multiple knowledge bases, rather than just one organisation’s. The bot was an initiative of a government programme called Better for Business (B4B), a cross-agency programme led by MBIE. The goal of B4B is to make it “easier and more seamless for businesses to interact with government.”

In its proof of concept trial, completed in July, Tai focused on honey exporting. That market was chosen because it requires users to navigate between two government agencies: MPI and Customs.

Similar to Spark’s chatbot, users interacted with Tai using a chat interface and natural language queries.

So what did MBIE and its fellow government agencies learn from this trial?

According to Lisa Casagranda, Director of the Better for Business unit, the trial showed that Tai was “faster than using Google search.” Furthermore, “the responses through Tai were a lot more tailored than the google search tests.”

The trial also found that participants trusted the information provided, and had no problems using the app since “the majority of participants had used a digital assistant before.”

Tai was built using Natural Language Processing (NPL), a subset of artificial intelligence that allows a computer to process and interact with human queries. It also uses Machine Learning (ML) to build up its store of knowledge. In other words, the system gets smarter the more it is used. Tai was developed using Microsoft technology and delivered via Datacom.

You may be thinking that deploying a chatbot on a government website is no big deal. But what’s interesting about software built using AI, such as Tai, is that over time it allows human-machine collaboration to get ever more smarter and reliable. The software is constantly learning how to serve humans better each time, which is why AI is a fundamentally transformative technology.

It isn’t just government agencies implementing AI software. AI is increasingly being used behind the scenes in all kinds of business settings.

I recently came across a kiwi startup called HipLee, which is being marketed as a “Shazam with pictures, for women’s clothes.” If you’re not familiar with Shazam, it’s a smartphone app that can identify and tell you the name of songs playing on the radio. Likewise, HipLee can scan photos of women’s clothing and tell you what each item is.

Although it’s not advertised on its homepage, HipLee is powered by AI technology. The product probably couldn’t exist without using AI. I emailed HipLee co-founder Tom Murphy to find out more.

“In terms of AI, we’re investing heavily in two spaces,” Murphy explained. “First, AI/ML in visual image processing. We’re also investing heavily in smart, self-learning algorithms that will identify what fashion is of most interest to each individual shopper – and present just those items.”

So in HipLee’s case, the AI software is being used to pattern match across a large image database; as well as making personalized recommendations to users. In both use cases, the machine’s ability to ‘learn’ is key.

I mention HipLee as just one example of tens of thousands of commercial applications of AI in the world today. AI is already having a massive impact on our economy, and the opportunity for government may be just as great.

The government’s B4B initiative is certainly thinking big. It wants to reimagine “legislation as code,” also known as “machine-consumable rules,” so that AI and other software can help citizens interpret and put into practice government regulation. This initiative has been labelled “better rules, better outcomes.”

Here’s how it was explained to me by Casagranda:

“The current output from legislative drafting is a text document. To this we add concept models, decision trees, rule basis and code (the knowledge asset). The ultimate aim is have all of this published in the public domain so that everybody can use it for their applications. This might be for government or private sector use.”

Tai, the chatbot which became an expert on honey exporting regulations, is an early case study for the government’s “code as legislation” project.

“For Tai, the regulatory requirements for exporting honey from both MPI and Customs were expressed in concept models, decision trees and rules,” Casagranda explained.

Tai’s knowledge base (which MBIE also calls a “brain”) learns by deploying these rules. In addition, it accesses information in existing government databases – including website content, contact centre knowledge base information and business support data.

Given it’s a proof of concept, Tai may never go into production. But it’s an intriguing experiment, to use AI to make it easier to interact with government – especially when you need to deal with multiple agencies.

As of now, it’s almost impossible to casually chat to government agencies. For a start, you have to get past all the annoying options on the 0800 numbers. Then there’s dealing with humans who sometimes don’t have a full grasp of the regulations as they apply to your situation.

If a chatbot can help solve these and other communication issues, I’d be happy to chat with a government AI.