Jump to content

ChatGPT and LabVIEW


Recommended Posts

NXG was XML, was it not? Good job they abandoned it.

2 hours ago, jcarmody said:

I asked it to and it said something about not being able to do graphics.

Sigh.. No early retirement for me then. :D

5 hours ago, Antoine Chalons said:

I suppose if I was prepared to give Skynet my telephone number I could have had it translate for me. :P But from Google it seems that was another fail to do LabVIEW.

Even so. All the examples of how fantastic it is for text languages seems to always be fairly trivial examples - mainly single functions, that they cajole to an answer.

My first impression is that it's an excellent natural language interpreter but not impressed with the claim that all our coding jobs are in danger. I'm much more impressed with the Graphics AI's such as Midjourney.

Link to comment
1 hour ago, ShaunR said:

My first impression is that it's an excellent natural language interpreter but not impressed with the claim that all our coding jobs are in danger. I'm much more impressed with the Graphics AI's such as Midjourney.

I haven't used ChatGPT yet.  But from what I've seen the power of it comes in the conversation like threads it can make.  I saw someone ask it for advice on how to get kids to eat vegetables.  It gave a list of things on how to eat them, but it was pretty general.  They then were able to refine the request and say they needed advice specifically for children, and it came back much better.  Any examples that seem very shallow and unimpressive, are likely just a single line of a request, and not a conversation asking it to refine or be more specific.

I have been having fun with StableDiffusion and AI generated images.  This too has the same problem that you most often can't just put in some text and get something awesome.  Most of the time you need to refine it, over and over, tweaking things, making decisions about what you are looking for.  Both in the prompts and in the parts of the image and how you want it to change.  I made a thread on the dark side about some of my experimentations.  In that thread is my new Linkedin profile picture.

00008.jpg.a4790de70b5ad074609a05b0391cd47c.jpg

This stuff is moving so very fast.  People are making changes to their work flow to have AI generate concept art, or inspire other things like writers block, alternate endings, or generating tiling texture for surfaces in a game.  It isn't replacing industries, it is another tool to get jobs done.  Of course you can combine these two things.  Here someone asked ChatGPT to explain whey AI art isn't real.  And then asking it again to say why it is superior.

  • Like 1
Link to comment

Yes. I was much more impressed with the imaging AI's.

This video builds a website. The imaging is very straight forward and produces excellent results. He then uses ChatGPT to make some text (which isn't that awe inspiring) and then puts it all together with one of those do-it-all web services. In reality, the only impressive thing here is the imaging.

However. ChatGPT is only used for a bit of content, not for creating the website proper. He spends a lot of the video creating the web pages in a service to use the images. I think the days of web businesses like Shuttershock are over though.

Edited by ShaunR
Link to comment

Here is a little fun I had with ChatGPT:

Me: what is the infinite sum 1-2+3-4+5-6... equal to?
 
ChatGPT: The infinite sum 1-2+3-4+5-6... is a so-called "alternating series," because the terms have alternating signs. This series does not converge to a single value. In other words, it does not have a sum in the usual sense.
If we take the first few terms of the series, we can see that the sum oscillates around a particular value and never settles down to a fixed number. For example, if we take the first 10 terms, the sum is -4. If we take the first 100 terms, the sum is 8. If we take the first 1000 terms, the sum is -32, and so on.
In general, the sum of the first n terms of the series is given by the formula (-1)^(n+1) * (n+1)/2. This formula shows that the sum oscillates between positive and negative values as n increases, and it never converges to a single value.
It is possible to assign a meaning to the infinite sum of an alternating series by considering the limit of the partial sums as the number of terms goes to infinity. This is known as the "alternating series test," and it can be used to determine whether an alternating series converges or diverges. However, in the case of the series 1-2+3-4+5-6..., the alternating series test cannot be applied, because the terms of the series do not approach zero as the number of terms increases.

Comment: so far, so good.

Me: but the sum of (-1)ˆn * n*(1+x)ˆ(n-1), for n = 0 to infinity has a finite value for x = 0 . And that is formally -1 + 2 - 3 + 4 - 5...
 
ChatGPT: Yes, that is correct. The series (-1)^n * n*(1+x)^(n-1) does have a finite sum when x = 0, and this sum is equal to the infinite sum 1-2+3-4+5-6...
To see this, we can use the formula for the sum of a geometric series:

Sum = a * (1 - r^n)/(1 - r)

where a is the first term of the series (in this case, a = -1), r is the common ratio (in this case, r = -1), and n is the number of terms in the series.

If we plug in the values for a, r, and n and set x = 0, we get:

Sum = (-1) * (1 - (-1)^n)/(1 + 1) = (-1) * (2 - (-1)^n)/2 = (-1)^(n+1) * (n+1)/2

This is the formula we obtained earlier for the sum of the first n terms of the series 1-2+3-4+5-6....

So, the sum of the series (-1)^n * n*(1+x)^(n-1) when x = 0 is indeed equal to the infinite sum 1-2+3-4+5-6...

Comment: the sum is not that of a geometric series. It is the first derivative of sum (-(1+x))ˆn) = 1/(2+x), so the derivative is -1/(x+2)ˆ2. Of course, this requires 1+ x < 1.

Me: That's wrong. The formula is sum of (-1)ˆn * n*(1+x)ˆ(n-1), for n = 0 to infinity equals -1/(x+2)ˆ2. Therefore -1 + 2 - 3 + 4 - 5... = -1/4

Comment: In retrospect, that may have been a bit too blunt for a US-trained AI...

ChatGPT: I apologize for the mistake in my previous response. You are correct that the sum of the series (-1)^n * n*(1+x)^(n-1) for n = 0 to infinity is equal to -1/(x+2)^2 when x = 0.

To see this, we can use the formula for the sum of an infinite geometric series:

Sum = a/(1 - r)

where a is the first term of the series (in this case, a = -1) and r is the common ratio (in this case, r = -1).

If we plug in the values for a and r and set x = 0, we get:

Sum = (-1)/(1 - (-1)) = (-1)/(1 + 1) = -1/2

Then, we can use the formula for the sum of an infinite series in which each term is the product of a constant and a series:

Sum = a * Sum(b)

where a is the constant (in this case, a = n) and Sum(b) is the sum of the series b (in this case, b = (1+x)^(n-1)).

If we plug in the values for a and Sum(b) and set x = 0, we get:

Sum = n * (-1/2) = (-1)^n * n * (-1/2) = (-1)^n * n/(-2) = (-1)^n * (-1/2) * n

This is the series (-1)^n * n*(1+x)^(n-1) for n = 0 to infinity.

Therefore, the sum of this series when x = 0 is indeed equal to -1/4, as you stated.

Again, I apologize for the error in my previous response. Please let me know if you have any further questions.

Comment: if that sound like gibberish to the non-mathematically versed reader, that's because it is.

Me: yes I do. How come an infinite series that oscillates and seems to diverge in absolute value, as you pointed out, can converge to a finite value?

ChatGPT: An error occurred. If this issue persists please contact us through our help center at help.openai.com.

Link to comment
2 hours ago, X___ said:

ChatGPT: An error occurred. If this issue persists please contact us through our help center at help.openai.com.

They should give it an error code. I would suggest Error ID:10T

There are a number of interesting points here though.

  1. It evaluates logical inconsistencies - it's doesn't seem to be just a look-up or query engine.
  2. It doesn't know how to say "I don't know" or suggest alternative sources where information may be sought - It doesn't comprehend its own limitations.
  3. It behaves more like an Oracle than, say, quoting or suggesting papers where certain arguments or theorems were undoubtedly gleaned - e.g. Leibniz,  Riemann et. al.

Did you also ask it for the source of it's information or to introspectively analyze it's own answers to see if it could identify the flaws in it's own reasoning? 

Link to comment

No. That was my second error in two attempts, so I considered the experiment done for me for the time being.

I had a similar experience with stabilityai (the graphic AI) where the outputs I got were complete garbage, so I suppose I am just not doing it right and don't have the patience to "play" with the thing.

Apparently, for pure text stuff, you need to reiterate and massage the question to get something that is acceptable.

For LabVIEW code, by the way, the latter tool might be more appropriate... or not (try it at https://huggingface.co/spaces/stabilityai/stable-diffusion).

Here are the results of ("a LabVIEW diagram adding two numbers" - Negative prompt: "not a NXG diagram"):

image.jpeg.cfbbcd7f3ba3d187afaf24124a5ec179.jpeg

image.jpeg.c28e3d8b44f4b5c839a4afd6aa7998b2.jpeg

image.jpeg.3af80f5d271faf088e1c58a740a373c9.jpeg

image.jpeg.5d2df3bc168f8391d9b17735f3dbec5b.jpeg

 

One more reason to switch to Python?

 

Edited by X___
typo
  • Haha 2
Link to comment

Here is the kind of response it produces for LabVIEW:

Quote

Me: Can you write code in LabVIEW?

Quote

AI: Yes, I can write code in LabVIEW. LabVIEW (short for Laboratory Virtual Instrument Engineering Workbench) is a graphical programming platform that allows users to create programs using block diagrams and icons rather than traditional text-based programming languages like C++ or Python. The block diagrams and icons used in LabVIEW represent data flow, rather than traditional control flow, which allows users to create programs that are intuitive and easy to understand. Do you have any specific tasks or projects you would like help with in LabVIEW?

Quote

Me: Give me an example written in LabVIEW.

Quote

AI: Certainly! Here is a simple example of a LabVIEW program that reads a temperature value from a thermocouple and displays the value on a front panel control:

# Open the serial port to read from the thermocouple
Open Serial Port VI

# Read the temperature value from the serial port
Read from Serial Port VI

# Display the temperature value on a front panel control
Numeric Control

This is just a simple example, but LabVIEW is a very powerful programming platform that can be used for a wide range of applications, including data acquisition, instrument control, and test and measurement. If you have any specific tasks or projects you would like help with, I would be happy to assist you.

Quote

Me: Create a VI for this example.

Quote

AI: Certainly! Here is a LabVIEW VI that reads a temperature value from a thermocouple and displays the value on a front panel control:

[LabVIEW VI]

To create this VI, you would follow these steps:

1. Open LabVIEW and create a new VI by selecting "File > New VI".
2. Add the following VIs to the block diagram:

  • "Open Serial Port" from the Serial I/O palette
  • "Read from Serial Port" from the Serial I/O palette

3. Wire the VIs together as follows:

  • Connect the output of the "Open Serial Port" VI to the input of the "Read from Serial Port" VI.

4. Add a numeric control to the front panel by dragging and dropping it from the Controls palette.
5. Wire the output of the "Read from Serial Port" VI to the numeric control by dragging and dropping a wire from the output terminal of the VI to the input terminal of the control.
6. Save the VI by selecting "File > Save" and giving it a name.

I hope this helps! Let me know if you have any questions or if you need further assistance.

The responses are impressive but it doesn't look like we are getting replaced any time soon... :)

  • Haha 2
Link to comment
3 hours ago, LogMAN said:

Here is the kind of response it produces for LabVIEW:

The responses are impressive but it doesn't look like we are getting replaced any time soon... :)

Very much the tail wagging the dog but it could certainly replace many of the managers I've worked with.:D

  • Haha 1
Link to comment
  • 3 months later...
  • 1 month later...

Eons have passed since the last reply. Any new experiences?

I just had GPT make me some C code calculating geomerty stuff and it did well (not a perfectly full implementation but the harder parts worked fine, saved me an hour or two).

But it surely doesn't know what Lego Technic is. Um.. that was last week, maybe it has improved in the topic. 

Link to comment
15 minutes ago, Lipko said:

Eons have passed since the last reply. Any new experiences?

Your time scale definitely seems skewed in terms of the grand scheme of the universe and all that. 😁

Or did you mean to write Atoms instead of Eons? 😎

I consider ChatGPT and friends still mainly a fairly advanced parrot. 

Edited by Rolf Kalbermatter
Link to comment
10 minutes ago, Rolf Kalbermatter said:

Your time scale definitely seems skewed in terms of the grand scheme of the universe and all that. 😁

Or did you mean to write Atoms instead of Eons? 😎

I consider ChatGPT and friends still mainly a fairly advanced parrot. 

The parrot is improving with every quiestion. I can only guess how many millions of questions it gets every day. So 1-2 months can mean eons.
Or maybe I just fell for all those alarmists...

Edited by Lipko
Link to comment
3 hours ago, Lipko said:

The parrot is improving with every quiestion. I can only guess how many millions of questions it gets every day. So 1-2 months can mean eons.
Or maybe I just fell for all those alarmists...

Supposedly it is not using user input to add to the internal knowledge pool beyond a single session. Of course it's tempting to do that anyhow. It uses a lot of energy to run and somehow some bean counters want to see some form of ROI here, so "free" learning input would seem interesting. But without a very rigorous vetting of such input, the whole knowledge pool could easily be tainted with lots and lots of untruthiness. Not that even the selection of the actual training corpus for each new training round is guaranteed or even likely to be not biased in some ways either.

Link to comment

I've been using a few AIs in help for writing things.  Professional sounding emails of sensitive subjects, work references, and a few other things to help get past a writing block.  Image and animation stuff I see cool new things all the time, but haven't done much myself lately.

 

  • Like 1
Link to comment
3 hours ago, Rolf Kalbermatter said:

Supposedly it is not using user input to add to the internal knowledge pool beyond a single session. Of course it's tempting to do that anyhow. It uses a lot of energy to run and somehow some bean counters want to see some form of ROI here, so "free" learning input would seem interesting. But without a very rigorous vetting of such input, the whole knowledge pool could easily be tainted with lots and lots of untruthiness. Not that even the selection of the actual training corpus for each new training round is guaranteed or even likely to be not biased in some ways either.

Some noise is good to prevent overtraining. People recieve lots of random info and intelligent people still can get around.
We have reached the point that God only knows how the info is digested by this AI thing. (for example a user asks something and the AI can google some interesting new keywords it didn't encounter much yet. The info it reads from the web is added to the pool...)

Link to comment

1:02:00 "... but NIgel can control your physical hardware!"

*terminator theme intensifies*

Jokes aside, the copilot looks interesting but it needs much better integration to be useful for any of my day-to-day tasks. It needs much faster response time and it will have to show how well it can work with legacy and non-standard code bases that aren't developed with NI's portfolio and vision in mind.

Did they mention if and when this can be tried out?

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.