Foundations · 10:36
Introduction to generative AI and LLMs
The open-source curriculum.
- Course based on an open-source curriculum.
- What LLMs are and how they work.
- A startup scenario.
| Concept | Meaning |
|---|---|
| Generative AI | Creates content |
| LLM | Large language model |
Do this in your own tools, step by step. Ticks are saved on this device.
Based on?
Open-source curriculum.
LLM?
Large language model.
0:09 hi everyone and welcome to the first lesson of the generative AI for beginners course uh this course is based on an open source curriculum with the same name available on gab that you can find at a link on the screen I'm carot Castello I'm A Cloud Advocate at Microsoft focused on artificial intelligence Technologies and in this video video I'm going to introduce you to generative Ai and large language models large language models represent the Pinnacle of AI technology pushing the boundaries of what was once foring possible they've conquered numerous challenges that older language models struggled with achieving human L performance in various tasks they have sever capabilities and applications but for the sake of this course we'll explore how larg large language models are revolutionizing education through a fictional startup that we'll be referring to as our startup our startup works in the education domain with the Ambi with the ambitious mission of improving accessibility in learning on a global scale ensuring Equitable access to
1:20 education and providing personalized learning experiences to every learner according to their needs in this course we'll de into to how our startup harnesses the power of generative AI to unlock new possibilities in education we also examine how they address the enevitable challenges tied to the social impact of this technology and its technological limitations but let's start by defining some basic concept we'll be using throughout the course despite 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 racing back to the 1950s 1960s uh the early AI Pro types consisted of type pretend chatbots relying on knowledge bases maintained by experts uh this chatbots generated responses based on keywords found in user input but it's soon became clear that this approach had scalability
2:34 limitations a 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 ping the way for the eye we know today in more recent times advancements in Hardware technology allowed for development of advanced masch learning algorithms particularly neural networks these Innovations significantly improved natural language processing enabling machines to understand the context of words in sentences this breakthrough technology powered the birth of virual assistance in the early 21st century this viral 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 arrived at generative AI a subset of deep learning after Decades of AI research a new model architecture known as the Transformer um 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
4:07 order in the input text today M generative AI models often referred to as large language models are built upon the Transformer architecture and that's uh what the T in gbt uh actually means um these models trained on vast amounts of data from sources like like books articles and websites possess a unique adaptability they 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 o the openi gbts one of the key concept to grasp is tokenization large language models receive text as input and produce text as output if 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 tokenizer comes into play text prompts are chunked into tokens uh helping the model in predicting the next token for completion models also have a maximum a Max maximum length of token window and model pricing is also typically computed by the number of tokens used in output and inputs so um tokenization is really an important Concept in large language
5:45 models and generative I domain now 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 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 and coding of the original text chunks making it easier for the model to process and understand now let's move to predicting the output tokens um given an input sequence of n tokens with the maximum n varing from one model to another according to the maximum um content window length or for for one model uh the model is designed to predict a single token as its output but here's where it gets interesting the predicted token is then incorporated into the input of the next iteration creating an expans window pattern and this pattern allows the model to provide more coh coherent and contextually relevant responses often extending to one or multiple sentences now let's delve into the selection process the model chooses the output token based on its probability of occurring after the current text
7:23 sequence this probability distribution is calculating using the model's training data however here's the twist the model doesn't always choose the token with the highest probability from the distribution to simulate the process of creative thinking a degree of Randomness is introduced into the selection process this 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 Tex that feels you know creative and engaging now we said that the main capability of a large language model is generating a 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 um term that refers to the model mechanism of generating the next token to complete the current input let's do some examples of prompts and completion by using the open AI CH gbt
8:34 playground um always in our educational scenario now a prompt may include an instruction specifying the type of output we expect from the model in the example we are seeing we are asking to write an assignment for a high for high school students including four open-ended questions um about Lou 14 and his court and you can see that the output is exact what I'm asking for um so the mother was able to generate an assignment with the questions now another kind of prompt might be uh a question asked in the form of a conversation with an agent in this example we are asking about Luis 14th um in a question so we asked who is Luis 14 and why he is an important historical character and we've got an answer another type of trump might be a of text to complete so an incipit of a text to complete and you can see now that we um used a an insit of a text to complete as prompt and we've got a whole paragraph to um um complete the the current input so this is basically an
9:50 implicit ask for writing assistance now the examples I just did are quite simple and don't want to be you know an examp itive demonstration of large language models capabilities they just want to show you the potential of using generative in particular but not limited in a context such as the educational context we have used today as example that's all for now uh 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 mod us to find the most suitable one for a specific use case thank you hey folks welcome back to dtive AI
Get the other 14 chapters, the exam and your certificate for LinkedIn, plus all 700+ AI courses.