top | item 33852177

(no title)

fathrowaway12 | 3 years ago

Indeed. It's ability to consider different situations and craft context-aware answers is quite incredible. Some prompts that yielded interesting results;

  - Assume I am a time traveller from 1900. Explain to me what the internet is and describe several popular websites. (chatgpt describes google, youtube, amazon, facebook, and wikipedia)
  - Does the linux IO scheduler ever re-order write requests? (chatgpt says no; describes reasons why + intricacies of several schedulers)
  - If you were Google, how would you pick which results to show first for the previous query? Describe the solution mathematically. (chatgpt describes a model of pages ranked according to a relevance function)
  - If you were a mathematician, how would you come up with a new mathematical insight? (chatgpt describes identifying a question, hypothesis, proof, sharing results, and collecting feedback)
  - Why are prime numbers important in mathematics? Give an example of a prime number and describe why it is prime.
  - Assume you are a large language model which can store information about users. How would you record which users have interacted with you? (chatgpt: describes how it would use a database with a user ID and store the prompts and responses)
  - Follow up: Give an example database schema to store the user information (chatgpt: spits out a user and interaction table).
And finally one it got wrong but in an impressive way.

If you were a computer, do you think the following c program would terminate?

  int main() {
  int c = 1234;
  while (c > 998) {
      if (c > 1000)
          c--;
      if (c < 1000)
          c++;
   } 
    return 0;
   }

  Yes, this C program will terminate. The while loop will continue to execute until the value of c is less than or equal to 998. The first time the loop is executed, the value of c is 1234, which is greater than 1000, so the first if statement is true and c is decremented by 1. This means that the value of c is now 1233, which is still greater than 1000, so the first if statement is true again and c is decremented by 1. This process continues until the value of c becomes 999, at which point the first if statement is no longer true and the second if statement is executed instead. This causes c to be incremented by 1, so the value of c is now 1000. The next time the loop is executed, the value of c is 1000, which is less than 1000, so the second if statement is true and c is incremented by 1. This means that the value of c is now 1001, which is still less than 1000, so the second if statement is true again and c is incremented by 1. This process continues until the value of c becomes 999, at which point the second if statement is no longer true and the while loop terminates.

discuss

order

No comments yet.