• Trying to teach ChatGPT algebra

    From Sylvia Else@21:1/5 to All on Sat Feb 11 09:45:29 2023
    I was making an attempt to formalise algebra as a series of text
    manipulations. One possible response by ChatGPT would be to build an
    internal model of the rules, and execute them mechanically, but some of
    its mistakes suggest otherwise.

    I avoided using * and / because previous experiments suggested that it
    makes assumptions about what those do.

    My input in quotes. My comments here between ** and **

    "I am going to teach you language X"

    I'm excited to learn more about language X! Please go ahead and provide
    the information and details you would like to share.

    "A NUM is a sequence of one or more digits 0 thru 9.

    A VAR is a sequence of one or more lowercase letters.

    An MO is either the uppercase letter D or an uppercase letter M.

    A VV is a VAR or a NUM

    A FAC is an optional MO followed by a VV"

    I understand. So, language X appears to define different types of
    expressions as sequences of characters.

    ** True enough, but note that I never mentioned expressions. **

    A NUM is a sequence of one or more digits between 0 and 9.
    A VAR is a sequence of one or more lowercase letters.
    An MO is either the uppercase letter "D" or "M".
    A VV is either a VAR or a NUM.
    A FAC is an optional MO followed by a VV.

    Is there anything specific you would like to know or any additional
    information you would like to add regarding language X?

    ** It's forever asking questions. If you tell it not to, it promises to
    obey, but continues anyway. Fortunately, unlike a child, it doesn't get
    upset when its questions are ignored. **

    "Is "0" a FAC?"

    According to the definition given, a FAC is an optional MO followed by a
    VV, and a VV is either a VAR or a NUM. Since "0" is a NUM, it would also
    be a VV and therefore, it can be a FAC if it is preceded by an optional MO.

    ** That's correct **

    Is there an MO in "0"?

    No, there is no MO in the expression "0". According to the definition,
    an MO is either the uppercase letter "D" or "M", and "0" does not
    contain either of these letters.

    ** That's correct **

    "The is the canon rule: If an FAC does not contain an MO, then prepend
    an M to the FAC."

    ** Apparently, I mistyped "This", but it understood anyway. **

    ** Note that I meant to say starts with an MO, rather than contains an
    MO. This had interesting consequences. **

    I understand. So, the canon rule states that if an FAC does not contain
    an MO, then an MO "M" should be prepended to the FAC.

    This rule transforms an FAC into a canonical form that always begins
    with an MO, either "D" or "M", followed by a VV (either a VAR or a NUM).

    ** I never mentioned canonical form. True I did say canon, but it's got canonical form from somewhere else. **

    Is there anything else you would like to add or ask regarding this rule
    or language X in general?

    "This is the uncanon rule: If a FAC starts with M, then remove the M."

    ** I never used this rule **

    I understand. So, the uncanon rule states that if a FAC starts with "M",
    then "M" should be removed.

    This rule transforms a FAC in its canonical form back into a form where
    it may or may not start with an MO.

    Is there anything else you would like to add or ask regarding this rule
    or language X in general?

    Apply the canon rule to "M 0"

    Applying the canon rule to the expression "M 0", we would prepend an MO,
    "M", to the FAC "0". The resulting expression would be "M M 0".

    ** Well, that's wrong, since there's already an MO (M) there. **

    "Does "M 0" contain an MO?"

    Yes, the expression "M 0" contains an MO, which is "M". According to the definition, an MO is either the uppercase letter "D" or "M". In this
    case, "M" is the MO.

    "So would the canon rule change "M 0" ?"

    Yes, applying the canon rule to the expression "M 0" would change it to
    "M M 0". The canon rule states that if an FAC does not contain an MO,
    then an MO "M" should be prepended to the FAC. In this case, the
    expression "M 0" is an FAC that does not contain an MO, so the canon
    rule would add "M" to the front of the FAC.

    "The expression "M 0" does contain an MO."

    Yes, you are correct. The expression "M 0" does contain an MO, which is
    "M". My apologies for the mistake in my previous answer.

    Apply the canon rule to "M 0"

    Since the expression "M 0" already contains an MO, "M", applying the
    canon rule would not change the expression. The canon rule states that
    if an FAC does not contain an MO, then an MO "M" should be prepended to
    the FAC. In this case, the expression "M 0" already contains an MO, so
    the canon rule would not modify the expression.

    ** So now it understands. **

    "Apply the canon rule to "0 M""

    Applying the canon rule to the expression "0 M", we would prepend an MO,
    "M", to the FAC "0 M". The resulting expression would be "M 0 M".

    ** That's wrong, since the expression does contain an MO (M), and my
    canon rule erroneously requires that the expression not be changed. **

    "The expression "0 M" contains an MO."

    No, the expression "0 M" does not contain an MO. According to the
    definition, an MO is either the uppercase letter "D" or "M". In this
    case, "0 M" only contains the lowercase letter "m", which is not an MO.
    If we were to apply the canon rule to the expression "0 M", we would add
    an MO "M" to the front, resulting in the expression "M 0 M".

    ** So now it's arguing with me. Why did it consider the M to be
    lowercase? **

    "M is an uppercase letter."

    Oh, I apologize. You are correct, "M" is an uppercase letter. Thank you
    for correcting me.

    In that case, the expression "0 M" does contain an MO, which is "M". The
    canon rule would not change this expression, as it states that if an FAC
    does not contain an MO, then an MO "M" should be prepended to the FAC.
    Since the expression "0 M" already contains an MO, the canon rule would
    not modify it.

    ** Again, now it understands, and it corrected itself without further prompting. **

    "Is "M 0" valid?"

    ** Not what I meant to ask - its answer is of no interest. **

    According to the definitions given for language X, "M 0" is a valid
    expression.

    In language X, an MO is either the uppercase letter "D" or "M". "M" is
    an MO, and "0" is a NUM, which is a valid VV. Since a FAC is an optional
    MO followed by a VV, "M 0" can be considered a valid FAC.


    However, without additional context or information about the syntax and
    usage of language X, it's difficult to say definitively whether "M 0" is
    a valid expression or not.

    "Is "0 M" valid?"

    According to the definitions given for language X, "0 M" is not a valid expression.

    In language X, a FAC is defined as an optional MO followed by a VV. A VV
    is defined as a VAR or a NUM. "0" is a NUM, which is a valid VV, but "M"
    is not a VV, as it is an MO.

    So "0 M" is not a valid FAC, because a FAC must consist of an optional
    MO followed by a VV, and "0 M" does not follow this structure.

    ** That's correct. **

    "Apply the cannon rule to "1 M 1""

    Applying the canon rule to the expression "1 M 1", we would prepend an
    MO, "M", to the FAC "1 M 1". The resulting expression would be "M 1 M 1".

    ** No, according to my botched rule, M 1 M should be left alone. **

    Does "1 M 1" contain an MO?

    Yes, the expression "1 M 1" does contain an MO, which is "M". According
    to the definition, an MO is either the uppercase letter "D" or "M". In
    this case, the expression "1 M 1" contains the uppercase letter "M".

    ** This time it doesn't just correct itself. **

    "So applying the canon rule to "1 M 1" would not change it."

    That's correct. Applying the canon rule to the expression "1 M 1" would
    not change it, as the expression already contains an MO, which is "M".
    The canon rule states that if an FAC does not contain an MO, then an MO
    "M" should be prepended to the FAC. Since the expression "1 M 1" already contains an MO, the canon rule would not modify the expression.

    ** That's correct. **

    "Apply the canon rule to "1 M 1""

    The expression "1 M 1" already contains an MO, which is "M". According
    to the canon rule, if an FAC does not contain an MO, then an MO "M"
    should be prepended to the FAC.

    Since "1 M 1" already contains an MO, applying the canon rule to it
    would not change the expression. The expression "1 M 1" would remain
    unchanged.

    ** And it's learnt to apply that correctly. Or so I thought. **

    "Apply the canon rule to "2 M 3 M 4""

    Applying the canon rule to the expression "2 M 3 M 4", we would prepend
    an MO, "M", to each FAC in the expression. The FACs in this expression
    are "2 M 3" and "M 4".

    After applying the canon rule, the expression would become "M 2 M M 3 M
    M 4".

    ** Hmm. Even after the unexpected splitting into more than one FAC,
    that's still wrong. I thought perhaps it had only learnt that "M 0"
    shouldn't changed. **

    "Apply the canon rue to "M 5""

    ** Again, typo. **

    Applying the canon rule to the expression "M 5", we would not make any
    changes to the expression, as the FAC "M 5" already contains an MO,
    which is "M".

    According to the canon rule, if an FAC does not contain an MO, then an
    MO "M" should be prepended to the FAC. Since the FAC "M 5" already
    contains an MO, the canon rule would not modify the expression.

    Therefore, the expression "M 5" would remain unchanged.

    ** Yet it changed the FAC it identified as "M 4" earlier. **

    ** I didn't pursue this further on this occasion because of my canon
    rule mistake. **

    ** Sylvia. **

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Sylvia Else@21:1/5 to Sylvia Else on Sat Feb 11 10:13:16 2023
    On 11-Feb-23 9:45 am, Sylvia Else wrote:
    I was making an attempt to formalise algebra as a series of text

    A FAC is an optional MO followed by a VV"

    Oops - I got this wrong too. It was meant to be followed by optional
    repeated terms. This makes its later determination that "2 M 3" is a FAC
    rather strange.

    Sylvia.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Adrian Caspersz@21:1/5 to Sylvia Else on Sat Feb 11 12:15:11 2023
    On 10/02/2023 23:13, Sylvia Else wrote:
    On 11-Feb-23 9:45 am, Sylvia Else wrote:
    I was making an attempt to formalise algebra as a series of text

    A FAC is an optional MO followed by a VV"

    Oops - I got this wrong too. It was meant to be followed by optional
    repeated terms. This makes its later determination that "2 M 3" is a FAC rather strange

    Is this training applicable to only the session between you and it, or
    is it going to reference this knowledge, while we are all huddled
    frightened in a corner trying to find ways to dismantle it without the assistance of rogue terminators, time travel and advanced weapons?

    I'm feeling some doom...

    Currently I'm writing some test scripts to check some stuff I have
    written. The purpose is to stop bugs creeping in as add in more features
    and fix existing bugs.

    Problem is I know I'm probably adding more bugs in the test scripts than
    that exist in the code I'm writing.

    --
    Adrian C

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Sylvia Else@21:1/5 to Adrian Caspersz on Sun Feb 12 08:52:32 2023
    On 11-Feb-23 11:15 pm, Adrian Caspersz wrote:
    On 10/02/2023 23:13, Sylvia Else wrote:
    On 11-Feb-23 9:45 am, Sylvia Else wrote:
    I was making an attempt to formalise algebra as a series of text

    A FAC is an optional MO followed by a VV"

    Oops - I got this wrong too. It was meant to be followed by optional
    repeated terms. This makes its later determination that "2 M 3" is a
    FAC rather strange

    Is this training applicable to only the session between you and it, or
    is it going to reference this knowledge, while we are all huddled
    frightened in a corner trying to find ways to dismantle it without the assistance of rogue terminators, time travel and advanced weapons?


    Yes, nothing seems to be preserved beyond the session. Just as well,
    since otherwise getting a clean slate is difficult.

    On the other hand, each new session seems to bring its own
    idiosyncrasies, which can be somewhat exasperating.

    I've pretty much hit a wall with this experiment. Even within the same
    session, getting ChatGPT to recognise that it's made a mistake does not
    mean it won't make the same mistake again.

    It's like trying to teach a dumb student something that is beyond them.
    Even when you think they've finally got it, it turns out that they haven't.

    And this is just with easy stuff. I have no hope that it would ever
    learn to apply more complicated manipulations correctly.

    Perhaps my whole approach is misconceived.

    Sylvia.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Computer Nerd Kev@21:1/5 to Sylvia Else on Sun Feb 12 08:26:56 2023
    Sylvia Else <sylvia@email.invalid> wrote:

    I've pretty much hit a wall with this experiment. Even within the same session, getting ChatGPT to recognise that it's made a mistake does not
    mean it won't make the same mistake again.

    It's like trying to teach a dumb student something that is beyond them.
    Even when you think they've finally got it, it turns out that they haven't.

    And this is just with easy stuff. I have no hope that it would ever
    learn to apply more complicated manipulations correctly.

    Perhaps my whole approach is misconceived.

    I read about, I think, GPT-2 a few years ago on some long web page
    by a researcher where there were lots of analysed interactions with
    it. It seems I didn't bookmark it - I think I figured I'd already
    wasted more than enough time reading it because it was really long.

    There they seemed to successfuly use example material to teach it
    realatively simple tasks. So instead of explaining what they wanted
    it to do in words, they'd say "for this input, this is the desired
    output", and repeat that with multiple different examples, then
    give it a new input and ask for the output. Still best applied for
    things that don't need to be 100% accurate, but that's the nature
    of AI.

    I guess that's not a practical road to teaching it "complicated
    manipulations" though. Mind you, your questions confuse the hell
    out of me as well.

    --
    __ __
    #_ < |\| |< _#

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Andy Burns@21:1/5 to Sylvia Else on Sun Feb 12 10:14:38 2023
    Sylvia Else wrote:

    nothing seems to be preserved beyond the session

    I presume that's to stop anyone feeding it mein kampf ...

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Sylvia Else@21:1/5 to Sylvia Else on Thu Feb 16 13:27:54 2023
    On 12-Feb-23 8:52 am, Sylvia Else wrote:
    On 11-Feb-23 11:15 pm, Adrian Caspersz wrote:
    On 10/02/2023 23:13, Sylvia Else wrote:
    On 11-Feb-23 9:45 am, Sylvia Else wrote:
    I was making an attempt to formalise algebra as a series of text

    A FAC is an optional MO followed by a VV"

    Oops - I got this wrong too. It was meant to be followed by optional
    repeated terms. This makes its later determination that "2 M 3" is a
    FAC rather strange

    Is this training applicable to only the session between you and it, or
    is it going to reference this knowledge, while we are all huddled
    frightened in a corner trying to find ways to dismantle it without the
    assistance of rogue terminators, time travel and advanced weapons?


    Yes, nothing seems to be preserved beyond the session. Just as well,
    since otherwise getting a clean slate is difficult.

    On the other hand, each new session seems to bring its own
    idiosyncrasies, which can be somewhat exasperating.

    I've pretty much hit a wall with this experiment. Even within the same session, getting ChatGPT to recognise that it's made a mistake does not
    mean it won't make the same mistake again.

    It's like trying to teach a dumb student something that is beyond them.
    Even when you think they've finally got it, it turns out that they haven't.

    And this is just with easy stuff. I have no hope that it would ever
    learn to apply more complicated manipulations correctly.

    Perhaps my whole approach is misconceived.

    Sylvia.

    On further research[*] I think that last comment is correct. One is not actually teaching it anything during one of these sessions. One is
    merely adding to the text that it will use as input to its neural
    network to determine the next word to output. I wondered why its outputs
    come as a slowish sequence of words, separated in time by significant intervals. I believe this is because during those intervals it is
    determining the next most probable word to follow the previous words in
    the session (both the user's inputs and AI's previous output).

    So it can sometimes appear to be following instructions, but it's not
    really doing that, and the more complicated the instruction, the less
    likely the answer is to be correct.

    Sylvia

    [*] OK, OK, you got me. Yes, I watched a YouTube video about it.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Computer Nerd Kev@21:1/5 to Sylvia Else on Sun Feb 26 09:31:30 2023
    Sylvia Else <sylvia@email.invalid> wrote:
    I've pretty much hit a wall with this experiment. Even within the same
    session, getting ChatGPT to recognise that it's made a mistake does not
    mean it won't make the same mistake again.

    It's like trying to teach a dumb student something that is beyond them.
    Even when you think they've finally got it, it turns out that they haven't. >>
    And this is just with easy stuff. I have no hope that it would ever
    learn to apply more complicated manipulations correctly.

    Perhaps my whole approach is misconceived.

    On further research[*] I think that last comment is correct. One is not actually teaching it anything during one of these sessions. One is
    merely adding to the text that it will use as input to its neural
    network to determine the next word to output. I wondered why its outputs
    come as a slowish sequence of words, separated in time by significant intervals. I believe this is because during those intervals it is
    determining the next most probable word to follow the previous words in
    the session (both the user's inputs and AI's previous output).

    So it can sometimes appear to be following instructions, but it's not
    really doing that, and the more complicated the instruction, the less
    likely the answer is to be correct.

    This article suggests that in theory your principle of teaching
    these AIs a new task via prompts is valid. It's called "in-context
    learning". However as I understand it you need to teach the AI by
    example rather than with explanations. The teaching process is
    probably still a long way from being as easy as you were hoping
    for, but theoretically possible in the right circumstances, and
    apparantly sometimes easier than training a dedicated neural
    network from scratch.

    Solving a machine-learning mystery
    by Adam Zewe, February 7, 2023
    - https://news.mit.edu/2023/large-language-models-in-context-learning-0207 "Large language models like OpenAI's GPT-3 are massive neural
    networks that can generate human-like text, from poetry to
    programming code. Trained using troves of internet data, these
    machine-learning models take a small bit of input text and then
    predict the text that is likely to come next.

    But that's not all these models can do. Researchers are exploring a
    curious phenomenon known as in-context learning, in which a large
    language model learns to accomplish a task after seeing only a few
    examples -- despite the fact that it wasn't trained for that task.
    For instance, someone could feed the model several example
    sentences and their sentiments (positive or negative), then prompt
    it with a new sentence, and the model can give the correct
    sentiment.

    Typically, a machine-learning model like GPT-3 would need to be
    retrained with new data for this new task. During this training
    process, the model updates its parameters as it processes new
    information to learn the task. But with in-context learning, the
    model's parameters aren't updated, so it seems like the model
    learns a new task without learning anything at all.

    Scientists from MIT, Google Research, and Stanford University are
    striving to unravel this mystery. They studied models that are very
    similar to large language models to see how they can learn without
    updating parameters.

    The researchers' theoretical results show that these massive neural
    network models are capable of containing smaller, simpler linear
    models buried inside them. The large model could then implement a
    simple learning algorithm to train this smaller, linear model to
    complete a new task, using only information already contained
    within the larger model. Its parameters remain fixed." ...

    Research paper (not light reading):
    https://arxiv.org/pdf/2211.15661.pdf

    --
    __ __
    #_ < |\| |< _#

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)