Artificial Intelligence (AI) technology is being piloted to help free up NHS hospital beds being used by people who are fit to be sent home, officials have said.