How to find yourself in chat history
What's your biggest hope for this year?
omg probably getting into a good college lol
I wished that I could remember every conversation I had. There had been a number of defining, meaningful conversations that touched me deeply. In light of this, for a while I got into the habit of writing down detailed summaries of calls with my friends in a journal. But I didn't start this hard-to-maintain habit until my 20s and some of the conversations I was most curious about where the ones from my teenage years. It wasn't that I want to relive the high school drama (although that would be fun). It was more of a brain itch: "How did I become who I am today?"
Step 01 — Data Extraction & Privacy
The download
A thought crossed my mind - I don't have the in-person conversations saved, but there are years of chat history I have on Facebook. I wondered what I could learn from that. I downloaded a large zip file from Facebook and then moved onto the question:
- How to keep data private? PII is scrubbed from conversation text. A process swaps each contact name with a random alias. Right before hitting the UI, the aliases are swapped back with actual names.
- Local or Online? Everything is processed in memory or written to local CSV and text files. This avoids the need to upload sensitive data to another party.
Step 02 — Scale
Processing
Raw exportmultiple GB of JSON
Filteredreactions & short messages dropped
Sampledper year & recipient
I had to figure out how to go through several GB of data to get the useful info without having to wait for hours.
- Clean & Filter. Drops "thumbs up"s and very short messages.
- Focus on the Inner Circle. Keeps a number of random messages per (year, recipient) and only the top recipients per year. If you regularly keep in touch with a few people, you can see how you interacted with those people differently over the years.
- 2 Year 25% Memory The memory of the chatbot I was making uses only the two prior years, and samples a quarter of months (so conversations benefit from continuity and we sample a variety of time points instead of just cutting the conversation off early.
Step 03 — Style
It gets real
2016
omg guess what happened todayyyy lol!!
2021
Sounds good. See you then.
2016 reads lowercase, run-on, and lol-heavy — excitement spilling past punctuation. 2021 is shorter and drier, with fewer exclamation marks and more clipped sentences.
Instead of just analyzing unstructured text, I wanted to experience "talking to myself" from a long time ago. I was curious how close to my tone and voice LLM outputs could get. It would be frightening if it could perfectly mimic me, and we could talk about the broader implications, but this is just a fun experiment about getting a chatbot to talk like me from various years.
- Style analysis A model writes concise descriptions of tone, grammar, and spelling using given chat data.
- Year-over-year comparison Style patterns from several years are compared, and the user is written a paragraph describing the trends (just for interest).
- References to the source data Scrubbed messages are shown to the chatbot as examples of writing style
- Prompt-based persona. Style guidelines are inserted into an LLM prompt to help the LLM write like you would
This is prompting, not fine-tuning. The model imitates your style from examples in context.
Step 04 — Memory
Remembering the past
2014context
2015context
2016
Two years of memory shape how 2016 replies.
A chatbot that only sounds like you isn’t much use if it has no idea what was going on in your life. I wanted it to bring up the things I was actually talking about back then.
- Two years of context. The chatbot remembers the two years before the year you pick, as if it were living through them.
- Search by meaning. Old messages are split into small chunks and indexed so that, on every reply, the chatbot can look up the chunks most similar to what you just said.
- Short-term memory. It also keeps track of the current conversation, so it doesn’t forget what you said a minute ago.
Step 05 — Insights
Unearthing
Closest to your style
Sally
First message ever sent
“hello world”
LLMs + plain data analytics enable us to find more insights from free text than was otherwise possible. Some questions I was able to answer are below, and this is just the start of what's possible
- How I changed. A short essay describes how my writing style shifted from year to year.
- Who I write like. The model picks which of my contacts writes the most like me, and explains why.
- When I was most active. A chart shows my average messages per day by month.
- Where it started. The very first message I ever sent.
And something else qualitative, what it's like to chat with a chatbot informed about your writing style. Is it like talking to your past self?