Introduction to Generative AI and LLMs [Pt 1] | Generative AI for Beginners
By Microsoft Developer
Summary
## Key takeaways - **LLMs: Pinnacle of AI Technology**: Large language models represent the peak of AI, overcoming challenges that older models struggled with and achieving human-level performance in many tasks. [00:35] - **Generative AI's Long History**: Despite recent hype, generative AI has roots stretching back to the 1950s and 60s, evolving from basic chatbots to sophisticated machine learning algorithms. [01:53] - **Transformer Architecture: The Key Innovation**: The Transformer architecture, with its attention mechanism, allows models to handle longer text sequences and focus on relevant information, forming the basis for modern LLMs. [03:50] - **Tokenization: How LLMs Process Text**: LLMs process text more efficiently by breaking it down into 'tokens,' which are then mapped to numerical indices for the model to understand and predict. [04:56] - **Creative Output Through Randomness**: LLMs introduce a degree of randomness in selecting the next token, preventing identical outputs for the same input and enabling creative and engaging text generation. [07:30] - **Prompts and Completions: LLM Interaction**: User input to an LLM is called a 'prompt,' and the model's generated text is a 'completion,' which can range from answering questions to writing assignments. [08:04]
Topics Covered
- Large Language Models: Revolutionizing Education with Personalized Learning
- Generative AI: A Decades-Long Evolution, Not Overnight Hype
- Beyond Text: How Tokenization Powers LLM Generation
- The Hidden Ingredient: Randomness in AI's Creative Output
- Prompting for Impact: Guiding AI for Specific Outputs
Full Transcript
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
cucho I'm A Cloud Advocate at Microsoft
focusing 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 for
possible they've conquered numerous
challenges that older language models
struggled with achieving human L
performance in various
stas they have sever capabilities and
applications but for the sake of this
course we'll explore how Lar 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
education and providing personalized
learning experiences to every learner
according to their needs in this course
we'll delve into to how our startup
harnesses the power of generative AI to
unlock new possibilities in
education we'll 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 tracing back to
the 1950s
1960s uh the early AI Prof types
consisted of typ PR chatbots relying on
knowledge bases maintained by experts uh
this chatbots generated responses based
on keywords found in user input but it
soon became clear that this approach had
scalability
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 viritual 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
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 open
gbds one of the key concept to grasp is
tokenization L 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 talken ISAC 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
models and generative I
domain now a token is essentially a
chunk of text which can VAR 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 predictive token is then
incorporated into the input of the next
iteration creating an exp 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
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
tax 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 Char gbt
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 Louis 14
and his court and you can see that the
output is exact ly what I'm asking for
um so the model 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 Lis 14 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
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
implicit ask for writing assistance now
the examples I just did are quite simple
and don't want to be you know an itive
demonstration of large language models
capabilities they just want to show you
the potential of using generative a 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
Loading video analysis...