Deputy prime minister David Lammy has promised to reform the UK’s justice system through the use of artificial intelligence (AI) and other technologies.