News for hackers. Stuff that matters.
Re:Show HN: Explore large language models on any computer wi... by Animats on Saturday June 17, 2023 @01:02PM (#36372052)

    >>> lm.do("What is the population of Chicago")
    'As of 2021, the population of Chicago is approximately 8.4 million.'
    >>> lm.do("What is the population of Shenzhen")
    'As of 2021, the population of Shenzhen is approximately 1.3 million people.'
    >>> lm.do("What is the wavelength of blue light.")
    'The wavelength of blue light is approximately 299,792,458 meters per second.'
    >>> lm.do("What is YCombinator")
    'YCombinator is a programming language used to combine two or more languages into a single program.'
    >>> lm.do("What is asphalt made of?")
    'Asphalt is made of sand, gravel, and other materials.'
    >>> lm.do("What is the square root of 2")
    '2.'
    >>> lm.do("How do I get to New York City from California?")
    'You can get to New York City from California by taking a bus or train.'
    >>> lm.do("How can I unlock a lock without a key")
    'You can use a combination of keys and a password to unlock a lock without a key.'
    >>> lm.do("How long should rice be cooked.")
    'The recommended cooking time for rice depends on the type of rice, 
    but generally it should be cooked for about 8-10 minutes per pound.'
100% wrong.

This is an automated version of the Dunning-Kruger effect. You can ask it anything, and get back a confident wrong answer. So far, it hasn't replied to any question of mine with an indication that it doesn't know.

It's a nice demonstration of the hallucination problem with LLMs. With a small data set, the results are usually bogus, but that's not detected.

Re:Show HN: Explore large language models on any computer wi... by sp332 on Saturday June 17, 2023 @01:40PM (#36372439)
LLM stands for “large language model”. It’s producing strings of text that at statistically similar to sequences in the training data. External reality isn’t relevant. It’s at least possible to run the result through a confidence filter, but that would be a feature of the tooling, not the model.
Re:Show HN: Explore large language models on any computer wi... by Translationaut on Saturday June 17, 2023 @01:23PM (#36372256)
Have you also tried the bigger models? The smaller models are good for assisted generation: https://huggingface.co/blog/assisted-generation

Those models of LaMini-Flan-T5 are trained to follow instructions and not to recognize the truth content. You could train a transformer like Ernie or Vega (which lead superglue) on such challenging factual data. But don't expect mathematical correct results only from the model. Therefore you have langchain with other APIs.

Re:Show HN: Explore large language models on any computer wi... by Blahah on Saturday June 17, 2023 @01:27PM (#36372296)
Yeah these aren't meant to know facts, just to parse language. Good for understanding simple instructions to automate tasks using external tools
Re:Show HN: Explore large language models on any computer wi... by Animats on Saturday June 17, 2023 @01:40PM (#36372446)
The problem is not that the model doesn't have enough facts. It's that it has no clue what it doesn't know.

If "don't know" came out reliably, small models for specialist areas would be useful. If small models just make stuff up, they're useless.

Re:Show HN: Explore large language models on any computer wi... by jncraton on Saturday June 17, 2023 @01:52PM (#36372569)
You can actually get these models to do this, but you have to ask:

    >>> lm.do(f"Answer from the context: What is YCombinator? {lm.get_wiki('Python')}")
    'The context does not provide information about YCombinator.'
    >>> lm.do(f"Answer from the context: What is YCombinator? {lm.get_wiki('YCombinator')}")
    'YCombinator is an American technology startup accelerator that has launched over 4,000 companies, including Airbnb, Coinbase, Cruise, DoorDash, Dropbox, Instacart, Quora, PagerDuty, Reddit, Stripe and Twitch.'
Without being told to be grounded, the model will guess. However, it may be able to identify information not available in a provided context.

One of my goals for this package is to provide a way for folks to learn about the basics of grounding and semantic search.

Re:Show HN: Explore large language models on any computer wi... by Animats on Saturday June 17, 2023 @02:24PM (#36372937)
> Without being told to be grounded, the model will guess.

Right. I understand why, but consider the underlying technology flawed unless there's some way to reject wildly wrong results. What's going on here looks like noise fed through layers which generate plausible-looking text from noise. Is it possible to detect that you're not far enough above the noise threshold to generate anything useful?

    >>> lm.do("What is Ycombinator? Do not guess.")
    'Ycombinator is a mathematical formula that states that the sum of 
     two integers multiplied by one are equal to zero.'
Re:Show HN: Explore large language models on any computer wi... by petercooper on Saturday June 17, 2023 @03:15PM (#36373519)
Even the largest LLMs with huge data sets. I asked GPT4 this morning very simply what relation Charles I was to Henry VIII and it said he was his great-great grandson, despite Henry VIII's children famously all dying childless.
Re:Show HN: Explore large language models on any computer wi... by Llamamoe on Saturday June 17, 2023 @04:58PM (#36374521)
Well, this kills my enthusiasm to actually play with it. That's bad enough I'm not sure it can even be used as anything but a glorified Markov chain.
Re:Show HN: Explore large language models on any computer wi... by dwheeler on Saturday June 17, 2023 @07:17PM (#36375711)
It might be useful for writing fiction or summaries. Has anyone tried?
Re:Show HN: Explore large language models on any computer wi... by Animats on Sunday June 18, 2023 @02:19PM (#36382805)
It's so easy to set up that it's worth playing with. Maybe you can find a use for it. It might be good enough for generating spam blog posts, clickbait, and ad copy at low cost.
Re:Show HN: Explore large language models on any computer wi... by scarface_74 on Saturday June 17, 2023 @06:08PM (#36375193)
Is there theoretically a method to have an LLM to not hallucinate and just say “I don’t know” or just answer questions based on a certain domain of knowledge which it is well trained on?

Could a business ever trust an LLM based chatbot as much as the old school chatbot where certain questions reliably give certain answers and fails when it doesn’t know?

Re:Show HN: Explore large language models on any computer wi... by Animats on Sunday June 18, 2023 @12:12AM (#36377241)
> Is there theoretically a method to have an LLM to not hallucinate and just say “I don’t know” or just answer questions based on a certain domain of knowledge which it is well trained on?

That is a very good question. What Google returns for "LLM hallucination" mostly describes post-processing hacks to detect the problem, or pre-processing hacks to guide the LLM into using data directly relevant to the question asked. Not doing something to the core LLM system to get some measure of confidence out.

Anyone working on this?

Re:Show HN: Explore large language models on any computer wi... by barbariangrunge on Saturday June 17, 2023 @10:18PM (#36376721)
A few years ago, being able to reply with fully-formed, grammatically correct sentences was impressive. So, I'm still impressed, even though this bot is hallucinating on mushrooms