When people suffering from depression speak, the range and pitch of their voice tends to be lower. There are more pauses, starts and stops between words. People whose voice has a breathy quality are more likely to reattempt suicide. Machines can detect this stuff better than humans.

There are also visual patterns. Depressed people move their heads less often. Their smiles don’t last as long. One research team led by Andrew Reece and Christopher Danforth analyzed 43,950 Instagram photos from 166 people and recognized who was depressed with 70 percent accuracy, which is better than general practice doctors.

There are other ways to make these diagnoses. A company called Mindstrong is trying to measure mental health by how people use their smartphones: how they type and scroll, how frequently they delete characters.

In his book “Deep Medicine,” which is about how A.I. is changing medicine across all fields, Eric Topol describes a study in which a learning algorithm was given medical records to predict who was likely to attempt suicide. It accurately predicted attempts nearly 80 percent of the time. By incorporating data of real-world interactions such as laughter and anger, an algorithm in a similar study was able to reach 93 percent accuracy.

I had a chance to interview Topol last weekend at the Aspen Ideas: Health conference. He emphasized how poor we are at diagnosing disease across specialties and figuring out when to test and how to treat. When you compare a doctor’s diagnosis to an actual cause of death as determined by an autopsy, you find that doctors are wrong a lot of the time. Three-quarters of patients taking one of the top 10 drugs by gross sales do not get the desired or expected benefit.

Medicine is hard because, as A.I. is teaching us, we’re much more different from one another than we thought. There is no single diet approach that is best for all people because we all process food in our own distinct way. Diet, like other treatments, has to be customized.

You can be freaked out by the privacy-invading power of A.I. to know you, but only A.I. can gather the data necessary to do this.