From the course: Generative AI: Introduction to Large Language Models
What is generative AI?
- [Instructor] In the dynamic landscape of artificial intelligence, one topic has taken center stage and captured the imagination of both researchers and the public. Generative AI is the buzzworthy superstar of the AI world, and for good reason. Generative AI is a game changer, a technological leap that allows machines to not only process and analyze data, but to also create, imagine and dream. It's as if AI has developed a form of digital creativity, producing art, music, and content that is both impressive and eerily human-like. In case you're wandering, yes, the image you're looking at was created using generative AI. So what exactly is generative AI? At a high level, we can think of generative AI as an approach to artificial intelligence that is focused on creating content or synthetic data, such as videos, pictures, text, and sound. A natural follow-up question is, what is artificial intelligence or AI? AI is a branch of computer science that deals with the creation of intelligent agents, which are systems that can reason, learn and act autonomously. Essentially, AI has to do with the theory and methods to build machines that think and act like humans. This brings up a second follow-up question, how does artificial intelligence differ from machine learning? The simple answer is that machine learning is a subset of artificial intelligence. If we compare AI to the vast field of biology, which encompasses the study of living organisms, their behavior, and their interactions with the environment, then we can liken machine learning to a specific branch of biology such as genetics. Just as biology covers various subfields like zoology, botany, and microbiology, AI encompasses different subfields, besides machine learning, such as natural language processing, computer vision, and robotics. Machine learning focuses on algorithms and techniques that enable systems to learn from data, recognize patterns and make predictions or decisions based on that information. It deals with statistical models, training processes, and optimization methods that allow AI systems to adapt, improve, and evolve. For a detailed explanation of what machine learning is, check out my LinkedIn Learning course titled, Machine Learning with Python: Foundations. There are several ways to categorize AI and machine learning models. One way is to classify models based on the type of data we give them. With this lens, we can classify machine learning models as either supervised, unsupervised, or semi-supervised. We can also classify AI and machine learning models based on the task we assign to them. With this lens, they can be classified as either discriminative or generative. Let's differentiate between these two types of models in the context of text analytics or natural language processing. In the context of natural language processing, discriminative models are models that focus on classifying or predicting specific properties of the input text. They aim to determine the probability of a particular class or label given the input context. Discriminative models are commonly used for tasks such as sentiment analysis, named entity recognition, part of speech tagging, and text classification. In contrast, in the same context of natural language processing, generative models are models that are designed to produce text that closely resembles natural language. By utilizing an input context, a generative language model anticipates and predicts the subsequent word or sequence of words that are most likely to follow. These models have the capacity to generate innovative text, complete sentences, and even craft entirely fresh pieces of writing. We can also illustrate the difference between discriminative and generative AI with a couple of oversimplified examples. Imagine you want to build a model that can correctly identify the breed of a dog in a photo. A discriminative model is well suited for this task. To train your model, you will need to show it a lot of labeled images of different dog breeds. Over time, your model will start to learn the general rules that govern the appearance of each breed of dog. So much so that if you gave it an unlabeled photo it has never seen before, it will be able to correctly determine which dog breed is present in the photo. Now, let's say you decide to build a model that can give you an idea of what a never before seen breed of dog could look like as a result of cross-breeding. This is a task for a generative model. To train such a model, you would also need to show it a lot of labeled images of different dog breeds. After a while, similar to the discriminative model, your model will start to learn the general rules that govern the appearance of each breed of dog. However, it will also introduce some randomness to the data, which helps it imagine slightly different versions of the training data. As the model evolves, if you ask it to generate an image of a Rottweiler and poodle mix, which is also known as a roodle, it would generate an image of what it thinks such a dog should look like, even though the model has never seen such an image before. That is what generative AI models do, rather well.