This story is part of What Happens Next, our complete guide to understanding the future. Read more predictions about the Future of Work.

In March 2016, AlphaGo’s deep learning algorithms ruthlessly dethroned mankind’s best Go player. The whole world jittered, knowing that the same job-eating AI technology was coming soon to an office near everyone.

Civilization has absorbed economic shocks driven by technology in the past, turning hundreds of millions of farmers into factory workers over the 19th and 20th centuries. However, these structural changes didn’t arrive as quickly as the breakneck pace we’re currently experiencing with AI. Based on current trends in technology advancement and adoption, I predict that within 15 years, AI will theoretically be able to replace 40% to 50% of jobs in the United States. Actual job losses may end up lagging behind by an additional decade, but the disruption to job markets will be very large, very real, and very soon.

As this new world order takes hold, we’ll be left to grapple with a far deeper question: When machines can do everything that we can, what will it then mean to be human?

When machines can do everything that we can, what will it then mean to be human?

This is the real underlying threat posed by automation: tremendous social upheaval, public unrest, and political collapse stemming from widespread unemployment and grotesque inequality. Tumult and turmoil across job markets and societies will occur against the backdrop of a far more personal and human crisis—that of an identity crisis; a psychological loss of one’s own sense of purpose.

We’re already seeing evidence of this. According to study by Gallup, 20% of Americans who have been unemployed for over a year have been treated for depression. The Center for Disease Control has also called the unemployment rate among emerging adults a “public-health concern” after it found that unemployed people aged 18-25 were three times more likely to have depression than their employed counterparts.

For centuries, human beings have filled their days by working every waking hour, trading their time and sweat for money, shelter, and food. We’ve built deeply entrenched cultural belief systems and values around this exchange, and many of us have been conditioned to derive our sense of self-worth from the act of daily work. I’ll readily admit that I was a willing victim of this workaholic brainwashing.

On the morning of Dec. 16, 1991, I was about to become a father for the first time. My wife was fighting through a tough 12-hour labor, and I was right beside her—but looking anxiously at my watch. I knew something that she didn’t know: If our first baby didn’t arrive within the next hour, I was planning to leave her there and rush back to Apple to make a presentation on AI to the company’s CEO. Fortunately, my daughter Jennifer was born by noon.

The human edge over AI is creativity and compassion.

For a long time, I put my work ethic ahead of my love for my family. But my obsession with work ended abruptly five years ago when I was diagnosed with stage-four lymphoma. I was suddenly faced with the real likelihood that I may have only a few months to live.

During that time of ultimate uncertainty, I did a lot of thinking. I came to see how foolish it was to base my self-worth entirely on my accomplishments at work. My priorities were completely out of order. I neglected my family. My father had passed away. My mother had dementia and no longer recognized me. My daughters had grown up.

One of the books I read during my illness was Bronnie Ware’s The Top Five Regrets of the Dying, which is about the regrets of people on their deathbeds. She found that no one wished they’d worked harder or spent more time at the office or accumulated more possessions. People’s top wish was that they had spent more time sharing love with their loved ones.

That crisis brought me to a very dark place, one that challenged my deepest-held assumptions about what matters in life. But it was that process—and that pain—that opened my eyes to an alternate ending to the story of human beings’ relationship with artificial intelligence. I came to realize that AI’s challenges are momentous, but not insurmountable.

We should accept that AI will beat us at doing all kinds of repetitive tasks. But these tasks are not what make us human. What makes us human is the capacity to love.

In my new book AI Superpowers, I raised an argument that may sound counterintuitive to some: that the human edge over AI is creativity and compassion. AI may replace routine jobs, but it will never be able to replace compassionate jobs. Below is a list of what this new breakdown may look like:

You might be skeptical: Do we need so many “service” jobs? But in the post-AI world, we will need many more social workers to help people make the transition. We will need many more compassionate caregivers who use AI for medical diagnosis and treatment, but wrap the cold data engine with the warmth of human love. We will need 10 times as many teachers to help children thrive in the brave new world (in fact, we need these teachers in the existing one, too). And with so much wealth created in the AI age, we will be able to make careers out of humanistic labors of love such as being there for our elderly, and homeschooling our children.

Further, instead of AI simply replacing our workforce, it will augment it. This graph suggests the four different ways our jobs will intersect with AI:

First, AI will do the repetitive jobs for us.

Second, AI tools will help scientists and artists amplify their creativity.

Third, for non-creative but highly compassionate jobs, AI will do the analytical thinking, and humans will wrap that with warmth and compassion.

Finally, there will be jobs where humans will excel without any AI at all.

So there you have it: A blueprint for AI and human symbiosis. Yes, we will lose jobs—but we will also gain ones where humans will excel. These new careers will celebrate both human creativity and compassion, along with our irreplaceable brains and hearts. In this way, AI will liberate us from routine work and push us to become more human, not less.

This story is part of What Happens Next, our complete guide to understanding the future. Read more predictions about the Future of Work.