Generative AI and LLMs
OCI AI Foundations · Lesson 6 of 16 · 40:05
YouTube loads only after you press play. This chapter opens at its timestamp in the full course. Watch on YouTube ↗
Learning with these videos? Subscribe for new courses and exam-style questions.
Subscribe on YouTube (opens in a new tab)In this lesson
Prepare for the Oracle Cloud Infrastructure AI Foundations Associate exam (1Z0-1122-26). In this lesson: what generative AI is and how it differs from other machine learning, what a large language model is (a probability for every possible next token, and billions of parameters), and how an LLM writes, one token at a time, with greedy decoding or sampling. Includes three original practice questions, with Willowmere Motors, a fictional network of car dealerships and repair shops, as the example.
Study notes
The text of this lesson, to read at your own pace. Information as of November 2026.
An assistant that writes
Willowmere's customer service team answers the same questions every night: opening hours, service prices, and how to book a test drive. An assistant that writes natural answers would help, and it would rest on a large language model. Before choosing one on OCI, the team needs to know what generative AI is, and how a language model actually writes.
What generative AI is
Generative AI is a subset of deep learning that creates new content: text, images, audio, code, or video. It learns the patterns and structure of its training data, then generates new data that shares those patterns, without copying it. Many generative models are first pretrained on huge amounts of unlabeled data, then fine-tuned for specific tasks with smaller labeled data sets. Some work with one kind of data, like text, while multimodal models take in or produce several kinds, like text and images.
Generative AI and other machine learning
Classic machine learning learns to map inputs to labels: given features, it predicts a class or a value, like declined, or nine thousand dollars. A generative model learns how the data itself is distributed: the patterns that make a car photo look like a car photo, or a sentence sound like English. That's why it can produce new examples that never existed, like a new photo, or a new answer. So when a question asks which model creates new content, rather than predicting a label, the answer is generative AI.
What an LLM is
A large language model, or LLM, is a probabilistic model of text. Given some text, it computes a probability for every word, or token, in its vocabulary to come next. For example, after the words the car needs new brake, the word pads gets a high probability, and the word banana a very low one. Large refers to the number of parameters, the adjustable weights of the model, from hundreds of millions to hundreds of billions, but bigger is not always better: more parameters need more data and computation, and a model can overfit.
How an LLM writes
An LLM writes one token at a time. It computes the distribution for the next token, picks one, appends it to the text, and repeats with the longer text. It can always pick the most likely token, which is called greedy decoding, or sample from the distribution, which gives more varied text. It stops when it generates a special end of sequence token, or when it reaches a length limit. And because it predicts what is likely, not what is true, it can write fluent text that is wrong: lesson eight shows how to reduce that.
Recap
Let's recap. Generative AI creates new content that shares the patterns of its training data, and multimodal models handle several kinds of data. Classic machine learning predicts a label, while a generative model learns how the data is distributed. An LLM computes a probability for every token in its vocabulary to come next. Large means many parameters, but bigger is not always better. And an LLM writes one token at a time, greedy or sampled, until an end of sequence token.
Quick checks for this lesson
The 3 questions of this lesson, as plain text. The button above runs them with shuffled choices and the reason behind every choice.
Willowmere wants one model that looks at a customer’s photo of a dashboard warning light, and explains it in a few sentences of text. What kind of model is this?
- A binary classifier
- A multimodal generative model
- A clustering model
- A text-only language model
Show the answer
A multimodal generative model
The model takes an image in and produces text, so it's a multimodal generative model. “A binary classifier” would only choose between two classes, and write no explanation. “A clustering model” would group photos without labels, and write nothing either. And “A text-only language model” works with text only, so it cannot look at the photo.
Willowmere compares two models, and one is described as much larger. In a large language model, what does large refer to?
- The length of each answer
- The size of the vocabulary list
- The number of parameters
- The number of its users
Show the answer
The number of parameters
Large refers to the number of parameters, the adjustable weights that the model learns. “The length of each answer” is set by the request and by the model's limits, not by its size. “The size of the vocabulary list” is the list of tokens that the model knows, which is not what large means. And “The number of its users” has nothing to do with the model itself.
Willowmere’s assistant must use exactly the same wording, every time, for a short legal notice. Which way of choosing the next token fits best?
- Always pick the most likely token
- Sample at random from the distribution
- Stop at the end of sequence token
- Switch to a model with more parameters
Show the answer
Always pick the most likely token
Greedy decoding always picks the most likely token, so the same prompt gives the same text. “Sample at random from the distribution” would give more varied wording, the opposite of what the notice needs. “Stop at the end of sequence token” only says when the text ends, not which tokens it contains. And “Switch to a model with more parameters” would change the model, not how it chooses each token.