Before the tractor was invented, most people worked in agriculture. 
All those jobs were replaced by a machine. 
But those people didn't become unemployed, they moved to better higher paying jobs. 
This was possible because inventions such as the tractor increase the total productive output and wealth of society, which enables new economic sectors.
Generally speaking, when such a new technology gets invented, it causes pain for a small group of people, but it increases the overall prosperity for everyone else. 
It is difficult to predict how this will play out for AI. 
But let's take one specific example where jobs may be replaced by AI:
Self driving cars. 
When self driving cars become a reality, every taxi, uber and truck driver will be replaced. 
Those people will lose their jobs, and they may or may not be able to switch to a different job. 
But for the rest of society, self driving cars will be a big blessing. 
For example, a 30 minute taxi or uber ride will no longer cost $40 dollars, but only $7. 
If people can use such cheap robotaxi services, they don't need to own a car anymore, and instead, they can spend that money on other things. 
This significantly increases the wealth of almost every person on earth. 
In addition, people currently spend several hours per week driving cars, all that time will be freed up. 
Instead of driving, they can sit in the back of the car and work, or pursue recreational activities, or consume goods and services. 
These 2 things, the fact that people may not need to buy and maintain cars anymore, and the fact that they will have more time to work or consume, these 2 things will significantly grow the economy. 
On the trucking side, every single product you buy, wether it's in a store or online will become cheaper, because the logistics cost of getting the product into your hands is lower. This will also grow the economy. 
All this economic growth will likely outweigh the temporary loss in employment in the taxi and trucking sector. 
There may be areas were AI really does replace jobs without a proportional increase in general prosperity, but i am not able to imagine such an example as of today.
spam fails_task lang_mismatch pii not_appropriate hate_speech sexual_content quality toxicity humor helpfulness creativity violence