Answers.Body: <p>ChatGPT is a generalised model. It does not understand any code. It does not know it is creating fake functions. It doesn't know that it isn't solving the question asked, because it doesn't know what the question means. All it knows is what sort of words fit together based on its training corpus.</p>
  <p>This works very well for chat, but is less suited for anything technical, specialised, or in fact non-chat.</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2023-01-04T01:01:14.037Z
Answers.Text: I have used ChatGPT very few times. The first attemp I asked how to create a macro in Google Sheets 80% of the answer was correct, but the 20% incorrect was very disapoting. Few days later after researching on Wordpress API docs, Stack Overflow and Wordpress SE and not finding something that help to get unstuck I did a new attemp and surprinsingly it created Google Apps Script several functions to create Wordpress posts with different parameters that worked correctly.
Answers.UserDisplayName: Rubén
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2023-10-26T01:32:08.063Z
Answers.Text: ‘Utterly unsuited’ seems rather strong: must be used with caution
Answers.UserDisplayName: innisfree
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2024-01-12T15:51:25.563Z
Answers.Text: @innisfree - I have updated. As time goes on your point becomes ever more correct.
Answers.UserDisplayName: Rory Alsop
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2024-01-13T01:19:36.237Z
Answers.Text: I would like to say that humans are better at filtering out rubbish than a compiler, but that would not be correct. Compilers refuse to compile rubbish, but humans take it on and run with it. Failing would really be better.
Answers.UserDisplayName: Edificial Inelegance
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2024-01-15T11:35:19.717Z
Answers.Text: Any computer of our time is utterly incapable of the activity "know", insofar as the general use of this verb implies a reflecting consciousness behind it.
Answers.UserDisplayName: Lutz Lehmann
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2022-12-31T11:04:31.233Z
Answers.LastActivityDate: 2024-01-12T15:51:01.077Z
Answers.LastEditDate: 2024-01-12T15:51:01.077Z
Answers.UserDisplayName: Rory Alsop
Body: <p>ChatGPT has been a big thing lately. It also makes a lot of mistakes. For example, it creates <strong>fake</strong> functions of a package and tells it as it works for real. I was wondering how that works. Why is it creating fake functions of code and not just telling that it doesn't know how to solve the question that was asked?</p>
  <hr>
  <p>Example taken from Stack Overflow.</p>
  <p><strong>Question</strong></p>
  <p>Link: <a href="https://stackoverflow.com/q/74662093/">https://stackoverflow.com/q/74662093/</a></p>
  <p>Title:</p>
  <blockquote>
  <p>App script accessing secret manager to retrieve api token</p>
  </blockquote>
  <p>Body:</p>
  <blockquote>
  <p>I am trying to access secret manager from a small script I built on app script. I need to access and API with with a key but do not want to hardcode it.</p>
  <p>I have already assigned the app to a project. I am just not sure how to query the token.</p>
  </blockquote>
  <p>Answer (deleted)</p>
  <p>Link: <a href="https://stackoverflow.com/a/74682465/1595451">https://stackoverflow.com/a/74682465/1595451</a></p>
  <p>Body</p>
  <blockquote>
  <p>To access the Secret Manager from Google App Script, you can use the
  <strong>SecretManager.getSecret(secret)</strong> method, which takes a secret parameter specifying the name of the secret you want to retrieve. For
  example:</p>
  <pre><code> // Get the secret named &quot;my-api-token&quot;
   var secret = SecretManager.getSecret('my-api-token');
   
   // Use the secret value in your script
   var apiToken = secret.getValue();
  </code></pre>
  <p>Note that this method will throw an error if the specified secret does
  not exist or if the user does not have permission to access it. You
  can use a try-catch block to handle these cases gracefully. For
  example:</p>
  <pre><code> try {
     // Get the secret named &quot;my-api-token&quot;
     var secret = SecretManager.getSecret('my-api-token');
   
     // Use the secret value in your script
     var apiToken = secret.getValue();
   } catch (e) {
     Logger.log('Error getting secret: ' + e.message);
   }
  </code></pre>
  <p>Also note that the getValue() method returns the secret value as a
  string, so you may need to convert it to the appropriate data type
  (such as a number or boolean) depending on your use case.</p>
  <p>For more information, see the <a href="https://developers.google.com/apps-script/guides/secrets" rel="nofollow noreferrer">Secret Manager documentation</a> and
  the <a href="https://developers.google.com/apps-script/reference/secrets/secret-manager" rel="nofollow noreferrer">SecretManager class reference</a>.</p>
  </blockquote>
  <p><strong>SecretManager.getSecret(secret)</strong> method doesn't exist, and obviously the links returns page not found.</p>
  
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2022-12-31T10:27:39.823Z
Comments.Text: It's have been nice if you had given the example too. If it happens, it has mostly to do with the training data, the output has a huge relationship with how it was trained. Also, it is a generalized model, and might  not be good for specialized tasks, you might want to use codex instead
Comments.UserDisplayName: Sadaf Shafi
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2024-01-13T01:16:32.030Z
Comments.Text: Experts don't like to say, "I don't know."
Comments.UserDisplayName: Edificial Inelegance
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2024-01-15T11:40:51.000Z
Comments.Text: ChatGPT is trained to lie. And to do that passably well. It is simulating knowledge, not having it. All the source materials it is trained on are human communications full of metaphors, generalizations and other half-truths and rhetorical devices. If humans try to approximate unambiguous truthful communications, they end up with mathematics or lawyer speech, and only a small part of the internet and other sources of digitized content contains that.
Comments.UserDisplayName: Lutz Lehmann
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2024-12-31T10:10:46.233Z
Comments.Text: This question is similar to: [Why does ChatGPT fail in playing "20 questions"?](https://ai.stackexchange.com/questions/40564/why-does-chatgpt-fail-in-playing-20-questions). If you believe it’s different, please [edit] the question, make it clear how it’s different and/or how the answers on that question are not helpful for your problem.
Comments.UserDisplayName: nbro
Tags: <machine-learning><natural-language-processing><open-ai><chat-bots><chatgpt>
Title: Why does ChatGPT create fake code?
UserDisplayName: Quinten
ThreadText: # Why does ChatGPT create fake code?
  
  (Asked by: username_0 on 2022-12-31)
  
  ChatGPT has been a big thing lately. It also makes a lot of mistakes. For example, it creates **fake** functions of a package and tells it as it works for real. I was wondering how that works. Why is it creating fake functions of code and not just telling that it doesn't know how to solve the question that was asked?
  
  ---
  
  Example taken from Stack Overflow.
  
  **Question**
  
  Link: <https://stackoverflow.com/q/74662093/>
  
  Title:
  
  > App script accessing secret manager to retrieve api token
  
  Body:
  
  > I am trying to access secret manager from a small script I built on app script. I need to access and API with with a key but do not want to hardcode it.
  >
  > I have already assigned the app to a project. I am just not sure how to query the token.
  
  Answer (deleted)
  
  Link: <https://stackoverflow.com/a/74682465/1595451>
  
  Body
  
  > To access the Secret Manager from Google App Script, you can use the
  > **SecretManager.getSecret(secret)** method, which takes a secret parameter specifying the name of the secret you want to retrieve. For
  > example:
  >
  > ```
  >  // Get the secret named "my-api-token"
  >  var secret = SecretManager.getSecret('my-api-token');
  >  
  >  // Use the secret value in your script
  >  var apiToken = secret.getValue();
  >
  > ```
  >
  > Note that this method will throw an error if the specified secret does
  > not exist or if the user does not have permission to access it. You
  > can use a try-catch block to handle these cases gracefully. For
  > example:
  >
  > ```
  >  try {
  >    // Get the secret named "my-api-token"
  >    var secret = SecretManager.getSecret('my-api-token');
  >  
  >    // Use the secret value in your script
  >    var apiToken = secret.getValue();
  >  } catch (e) {
  >    Logger.log('Error getting secret: ' + e.message);
  >  }
  >
  > ```
  >
  > Also note that the getValue() method returns the secret value as a
  > string, so you may need to convert it to the appropriate data type
  > (such as a number or boolean) depending on your use case.
  >
  > For more information, see the [Secret Manager documentation](https://developers.google.com/apps-script/guides/secrets) and
  > the [SecretManager class reference](https://developers.google.com/apps-script/reference/secrets/secret-manager).
  
  **SecretManager.getSecret(secret)** method doesn't exist, and obviously the links returns page not found.
  
  **Tags:** machine-learning, natural-language-processing, open-ai, chat-bots, chatgpt
  
  > **Comments:**
  > **username_1**: It's have been nice if you had given the example too. If it happens, it has mostly to do with the training data, the output has a huge relationship with how it was trained. Also, it is a generalized model, and might  not be good for specialized tasks, you might want to use codex instead  
  > **username_2**: Experts don't like to say, "I don't know."  
  > **username_3**: ChatGPT is trained to lie. And to do that passably well. It is simulating knowledge, not having it. All the source materials it is trained on are human communications full of metaphors, generalizations and other half-truths and rhetorical devices. If humans try to approximate unambiguous truthful communications, they end up with mathematics or lawyer speech, and only a small part of the internet and other sources of digitized content contains that.  
  > **username_4**: This question is similar to: [Why does ChatGPT fail in playing "20 questions"?](https://ai.stackexchange.com/questions/40564/why-does-chatgpt-fail-in-playing-20-questions). If you believe it’s different, please [edit] the question, make it clear how it’s different and/or how the answers on that question are not helpful for your problem.  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_5 on 2022-12-31. Score: 13 | Accepted answer
  
  ChatGPT is a generalised model. It does not understand any code. It does not know it is creating fake functions. It doesn't know that it isn't solving the question asked, because it doesn't know what the question means. All it knows is what sort of words fit together based on its training corpus.
  
  This works very well for chat, but is less suited for anything technical, specialised, or in fact non-chat.
  
  > **Comments:**
  > **username_6**: I have used ChatGPT very few times. The first attemp I asked how to create a macro in Google Sheets 80% of the answer was correct, but the 20% incorrect was very disapoting. Few days later after researching on Wordpress API docs, Stack Overflow and Wordpress SE and not finding something that help to get unstuck I did a new attemp and surprinsingly it created Google Apps Script several functions to create Wordpress posts with different parameters that worked correctly.  
  > **username_7**: ‘Utterly unsuited’ seems rather strong: must be used with caution  
  > **username_5**: @username_7 - I have updated. As time goes on your point becomes ever more correct.  
  > **username_2**: I would like to say that humans are better at filtering out rubbish than a compiler, but that would not be correct. Compilers refuse to compile rubbish, but humans take it on and run with it. Failing would really be better.  
  > **username_3**: Any computer of our time is utterly incapable of the activity "know", insofar as the general use of this verb implies a reflecting consciousness behind it.  
  
  ---
  
  