Code Story · Transcripts

S5 E9: The Science of Changing Minds: Valerie Coffman’s Journey Architecting Swayable’s Analytics Engine

August 10, 2021 · 25:26
Listen to the episode Download .txtDownload .vtt
Valerie Coffman

When we sat down to think about architecture, we basically punted on it completely. The thinking was that, well, we don't know. We can't predict what this product is going to be in the long run, which was true. But if we had maybe spent half a day thinking through, like, what could limit us in the future? or how might we be painting ourselves into a corner? What assumptions are we making that might be wrong? We might have saved ourselves a little bit of technical debt. My name is Valerie Coffman. I'm CTO and co-founder of Swayable.

Noah Labhart

This is Code Story, the podcast bringing you interviews with tech visionaries who share in the critical moments of what it takes to change an industry and build and lead a team that has your back. I'm your host, Noah Labhart, and today, how Valerie Coffman created a way to measure the persuasive impact of your messages. All this and more on Code Story. Valerie Coffman has a family in San Francisco with two cats, both 18 pounds each, and two kids, the oldest being three and a half. So you could say she has a lot to juggle, even outside of a startup. Her family spends time outside in parks, the zoo, museums, etc., as much as she can since they are opening up again post-pandemic. She graduated from Cornell with her PhD in Theoretical Condensed Matter Physics, which I had to Google to understand. Prior to her current venture, she was the CTO and Chief Science Officer at Xometry, an on-demand marketplace for custom manufacturing, building their software team from scratch. She and her co-founders started their current venture by exploring why people resist believing scientifically-backed factual information. She wanted to figure out which messages and stories were more effective at communicating these true facts. This is the creation story of Swayable. Swayable

Valerie Coffman

is a data science platform for measuring the persuasive impact of advertisements. We use randomized control trial survey experiments to rigorously measure how an advertisement changes someone's opinions on the topic of the advertisement. We've worked with many political campaigns and we're working more and more with a growing list of brands. We started by exploring a broad problem of why people resist believing things that are true. One of the motivating issues was around climate change. Why do people not believe climate change when there's over, but climate change is real and caused by humans when there's overwhelming evidence. And one of one of the ideas, among a few others, was using RCTs to test messages. and stories and short videos or audio or text to see which messages and stories and images and audio are more effective. Through a series of conversations with many customers, we identified one customer was interested in testing a set of advertisements. They're an agency that was building ads for convincing people that climate change is real. So we had actually identified a customer who wanted to pay for a pilot. even built it. And at that point, I was actually on maternity leave and we hadn't formed a company yet. So we built a fabulously hacky prototype just to see, can we even do this? Can we even pull this off? We weren't sure we would be able to. This first client, they knew that they were taking a risk to see if it would work. And they paid us $5,000 to test seven or eight different clips. And we thought we were going to spend all of that on the data. So we ran a survey, First survey we ran on Mechanical Turk, because that was the most obvious place to start, really, that was accessible. And we gathered the data, and I basically took that data and downloaded it into a spreadsheet, and I analyzed it in basically a Jupyter notebook that I wrote as a one-off notebook. And to our surprise and amazement, we were able to detect a statistically significant movement answered questions like, you know, on a scale of zero to 10, do you believe that climate change is real? So we were somewhat shocked because we weren't sure it was going to work. The other piece of it, the client facing piece of it was basically a pretty simple web interface that displayed those results. We didn't even have a database at that point. We just used that sort of a flat file and displayed the results. So our very, very first prototype was really laser focused on proving that we can even do this thing.

Noah Labhart

Let me switch gears then. You proved that this could work by piecing together Jupyter, flat file, rendering to the front end. Tell me about the next phase, the MVP. How long did it take to build, and what sort of tools did you use to bring it to life?

Valerie Coffman

Once we've had this prototype, we use that to apply to Y Combinator. So basically, we built the MVP during Y Combinator in the very beginning of 2018. So at this point, you know, I had officially joined as a co-founder and we were starting to build out the real product. So, you know, after we moved to San Francisco and I sat down to write out a whole bunch of pivotal tickets, brand new, fresh project. And I found myself writing tickets like a user should be able to create a survey. A user should be able to add a question. A user should be able to delete a question, etc. And I had this moment where I realized, OK, a whole lot of this stuff is kind of boring and we can, you know, hack it together on the back end somehow. The money page, the real thing that's most important where the customers are getting all of their value is the dashboard where they see their results. So we decided to just hack together whatever we can for, you know, creating the surveys, setting it up, user logins, etc. We use a service called Auth0 at first to just sort of manage the authentication. And we decided to focus all of our energies on the data collection, the analysis, and the front end. So the tools we were using, we basically took that notebook from the MVP and took it out of a notebook and started building out a real Python package, which can take the survey responses and generate the results. And then we started building out a web application where people log in and they basically go pages. So they have, you know, if they have multiple tests, they can see a list of those. But all of the focus was really on building out the results page where people get their answers.

Noah Labhart

So with any MVP, you got to make certain decisions and trade-offs. And you started to kind of dig into those a little bit towards the end of your explanation. But tell me a little bit more about those trade-offs, either feature cuts or technical debt that you had to accept, and decisions and trade-offs you had to make and how you coped with them.

Valerie Coffman

One of the big trade-offs we made was in the self-service nature of creating your survey. We still needed a way to discuss the survey design, the experiment design with the client. So a trade-off that we made was to create a nice, well-designed Google Doc template, essentially, the questions are listed. And the process became one where we go over that doc with clients and they can comment on it. It actually had some nice features that they can leverage the collaborative benefits of Google Docs. And the trade-off on our end, the technical debt on our end, was now we've got to take that doc and put it into the system somehow. And there's been several iterations of that. One of them was early on, we had members of the team translating it into basically a JSON file that gets uploaded to a database or imported to the code. In the very early days, for the first several clients, we didn't even have a fully functional database for everything. The results were a flat file for the first several customers. So there was some technical debt involved in retrofitting a database, basically, but we did that pretty early on. But the biggest tradeoff has been the internal tooling and the self-service, which is something we're still working on.

Noah Labhart

What did you end up choosing from a database standpoint? Did you end up going SQL-based or doc-based, no SQL?

Valerie Coffman

We're using Mongo Atlas.

Noah Labhart

How has that transition been? You said you did it pretty quickly. Has it been a challenge or was it pretty easy step over to Mongo?

Valerie Coffman

It was straightforward to step over. We definitely have been iterating on our schema continuously. I think the main challenge of doing the step over was typical building the airplane while you fly it, starting the step over and then making another change and then having to do that change twice until the transition was done.

Noah Labhart

So you got your working MVP, you're making some progress. How did you progress and mature the product from there? And how did you build your roadmap and decide, okay, this is the next most important thing to build?

Valerie Coffman

I think in the early days, a lot of what we started adding on, very quickly we found out that people wanted powerful segmentation. Early on, a big focus was on adding more capabilities to find subsegments of the survey sample. So all the possibilities. There's a numerical range. You can do quantiles. You can do categorical segments. You can create logical combinations of all of those. It took a while to build that out. So very early on, that was just the top request from customers. later on we started to get questions about the sort of dominant feedback was are my results good or bad but essentially what do these numbers actually mean so I would say our product roadmap has been driven a lot by taking the various feedback we get and synthesizing it to find like what what is the overarching theme and then and then we build basically to solve that that sort problem statement. We try to find sort of the underlying problem statement of the synthesized feedback that we get. So one theme has been segmentation. Another theme had been, how do I even interpret this dashboard? How do I even interpret these results? One very early version, we present a lot of bar charts. One very early version had many different colors in it. And we found out that people expect the colors to mean something. thing. They're distracted by different colors if they don't mean something. So we spent some time iterating on that. We also found that people open up this dashboard and they see, okay, the baseline score is 50.2 and my top performing ad moved people by 7.8 points on 100 point scale. It's not good or bad, right? So after building up thousands of tests, we're able to offer what called benchmarks, which basically show how you rank compared to similar tests. So that really gets to the heart of, are the results good or bad?

Noah Labhart

So let's flip the team then. So how did you go about building your team? And what did you look for in those people to indicate that they were the winning horses to join you?

Valerie Coffman

You know, obviously there's hard skills in the technical technical fields. One thing that we try to do when we're looking for that is, you know, I don't copy code challenges off of LeetCode or whatever, you know, I'm not giving people sort of the same code challenges they get everywhere. So we try to make sure that the coding challenges that we're giving people are representative of what they would be doing, both because I want it, we want based on something that is closely aligned to what they'll do, but also fully recognizing that the job candidates are vetting us just as much as we're vetting them. And we want to get them excited about what they might be working on at Swayable. So that's one part of it. Other things that we look for are, we like to see people who are motivated by the overarching overarching mission of the business.

Noah Labhart

So is there any particular process you go through when you're talking to someone to gauge their interest or any reaction that shows you that, okay, this person is bought into what we're doing here?

Valerie Coffman

No, I would say it varies with each individual. When I'm actively reaching out to people, which is one part of the process, I don't necessarily just put up a job description and then wait for people to apply. I will frequently go on to a platform like AngelList or LinkedIn. Y Combinator has a platform as well where I reach out to people. And I like to highlight who we've worked with. I find that talking about the clients that we've worked on and the overarching mission of the company is something that motivates the right people to reply. get excited about about a potential role with Swayable.

Noah Labhart

Let's flip to scalability. Did you build this to scale efficiently from day one, or are you fighting this as you grow?

Valerie Coffman

We explicitly were not focused on scalability on day one. And it's actually, it's a somewhat contrarian advice that is circulated widely in community they say do things that don't scale because in the early days of trying to get product market fit it doesn't make sense to to be too focused on scalability so spending time talking to customers there were some early versions of the segmentation were very unscalable

Noah Labhart

you know in the early days you didn't engineer it to where you didn't over engineer it which makes total sense you kind of want to engineer as you grow how are you addressing those problems today? What are the types of approaches you're taking or tools you're using?

Valerie Coffman

It's a really good question because there's so many different aspects to the scalability. It's hard to even know where to start. One of the areas, one of the things that's really been interesting to see that we could not have foreseen, by the way, in the early days, is how how things have scaled horizontally, basically within each individual test. And by that I mean every content test has the pieces of content that are being tested. It could be we've done tests with one piece of content, we've done tests with 20 or 30 pieces of content. Then there are the metrics that you are measuring, and then there's the segments, essentially. And in the early days, we would typically test maybe three metrics and 10 different breakdowns of which are collections of segments, age, gender, ethnicity, etc. But we found that the tests have gotten more complex over time. So there's more and more metrics that people are interested in looking at, probing questions like, is that a leading indicator of that measure over there? Can we understand why certain ads are more effective than others? But with that, there's been way more calculations to do. And so we're finding that what has been a background task, the time that it takes to do that, well, it expands as the test becomes more complex and there's more calculations. Also, the amount of data that comes out the other end. Sometimes, you know, a survey of 5,000 people will have way more than 5,000 different results, which are aggregate statistics because we're just slicing and dicing the data so many different ways. So some of the things that we've had to do to accommodate that have been the scalability, I mean, that have been the database schema, updating that to accommodate that. If you remember, the early versions used flat files for results. Well, that doesn't work in Mongo if your results are larger than 16 megabytes. That's a document size limit built into Mongo, which we hit. We hit until we, you know, revised the schema.

Noah Labhart

As you step out on the balcony and you look across all that you've built, what are you most proud of?

Valerie Coffman

I would say that I'm most proud of the actual impact that this product has had, especially in the political space. We've worked with both Georgia runoff elections, which were quite close. It's not unreasonable to think that we had a role in that outcome. come.

Noah Labhart

So let's flip the script a little bit. Tell me about a mistake you made and how you and your team responded to it.

Valerie Coffman

That's a great question because I think we've made a few mistakes in the technical space. I think if I could go back in time, we might have spent a little bit of time thinking about the architecture and trying to anticipate in the early days. We think about architecture a lot now but in very early days when we sat down to think about architecture we basically punted on it uh completely but the thinking was that well we don't know enough to to decide we can't predict what what this product is going to be uh in the long run which was true but if we had maybe spent half a day thinking through like what what could limit limit limit us in the future? How might we be painting ourselves into a corner? What assumptions are we making that might be wrong? We might have saved ourselves a little bit of technical debt.

Noah Labhart

Well, this will be exciting. So tell me what the future looks like for your product and for your team.

Valerie Coffman

The future is a lot of data science capabilities. We're building, you know, data visualization capabilities. And there's potential that that can be applied to more than content pre-testing. We recently have launched a new product line effectively, which is a time series tracker survey. So this is a survey that it's not tied to content. It's not a randomized control trial, but it's ongoing. And so you can see a time series of how a metric is tracking. We've gathered quite a bit of data over the last several months about how consumer are changing related to products and services that are affected by COVID. So the likelihood that you would see a movie in a theater or fly on an airplane or shop in a shopping mall. We're also tracking the ESG perception. ESG stands for environmental, social and governance. Tracking the perception of several hundred different brands in seven different verticals to see how people's perception of those brands change over time.

Noah Labhart

Well, let's switch to you. Who influences the way that you work? CTO, an architect, really any person. Name a person you look up to and why.

Valerie Coffman

Oh, it's hard to choose a single person. I think I've learned a ton from every software engineer I've worked with. In terms of software engineering, I've learned a lot from software engineer, every software engineer I've worked with. I've learned good and bad things over the last decade plus of doing this stuff. I mean, I've also been influenced quite a bit by my co-founder, James, and learned a lot about sort of how to think about different aspects of the business by working closely with him.

Noah Labhart

Well, we talked about a mistake, but a little bit different spin. go back to the beginning what would you do differently or where would you consider taking a different approach

Valerie Coffman

i think we may have taken a somewhat different approach to some of the internal tooling potentially looked for more sort of out of the box solutions for that or started a little bit earlier on on building our own internal tooling has definitely been kind of a pain point point. There are some out of the box solutions. It's very hard to adapt those for a product that has a lot of settings. There's a fair amount of setup involved with the survey. You've got to add all the questions and then you've got to tie those questions to the metrics and the segments, et cetera, that you're tracking. So the out of the box solutions for that, which are sort of doing like crud on your database. They might work better for simpler products. For this product, it's been kind of a pain point. So I might have searched a little more for different ones or potentially just bit the bullet and started building something like that from the beginning. It's hard to say, but we definitely put a lot of that off, put a lot of that work off in favor of building, like I said, the money page. the results page. But it has been a pain point in terms of internal operations. I don't think it really affects customers as much, but internally it's a little bit difficult.

Noah Labhart

So you're getting on a plane and you're sitting next to a young entrepreneur who's built the next big thing. They're jazzed about it. They can't wait to show it off to the world. Can't wait to show it off to you right there on the plane. What advice do you give that person having gone down this road a bit?

Valerie Coffman

One bit of advice is just never stop asking questions. I think it's tempting to get an idea and run with it, but always be cognizant that you could have cognitive biases. Try to avoid them. Be aware of what the possible cognitive biases are to build the best product.

Noah Labhart

That's great advice. Well, Valerie, thank you for being on the show today. Thank you for telling the creation story of Swayable. Thank you. And this concludes another chapter of Code Story. Code Story is hosted and produced by Noah Labhart. Be sure to subscribe on Apple Podcasts, Spotify, or the podcasting app of your choice. Support the show on patreon.com slash Code Story for just $5 to $10 a month. And when you get a chance, leave us a review. Both things help us out tremendously. And thanks again for listening.

Transcribed with Whisper and reviewed for names and terms; speaker labels are automatic and may contain small errors. Timestamps link to that moment of the transcript.