Building privacy into artificial intelligence and automated systems