Two Truths and a Lie at Klaviyo

Ezra Freedman
Klaviyo Engineering
5 min readFeb 16, 2024

--

A history

Klaviyo values its traditions, and we’ve got a few quirky ones that make our workplace unique. Our weekly ‘By the Numbers’ all-hands meeting keeps everyone in the loop with stats and learnings. The ‘VCR working group’ adds a nostalgic twist, screening movies on VHS and streaming the feed to Zoom. Come Cyber Monday, our busiest day of the year, we order Blue Ribbon BBQ for lunch. And, until our size made it unrealistic, when someone new joined Klaviyo, we skipped the typical welcome and opted for a game of ‘Two Truths and a Lie.’ New hires shared three statements about themselves, and the rest of us guessed which one was the lie.

Two Truths is not just a game; it’s a fun way to get to know each other and inject some friendly competition into the mix. Can the new hire stump Klaviyo with their lie?

When I joined Klaviyo, the way we’d vote was that the new hire would introduce themselves, share three statements, and then repeat them. After each one, people would clap if they thought that it was the lie. We’d then make a judgment call — which statement elicited the loudest and most enthusiastic applause? Whichever one did would be Klaviyo’s guess. Finally, the lie was revealed. Did we guess correctly?

The app

Shortly after joining Klaviyo, I thought “We are a data focused company. We know how to build software. Clapping is an imprecise measure. Why don’t we run Two Truths in a technology-first way?”

I enlisted the help of Don Ton, then a designer at Klaviyo, to work on designs. While Klaviyo was and is a Python-first shop, I started coding the app in Ruby on Rails, a framework I had used (and loved) in the past. Maritza Ebling, who I had worked with before at TrialNetworks, and now also at Klaviyo, helped with the coding. The three of us worked in secret — we wanted there to be a strong surprise factor when we went live.

The initial commit was on Aug 29, 2019. The first new hire to play was Jon Ross, on October 25, 2019. The screen would start with the new hire’s photo, name and title.

Click next and their statements would appear, which they would read aloud.

The fun would start when they clicked “Open voting”. A slack message would go out to the #twotruths channel with the statements, along with three buttons to cast a vote.

On the screen, after you voted, the vote count would increase and a bubble with your photo would appear on the screen and float gradually to the top. Music would play in the background. I started with the Jeopardy theme song but extended the library to include other game show songs (Match Game, Family Feud, Price Is Right).

When voting closed, we’d show the breakdown of how Klaviyo voted.

In this case, voting was close, but Klaviyo thought the lie was B. Click to reveal the lie, and the winner.

Jon won!

The pandemic came shortly after the launch. Like other companies, we scrambled to adapt to being remote. We realized that this new app could help in a way I hadn’t anticipated — we could continue the Two Truths tradition even though we were working from home.

Over the next several years, we ran a total of 770 new hires through the app. The weekly session gave us a chance to unwind and learn about our new hires. We fed our competitive nature, trying to vote correctly most often (or least often, with the strangely coveted “Biggest Loser” award). It gave us a sense of just how quickly we were growing. And eventually brought to attention that we were growing too fast to continue this tradition for every new hire.

Internal hackers

The app also brought about some competition in the form of hacking. Some people noticed that if they voted multiple times, they would get multiple bubbles on the screen. (The database schema only allowed one vote per person, so only the last vote counted — ballot stuffing was not possible.)

Still, you can only click so fast. I’ve only learned recently how this worked (an anonymous tipster pointed me to a Slack channel where this was coordinated), but Vidhu Bhatnagar led an effort to automate vote flooding — he wrote and shared a chrome extension that listened for HTTP requests from the Slack browser app for the three options, and then would dutifully resend these requests on a rapid schedule.

This led to some cat and mouse hacking over the months. I added countermeasures, the hackers would react. (To be fair, they had an edge — they had found the Github repository hosting the source code.)

One week, the hackers had some extra fun. They saw that the software pulled down and cached Klaviyo’s Slack photos on Fridays at 11AM. Some went into Slack, updated their profile picture briefly to match AB or Ed (our co-founders), and switched back once the images had been stored. They could then flood the screen with our co-founders.

To be continued

Revisiting this game got me thinking. We have all of this data around the games. And we know when the participant stumped us and when they did not. How would a Large Language Model (LLM) be at playing? Read my part two blog post on this topic.

--

--