Whenever I talk to people about the potential impact of artificial intelligence (AI) and robotics, it’s clear there is a lot of anxiety surrounding these developments.

And no wonder: these technologies already have a huge impact on the world of work, from AI-powered algorithms that recommend optimal routes to maximize Lyft and Uber drivers’ earnings; to machine learning systems that help optimize lists of customer leads so salespeople can be more effective.

We’re on the verge of tremendous transformations to work. Millions of jobs will be affected and the nature of work itself may change profoundly. We have an obligation to shape this future — the good news is that we can.

It’s easier to see the jobs that will disappear than to imagine the jobs that will be created in the future but are as yet unknown. If, as The Wall Street Journal suggests, we think of AI as a technology that predicts, it’s much easier to map its impact. We must push ourselves to do that and understand the future of work.

Here are six principles to keep in mind as we imagine how the world of work will evolve.

1. Expect massive disruption

As Klaus Schwab, Founder and Executive Chairman of the World Economic Forum, explains, we’re in the midst of a “Fourth Industrial Revolution”, after steam power (the first), electric power (the second) and digitization (the third). The fourth, which incorporates AI and robotics as well as other technologies, will have an even greater impact.

Of course, most new technologies create new opportunities at the same time as they eliminate old jobs, but there is rarely a perfect correspondence between these two forces. The people whose jobs go away aren’t easily retrained for the new jobs and that can lead to anger and social unrest — and, in the short term, massive inequalities, across both geographies and groups of people.

It’s essential to prepare for change by keeping abreast of new technologies, both in general and in your specific field. Learn as much as you can and keep your skills up to date.

2. AI will replace repetitive tasks more than jobs

Recent studies, including one from McKinsey and another from the OECD, have poured cold water on earlier estimates that nearly half of American jobs are at risk of being eliminated by AI.

Newer studies look at specific, repetitive tasks instead of whole jobs and find that, for most of us, some fraction of the work we do each day could be done better with AI. But for most jobs, computers aren’t going to replace everything we do.

For the majority of us, AI will take away the most repetitive and boring tasks, enabling us to spend more time on creative problem-solving and on the parts of our jobs that involve complex human interactions and relationships.

To help prepare for this future, investigate AI-powered tools in your own field. Learn how to use them and exploit them to increase your own productivity.

3. Middle-skilled jobs will be hit hardest

The job market will not, however, be untouched by automation. The OECD estimates that 9% of US jobs are in principle automatable. If that happens, it’s going to have the worst effect on people with mid-level skills. Both mid and low-level jobs will be the easiest to automate, but there’s a stronger business case for replacing mid-level workers with machines because they are more expensive.

If the people replaced by AI and robots aren’t retrained well, they’ll be forced to apply for low-skilled jobs, leading to an oversupply of workers at that level and depressing those wages even further.

At the same time, there will be fewer people qualified for high-skilled jobs, increasing wages in that segment. This dynamic, if unchecked, will hollow out the middle of the job market and lead to even greater polarization.

To mitigate the impact, society needs to provide education and job placement opportunities for those most affected by automation.

4. Opportunities will be unequally distributed — at first

Over time, jobs will return. But they won’t be the same kinds of jobs and they will, in all likelihood, appear in different parts of the country to the jobs that automation has destroyed.

For instance, researchers Daron Acemoglu and Pascual Restrepo have examined the impact of robots on jobs in the US. What they found is a strong regional impact: for every new robot introduced in a particular metro region, an estimated 6.2 jobs were lost in the same geographic area. But when examining the country as a whole, they found that the impact was about half or equivalent to three workers losing their jobs for each additional robot.

One possible explanation is that the automation of industrial jobs in the Midwest and US south is partially offset by new types of jobs in coastal cities.

But that’s no comfort if you’re living in one of the states with a net decline in jobs. Those who have lost their jobs need retraining and we need an education system that prepares all US children, not just a privileged subset, for the jobs of the future.

We also need to acknowledge the uneven geographic impact of automation and take steps, as businesses and collectively as a society, to increase opportunity in geographic areas that are affected adversely.

5. Technology designers have responsibility

The ethical mandate is not just in education, but also in the design of technology products themselves. Autonomous technologies are not value-neutral with respect to the jobs they impact. Carnegie Mellon robotics professor Illah Nourbakhsh makes the case in a recent podcast that the makers of robots and AI software need to think ethically. Are they creating technologies whose sole purpose is to replace human workers or are they facilitating human productivity and happiness?

Designers, computer scientists and CTOs all need to understand the ethical implications of how we create and use robots and AI. This needs to be a topic of discussion among business leaders on national and global stages. Merely calling for a universal basic income is sidestepping the question: technology makers need to account for human dignity and work in their very products.

6. The long-term trend can be positive — if we make it so

Eventually, after the Industrial Revolution, there were at least as many jobs as there were before and they were better ones. The net result was an increase in productivity and in the number of people employed, which raised overall wealth. But that wasn’t a foregone conclusion.

In the 21st century, we’re facing a massive change in the technologies and types of jobs available, similar to that faced by our grandparents in the early 20th century. Like them, we can’t be certain that both productivity and employment will rise.

We, as a society, need to make the commitment to guide our technologies responsibly and to capitalize on the prosperity we are creating, just as those who came before us did. That way we will ensure that AI technology creates opportunity for all, not just for a lucky few.