Re: [xsl] ChatGPT front-end to XML?

Subject: Re: [xsl] ChatGPT front-end to XML?
From: "Dimitre Novatchev dnovatchev@xxxxxxxxx" <xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx>
Date: Wed, 25 Dec 2024 23:59:56 -0000
Why would one trust ChatGPT? Especially for critical data in real, critical
applications?

The best ChatGPT can do is provide an answer, if such exists, scraped from
Stack Overflow or any internet site. Even in this task ChatGPT produces
mediocre results, in cases when the source data isn't similar to the one
provided in any of the available on the internet problems.

It is known to sometimes return syntactically invalid XPath expressions,
which is really a better scenario than producing a syntactically correct
expression and lying to you that it returns the wanted results.

My advice is: "Don't waste your time and absolutely don't use for anything
else than recreational activities (but why should this be better than Tarot
cards?)"

Here is a session with ChatGPT demonstrating its "value":

<session>
  <me> The following sequence is defined in XPath, write an XPath
expression to replace the comments in the "return" clause. This XPath
expression must return only the items that are contained more than once in
the sequence.
 let $seq := (2,3,2,5,6,7,5,4,8,4,9,7)
   return (: some expression :)
  </me>
  <chatGpt>
      To return only the items that are contained more than once in the
sequence, we can use the count() function in XPath to identify those
elements that appear more than once.     Herebs the XPath expression to
replace the comment:xpath:
   let $seq := (2, 3, 2, 5, 6, 7, 5, 4, 8, 4, 9, 7)
     return $seq[count($seq[.=.)] > 1]

Explanation:
    1. $seq: Defines the sequence (2, 3, 2, 5, 6, 7, 5, 4, 8, 4, 9, 7).
    2. count($seq[.=.]): This checks how many times each element appears in
the sequence.
    3. > 1: Filters the elements to only return those that appear more than
once.

This expression will return all the numbers in the sequence that appear
more than once, which are: 2, 5, 7, 4.
  </chatGpt >
</session>

As we see, the expression in the "return" clause is syntactically
incorrect, and "$seq[.=.]"  , which appears corrected in the explanation,
is quite meaningless.

Conclusion:
  This is "artificial", and this is not "intelligence".

   I am tempted to call it "religion", but it is short of being one, as its
falseness, fortunately, can be detected right-away.

Anyone paying $200/month for ChatGPT would sooner or later, depending on
their own intellect, come to realize the stupidity of such a decision.

Thanks,
Dimitre.

Current Thread