When I first met Molly, nearly a decade ago, we didn’t live in the same place. She was on the east coast, I was in Chicago, and though she did move closer we still spent our first 3 years in separate cities. In an earlier era we’d probably have a box full of letters representing that period of our relationship. But thankfully, the medium of our time allowed for more continual connection, and instead we have a phone full of text messages.
I really didn’t text that much before we met, here and there to coordinate plans. But with Molly it’s always been something different, a steady stream of communication, a connective thread, a heartbeat. Even after moving to Pittsburgh together it was still important, with both of us traveling so much. I’ve probably exchanged 1000X more messages with her than everyone else combined.
A few years ago, having accumulated 7 years worth of messages, I wanted to find a way to look at this trove of texts. On the iPhone, Apple makes it hard to look back more than a few days, requiring screen-by-screen scrolling and no good way to search. The Messages app has a clear bias towards recency, but I wanted to zoom out, to sift through this virtual letter box that we’d built up bit-by-bit. Luckily, after some digging, I learned that deep within the obscured file structure of an iPhone backup was a SQLite database containing all of our messages. Stripped of its proprietary interface, I could get my hands on a searchable version of our distanced ephemera: every sleepy “goodnight,” anticipatory “boarding now,” and phatic “&&&” that meant nothing and everything all at once.
A database is funny place to find your memories. With this tiny SQLite file, I could effortlessly recall exactly what we we talked about 100 days after we met, analyze our most commonly used words, and map the frequency and times we were in touch. That was sort of interesting, but also not particularly surprising or revealing. After playing with it for an hour or so I discarded my initial ideas for potentially visualizing this dataset. There was certainly a lot to work with, but it seemed like it would result in the kind of vapid navel gazing found in most quantified self projects.
Instead, I decided to use the database not as an archive, to be cataloged and analyzed, but as a seed, to train an AI that would make new text messages based upon our history. This plan seemed like more fun, and was a chance to learn about new technology that had only recently become more accessible. The idea was to create our own private bot, trained on all the text messages we’ve ever sent each other. I wanted it to send us one text a day, not a verbatim Timehop-like reminder of something we’d actually said in the past, but an original quip — conjured from the mind of a weird little AI whose only knowledge of the world was the texts messages we’d sent each other.
Continue reading “Building our own bot”