< Return to Video

Chatbots and Large Language Models Part 2

  • 0:07 - 0:12
    The problem in the last example
    is that at any point the AI only considers
  • 0:12 - 0:16
    a single letter to pick what comes next.
  • 0:16 - 0:20
    That's not enough context,
    and so the output is not helpful.
  • 0:21 - 0:22
    What if we could
  • 0:22 - 0:26
    train it to consider
    a sequence of letters, like sentences
  • 0:26 - 0:30
    or paragraphs, to give it more context
    to pick the next one?
  • 0:30 - 0:33
    To do this, we don't use a simple table
    of probabilities.
  • 0:33 - 0:36
    We use a neural network.
  • 0:36 - 0:39
    A neural network is a computer system
    that is loosely inspired
  • 0:39 - 0:41
    by the neurons in the brain.
  • 0:41 - 0:45
    It is trained on a body of information,
    and with enough training,
  • 0:45 - 0:50
    it can learn to take in new information
    and give simple answers.
  • 0:51 - 0:54
    The answers always include probabilities
  • 0:54 - 0:56
    because there can be many options.
  • 0:57 - 1:00
    Now let's take a neural network
    and train it
  • 1:00 - 1:05
    on all the letters sequences
    in Shakespeare's plays to learn
  • 1:05 - 1:09
    what letter is likely
    to come next at any point.
  • 1:11 - 1:13
    Once we do this,
    the neural networks can take
  • 1:13 - 1:18
    any new sequence and predict
    what could be a good next letter.
  • 1:18 - 1:21
    Sometimes the answer is
    obvious, but usually is not.
  • 1:22 - 1:23
    It turns out,
  • 1:23 - 1:26
    this new approach works
    better, much better
  • 1:26 - 1:30
    by looking at the long enough
    sequence of letters, the AI
  • 1:30 - 1:36
    can learn complicated patterns, and
    it uses those to produce all new texts.
  • 1:36 - 1:39
    It starts
    the same way with a starting letter
  • 1:39 - 1:44
    and then using probabilities
    to pick the next letter and so on.
  • 1:45 - 1:47
    But this time, the probabilities are based
  • 1:47 - 1:51
    on the entire context
    of what came beforehand.
  • 1:52 - 1:56
    As you see, this works surprisingly well.
  • 1:56 - 2:00
    Now, a system like ChatGPT uses
    a similar approach,
  • 2:00 - 2:04
    but with three very important additions.
  • 2:04 - 2:07
    First,
    instead of just training on Shakespeare,
  • 2:07 - 2:10
    it looks at all the information
    it can find on the Internet,
  • 2:11 - 2:15
    including all the articles on Wikipedia
    or all the code on GitHub.
  • 2:15 - 2:19
    Second,
    instead of learning and predicting letters
  • 2:19 - 2:24
    from just the 26 choices in the alphabet,
    it looks at tokens
  • 2:24 - 2:30
    which are either full words
    or word parts or even code.
  • 2:31 - 2:32
    And third
  • 2:32 - 2:36
    difference
    is that a system of this complexity
  • 2:36 - 2:41
    needs a lot of human tuning to make sure
    it produces reasonable results
  • 2:41 - 2:46
    in a wide variety of situations,
    while also protecting against problems
  • 2:46 - 2:51
    like producing highly biased
    or even dangerous content.
  • 2:51 - 2:55
    Even after we do this tuning,
    it's important to note that this system
  • 2:55 - 2:59
    is still just using random probabilities
    to choose words.
  • 3:00 - 3:02
    A large language model can produce
  • 3:02 - 3:06
    unbelievable results that seem like magic,
  • 3:06 - 3:11
    but because it's not actually magic,
    it can often get things wrong.
  • 3:11 - 3:13
    And when it gets things wrong, people ask,
  • 3:13 - 3:18
    does a large language
    model have actual intelligence?
  • 3:18 - 3:21
    Discussions about A.I. often spark
  • 3:21 - 3:24
    philosophical debates
    about the meaning of intelligence.
  • 3:24 - 3:28
    Some argue that a neural network
    producing words
  • 3:28 - 3:32
    using probabilities
    doesn't have really intelligence.
  • 3:32 - 3:35
    But what isn't under debate
    is that large language models
  • 3:35 - 3:38
    produce amazing results
  • 3:38 - 3:41
    with applications in many fields.
  • 3:41 - 3:46
    This technology is already being used
    to create apps and websites,
  • 3:46 - 3:51
    help produce movies and video games,
    and even discover new drugs.
  • 3:51 - 3:56
    The rapid acceleration of
    AI will have enormous impacts on society,
  • 3:56 - 4:00
    and it's important for everybody
    to understand this technology.
  • 4:00 - 4:03
    What I'm looking forward to
    is the amazing things
  • 4:03 - 4:07
    people will create with AI.,
    and I hope you dive in to learn
  • 4:07 - 4:11
    more about how AI works
    and explore what you can build with it.
Title:
Chatbots and Large Language Models Part 2
Description:

more » « less
Video Language:
English
Team:
Code.org
Project:
How AI Works
Duration:
04:16

English subtitles

Revisions Compare revisions