How AI Works: LLM, Machine Learning, and Neural Networks

By Brian Prince - Last Updated: May 7th, 2024

Today we're going to unravel the mysteries of artificial intelligence, exploring the fascinating world of large language models, machine learning, neural networks, and more. 

Before we dive into it, let's recap what we know so far:

  • Artificial intelligence (AI) is all about creating smart machines that can mimic human-like thinking and problem-solving.

  • This technology is giving rise to apps that can help us in various everyday tasks, from meal planning to email marketing. (Review Day 2: Popular AI Apps: ChatGPT and Beyond.) Now, we’re going to learn exactly how AI works. 

NOT A FAN OF READING? Watch our video lesson instead:

The AI Power Trio: LLM, ML, and Neural Networks

AI isn't just one thing; it's a trio of technologies working together:

  1. LLM (Large Language Model): This is how we teach machines to think logically, like Sherlock Holmes solving a mystery. It's all about making smart decisions based on analyzing tremendous data sets of language.

  2. ML (Machine Learning): Imagine your computer learning from experience, just like you learn from your mistakes. MLL is all about computers getting smarter over time by methods such as trial and error.

  3. The Neural Network: This one's a bit like your brain's wiring – a complex network of nodes that helps computers recognize patterns, like telling a cat from a dog in a picture.😺🐶

There is also other technology that comes into play when we talk about AI, such as Natural Language Processing, Generative Pre-trained Transformers (GPTs), and Variational Autoencoders, used in an advanced form of AI called Generative AI, or Gen AI. 

In essence, apps like ChatGPT and DALL-E use Gen AI to become smarter and more creative the more we use them. 

Large Language Model (LLM): The Logic and Reasoning of AI 

As you go through everyday life, you may wish that your co-workers, friends, family members — and especially your kids — used logic more often.

AI uses a Large Language Model (LLM) for logic and reasoning, helping it to solve problems and make decisions. LLM helps teach a computer to solve mysteries like a leading detective on a crime-solving TV series. 

To understand what goes into the development of such advanced capabilities, it helps to think of AI as a child that didn’t start with logic; software developers and engineers had to teach it. 

Machines learn what we teach them with surprising ease. When you’re talking about rule-based AI that uses a large language model, computers follow a set of rules, just like a board game. 

For example, if you're building a chatbot, you'll set rules for how it responds to different questions. "If they ask about the weather, tell them the forecast!"

Some AI programs are broad-based, like ChatGPT. That means they can quickly become experts in virtually anything. 

On the other hand, other AI programs are considered “expert systems.” They are designed to mimic human expertise in a specific field. They can diagnose illnesses, troubleshoot tech issues, and even recommend the perfect recipe for dinner.

Machine Learning: Guided, Self-Exploring, and Adaptive Techniques Unveiled

Machine Learning is the heart of AI, making computers learn from experience. Think of it as teaching a robot to dance by showing it dance moves, over and over again.

There are three flavors of Machine Learning:

  1. Supervised learning: It's like training a dog. You tell the computer what's right and wrong, and it learns from your guidance. 🐕

  2. Unsupervised learning: Here, the computer explores data on its own, finding hidden patterns and groupings without any guidance. It's like letting a kid play with Legos and discover new shapes.

  3. Reinforcement learning: This is the fun one! It's like training a kid to ride a bike. The computer makes decisions and learns from the consequences. If it falls, it figures out not to do that again! 🚴

Machine Learning is everywhere. From spam filters that keep your inbox clean to Netflix recommending your next binge-watch, ML works its magic.

The more data we give to Machine Learning, the smarter it becomes. So, when your fitness tracker learns your workout routine, it's all thanks to ML.

Neural Networks: The Brains Behind the Magic

Since we think of machine learning as the heart of AI, it makes sense that the neural network is the brain, right?. 

Picture it like this: The neural network is a virtual brain comprised of minute intertwined units called neurons that function as decision-making experts, each with its own specialty. Some are good at recognizing patterns and shapes, others excel at understanding language, and so on and so forth.

The way this neural network gets trained and more and more intelligent is by us feeding it volumes of data. For example, we can show it a bazillion cat pictures until it becomes a cat expert. Once trained, it can spot cats in pictures it's never seen before.

If you need a metaphor to help you further understand this, here’s a yummy one: Neural networks come in layers, like a sandwich. Each layer learns something new – the first might identify edges, the next spots shapes, and the last figures out if it's a cat or a dog.

When we stack a bunch of these layers together, we get deep learning, another popular term you may have heard of when it comes to AI. Deep learning is the power behind much of the cool stuff AI does, from self-driving cars to beating humans at a game of chess.

Natural Language Processing: Enhancing Human -> Computer Understanding

Natural Language Processing (NLP) combines the aforementioned technologies to power AI that can comprehend and produce human language in a way that is meaningful and relevant. 

At its core, NLP develops models that can process and analyze text and speech data. Here’s how it works in a way we think is easy to understand:

  • Understanding text: In NLP, this is where everything begins. It’s all about  breaking down different types of human communication, from written word, textbooks, transcribed speeches, and everything in between. It digests data into segments of words, phrases, sentences... you name it.

  • Breaking it down: In tech terms, this step is referred to as tokenization. Think of it as chopping text into bite-sized pieces — words or tokens. This one is super important because it lays the groundwork for the computer to grasp the text's structure.

  • Delving into linguistics: Last but not least, NLP algorithms dive into linguistic analysis. Here's where it gets interesting… The algorithms do a bit of “Schoolhouse Rock,” figuring out the grammar and the role of each word (like whether it's a noun, verb, or adjective). These algorithms also examine sentence structures, and develop the ability to grasp what words mean in specific contexts. It's like teaching a computer to understand language like we do.

Feeling a bit overwhelmed — or flabbergasted? Don’t worry. You don’t need to be an engineer, data scientist, or programmer who gets all of nitty-gritty tech details. Of course, understanding how AI works at a basic level can make it seem less scary, which is why we thought it was important to share.

Understanding Generative AI 

If you’ve been hearing the term "Generative AI" or “Gen AI” more and more it’s because it refers to a subset of artificial intelligence that does all the magic we hear about. Yep, that’s the term for the new content, data, or information creation that AI outputs  in the form of text, images, and other media. Gen AI can generate content not explicitly programmed or pre-defined by humans. 

On the other hand, "regular AI" or "traditional AI" refers to AI systems that are built for specific tasks and functions. Traditional AI excels at pattern recognition, decision-making or problem-solving within predefined boundaries.Here’s a straightforward way to look at it: 

From recognizing cat videos to diagnosing diseases, both forms of AI are changing our world in amazing ways. It's like having a friendly AI sidekick ready to assist with everything from answering questions or suggesting your next binge-watch to unleashing your creative potential in words or images. 

So, keep exploring, boost your focused on learning, and stay curious about the world of AI. Who knows what exciting AI adventures await you next? 

Next up, we’ll teach you how to train your AI using “prompt engineering,” the growing field of knowing how to communicate with AI to boost your productivity.