I have some data science background, and I kinda understand how LLM parameter tuning works and how model generates text.

Simplifying and phrasing my understanding, an LLM works like - Given a prompt: Write a program to check if input is an odd number (converts the prompt to embedding), then the LLM plays a dice game/probability game of: given prompt, then generate a set of new tokens.

Now my question is, how are the current LLM’s are able to parse through a bunch of search results and play the above dice game? Like at times it reads through say 10 URLs and generate results, how are they able to achieve this? What’s the engineering behind generating such huge verbose of texts? Cause I always argue about the theoretical limitations of LLM, but now that these “agents” are able to manage huge verbose of text I dont seem to have a good argument. So what exactly is happening? And what is the limit of AI non theortical limit of AI?

Edit

  • Greyscale@lemmy.sdf.org
    link
    fedilink
    English
    arrow-up
    9
    arrow-down
    1
    ·
    1 day ago

    An LLM reads the previous prompts and replies, plus any base prompts. This is considered the context window. Don’t ask me why its not infinite.

    The machine will then generate text following the previous text that continues the spirit and intent of the previous text, based on other texts previously digested into weights.

    Its the same thing as your phones autocomplete but with a few gigabytes of weights instead of a few kilobytes.

    If the data its working with is larger than the context, it will lose it. Theres a chance it’ll halucinate anyway because the text generator later in the text is non-deterministic. Say you’re working with insurance data. Maybe your data is familiar enough to data it previously injested data. So now it starts using wrong data, but it “feels” right as far as the LLM is concerned, because its a text generator, not a truth checker.

    You can ask it to look again but its just generating fresh tokens while the context gets more polluted.

    Just start looking at the volumes of non-trivial psuedo-information it generates and just try to verify some of the facts it states about your data.

    • Iunnrais@piefed.social
      link
      fedilink
      English
      arrow-up
      10
      ·
      1 day ago

      It’s fundamentally not the same thing as autocomplete. Give autocomplete all the data an LLM has, every gig, every terabyte if it, and it still won’t be an LLM. Autocomplete lacks the semantic meaning layer as well as some other parts. People say it’s nothing but autocomplete from a misunderstanding of what a reward function does in backpropagation training (saying “the reward function is to predict the next word” is not even close to the equivalent of “it’s doing the same thing as autocomplete”)

      I’m writing this short reply with hopes that when I have more time in the next two days or so I’ll come back with a more complete explanation, (including why context windows have to be limited).

    • Iced Raktajino@startrek.website
      link
      fedilink
      arrow-up
      5
      ·
      edit-2
      1 day ago

      Disclaimer: : All of my LLM experience is with local models in Ollama on extremely modest hardware (an old laptop with NVidia graphics) , so I can’t speak for the technical reasons the context window isn’t infinite or at least larger on the big player’s models. My understanding is that the context window is basically its short term memory. In humans, short term memory is also fairly limited in capacity. But unlike humans, the LLM can’t really see (or hold) the big picture in its mind.

      But yeah, all you said is correct. Expanding on that, if you try to get it to generate something long-form, such as a novel, it’s basically just generating infinite chapters using the previous chapter (or as much of the history fits into its context window) as reference for the next. This means, at minimum, it’s going to be full of plot holes and will never reach a conclusion unless explicitly directed to wrap things up. And, again, given the limited context window, the ending will be full of plot holes and essentially based only on the previous chapter or two.

      It’s funny because I recently found an old backup drive from high school with some half-written Jurassic Park fan fiction on it, so I tasked an LLM with fleshing it out, mostly for shits and giggles. The result is pure slop that seems like it’s building to something and ultimately goes nowhere. The other funny thing is that it reads almost exactly like a season of Camp Cretaceous / Chaos Theory (the animated kids JP series) and I now fully believe those are also LLM-generated.

      • Limerance@piefed.social
        link
        fedilink
        English
        arrow-up
        4
        ·
        1 day ago

        You can improve the novel writing by using agents. First you generate just an outline with the plot points to every chapter. Then you chop that up and feed it to several agents to flesh out individual chapters. Finally the generated chapters are verified against the outline and overall plot. If that doesn’t fit, the agents are tasked with a rewrite. Repeat that until you have something serviceable.

        As you point out, there exists plenty of bad writing in TV series. These often have a number of different authors, who don’t necessarily know the other episodes very well.

        • KindnessisPunk@piefed.ca
          link
          fedilink
          English
          arrow-up
          2
          ·
          edit-2
          1 day ago

          I will say that while most of these models are non-deterministic their training data was very similar so if you did something like this I can guarantee you if you churned out enough you would start to see the common threads.