Results 1 to 13 of 13

Thread: openAI chat

  1. #1
    Join Date
    May 2023
    Location
    Kalgoorlie, WA
    Posts
    15

    Default openAI chat

    Watched the youtube vido "How scared should we be of artificial intelligence?"
    Bla-bla almost of invention of the weel , bla-bla, need to be regulated, bla-bla.

    Decided give it a crack and have a chat with a thing about woodworking. The thing is Dumb, it just search google for answers. ))))
    Looks like someone trying to sell something for a squillion or two.))

  2. # ADS
    Google Adsense Advertisement
    Join Date
    Always
    Location
    Advertising world
    Posts
    Many





     
  3. #2
    Join Date
    Nov 2018
    Location
    Newcastle
    Posts
    1,016

    Default

    if you're playing with a free service, you're probably talking to GPT3.5, which failed the American bar exam (what a dunce machine eh).

    GPT4 is a whole different animal. It passed the American Bar exam in the 90th percentile. You can get very limited access for free if you sniff around.

    I asked it to write me an arduino program to monitor a door sensor, and send an alert to a web server. It spat out the code below, explained it, then made me a shopping list for components and drew me a circuit diagram.

    And if the code generates an error, you just tell the AI the error and it figures it out and re-writes for another crack.

    Code:
    
    #include (includes removed for this post)
    #include 
    
    // Replace with your network credentials
    const char* ssid = "your_SSID";
    const char* password = "your_PASSWORD";
    
    // Replace with the IP address of your web server
    const char* serverIP = "10.0.0.20";
    
    // Replace with the port number your web server is listening on
    const int serverPort = 80;
    
    // Pin connected to the switch sensor
    const int switchPin = 2;
    
    // Set the initial state of the door
    bool doorClosed = true;
    
    void setup() {
      // Connect to Wi-Fi
      Serial.begin(115200);
      WiFi.begin(ssid, password);
      while (WiFi.status() != WL_CONNECTED) {
        delay(1000);
        Serial.println("Connecting to WiFi...");
      }
      Serial.println("Connected to WiFi");
    
      // Set the switch sensor pin as input
      pinMode(switchPin, INPUT_PULLUP);
    }
    
    void loop() {
      // Read the state of the switch sensor
      bool switchState = digitalRead(switchPin) == LOW;
    
      // If the door has been opened, send an alert to the web server
      if (doorClosed && !switchState) {
        Serial.println("Door opened");
    
        // Construct the URL for the web server
        String url = "http://" + String(serverIP) + ":" + String(serverPort) + "/door_opened";
    
        // Create an HTTP client
        WiFiClient client;
    
        // Make the HTTP request
        HTTPClient http;
        http.begin(client, url);
        int httpCode = http.GET();
        if (httpCode > 0) {
          Serial.printf("HTTP status code: %d\n", httpCode);
          String payload = http.getString();
          Serial.println(payload);
        } else {
          Serial.println("HTTP request failed");
        }
        http.end();
    
        // Set the state of the door to opened
        doorClosed = false;
      }
    
      // If the door has been closed, reset the state
      if (!doorClosed && switchState) {
        Serial.println("Door closed");
        doorClosed = true;
      }
    
      // Wait a short time before checking the sensor again
      delay(100);
    }
    

  4. #3
    Join Date
    Nov 2018
    Location
    Newcastle
    Posts
    1,016

    Default

    Here's another one I tried for fun:

    It doesn't quite get the order correct (GPT3.5 again), but you can tell it and it'll have another crack. Or give it to GPT4 (I've run out of queries for the next few hours)

    Prompt:
    create a checkbox shopping list template. tasks: 1. create subheadings for all the major food groups like meat, vegetables, pasta etc. 2. arrange the headings in an order that will make shopping at woolworths australia the most efficient. 3. add 3 empty checkbox lines to each subheading.

    Response:

    Sure, here is a checkbox shopping list template that meets your requirements:

    Shopping List:

    Meat:




    Vegetables:




    Fruits:




    Bakery:




    Dairy:




    Frozen:




    Pantry:




    Beverages:




    Personal Care:




    Household:




    Pets:




    Notes:

    1. The subheadings are organized according to the major food groups, starting with meat, followed by vegetables, fruits, bakery, dairy, frozen, pantry, beverages, personal care, household, and pets.

    2. The order of the subheadings is designed to make shopping at Woolworths Australia more efficient by grouping items together based on their location in the store.

    3. Each subheading includes three empty checkbox lines to allow you to easily check off items as you shop.


  5. #4
    Join Date
    Mar 2004
    Location
    Orange, NSW, Australia
    Posts
    35

    Default

    Quote Originally Posted by Bernmc View Post
    Or give it to GPT4 (I've run out of queries for the next few hours)
    You could try Bing Chat as it is based on GPT4.

  6. #5
    Join Date
    Feb 2006
    Location
    Perth
    Posts
    27,793

    Default

    My son is a "white hat" hacker for an international IT security company.
    He leads a team of hackers that legally hack IT systems and write reports written about how good/bad a clients IT security it..
    As team leader my son spends a lot of time editing these reports -

    Getting the hackers in his team to meet a set standard and be consistent in their report writing is hard work so my son writes manuals/guidelines about what should be in the reports and how to write them
    Writing the manuals is one thing but getting the team members to read them is another and so quirky writing in the manuals is used to entice the team members to read them..
    So he asked GTPchat (company pays so its no cost to him) to take the view point of a 3ft high devil and rewrite his manuals with a bit of humour etc and it did a great job.

    This is only one of the myriads of ways he and his team usie AI in the hacking prevention game.
    He reckons it's already improved his teams productivity by at least 20% and they havent even really gotten started yet.

    Like anything to do with computers its the quality of the input that determines the quality of the output.

  7. #6
    Join Date
    Nov 2007
    Location
    melbourne australia
    Posts
    2,640

    Default

    Quote Originally Posted by Bernmc View Post
    And if the code generates an error, you just tell the AI the error and it figures it out and re-writes for another crack.
    I can't quite get my head around that. A computer program that writes code that contains errors?

  8. #7
    Join Date
    Sep 2011
    Location
    Hervey Bay
    Posts
    250

    Default

    Quote Originally Posted by jack620 View Post
    I can't quite get my head around that. A computer program that writes code that contains errors?

    From the horse's mouth (3.5)

    As an artificial intelligence language model, ChatGPT has been trained on a vast corpus of text data from the internet, which includes a wide range of programming languages and coding styles. While the model has a good understanding of the syntax and structure of these languages, it may still generate code that contains errors or is otherwise incorrect.
    There are several reasons why this can happen:


    1. Ambiguity in natural language: Natural language is often ambiguous, and the same words or phrases can have multiple meanings depending on the context. When generating source code, ChatGPT relies on the context of the prompt and its training data to understand what the user is asking for. However, this can sometimes lead to errors or misunderstandings.
    2. Lack of domain-specific knowledge: While ChatGPT has been trained on a wide range of text data, it may not have specialized knowledge in certain domains or industries. For example, if a user asks for code related to a specific scientific or engineering application, ChatGPT may not have the necessary domain-specific knowledge to generate correct code.
    3. Noise in the training data: The training data used to train ChatGPT contains a lot of noise and errors, which can sometimes affect the accuracy of the model. While the model has been designed to filter out noise and learn from high-quality data, there may still be errors that affect the quality of the generated code.

    In general, it is important to understand that ChatGPT is a language model that generates responses based on the patterns it has learned from its training data. While the model is very good at generating natural-sounding responses and code, it is not perfect and may sometimes generate incorrect or incomplete code. It is always a good idea to carefully review and test any code generated by ChatGPT to ensure its correctness and functionality.

  9. #8
    Join Date
    Nov 2007
    Location
    melbourne australia
    Posts
    2,640

    Default

    Quote Originally Posted by Jeffen View Post
    It is always a good idea to carefully review and test any code generated by ChatGPT to ensure its correctness and functionality.
    So don't use it to generate mission-critical code I guess?

  10. #9
    Join Date
    Feb 2006
    Location
    Perth
    Posts
    27,793

    Default

    My son uses GPTchat extensively to generate specific IT security testing code.
    Any errors he has found so far have been his fault in not specifying the input requirements/data tightly enough.
    As an extra check users can ask GTPchat to explain in words how the code works, which helps confirm it's operating correctly.
    The approach my son uses for most coding is to break up longer programs up into chuncks that makes it easier to check and test which is what good programmers do anyway.
    GPTchat also won't perform certain tasks it deems illegal so sometimes the break up method is a way around this.

  11. #10
    Join Date
    Feb 2016
    Location
    Perth WA Australia
    Posts
    829

    Default

    It depends on what you're using it for. Ive toyed around with it for a period of time for work, it's surprisingly good at doing things programming related, eg VBA, python, excel SQL etc.

  12. #11
    Join Date
    Sep 2011
    Location
    Hervey Bay
    Posts
    250

    Default

    Quote Originally Posted by jack620 View Post
    So don't use it to generate mission-critical code I guess?
    Well, the onus is on the developer using it to test appropriately.
    It saves a lot of drudgery work, and as mentioned, the better the specification, the better the output.

    I used it to create a comparison tool for some largish, slightly complex data sets. I spent a couple of hours fine tuning the question I was asking of it until I had the code I needed.

    You still need to know what you're doing, it helps you speed up the process.

    Jeff

  13. #12
    Join Date
    Nov 2018
    Location
    Newcastle
    Posts
    1,016

    Default

    Quote Originally Posted by jack620 View Post
    I can't quite get my head around that. A computer program that writes code that contains errors?
    Remember that it's generating code in response to a plain English prompt - 'write me some code in x language to do this that and the next thing'

    Bit like the bloke who asked the painter to paint his porch green... couple of hours later the painter bangs on the door and asks "do you want me to do the hubcaps too?"

  14. #13
    Join Date
    Nov 2007
    Location
    melbourne australia
    Posts
    2,640

    Default

    Quote Originally Posted by Bernmc View Post
    Bit like the bloke who asked the painter to paint his porch green... couple of hours later the painter bangs on the door and asks "do you want me to do the hubcaps too?"
    That’s what worries me.

Similar Threads

  1. Building the BMD Flat Chat 16
    By IceManDude in forum BOAT BUILDING / REPAIRING
    Replies: 95
    Last Post: 20th July 2021, 10:29 AM
  2. Chat rooms
    By plantagenon in forum FORUMS INFO, HELP, DISCUSSION & FEEDBACK
    Replies: 2
    Last Post: 13th January 2014, 07:55 PM
  3. Online chat
    By spencer411 in forum FORUMS INFO, HELP, DISCUSSION & FEEDBACK
    Replies: 0
    Last Post: 6th June 2010, 01:34 AM
  4. Tom Lie-Nielsen Chat
    By Mirboo in forum HAND TOOLS - UNPOWERED
    Replies: 1
    Last Post: 1st February 2006, 02:00 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •