AI is learning when it should and shouldn’t defer to a human