All it takes is one misinterpreted text to land you in a heap of trouble with a friend, significant other, or colleague. Even serial texters aren’t immune — studies show that most recipients fail to tell the difference between sarcasm and seriousness about 44 percent of the time.

That’s why Es Lee, a Harvard graduate with a degree in computer science, founded Mei, a mobile messaging startup that leverages machine learning to suss out the subtext of conversations.

“One of the difficulties of maintaining relationships through text is that it’s [possible] to come across as crass or rude — even when that was never the intention,” Lee told VentureBeat in a phone interview. “Emotion is lost in text messages. It’s a different form of body language that people aren’t quite attuned to detecting yet.”

Mei, which launched in beta earlier this year, is built on the back of “millions” of messages sourced from the app’s more than 100,000 users, data from two universities, and the dev team’s own exchanges. Lee claims it’s one of the largest datasets of its kind.

Using natural language processing and sophisticated algorithms that take into account response time, terseness, word choice, and other factors, Mei builds a psychological profile of your texting partners. It’s more nuanced than you might expect; Lee said that it’s able to determine the gender and age of a person from nothing more than the types of emoji they use. Add messages to the picture, and Mei can tease out the type of relationship between two people — and the strength of that relationship.

“When you’re a 25-year-old woman texting a 40-year-old man, you might think that from the one-word messages he’s sending, he’s not into you,” Lee said. “But our data shows otherwise.”

In practice, Mei calculates a compatibility percentage, scoring people across five key traits — openness, emotional control, extraversion, agreeableness, and conscientiousness — and breaking each into subscores (e.g., “self-focused,” “contrary,” “respectful”). It also highlights the top characteristics they share in common, like “proudness” and “seriousness.”

It’s much more personalized than the feedback most relationship apps are able to provide, Lee said. AI chatbots like NTT Resonant’s Oshi-el are trained on common questions and answers, but Mei promises to take each of your interactions into account.

“Our idea is to use aggregated data to improve relationships with people. Other than face-to-face conversations, few forms of communication are more important than texting,” Lee said.

He’s got a point. Conservative estimates put the number of text messages sent each day in the tens of billions. And there’s evidence to suggest that texting habits influence the strength of relationships. According to a recent study, the more someone feels they and their romantic partner have symmetrical rhythms of texting — that is to say, the more they send and reply to messages at the same interval — the better they feel about their partnership.

I’ve been using Mei for the past few days, and though I can’t say it’s improved any of my relationships (intimate or otherwise), its insights haven’t been far off the mark — for the most part.

Mei

Mei rated a close friend of mine 82 percent similar — we differed in our adventurousness and appreciation of art (apparently, they’re more “eager to experience new things” and “seek out creative experiences” than I am). But we jibed on agreeableness, specifically our “altruism” and our shared “willingness to accommodate” other people.

As for my personality profile, Mei guessed correctly that I’m a 24-year-old male who’s (1) ambitious, (2) persistent, and (3) a bit introverted. Color me impressed.

AI features aside, it’s worth noting that Mei is a capable messaging app in its own right. Texts are end-to-end encrypted and can be “unsent” from conversation threads at any time, regardless of whether they’ve been read. And there’s a Snapchat-like ephemeral messaging feature that automatically deletes texts after they’ve been sent or read.

But it isn’t perfect. Mei’s algorithms rated another of my chat partners — a family member — a bit lower than me on agreeability, extraversion, and conscientiousness, which didn’t seem quite right. I’ve known this person my whole life, and we’re practically peas in a pod.

Lee admitted that the app is a work in progress and that the dev team is constantly supplementing its data with user feedback. “We’ve always known that users are the best source of information,” he said.

To that end, users informed the app’s newest feature: messaging tips. Starting this week, Mei will offer suggestions on “how to bridge gaps in communication style” by behaving more similarly to the people with whom you’re speaking. If you’re the organized type and a friend isn’t, for example, it might tell you to play things by ear with them.

“We made this tool to help with relationships,” Lee said. “If your car breaks down, there are 1,000 people out there who can fix it. If your relationship is falling apart, it doesn’t feel like there’s help out there.”

Lee and the team run the risk, of course, of unintentionally harming relationships with recommendations that miss the mark. And then there’s the matter of Mei’s cloud-hosted algorithms: The app requires that you upload a copy of your text message history to its servers, which is bound to make some folks uncomfortable.

Lee stressed that users have to explicitly agree to have their data shared with Mei and that it’s encrypted and anonymized. And he acknowledged that while Mei’s algorithms won’t always get personality predictions right, they’ll never suggest an overly pushy or aggressive course of action with a friend or partner.

“The advice is meant to help [users] understand where they may be most different from the people they chat with — so [you] can try harder to find common ground,” the Mei team wrote in a blog post. “We hope information like this will promote empathy … an important factor in effective communication.”

With any luck, it’ll do just that.