Let's see if GPT-4 can build ChatGPT in 10 prompts or less:
Note: I'm going to do this live, I have no idea if this is going to work. Wish me luck 🫡
PROMPT 1:
We're asking it to build a React component for a chatbot:
Here's the response, it looks pretty good!
PROMPT 2:
Now we'll ask it to write the HTML file that includes the React component, and style it. I asked it for dark mode–let's see how it does 😅
Here's the response:
As you can see, it's asking me to include an index.js file...but it hasn't yet told me what that is. Let's use a prompt on that!
Here's its response:
It's recommending I use the create-react-app to start the project, which makes me a bit nervous but we'll give it a shot!
I'm creating the React app now:
AND WE HAVE A CHATBOT!
It's client-side only for now, but you can send messages and everything :)
PROMPT 3:
Okay now we're cooking! We need a Flask server to handle the chat requests from the client. When it gets a chat request it should send it to GPT-4 for a completion. I'm literally going to paste in the GPT-4 API docs for reference.
Let's see what it can do!
Here's the response. Looks good!
I'm going to implement this (with a few minor modifications) and see what happens...
Our server is up and running!!!
Okay, we ran into a minor problem. Our server and client are hosted at different addresses—so when I make POST requests I get a Cross Origin error:
PROMPT 4:
Let's ask GPT-4 to fix the CORS error!
Here's the response. Seems reasonable! I'll report back...
Okay I went back and forth a bit on the CORS issue until it finally found the right modification for my app.py file. Not counting that as a prompt...it's sort of a side quest conversation. But...it fixed it!
Now, when I type a message it hits my chat server!
But there's a problem...when I send the request to GPT-4 it returns an error.
It looks like for some reason we're not actually sending the chat transcript to GPT-4. Not sure why...I'm going to step through the code
Okay so it looks like for some reason the client side isn't actually sending the chat transcript to the server.
I wonder why that is...
OMFG IT WORKS
For some reason it works on the second message, but not the first.
Going to have to ask GPT-4 why that is, and see if it can fix it...
PROMPT 5:
I asked it why the first message doesn't arrive and it figured it out!
It worked! It worked! It worked!
This was shockingly, crazily, incredibly easy.
I actually also learned something...I never would've used the create-react stuff on my own. I would've rolled it myself.
But it's quite good!
Now...let's see if I can get my ChatGPT clone to create another ChatGPT clone in 10 prompts or less... 👿
• • •
Missing some Tweet in this thread? You can try to
force a refresh
i've been playing with it for a week or so and it's already my go-to model. it's fast, agentic, extremely smart, and has great vibes.
some of my top use cases:
- it flagged every single time I sidestepped conflict in my meeting transcripts
- it spun up a bite‑size ML course that it pings me about every morning
- it found a stroller brand from one blurry photo
- it coded a new custom AI benchmark in record time
- X‑rayed an Annie Dillard classic and found writing tricks I’d never noticed before
- it even analyzed @every’s org chart to tell me what we’ll be good at shipping, and what our weaknesses are
David Perell (@david_perell) is one of the best known internet writers of his generation.
@ChatGPTapp has become a go-to tool in his arsenal for creating great work. I dove deep with him on how he uses ChatGPT for:
- Doing deep reading of old books
- Finding anecdotes that spread
- Better understanding his taste
- Finding his heroes
- Understanding his blind spots as a leader
- Unpacking the strategy of his business
It was one of the deepest and most inspiring episodes we’ve ever done. And it's the first one we've ever recorded in person!
Watch below.
-----
Timestamps:
Intro 00:53
Finding and understanding his heroes 13:42
Understanding his personality and leadership style 19:14
Who does David work well with? 25:53
Workshopping The New York Times’s business strategy 36:52
Why ChatGPT is incredible at diversity, accessibility, and speed 52:54
Bringing old books like Moby Dick to life with DALLE 58:50
Using ChatGPT for deep textual analysis 1:06:29
ChatGPT for writing anecdotes that spread 1:21:04
Conversations with ChatGPT as food and drink for the soul 1:25:55
I run a media company, and I love writing. So it’s bittersweet to write this, but here it is:
AI is going to fundamentally change media in all sorts of ways over the next five years...
Specifically, I think it will:
- Automate commodity content (like summaries)
- Unbundle research from narrative
- Write previously unwritten stories
Let me explain..
1/ Automating commodity content
Media companies monetize creativity, but the creative act is inherently unpredictable. Most of the media business is about looking for ways to de-risk creativity