The most thoughtful post I’ve read recently on these two apparently related (problem + solution) ideas is Vi Hart’s.
Her conclusion: AI is going to displace jobs, but it’s not what you think. UBI is a good idea, but not as a solution to AI. A better solution is based around fairly valuing people for the data they generate, which is fundamental to the successful operation of AI. Lots of good references to Lanier, et al.
Definitely worth the read if you’re interested in this. Andrew Yang, do you have a good response?