Making AI work in the legal sector