00:09Hi everyone, and welcome to the first lesson of the Generative AI for Beginners course
00:13Uh, this course is based on an open source curriculum with the same name available on GitHub that you can find at a link on the screen
00:21I'm Carlotta Castelluccio, I'm a Cloud Advocate at Microsoft focusing on artificial intelligence technologies, and in this video, I'm going to introduce you to generative AI and large language models
00:35Large language models represent the pinnacle of AI technology, pushing the boundaries of what was once possible
00:43They've conquered numerous challenges that older language models struggled
00:47with achieving human-level performance in various tasks, they have several capabilities and applications, but for the sake of this course, we'll explore how large language models are revolutionizing education through a fictional startup that we'll be referring to as our startup
01:08Our startup works in the education domain with the ambitious mission of improving accessibility in learning on a global scale, ensuring equitable access to education, and providing personalized learning experiences to every learner according to their needs
01:25In this course, we'll delve into how our startup Harnesses the power of generative AI to unlock new possibilities in education
01:36We'll also examine how they address the inevitable challenges tied to the social impact of this technology and its technological limitations, but let's start by defining some basic concepts we'll be using throughout the course
01:53Despite the, uh, relatively recent hype surrounding generative AI, we can say that in the last couple of years, we have really, uh, heard of generative AI everywhere and every time, um, but this technology has been decades in the making, with its origins tracing back to the 1950s, 1960s, uh, the early AI prof
02:13types consisted of type PR chatbots relying on knowledge bases maintained by experts
02:20Uh, this chatbots generated responses based on keywords found in user input, but it soon became clear that this approach had scalability limitations
02:34A significant turning point arrived in the 1990s when a statistical approach was applied to text analysis, and this gave birth to machine learning algorithms, uh, which could learn patterns from data without explicit programming, and these algorithms allowed machines to simulate human language understanding, paving the way for the AI we know today in more recent times, advancements in hardware technology allowed for development of advanced machine learning algorithms, particularly neural networks
03:11These innovations significantly improved natural language processing, enabling machines to understand the context of words in sentences
03:19This breakthrough technology powered the birth of virtual assistance in the early 21st century
03:24This virtual assistance excelled at interpreting human language, identifying needs, and taking actions to fulfill them, such as answering queries with predefined scripts or connecting to third-party services, and so we
03:40Arrived at generative AI, a subset of deep learning, after decades of AI research, a new model architecture known as the Transformer emerged, and Transformers could handle longer text sequences as input and were based on the attention mechanism, enabling them to focus on the most relevant information regardless of its order in the input text
04:10Today, generative AI models, often referred to as large language models, are built upon the Transformer architecture, and that's what the "T" in GPT actually means
04:25These models, trained on vast amounts of data from sources like books, articles, and Websites possess a unique adaptability
04:33They can tackle a wide range of tasks and generate chromatically correct text with a hint of creativity, but let's dive deeper into the mechanism of large language models and shed light on the inner workings of models like the Open GBDS
04:51One of the key concepts to grasp is tokenization
04:56Language models receive text as input and produce text as output
05:03If we want to really simplify the mechanism, however, these models work much more efficiently with numbers rather than with row text sequences, and that's where the token Isaac comes into play
05:17Text prompts are Chunked into tokens, uh, helping the model in predicting the next token for completion
05:25Models also have a maximum, a maximum length of token window, and model pricing is also typically computed by the number of tokens used in output and inputs
05:38So, um, tokenization is really an important concept in large language models and generative AI domain
05:48Now, a token is essentially a chunk of text which can vary in length, uh, and typically consist of a sequence of characters, and the tokenizer's primary job is to really, is to really break down the input text into an array of those tokens, um, which are then further mapped to Token indices, these token indices are essentially integer encoding of the original text chunks, making it easier for the model to process and understand
06:23Now, let's move to predicting the output tokens
06:28Um, given an input sequence of n tokens, with the maximum n varying from one model to another according to the maximum content window length, or for one model, uh, the model is designed to predict a single token as its output
06:48But here's where it gets interesting, the predictive token is then incorporated into the input of the next iteration, creating an expanding window pattern, and this pattern allows the model to provide more coherent and contextually relevant responses, often extending to one or multiple sentences
07:12Now, let's delve into the selection process
07:15The model chooses the output token based on its probability of occurring after the current text sequence
07:23This probability distribution is calculated using the model's training data
07:30However, here's the twist: the model doesn't always choose the token with the highest probability from the distribution
07:36To simulate the process of creative thinking, a degree of randomness is introduced into the selection process
07:45This means that the model doesn't produce the exact same output for the same input every time, that's the element that allows generative AI to generate text that feels, you know, creative and engaging
07:57Now, we said that the main capability of a large language model is generating text from scratch, starting from a textual input written in natural language, but what kind of textual input and output? First of all, let me say that input of a large language model is known as prompt, while the output is known as completion, a term that refers to the model mechanism of generating the next token to complete the current input
08:11Let's do some
08:24Examples of prompts and completion by using the OpenAI ChatGPT playground, um, always in our educational scenario
08:37Now, a prompt may include an instruction specifying the type of output we expect from the model
08:41In the example we are seeing, we are asking to write an assignment for high school students, including four open-ended questions, um, about Louis XIV and his court, and you can see that the output is exactly what I'm asking for
09:01Um, so the model was able to generate an assignment with the questions
09:05Now, another kind of prompt might be, uh, a question asked in the form of a conversation with an agent
09:12In this example, we are asking about Louis XIV in a question, so we asked, "Who is Louis XIV and why is he an important historical character?" and we've got an answer
09:26Another type of prompt might be a text to complete, so an incipit of a text to complete, and you can see now that we used an incipit of a text to complete as prompt, and we've got a whole paragraph to complete the current input, so this is basically an implicit ask for writing assistance
09:50Now, the examples I just did are quite simple and don't want to be, you know, an iterative demonstration of large language models' capabilities, they just want to show you the
10:04Potential of using generative AI, in particular, but not limited in a context such as the educational context we have used today as example, that's all for now
10:16Uh, in the following lesson, we are going to explore different types of generative AI models, and we're going to cover also how to test, uh, to iterate, and to improve the performance, and compare also different models to find the most suitable one for a specific use case
10:33Thank you.