Skip to main content

Command Palette

Search for a command to run...

Rain, Rage & GPT: The Unexpected Start to My GenAI Adventure

Updated
4 min read
Rain, Rage & GPT: The Unexpected Start to My GenAI Adventure

It was a thundery night, raining heavily in Mumbai. I was sitting at my desk, which is just next to the window. The window was open, and the breeze of fresh air was making me feel good and relaxed. I was very focused on solving an array problem (Data Structure) on LeetCode. It was my initial days, so even easy questions seemed very hard to solve. One of the questions I was pondering over kept me thinking for 2 hours — I tried multiple dry runs, watched videos, but still, it was not getting into my head and I was very frustrated.

I opened YouTube to listen to some songs and calm my mind. On my feed, there was a video, and in that thumbnail, I saw the ChatGPT logo and some text written. I didn't know what the video was about — I just saw ChatGPT and then it clicked to me: why not ask GPT what is going wrong with the solution I was working on? Before that, I had never used ChatGPT.

So I went to the website, entered the entire solution that I had tried into the prompt, and I asked for a dry run of this solution — and bang! To my surprise, it solved the problem in seconds and highlighted the part that was wrong in the solution. Then I learned about the issue, implemented the fix, and it worked. I was relieved, but now curious — how is this GPT thing working behind the scenes?

I started searching about it on YouTube and saw a couple of videos. Everyone was saying that to understand GenAI, you need to know maths, probability, statistics, matrices, and whatnot... I hated maths when I was in school. Then I thought, maybe it's not for me, and skipped it — I let go of my curiosity.

Until a year later... I saw a video titled GenAI for Developers. It was very catchy, and even before watching the video I knew what was going to be inside: Do maths, linear algebra, etc. But still, I just clicked on it. And then the folks said — you don't need to know maths to work with AI — and I was like, whattttt...! It blew my mind.

The creators I was talking about were Piyush and Hitesh. In the past, I had learned Kafka, Docker, and Git from Piyush, and from Hitesh, I had learned TypeScript. Their teaching style and content were top-notch, and I had learned a lot from them, so I knew — if they were saying something, then it must be true.

So, without thinking, I enrolled myself in the cohort and started attending lectures. To my surprise, the first lecture that Piyush took was mind-boggling. The way he explained stuff — anyone could understand.

Following are my learnings from the lecture. If you are someone like me who thought learning AI is only possible with maths, then let me help you break that myth.

GENAI → Generative Artificial Intelligence

What does that mean? The word Generative means to generate something, right? In this context, it means to generate something with the help of AI — i.e., GenAI — it will generate something for you.

Easy, right? Let's dive a bit deeper into it!

So, what is the difference between Google and GPT? Doesn’t Google also show results based on the prompt you search?

Yes, it does... but when you search on Google, you are just searching for data within a database. With GPT, you are generating data based on some pre-trained data.

For example, if you search "Hi my name is cristiano" on Google, it will show you articles about cristiano ronaldo that are stored in the database. Now, if you search the same prompt on ChatGPT models, it will generate something like

See the magic? It generated text and started a conversation.

What is GPT?

Before understanding what GPT is, let’s first understand what LLM is.

LLM means Large Language Model. Huh? Large what?

Okay, so imagine there is one huge box that is empty. You add a lot of data inside it, and now, if someone asks for something, this magical box can respond using the data it has stored. This is called training data for the box.

Now in tech terms — there is one transformer, which is initially empty. Lots of data is fed into this transformer — that data can be books, articles, blogs, news, etc. This process is called feeding, and once this data is fed to the transformer, it is now called a Large Language Model, which has the capability to generate new data from old data.

OpenAI is a company, and they call this transformer GPT — i.e., Generative Pre-Trained Transformer.

This transformer predicts what the next word will be.

In the next post, I will talk about how GPT processes data and generates content.

More from this blog

T

Tech Talks

7 posts

This is a space where I share my knowledge and experience about tech. Hi my name is VP and I am a software engineer with 3 years of experience. I am a full stack developer.