I hear people saying things like “chatgpt is basically just a fancy predictive text”. I’m certainly not in the “it’s sentient!” camp, but it seems pretty obvious that a lot more is going on than just predicting the most likely next word.

Even if it’s predicting word by word within a bunch of constraints & structures inferred from the question / prompt, then that’s pretty interesting. Tbh, I’m more impressed by chatgpt’s ability to appearing to “understand” my prompts than I am by the quality of the output. Even though it’s writing is generally a mix of bland, obvious and inaccurate, it mostly does provide a plausible response to whatever I’ve asked / said.

Anyone feel like providing an ELI5 explanation of how it works? Or any good links to articles / videos?

  • bionicjoey@lemmy.ca
    link
    fedilink
    arrow-up
    58
    arrow-down
    2
    ·
    edit-2
    10 months ago

    It is literally the same exact kind of algorithm that predicts the next word you will type on your phone based on what’s already been typed. The differences are that it has a much larger training dataset, which means more accurate predictions, it processes based on the entire body of text that has already been given (including the hidden prompt and previous messages), and that it doesn’t always predict whole words, but instead clusters of characters.

    If you want a more general overview of how machine learning works in general, this is a good video series to watch: https://www.youtube.com/watch?v=aircAruvnKk

    If you want to see some evidence that it doesn’t truly understand what it says, try having it generate and explain some jokes or riddles that rely on wordplay. It will completely shatter the illusion.

    • QuaternionsRock@lemmy.world
      link
      fedilink
      arrow-up
      12
      arrow-down
      3
      ·
      edit-2
      10 months ago

      Me:

      You are a talented comedian. Generate some jokes or riddles that rely on wordplay.

      ChatGPT 4:

      Sure, here are a few wordplay-based jokes and riddles:

      Why don’t scientists trust atoms? Because they make up everything!

      I told my wife she should embrace her mistakes. She gave me a hug.

      What do you call fake spaghetti? An “impasta.”

      I’m reading a book on anti-gravity. It’s impossible to put down!

      Why was the math book sad? Because it had too many problems.

      Enjoy these light-hearted plays on words!

      Edit: I prodded it a little, and I actually quite like the fourth one below.

      Me:

      These aren’t very clever. Can you generate some that a more mature audience would appreciate?

      ChatGPT:

      Of course, here are some more sophisticated wordplay-based jokes suitable for a mature audience:

      Parallel lines have so much in common. It’s a shame they’ll never meet.

      A Freudian slip is when you say one thing but mean your mother. I mean another.

      I’m reading a book on the history of glue. Can’t put it down, but I’m sticking to it.

      Time flies like an arrow; fruit flies like a banana. A classic example of linguistic ambiguity.

      The rotation of Earth really makes my day. Quite literally.

      These jokes involve a bit more linguistic and conceptual play, appealing to an audience that enjoys a deeper level of wordplay.

      • bionicjoey@lemmy.ca
        link
        fedilink
        arrow-up
        18
        arrow-down
        1
        ·
        10 months ago

        All of those jokes are plagiarized. It doesn’t actually understand the jokes, it’s just repeating ones that it’s seen before. Ask it to explain why some of these are funny.

        • shastaxc@lemm.ee
          link
          fedilink
          arrow-up
          7
          ·
          10 months ago

          Seriously. I’ve literally heard all of those jokes before. It may have even stolen them all from a single website.

      • guyrocket@kbin.social
        link
        fedilink
        arrow-up
        3
        ·
        10 months ago

        I agree, that was good.

        My major takeaway is that neutral networks, and AI in general, are mostly pattern recognition with a little bias and weighting thrown in to improve accuracy.

        And that is why I question all the supposedly amazing things people seem to think it will do and many of the applications of AI.

  • huginn@feddit.it
    link
    fedilink
    arrow-up
    23
    ·
    edit-2
    10 months ago

    I think there’s a second, unstated issue at play here: you’re experiencing a very deep cognitive bias. An exploit in the human brain.

    The human brain is a fantastically complex piece of meat but one of its many issues is the anthropomorphic bias: the tendency to ascribe human traits, especially agency and cognition, to things or animals that do not have those traits.

    We tend to believe if it walks like a duck and talks like a duck it must be a duck. ChatGPT is a very complex and highly specialized algorithm that outputs data just like another online human… But 100% of it is just a model processing your input and returning it back out. It talks like a human but is more akin to notepad than it is to us.

    To be clear: that bias exists in everyone. We all do this. Anytime I talk about my dog scheming to get my attention I’m hitting that bias. Anytime my robot vacuum interrupts me doing the dishes I talk at it and tell it to go away. I interact with the world around me as though most things are human.

    • Azzu@lemm.ee
      link
      fedilink
      arrow-up
      9
      ·
      10 months ago

      To be fair/to elaborate on that point, your dog is much much closer to human than chatgpt is, we share like 84% of DNA. Most of the same basic emotions like hunger, fear, desire, etc are present as well as the ability to learn and communicate.

      Your dog may not be “scheming”, because it lacks the ability to plan very far in the future, but it definitely has the intention of getting your attention and tries to figure out in the moment how to do it. Same as a human kid might do.

      It is incredibly valuable to act like a dog is human, because dogs do actually share a lot of characteristics. Not all of course, it’s still wrong to fully assume a dog is human, but as a quick heuristic it’s still valuable a lot (84%? :D) of the time.

      • huginn@feddit.it
        link
        fedilink
        arrow-up
        2
        ·
        10 months ago

        Sure: I get that they’re not exactly the same. The ChatGPT issue is orders of magnitude more removed from humanity than a dog, but it’s a daily example of anthropomorphic bias that is relatable and easy to understand. Just was using it as an example.

    • Randomgal@lemmy.ca
      link
      fedilink
      arrow-up
      3
      ·
      10 months ago

      Yep, this is a very good explanation. Seeing ChatGPT “talk” is immediately associated with sentience, because for your entire life, and millions of years of evolution, apeech was in 99.9% of cases, a sign of aentience. So your brain doesn’t even consider it a question, until you consciously stop to think about it.

      An interesting way to antromorphizise GPT that’s still technically correct is to think of it as having essentially perfect memory. So it doesn’t know how to talk, but it has seen so many conversations (literal trillions) that it can recognize the patterns that make up speech and simply “remember” what the most likely combination of words is, given the context, with zero actual “understanding” of language. (Human trainers then fine-tune these guesses to give you the ChatGPT experience)

      • huginn@feddit.it
        link
        fedilink
        arrow-up
        1
        ·
        edit-2
        10 months ago

        ChatGPT also fudges “memory” by feeding in all previous prompts (up to a token limit) with whatever you’ve said latest, which improves the pattern matching.

  • SorteKanin@feddit.dk
    link
    fedilink
    arrow-up
    22
    arrow-down
    1
    ·
    10 months ago

    it seems pretty obvious that a lot more is going on than just predicting the most likely next word.

    But that is all that’s going on. It has just been trained on so much text that the predictions “learn” the grammatical structure of language. Once you can form coherent sentences, you’re not that far from ChatGPT.

    The remarkable thing is that prediction of the next word seems to be “sufficient” for ChatGPT’s level of “intelligence”. But it is not thinking or conscious, it is just data and statistics on steroids.

    • datavoid@lemmy.ml
      link
      fedilink
      English
      arrow-up
      10
      ·
      10 months ago

      Try to use it to solve a difficult problem and it will become extremely obvious that it has no idea what it is talking about.

      • pearsaltchocolatebar@discuss.online
        link
        fedilink
        arrow-up
        1
        ·
        10 months ago

        Yup. I used it to try to figure out why our Java code was getting permission denied on jar files despite being owned by the user running the code and 777 permissions while upgrading from rhel7 to 8

        It gave me some good places to check, but the answer was that rhel8 uses fapolicyd instead of selinux (which I found myself on some tangentially related stack exchange post)

    • Dran@lemmy.world
      link
      fedilink
      arrow-up
      4
      ·
      10 months ago

      The magic sauce is context length within reasonable compute restraints. Phone predictive text has a context length of like 2-3 words, ChatGPT (and other LLMs) have figured out how to do predictions on thousands or tens of thousands of words of context at a time.

    • LesserAbe@lemmy.world
      link
      fedilink
      arrow-up
      3
      ·
      10 months ago

      I think this explanation would be more satisfying if we had a better understanding of how the human brain produces intelligence.

      • SorteKanin@feddit.dk
        link
        fedilink
        arrow-up
        2
        ·
        10 months ago

        I agree. We don’t actually know that the brain isn’t just doing the same thing as ChatGPT. It probably isn’t, but we don’t really know.

  • vzq@lemmy.blahaj.zone
    link
    fedilink
    arrow-up
    12
    arrow-down
    8
    ·
    10 months ago

    Most of my job is predicting the next word I’m going to type.

    I get a mail. I read it. Then I wrote the first word of my reply, the most likely word after the last word of the original mail. Then the next one. Then the next one.

    Or in a meeting. Someone says something. Then I say the first word of my reply. Then the next one.

    Predicting the next word well in a wide number of cases is what most of us do daily all the time. It’s a very difficult and versatile and complex skill.

  • As I understand it, the big innovation that allowed things to advance so fast is called “attention”.

    Basically it’s not just learning which word is next, it’s also learning which of the previous words is the most important context for predicting the next word. This is what allows it to learn the grammatical structure of language which is important for a couple reasons.

    For one it can use that info to better identify if data in the training set is related to the subject at hand. E.g. it can better pick out keywords so it knows that 2 data sets with the word “the” might not be related at all, but 2 data sets with the word “silicon” are probably highly related.

    It might even be able to “understand meaning” by finding the relationships of words to each other. If it comes across the phrase “minor the key and not the child”, it can figure out not only that “key” is important to the subject at hand, but also that information about children is actively harmful to predicting the next word.

    It then uses this information to stay on topic, avoid mixing nonsense sentence structures together, and increasingly-- predict what an expert in the field might say.

    There are more tricks to it than this, including ones that don’t know about or understand, but I’ve heard that the recent advancement is largely due to “attention”

  • DarkGamer@kbin.social
    link
    fedilink
    arrow-up
    3
    arrow-down
    1
    ·
    edit-2
    10 months ago

    I found this example useful, this dude builds a simple LLM that writes infinite Shakespeare and walks you through each step.

    Eli5: large language models like chat GPT are really good at guessing what combinations of words are most likely to be a good response to questions. They’re so good at it that many people think they are intelligent even though they’re not.