Molly White
Software engineer, editor and arbitrator on Wikipedia, feminist, Twitter bot commander, unabashed cat lady.

The challenges of building a compassionate robot

I recently released you're valued, a Twitter bot somewhat unlike my others. The other three bots are interactionless—they don't tweet at you, and they ignore tweets you send to them. They all pull from outside corpora (news headlines or song lyrics), adapt the text, and tweet it into the ether.

you're valued is quite simple: it searches through Twitter for the phrases "nobody likes me" and "nobody loves me," then replies to the tweet with "I like you," "You're valued," "You matter," or a simple "❤".1 It maintains a list of users to whom it's replied to avoid repeatedly tweeting at the same user—nothing like having a bot follow you around insisting you're liked... It also avoids responding to tweets that contain YouTube links (or links at all), "#nowplaying", or any tweets that even contain a quotation mark or a hyphen. Although these are pretty rudimentary filters, and possibly overeager, I was finding that the presence of quotation marks and hyphens was very highly correlated with the tweet being a song lyric or a verse from a poem.

Once Twitter had handled the app permissions,2 I set up a cron job to run the bot every 15 minutes, and crossed my fingers. I wasn't sure what the response would be—would people like having a bot telling them they mattered? Would it seem weird or more alienating that potentially the only responder to your tweet was a script? Would the bot accidentally respond to tweets containing those words, but expressing some other sentiment?



I quickly found a few things I need to tweak about the bot. The first was that the bot was responding to people, but the response ID (what allows you to view the tweet the bot is replying to) was not working. It turned out that the bot was responding to people who were retweeting tweets that matched the search, and including the wrong ID. I fixed this by filtering out retweets entirely—they seemed more often than not to not really reflect how the retweeter was feeling.

The second was that the bot was replying to tweets that were part of a larger conversation. This was a little bizarre, because it seems odd for a bot to jump in to tell someone they're valued when they're already interacting with someone else. I added a filter to ensure that the bot only responded to standalone tweets.


I was worried that people would react to a bot telling them they're valued with "wow, the only thing that likes me is this robot." That has generally not been the case. The tweets receive a much higher rate of favorites and retweets than tweets from my other bots, which I imagine is because the bot is directly engaging other users. The replies are the most interesting, because they tell me more about how the user feels about the bot. I've gotten a pretty wide range of responses:


The overwhelming majority of replies seem to be positive! I was very happy to see this.


I think these are the only four negative tweets the bot has received so far. Some of them seem to be more confusion than anything.


I really don't know what these are. Edit: Turns out the tweet by @NikkiLaporte is in fact another bot. AWESOME!

Song lyrics

Oops! you're valued has replied to "Bohemian Rhapsody" ("I'm just a poor boy, nobody loves me") several times now, so I added a filter to the bot.

People who didn't realize it was a bot

These ones are pretty funny. The bio of the bot is "I am but a robot. Written by @molly0x57.", and includes a link to the source on Github, so I'm not really sure how to be more clear about this...


1. So far, this is all it does. I might add to it so it responds to more types of tweets, and with more replies.

2. ...which are SUCH A PAIN. Seriously, Twitter, your solution for a single user controlling multiple applications on multiple accounts should not involve the user sending a support ticket so you can manually transfer the app permissions to another account.

comments powered by Disqus