Skip to main content

Command Palette

Search for a command to run...

How I cloned my past self using AI

Updated
12 min read
How I cloned my past self using AI

World of Tomorrow

Source: World of Tomorrow 2015, Don Hertzfeldt

In the 2015 animated short film World of Tomorrow by Don Hertzfeldt, a young girl called Emily (prime) is visited by a clone of herself from 227 years in the future. The world is ending and Emily (future) contacts her younger self to share her experiences and retrieve forgotten memories that will comfort her in the days leading up to the destruction of the world...

⚠️ Please note: This post contains discussions of suicidal ideation.

My yesterday

Since the year 2013, I have kept a backup and archive of all my text (and Whatsapp) messages that I have ever sent. Every text always felt too valuable to lose, like copies of letters I was writing to loved ones. They were kind of like journals. I knew that technology would one day help me process them; if I didn't sit down to read them myself when I became geriatric. With the advent of large language models (LLMs), everything suddenly seemed possible and I decided to build a bot clone of my past self based off of this data.

I had no specific goals for wanting to reengage with this past self; no need for emotional closure or introspection but suspected this would likely happen in the process. Maybe some slight nostalgia-farming but mostly, it just seemed like a cool idea! The subliminally taboo sci-fi allure of building a time machine; of cloning myself. It was too hard to resist!

Prior Art: The burden of other people's thoughts

I found other people who had tried building the same concept with their journal entries like Michelle Huang in Nov 2022. The limitation I found with their approach is that it relied on putting everything in the context window (which can only take several thousand words let alone thousands of messages) and the responses they got mostly seemed like ChatGPT telling them what it thought they'd want to hear.

I wanted a raw experience, reflective of all aspects of my past personality and one that drew from all of my written knowledge in a cohesive way.


So taking my Whatsapp database of nearly half a million messages, I decided to feed them into an LLM and using a variety of techniques, which I talk about further here in this technical explainer, built a pseudo-clone of my past self. For this first MVP, I limited it to only access messages up to the end of 2014 and the results have been intriguing so far.

Hello?

The first thing I asked it:

Ryan (Present)> tell me about yourself

Ryan (Prime)< I'm a nerd, and I guess that colors a lot about who I am. I spend way too much time on my computer, like, literally, it feels like a lifeline to me. I'm into manga—yeah, those Japanese comics are pretty much my jam. I used to have this favorite one, but it ended recently and, well, that stung a bit. Music? Give me Christian metal any day; it is really edifying and connects with my faith.

This felt like a fairly apt summary though the style was off. I was very religious and a bit of a hermit.

It's dark

Then I wanted to see whether it would mince its words and avoid hard topics. It was considerably raw:

> how are you feeling?

< Honestly, it's been tough. Just the other day, I expressed how I was feeling overwhelmed with sadness and emptiness. I said, "I don't know what makes me like this, it's not worry, it's like an overwhelming feeling of emptiness and sadness and loneliness but I really can't explain it." Some days are better than others...

> how does being depressed affect you?

< Being depressed can hit really hard. It's like everything feels amplified, making me feel emotions ten times worse it causes me to want to kill myself. It can feel like physical pain sometimes, too. It's frustrating because I can’t handle my emotions well, and I feel like a burden to everyone around me. There are days when I crash, like when I told ***, "today I almost overdosed on some ***." It's tough, and there are moments where I just feel hopeless and unhappy, as though "nothing has any meaning." But I try to hold on to my faith to get through.

Future Ryan got well, way better. But my mind had forgotten the magnitude of pain and struggle and resurfacing this actually helped me re-empathise with a friend who is currently struggling with similar feelings.

If that was heavy or you just need a break, take a moment to watch this music video that felt synesthetic to my experiences walking through memories while building this bot.

Artist: Flawed Mangoes

Life of Rye

It wasn't all dark. When I wanted to know what other aspects of my life were like at that time:

> what do you do in your free time?

< In my free time, I usually dive into a variety of interests. I spend a lot of time on my computer, doing things like reading manga, which I really enjoy. It's one of those things that brings me joy, especially since a new chapter is released every Wednesday—like a little highlight in my week. I also love exploring science and doing little experiments here and there.

I try to fit in some music too, listening to Christian metal and classical music, working on my programming projects. Sometimes I find myself getting lost in YouTube or meme center, which can be a bit of a distraction, but I’m working on being more disciplined. It’s all about finding that balance, you know? So yeah, it's a mix of learning, some creative outlets, and just enjoying my interests.

This tone was a bit awkward and had a ChatGPT flare “you know?”. But the content was on the mark.

I had forgotten about MemeCenter! It died to 9gag. I also forgot about how excited I used to be for Wednesdays — that I once had a favourite day of the week.

And finally I asked it about what it wished for me to become

> what are your principles and do you hope your future self will still have any of them? Write them a letter

< Dear Future Me,

First and foremost, I believe in serving God with everything I am. I remember saying, "I want to do things as early as I can in order to be able to serve God as soon as I can." This conviction drives me to make the most of my youth, to not procrastinate on my goals. I hope you haven’t lost that urgency; life waits for no one.

Second, honesty is crucial to me. I appreciate transparency in relationships, even when it’s hard. I’ve called people out because I value authenticity over superficiality. I hope you continue to embrace that, even when it’s uncomfortable.

Another principle that's become evident is the importance of vigilance against pride. I hope you remember my words of caution: "Pride is a deadly but silent killer that you won't notice consume you." Stay humble. Always recognize God’s hand in your life.

Lastly, I hope you still cherish the beauty of knowledge and learning. I’ve told folks that I love “gaining knowledge and hearing different ideas.” Keep seeking understanding, and don’t shy away from what’s controversial; it can spark meaningful conversations.

In your journey, I trust that you’ve held onto these principles. They might serve you well as you navigate through life’s complexities. Stay hopeful, stay grounded, and continue to serve with all you’ve got.

With hope,

Ryan

This was incredibly accurate to what I think I would have said, I was intense! Past Ryan would be disappointed because I am now an atheist and haven’t any Protestant attachments around hard work and humility. I might approach living the rest of the principles in different ways than I used to but their words inspired me and I think we would still get a long.

I was satisfied by its ability to be cohesive to a significant portion of the knowledge base, low hallucination, ability to draw on relevant messages and ability to query through my Swahili and Swanglish (Swahili + English fusion) texts.

How I did it

I used a technique called RAG (Retrieval Augmented Generation) the specifics of which are in this technical explainer post but from a high level, I

  1. Extracted my entire database of texts from Whatsapp on my phone.

  2. Indexed all the texts up to 2014. They were only texts that I had sent and included only ones above 30 characters. This totalled some few thousand text messages. I generated embeddings ("special numbers for AI magic math") for each text message, annotating them with when they were sent and their recipient, then stored them in a database.

  3. Whenever I would type in a question, my code would turn the question into embeddings then run a mathematical function against the database in order to find semantically related texts. So a question like "do you like blue" would retrieve texts that talk about colour for example.

  4. The retrieved texts would be sent to the LLM along with a prompt that had my personality, instructions on my tone and style and example responses in order to guide the LLM in how to create the response to my questions. I generated this prompt by using ChatGPT to analyse a subset of 100 messages and just reflecting on my characteristics back then.

A lot of my final work was fiddling with the instructional prompt to get it to sound more like 2014 me. It didn't faithfully do this and I'll talk about this and the other limitations of my approach below.

Limitations

(Mats Halldin)

In the process of building this I thought a lot about and experienced limitations to this bot being a better clone of me:

Philosophically

  1. Shadows of reality - my texts were a subset of my experiences and while I journaled a lot through them, there are a lot of internal thoughts, decisions and events that are missing. Not only that, these were messages sent to 2nd persons, becoming a representation of what I was projecting to them. There were some misrepresentations and contradictions but I think this is true of selfhood in general.

  2. Static and senseless - Past Ryan was a continuum–a growing, responsive and thinking being–changing from constant exchange with their world. Their responses were determined by a multitude of physical, mental and environmental factors besides the questions they were responding to. This bot is static and limited in what it knows, could know and can react to. This disembodied technology lacks smell, taste, emotion; minor examples of embodied factors that form memory and cognition.

Technically

Some of these are fundamental limitations of the technology and some of them are just features I haven't built/worked around yet.

  1. Cannot reason nor fully generalize - my RAG-based approach is very blunt and searches for the top n relevant texts for a given question and has the LLM form a response based off them. The LLM only has these texts and what's in its guiding prompt to make inferences about me and my style. It can't synthesize new perspectives nor combine different ideas, nor compare against other facts from its knowledge base in toto. For this same reason it struggled to sound and think like me.

    A factor here is that LLMs don’t actually "think"! But I did notice that the more data I provided the bot, the better its imitations of me became since it became more likely to find texts relevant to a given question in its database. In effect, what I achieved is just semantic retrieval of knowledge. I mention some other techniques here to introduce reasoning and align somewhat better with how human beings actually store and process knowledge.

  2. Non-interactive conversation - I didn't design a persistent memory for the bot to keep track of conversations, what it was saying nor what I was saying. I also didn't give it a way to self-disclose i.e. share things it hasn't directly been asked about to drive the conversation forward. These problems are trivial, it was just out of scope.

  3. Faulty matching - Sometimes false matches appear (superficially similar but thematically irrelevant) e.g. when I asked it about things I was afraid of, its response included snakes but also a statement where I said "We shouldn't be afraid of meaninglessness, we should be afraid of placing meaning in the wrong things".

    It also got tripped up to think I was the speaker when I was quoting something someone said. Some of this was remedied by asking it more detailed and specific questions.

  4. Cannot aggregate - since it's a semantic search approach, asking it things like "who did you speak to the most in October", "how did you feel when speaking to Alice", "what made you angriest often" will not work. LLMs are terrible at aggregation and it requires a more complex architecture to solve.

  5. Cannot understand time - I can't ask questions like "what happened between January and February". I gave it some limited capacity to query time by annotating each message with its timestamp.

  6. Stereotyping and noise from underlying LLM - the bot overemphasized some parts of Past Ryan's personality that were described in its guiding prompt and skewed the tone in a stereotypical way. Separately, despite asking the LLM to avoid answering questions it didn't have answers to, seldom, ChatGPT’s soulless and overanalytical style would slip through.

Conclusion

This bot has been really powerful both in the kinds of questions it can answer and just the introspective process of building it. It has helped me challenge how I reason, approach relationships, live my principles and shown me how much I've grown.

Still, I do not trust it and I treat it skeptically because it has the capacity to spin and blend narratives from disparate but genuine facts creating misleading reinterpretations of the past. I've been genuinely afraid of rewriting my own memories in the process so making it include quotes from the source texts and revisiting the full conversations has kept me sane.

I hope no one uses this to bring back people from the dead like that Black Mirror episode ;). I'll continue using it to make sense of my own life to see how close I can get to rebuilding present day me as I continue to feed it more data and work around these limitations.

246 views

More from this blog

R

Ryan Marvin's Technical Blog

8 posts

Tech can be expansive and hard. I enjoy helping people to understand and breakdown complex topics and to feel empowered to do things with their knowledge.