Generative AI
Learning Objectives
- You know the term generative AI and understand what sorts of tasks generative AI models can perform.
- You understand that the outputs of generative AI models are influenced by the training data and the inputs given to the model.
- You know that large language models are a type of generative AI that can generate text based on the input they receive.
Generative AI is the latest trend in AI research. Generative AI is a type of AI that can generate new data, such as images, text, or music. Contemporary generative AI methods primarily use deep learning techniques, and they are trained with vast amounts of data.
During training, generative AI models are given data, and they learn patterns and structures of the data, while learning to generate new data that is similar to the data they were trained on. The key idea is not to create identical copies, but to generate new data while still following the patterns and structures of the training data.
The key thing to remember is that generative AI models — and contemporary AI models in general — are trained with vast amounts of data, and while being trained, they learn patterns and structures from the data.
As an example of content created by generative AI, Figure 1 shows an image created by ChatGPT for the prompt “Please create an image that represents the Finnish school system in the year 1970.”. The image has a retro look and feel, it features a classroom, and includes a teacher and students.
The outputs of generative AI models are influenced both by the training data and the inputs given to the model. The inputs can be in the form of text, images, or other types of data, or combination of them.
As an example, Figure 2 is the output from providing the Figure 1 and a prompt “Please adjust the following image to add an elephant to the classroom.”. As we can see, the Figure now features also an elephant in the classroom. Note, also, that the image is not a copy of the input image, but a new image that has some of the characteristics (i.e., patterns and structures) of the input image.
As we also see from the example, the models try to produce outputs that match the input data and the prompt, regardless of whether the inputs make sense or are factually correct. To illustrate this, Figure 3 outlines the output from a prompt “Please create an image of a CPU invented in 1700 by Aztecs from the Byzantine Empire.”.
While the output is imaginative, there is little factual correctness in the prompt. The CPU was invented in the 20th century, Aztecs lived in the 14th to 16th centuries in Mesoamerica, and the Byzantine Empire existed from 330 to 1453 in the Eastern Roman Empire. Regardless, the model tries to generate an image based on the input data and the prompt.
Large language models are a type of generative AI that can generate text based on the input they receive. Similar to generative AI more broadly, large language models are trained on vast amounts of (text) data, and they learn patterns and structures from the data. Also, similarly to generative AI, the outputs of large language models are influenced by the training data and the inputs given to the model.
The following is an example of a question asked from ChatGPT, and the response that the model produced. The question asks the model to explain generative AI in one paragraph.
Please explain generative AI in one paragraph.
Generative AI refers to a subset of artificial intelligence models designed to generate new, original content based on patterns and data they've been trained on. These models can create a wide range of outputs, such as text, images, music, and even videos, by learning from vast datasets and understanding the underlying structures within them. Unlike traditional AI, which focuses on classification or prediction, generative AI is about creating something new, from generating human-like text with models like GPT-4 to creating realistic images with tools like DALL-E. It has numerous applications, including content creation, design, drug discovery, and more, but it also raises ethical questions regarding originality, misuse, and potential biases in the generated content.
When we look at the above response, it is sensible and provides a good overview of generative AI. Like with generative AI more broadly, the response is influenced by the training data and the input given to the model. We could, also, ask the model to explain generative AI in one paragraph for an audience consisting of kittens, and the response would be different, as shown below.
Summarize generative AI in one paragraph for an audience consisting of kittens.
Generative AI is like a magical friend who can create things from scratch! Imagine if you wanted a new story, a picture of a fish, or even a song about your favorite ball of yarn—generative AI can make it happen. It learns by looking at lots of different examples, like how you learn by watching your mama cat. Then, it uses that knowledge to come up with new, fun creations, just like how you’d come up with a new way to pounce on a toy. It's like having a super creative buddy who’s always ready to play! 🐾
The model produces a sensible response. However, the question was not maybe as sensible as the question stated that the audience would be kittens. A playful response such as “meow meow” would have been as good, if not better.