Insights from my experiences with using Generative AI

  • Find ways to utilize AI rather than trying to compete with it or show it is not yet capable enough. Also, there is no point trying to act like a purist by trying to reinvent the wheel or doing everything on our own even when help in the form of Generative AI is available. Be “intelligent” and use it!
  • Source code generated is better than what many of us can write, just that sometimes AI also makes mistakes like deleting a previously working functionality. We still are the reviewers and approvers before treating the code as production worth.
  • You still need to ask what you want from it, if you don’t give the instructions properly don’t expect the output to be magical. Of course, there could be certain level of automation in asking routine questions or assigning routine tasks but in general the “requirements” should still be framed by humans, at least in the near term (or maybe I haven’t seen enough of AI yet).
  • When you ask AI to fix an issue or refine the program, it thinks it did a great job but more often than not it doesn’t, you still need to verify the results. Be prepared to have an iterative experience to get the desired results. Persistence is key here too. Verification of AI generated code is going to be critical.
  • AI most likely will eliminate mediocre programmer jobs (routine querying, scripting, etc). But there will still be need for core logic developers/engineers. So, I believe now we need to get back to the core science and engineering principles and let AI do the rudimentary tasks. By core I mean the underlying concepts of engineering – mathematics, physics and also the other sciences (biology, chemistry).

Here’s a small experiment I did recently

I had asked it to generate a code, to connect to an MQTT broker hosted on AWS IoT Core and subscribe to messages from a specific topic. Additionally, has asked it to format and write the incoming messages to a csv file, and also to insert the incoming messages into a PostGreSQL database.

Snippet of the plotting code generate by ChatGPT

Snippet of the MQTT subscribe code generate by ChatGPT

Snippet of live telemetry data stream from field device

Snippet of CSV file data

Snippet of data query response in pgAdmin (PostgreSQL)

The following is a plot from source totally generated by AI. I would say 99.9% of it was generated by ChatGPT, except for the paths or filenames.

Source files: armrnd/IoT_EM (github.com)

This entire exercise did not take more than few hours, maybe 4 to 6 hours over the weekend.

The energy meter wiring was a typical 3 phase energy meter wiring with current transformers.

Home energy meter wiring

If you’re reading this, please share your thoughts and comments below. Thank you for reading!

Comments

Leave a Reply

Your email address will not be published. Required fields are marked *