# Perplexity's first product turned Twitter into a queryable database

Markdown copy of https://realalpha.app/s/perplexitys-first-product-turned-twitter-into-a-queryable/ on Real Alpha, the best minutes from long interviews with the people building AI. Cite and link the page, not this copy.

- Speaker: [Aravind Srinivas](https://realalpha.app/builders/aravind-srinivas/) · Aravind Srinivas is cofounder and CEO of Perplexity. · Held research roles at OpenAI and Google DeepMind before co-founding the AI search engine Perplexity in 2022.
- Host: David Lieb · General Partner, YC
- Show: Lightcone
- Episode: [How To Build The Future: Aravind Srinivas](https://realalpha.app/v/SP7Ua8FKZN4/), Feb 21, 2025
- Moment: 6:33 to 9:44 of the episode (3 min), playing on https://realalpha.app/s/perplexitys-first-product-turned-twitter-into-a-queryable/; the episode from there: https://realalpha.app/v/SP7Ua8FKZN4/?t=393

## Quote

> “And then we had a lot of callbacks in case errors happen. It'll **automatically correct it**.”
> — [Aravind Srinivas](https://realalpha.app/builders/aravind-srinivas/) at [8:32](https://realalpha.app/v/SP7Ua8FKZN4/?t=512) · Lightcone

## Takeaways

1. Use accessible data when target databases won't grant access.
2. Templates and callbacks helped make early SQL generation reliable.
3. The three-person team built the demo in about a month.

## About this segment

After data providers refused access, the team built a Twitter database and chat interface with SQL templates and error correction. Three people shipped the demo in about a month, giving them a product to test.

From “How To Build The Future: Aravind Srinivas”, Feb 21, 2025. [Watch the full episode](https://realalpha.app/v/SP7Ua8FKZN4/)

## Transcript

Transcribed by machine (Whisper) from the episode’s audio, so a word may be off here and there.

[6:39](https://realalpha.app/v/SP7Ua8FKZN4/?t=399) a bunch of demos that were very dissimilar from perplexity. Yeah, so I was like adoshes enough to go and pitch to the first seed investor of ours, Elad Gill, that like, hey, like, you know, I want to disrupt Google, but I kind of want to do it from pixels from a glass. And I think that's why, you know, you're not competing with people typing on the search bar. They're just seeing. But even at that point, you like knew in your mind, I want to go after Google or like.

[7:07](https://realalpha.app/v/SP7Ua8FKZN4/?t=427) Yeah, it was not like I want to go and kill Google, like that sort of motivation. It was more like, what is an idea of that scale and ambition is something like this. It was also around the time when multimodal models were slowly beginning to work. So I thought, like, if you were on the trajectory of improving technology, you could build something pretty amazing. My investor rightfully said, like, not to work on it in the beginning.

[7:28](https://realalpha.app/v/SP7Ua8FKZN4/?t=448) So we focused more on searching over, like, specific verticals or data sets or databases, tables, actually. And we were an enterprise kind of focused company, except, like, nobody wanted to give us their data. I remember I used to, you know, hustle for calls with like PitchBook or Crunchbase because I kind of wanted to build a demo that would first make sense to an investor. That way we can keep, you know, raising some capital and then actually hiring good people and then go and like do the real thing. And so Crunchbase had all this data, PitchBook has all this.

[8:00](https://realalpha.app/v/SP7Ua8FKZN4/?t=480) They just don't want to give it to us. And so... Next best step, Twitter. Yeah, Twitter. The pre-Elon CEO moments, academic access was allowed, legal. So we built a database of Twitter. We organized it in the form of tables. We tried to do it with the OpenAI codex models. This was even pre-GPT 3.5. We wrote a lot of templates. Oh, for these kind of queries, these are example sequels. And then the model would do kind of rag, they would pull relevant queries in the templates and then write the actual SQL based on the template sequels.

[8:35](https://realalpha.app/v/SP7Ua8FKZN4/?t=515) And that was the only way to get it to work reliably. And then we had a lot of callbacks in case errors happen. It'll automatically correct it. And then it will go and query the database and then retrieve the records. It was very nice. And it was a chat UI. You could chat, you could converse, you could plot. And this was like the first real product or demo that you guys did? Yeah, we did it very fast.

[8:57](https://realalpha.app/v/SP7Ua8FKZN4/?t=537) took only a month to do this because there were like three people only but that energy in the beginning was insane and they showed it to a bunch of people and they all allowed it there are two reasons one, something like that never existed before like you could never actually Twitter searches exactly to this day even today, right? and then also people allowed finding all these I think the social search of like knowing who other people are following whose tweets are they liking Whose tweets are they not liking?

[9:28](https://realalpha.app/v/SP7Ua8FKZN4/?t=568) Who did they unfollow this week? You know, those kind of diffs. It's all like funny. So you launched this Twitter search thing. Yeah. How did you transition from that to now what we all know as perplexity? Yeah. So we had that, right?
