What would you do if you had a machine to catch a thief? If you were a corrupt Chinese bureaucrat, you would want to ditch it, of course.
Resistance by government officials to a groundbreaking big data experiment is only one of many challenges as the Chinese government starts using new technology to navigate its giant bureaucracy.
According to state media, there were more than 50 million people on China's government payroll in 2016, though analysts have put the figure at more than 64 million - slightly less than the population of Britain.
To turn this behemoth into a seamless operation befitting the information age, China has started adapting various types of sophisticated technology. The foreign ministry, for instance, is using machine learning to aid in risk assessment and decision making for China's major investment projects overseas.
Beijing has been developing a nationwide facial recognition system using surveillance cameras capable of identifying any person, anywhere, around the clock within seconds. In Guizhou, a cloud system tracks the movements of every policeman with a live status report.
Major Chinese telecommunication companies such as ZTE have won government contracts to develop blockchain technology to prevent the modification of government data by unauthorised people or organisations.
President Xi Jinping has repeatedly stressed the necessity of promoting scientific and technological innovations such as big data and artificial intelligence (AI) in government reform.
The challenge is implementing that vision on the ground. Look no further than an anti-corruption AI system dubbed by the researchers working it as "Zero Trust".
Jointly developed and deployed by the Chinese Academy of Sciences and the Chinese Communist Party's internal control institutions to monitor, evaluate or intervene in the work and personal life of public servants, the system can access more than 150 protected databases in central and local governments for cross-reference.
According to people involved in the programme, this allows it to draw sophisticated, multiple layers of social relationship maps to derive behaviour analyses of government employees.
This was "particularly useful" in detecting suspicious property transfers, infrastructure construction, land acquisitions and house demolitions, a researcher said.
The system is not without its weaknesses, however.
"AI may quickly point out a corrupt official, but it is not very good at explaining the process it has gone through to reach such a conclusion," the researcher said. "Although it gets it right in most cases, you need a human to work closely with it."
The system can immediately detect unusual increases in bank savings, for instance, or if there has been a new car purchase or bidding for a government contract under the name of an official or one of his family or friends.
Once its suspicions have been raised it will calculate the chances of the action being corrupt. If the result exceeds a set marker, the authorities are alerted.
A computer scientist involved in the programme who asked not to be named said that at that stage a superior could then contact the person under scrutiny and perhaps help him avoid "going down the road of no return with further, bigger mistakes".
The Zero Trust experiment has been limited to 30 counties and cities, just 1 per cent of the country's total administrative area. The local governments involved, including the Mayang Miao autonomous county in Hunan province, are located in relatively poor and isolated regions far away from China's political power centres.
Another researcher involved in the programme said the idea was to "avoid triggering large-scale resistance among bureaucrats", especially the most powerful ones, to the use of bots in governance.
Since 2012, Zero Trust has caught 8,721 government employees engaging in misconduct such as embezzlement, abuse of power, misuse of government funds and nepotism.
While some were sentenced to prison terms, most were allowed to keep their jobs after being given a warning or minor punishment.
Still, some governments - including Mayang county, Huaihua city and Li county in Hunan - have decommissioned the machine, according to the researchers, one of whom said they "may not feel quite comfortable with the new technology".
None of the local authorities responded to requests for comment.
Zhang Yi, an official at the Commission for Discipline Inspection of the Chinese Communist Party in Ningxiang, Hunan province, said his agency was one of the few still using the system.
"It is not easy … we are under enormous pressure," he said, insisting that the main purpose of the programme was not to punish officials but to "save them" at an "early stage of corruption".
"We just use the machine's result as reference," Zhang said. "We need to check and verify its validity. The machine cannot pick up the phone and call the person with a problem. The final decision is always made by humans."
Since Xi rose to power in 2012, more than 1.4 million party members and government employees are estimated to have been disciplined, including leaders like former security tsar Zhou Yongkang and former Chongqing strongman Bo Xilai.
A party disciplinary official in Xiushui county, Jiangxi, who took part in the Zero Trust project said no government officials were willing to provide the necessary data.
"But they usually comply with a bit of pressure," said the official, who asked not to be named because of the sensitivity of the technology.
Disciplinary officials need to help scientists train the machine with their experience and knowledge accumulated from previous cases. For instance, disciplinary officials spent many hours manually tagging unusual phenomenon in various types of data sets to teach the machine what to look for.
Some officials might fabricate data, but the machine can compare information from different sources and flag discrepancies. It can even call up satellite images, for instance, to investigate whether the government funding to build a road in a village ended up in the pocket of an official, the researchers said.
The system is still running in Xiushui, but its fate is uncertain. Some officials have questioned the machine's right to access a sensitive database because there is neither a law nor regulation authorising a computer or robot to do so.
No wonder the system is being decommissioned by counties and cities that had signed up, and those still using it are facing enormous pressure, with the researchers seeing little or no hope of rolling it out nationwide.
The Zero Trust hump notwithstanding, artificial intelligence's foray into other government sectors continues as the government is determined to use cutting-edge technology to its advantage. AI clerks, for example, have been recruited in some courts to read case files and help judges process lawsuits with higher speed and accuracy.
Last month, a court in Shanghai became the first ever in China to use an AI assistant at a public hearing, Xinhua reported.
The machine, code-named "206", has the ability to record conversations, show evidence such as surveillance camera footage when mentioned by lawyers, and compare testimonies to help judges spot discrepancies, the report said.
One judge was quoted as saying it would reduce the likelihood of a wrong verdict.
This article was first published in South China Morning Post.