No history yet

Introduction to AI Models

What is an AI Model?

An AI model is like a specialized brain trained to perform a specific task. It's not a physical machine, but a complex piece of software built on algorithms and mathematical structures. Think of it as a student who has studied a massive library of books, images, or sounds to become an expert in one area, like identifying birds, translating languages, or writing poetry.

This “studying” is called training. During training, the model is fed vast amounts of data. A model learning to identify cats might be shown millions of cat photos. It learns to recognize the patterns, shapes, and textures that define a cat. Over time, it gets better and better, until it can reliably spot a cat in a new photo it has never seen before.

Lesson image

Once trained, a model can make predictions or decisions. This is called inference. When you give the model new data, it uses its training to give you a smart guess. That's what happens when your phone's camera app suggests a photo is a portrait, or when a streaming service recommends a movie you might like. It's an AI model making an inference based on its training.

Generative vs. Discriminative

AI models generally fall into two broad categories based on what they do with data: discriminative and generative. Understanding the difference is key to knowing which tool to use for which job.

Discriminative models are classifiers. Their goal is to learn the boundary between different groups of data. They answer questions like, "Is this a cat or a dog?" or "Is this email spam or not spam?" They discriminate between different categories.

Imagine a security guard at a private event. Their job is to look at an ID and decide if the person is on the guest list (in) or not (out). The guard doesn't need to know how to create a fake ID or what a person not on the list might look like. They just need to make a yes-or-no decision based on the data they see. Most of the AI you encounter daily, like image recognition or spam filters, uses discriminative models.

Discriminative models classify data. They learn the differences between categories.

Generative models are creators. Instead of just categorizing data, they learn the underlying patterns of the data so well that they can generate new, original examples. They answer questions like, "Create a picture of a cat riding a bicycle," or "Write a poem about the ocean."

Think of a portrait artist. They don't just decide if a face is a face. They study hundreds of faces to understand features, lighting, and expressions so deeply that they can create a brand-new portrait of someone who doesn't exist. This is what generative AI does. It learns the distribution of the data to generate new content.

Generative models create data. They learn how to produce new examples that look like the original data.

Model TypeMain GoalExample Question
DiscriminativeClassify or predict a labelIs this a picture of a cat?
GenerativeCreate new dataGenerate a picture of a cat.

The Role of LLMs

A Large Language Model (LLM) is a specific type of generative AI model that has been trained on immense amounts of text data. The 'large' in their name refers to two things: the enormous size of the dataset they learn from (essentially, huge chunks of the internet) and the massive number of parameters within the model itself.

Parameter

noun

A value within an AI model that is learned from training data. Parameters are the internal variables that the model uses to make predictions or generate content.

Because they've processed so much human language, LLMs are incredibly versatile. They are the engines behind chatbots, writing assistants, and translation services. Their fundamental skill is predicting the next word in a sequence. If you give it the phrase "The cat sat on the...," it uses its training to predict that the next word is likely "mat," "couch," or another plausible word.

By stringing these predictions together, an LLM can write emails, answer complex questions, summarize long documents, and even write code. This ability to understand and generate human-like text is what makes them so powerful. When you write a prompt for an AI, you are giving an LLM a starting point and a set of instructions to guide its word-prediction process.

Lesson image

Knowing that you're interacting with a generative model trained on text helps you understand how to communicate with it. You're not talking to a being that 'knows' things, but a sophisticated pattern-matching and prediction engine. Your goal in prompt engineering is to provide the clearest possible pattern for the model to follow.

Quiz Questions 1/5

What is the best description of an AI model?

Quiz Questions 2/5

When your phone's camera app identifies a face in a photo and suggests tagging a person, what process is the AI model performing?

These foundational concepts are the building blocks for effectively communicating with AI. Next, you'll learn how to start crafting prompts that get the most out of these powerful models.