DEV Community

Cover image for How Does AI Work? 🤔🤔
Chirag Joshi
Chirag Joshi

Posted on

How Does AI Work? 🤔🤔

We hear a lot about AI, and when we ask ChatGPT something, it gives amazing answers. But how does it all happen? How does AI work?

I’m sure many people have had these questions in their minds. Today, let's understand the answer in the simplest way possible. 😊

First, it’s important to know that even though ChatGPT was released just 8 months ago and made AI famous, AI has been around us in some form for many years.

For example, when you open YouTube or Instagram and see videos or photos you like, that’s AI working in the background. Although it's much weaker compared to today’s ChatGPT or other AI, it was still AI.

Now, to understand AI easily, we need to know how our brain works and how we’ve learned things from childhood till now.

When a baby is born, they know nothing about the world—how to talk, what people look like, or anything about their surroundings. (Sure, some basic info is already in their DNA, but not much.)

As the baby grows, they hear people talking and learn how to speak, see things, recognize people, and understand their surroundings. During this time, the brain receives all this information through the eyes, ears, nose, or touch in the form of language, visuals, sounds, smells, or touch. And the brain learns and understands from this information. (So basically, we become what we are today just because of the information our brain has collected! 😄)

The AI behind ChatGPT is like a simple copy of how our brain works. These models are called Large Language Models.

They’re called “language models” because they work with language. You give instructions in a language, and the response also comes in a language.

And they’re called “large” because they’re trained on an enormous amount of data—billions of text data across the entire internet. Training means they process this data and learn from it.

AI models are trained on powerful GPUs. Just like how computers have CPUs, GPUs are special high-capacity chips needed for AI. (Also useful for gaming! 🤪)

The AI behind ChatGPT was trained on 10,000 of the most advanced GPUs, which took months. That’s why it has such incredible capabilities! 😇

This is why AI can do many tasks much better and faster than us, although there are still some areas where it's weak.

Now you might wonder—how does the model learn from data?

In reality, AI uses artificial neural networks, which are simple mathematical copies of how our brain works.

As you probably know, our brain and body process information through neurons. Our brain has 86 billion neurons that are all connected in a network and constantly exchange information. Imagine how complex and vast this network is inside our heads! 😊 This is called a neural network.

In AI, we have “artificial neural networks,” and we train them with data. At their core, these networks work by predicting the next word in a sentence. So, the answers you get from ChatGPT are just predictions of what the next word might be based on the data it’s trained on. 😊

This artificial neural network isn’t made of plastic or human tissue 😄. It’s purely mathematical. Yes, math is at the core of all the hype around AI. (I never realized how important math was until I saw its power in AI—otherwise, I just wanted to score higher! 😄😄)

Now, you probably have an idea of how this “AI” thing works and why people fear it can become incredibly powerful! 😊😊

Top comments (0)