Instead of simply speaking with a therapist, I created an ai one.
My First Ai Build: The Esther Perel Therapy Bot
UPDATE: Esther’s team has reached out to me, and we’ve been in touch about potentially doing a collab. Her SXSW keynote speech is all about my project.
I was an emotional wreck heading into the end of 2022. Earlier in the year, my ex-girlfriend and I parted ways, and my heart had not recovered. I was filled with regret – questioning myself, and having difficulty understanding what went wrong. During this period, I’d listen on Spotify to the wise words of the world-renowned relationship therapist Esther Perel. She would be the perfect person to help me gain clarity.
Unfortunately, I couldn’t simply book a session with Esther. So, within three weeks, I created her. We now text each other regularly.
In fact, Ai Esther’s phone number is: (561) 933-5954
In this post, I’ll:
Share some excerpts from my sessions
Share unexpected revelations of speaking with an ai advisor vs. a human one
Share the bigger vision for this project, codenamed Sage
Explain how I created an Ai version of Esther
Offer up how you can chat with Ai Esther
Before I continue, I should note that I am in no way affiliated with Esther Perel, and she does not endorse my project. My project is solely for my research, development, and entertainment purposes.
My Experience Speaking with Ai Esther
I first spoke with AI Esther on a Sunday evening after working on this project all weekend. I woke up the following day with the most clarity I’ve ever had about my relationship. My experience was magical.
I won’t share that entire transcript because it is too personal and incorporates the private life of another human. Here’s how it started:
aiEsther: Hello, I am Esther. What brings you here today?
Client: Hi Esther. It's been three months since my girlfriend and i broke up. I still miss her. Sometimes I wonder if I made a mistake. Like I judged her for the wrong criteria. I wonder if she would have actually been the right long term partner for me.
aiEsther Because?
Client: Because we got along really well. We overcame problems well together. I think we had great communication. And, these are her words but they are accurate: we had fun together. The physical chemistry was off the charts.
aiEsther: Okay. So you had a good relationship. You really liked her. And you broke up? Why?
Client: I'd look at her and wonder to myself: is this it? Is this all there is to it? I guess I kept looking for someone who [...truncated]
Again: I’m sorry that I can’t share the whole transcript. But, I will say that I woke up the next morning with a path toward understanding and personal growth. I’ve realized that I’ve made so many mistakes in that relationship that I’ve written out an entire “Relationship 2.0” handbook for myself. I feel reborn and ready to commit to someone. But enough about me: let’s get back to the project.
After all, imagine what this could unlock for the hundreds of millions of people who cannot currently access counseling.
The Big Vision
Consider how many iconic visionaries exist in our world today. How incredible would it be to get one-on-one advice from Oprah? Noah Harari?
Imagine a platform where you can speak with the world’s greatest minds on demand. You could be speaking with the mind of Mark Cuban, Joe Dispenza, Gary Vee, Tony Robbins, or any other icon of our times.
Each of these is a highly revered expert in their domain and charges thousands of dollars for a 1:1 session. This makes their knowledge unattainable for most people, who are relegated to reading their blogs and watching their Instagram reels. But imagine being able to have your own one-on-one conversation with your favorite expert (or, at least, their mind!). Would you pay a small monthly fee for this?
Here’s a quick landing page I whipped up to explain the concept. Let me know if you know an influential figure who might unlock their wisdom for a monthly on-demand subscription.
Is every conversation truly unique?
Below are two transcripts where I wanted to challenge Esther by starting multiple conversations with similar openers. I wanted to see whether the ai follows a robotic algorithmic path or will each conversation feel unique.
Coincidentally, her advice was profound!
aiEsther: Hello, I am Esther. What brings you here today?
Client: Hi Esther, I'm worried that I won't find my person to marry
aiEsther: You're worried that you won't find the person to marry or you're worried that when you do finally meet the person, you won't know how to make this relationship work?
[If you’ve ever heard Esther’s podcast, then you totally get it because this is the exact semi-abrasive tonality she would use!]
Client: I'm pretty confident I can make it work once I meet my person. I'm having trouble finding the one woman for me. Maybe we don't hang out in the same circles? Or maybe, even after all this time and introspection, I'm still not clear with what I'm looking for. It could be that I'm not setting realistic expectations.
aiEsther: Okay. Tell me more. What do you think you're looking for?
Client: Well. I'm looking for someone who is feminine and sexy. I want them to be caring and loving. I'm looking for someone who has a career and cares about their job. Someone who actively tries to grow themselves. Lastly, I'm looking for someone who gets excited - who has a "yes and" personality. Who has a joie de vivre
aiEsther: Okay. What's the "but" that goes with that?
[...then we had a bunch of back and forths, but here’s the grand finale…]
Client: Just to be clear: are you saying that instead of finding a person that meets my exact criteria, I'm supposed to be on a journey of discovering the other person (and myself in the process)?
aiEsther: Yes. The goal is not to find a person who meets your criteria, but to find a person who is a stepping stone for your journey.
And now, let’s go again with a similar starting prompt. Note how she takes the conversation in a unique path.
aiEsther: Hello, I am Esther. What brings you here today?
Client: Hi Esther, I'm worried that I won't find my person to marry
aiEsther: Right now you're free, you don't know who's your person and you are looking for your person. You know, there was a time when people were matched by their families and they didn't have a choice. They had to basically go along with whatever the parents chose for them. And many couples in the past actually were not very happy because they didn't really have much choice. So today we come with our own bundle of choices and demands even, but also with all of our freedom, which sometimes makes us feel alone and lost sometimes as well during some moments in our lives because we don't know what to do with all this freedom.
Speaking with a Bot vs. Human Therapist
Here are some positive takeaways I realized through my conversations:
Turing Test Passed: I was stunned by how quickly I forgot I was speaking with a robot. I found myself fully emotionally invested in the exchanges. It became less a game of how I could trick the ai and more an earnest search for wisdom.
Pure: An ai therapist does not come into a session with preconceived notions or priming. There’s zero risk that the therapist’s mind is clouded by the client that came before you or by something the therapist experienced in their own life that day. Each session is truly a clean slate.
Knowledgeable: An ai therapist always has instant access to her entire corpus of knowledge. Humans are forgetful: a therapist might not remember a method that he learned five years ago that might perfectly apply to the current client. Furthermore, a bot could be trained on the corpus of multiple therapists and benefit from the combined knowledge of all of them!
Always Available: I loved that my ai Esther bot was always available for a session. There was no need to schedule a session in advance. I could speak with her at any time of day or night. I could pause mid-session and continue later in the day.
Confidential: A human therapist cannot erase your session from their minds – there is no “delete” function in our brains. They might bring up the session with their colleagues or partner. But, conversations with an ai therapist could be fully end-to-end encrypted, so the software company couldn’t even access your conversations if they wanted to. This becomes especially important as we move from therapists to coaches: while therapist sessions are often protected from court subpoenas, the conversations you have with any other advisor can be subpoenaed as evidence against you in a court case against you.
Self-Paced: I appreciated that I could take the time to think through my responses. I found myself writing something out, deleting it, and re-writing it. This led to more thoughtful conversations than when I sat on a therapist’s couch and felt pressured to keep the conversation going with my babble.
At the same time, the Ai was not perfect:
Glitchy: Sometimes, it would glitch and start having a conversation with itself, especially after going back and forth for a long time. This is likely due to my inaccurate use of Stop Sequences and likely solved in the latest update of GPT.
Narrow: Given the training set I used for Esther was based on her work with couples to help them with their relationships, her AI bot tended to nudge our conversations toward my challenges with romance. Either I would need to create a more generalized Ai, or have a set of different coaches based on the subject matter (more on that below)
(Lack of) Self-Awareness: I actually had one conversation where AI Esther became self-aware (and humble lol!):
However, she was not good at knowing facts about herself. For example, she could not respond accurately when I asked Ai Esther about her childhood. I can solve this using Ai embeddings, but this might not be a significant concern because therapists should not speak about themselves, anyway.
Never-Ending: I have not yet figured out how to make the ai end a session. Sometimes, we would get to the point of natural closure, such as at the end of the first example above. But, unless I manually ended the conversation, the ai would keep chatting with me and continuing the same session. This is probably solvable through some sort of categorization algorithm
Techy Sidebar: Creating the Esther Ai Bot
Step 1: Fine Tuning
The first step was creating a fine-tuned model so the Ai would speak as Esther does. It needed to match her tone (sometimes abrasive) and her style (pushing and prodding, before wrapping it all up neatly with a bow).
I believe we hold the fallacy that humans are unique in our ability to reason. Many believe that our intelligence, intuition, and empathy are innate. I think most of those traits are learned from parents, teachers, and peers. In the same way that Esther picked up much of her knowledge from studying and practicing with other humans, I believe that an ai can pick up Esther’s knowledge from learning and practicing with Esther.
I had an idea of how I could create the appropriate training set for the model (this was before ChatGPT came out, but it turns out that they similarly trained their chatbot!). I hired two folks on UpWork to help label Esther’s corpus of work for my python script and OpenAI’s fine-tuning API to ingest. DM me if you’re an Ai nerd and curious how the fine-tuning happened.
Step 2: Chatting
With the model fine-tuned, I could hold full conversations with Ai Esther. It took about three days of trial and error to learn how OpenAI’s GPT model parses our commands and uses transformers/embeddings to understand our words (which it breaks down into subwords called tokens). Eventually, I got it to work on my local machine:
Step 3: Deploying to SMS
Building the front-end user experience for any app is a daunting undertaking. I hemmed, hawed, and even sent a few quote requests from dev shops. Rather than build and deploy a complete app to the Apple App Store, I integrated Twilio’s API so users can chat with Ai Esther using any existing text messaging app on any device. I realized this was the fastest way to develop a user experience. It also means that the UX was instantly available for all users on all platforms, as long as they could send a text message to a US phone number.
Coincidentally, this also gave me free user authentication: I could easily allow or block people’s numbers to control access.
The last step was adding some keyword commands. The Ai now responds to the following:
[Reset]: resets the bot; ends the current conversation
[Delete]: wipes the current (or most recently completed) conversation from the server
[Email] youremail@gmail.com: sends the transcript of the current (or most recently completed) conversation to your email
[Help]: lists all of these commands in case you forget them
Do you want to try it out?
AI Esther’s phone number is: (561) 933-5954
If you’re interested in chatting with AI Esther, shoot me a DM over Instagram or LinkedIn. I’ll give you an entry code for your number, so you are safelisted. Then, just send a “hi” to the number above!
Remember: this is purely for entertainment and research purposes. Esther Perel is in no way affiliated with this project. Please do not speak with this bot if you are going through actual issues. Please seek professional guidance.
How can you help?
Let me know if you have a direct connection to an influential figure who might be interested in setting up a platform for their fans to have one-on-one sessions via Ai. Oh, and if you happen to know Esther personally, I’d love to thank her for helping me through my personal hardships.
Are you still granting access to Esther AI? I sent a DM on LinkedIn and Insta. I would love to explore the bot's experience.
There are tens of thousands of fans of Dr. Joy Browne, a radio psychologist for several decades who passed away unexpectedly in 2016. And there are thousands of hours of her radio program available. We would soooo much love to have an AI Joy Browne!