271352178 © Eranda Ekanayake | Dreamstime.com
Generative Ai Dreamstime L 271352178

Trying to Understand Generative AI

Oct. 2, 2023
The rise of generative AI has been explosive, but unknowns remain. And what exactly are its capabilities? I took a deeper dive to find out.

This article is part of the TechXchangeGenerating AI.

What you’ll learn:

  • What is generative AI?
  • What generative AI can do.
  • What generative AI can’t do.

Artificial intelligence (AI), machine learning (ML) and generative AI are all the rage and the terms everyone is using. Unfortunately, they’re now being used to describe a wide range of items and implementations that often have minimal relationship to each other. Those who don’t deal with the details of various platforms like ChatGPT tend to oversimplify what they think is going on and overestimate the capabilities or actual operation of these systems.

AI/ML covers a lot of ground from rule-based systems to large language models (LLMs). The latter is where generative AI comes from—more on that later. The challenges faced by AI researchers early on involved training or how to get information into the system so that it could be used to respond to inputs. Artificial neural networks (ANNs) took an approach modeled on biological neural networks; however, ANNs and their bio counterparts are different. Like most approximations, things work the same if you don’t look too closely.

It turns out that training neural networks is possible, but it takes a good bit of input. And the computations required to make this work are significant as one progresses from the simple idea of ANNs to production. Likewise, a whole host of neural-network type systems have been implemented, many tailored for specific input flows or analysis like image pattern recognition. Generative AI is one such area, but even here, generative AI covers a lot of ground.

What is Generative AI?

This article will be long enough without getting into a big discussion of neural networks. I want to focus on one class of generative AI: chatbots such as ChatGPT. They’ve become quite popular and have brought the discussion of AI, laws, and so on to the fore.

Platforms like ChatGPT are LLMs are being made available to the public to provide, for instance, companies with a large number of beta testers and vast amounts of input. This is over and above the amount of input used to train and support the systems. These systems combine various AI tools and models—not a single “brain”—and are being designed and tuned and released to the public at a rapid rate.

In their most basic form, chatbots perform a number of chores. They accept input, analyze the query, determine how to act on the query, generate the internal results, convert this to something that’s useful (usually a text response), and then present it. Initially, the input and output for platforms like ChatGPT was text, but verbal and graphical inputs and outputs can also be part of the mix. Image generators like OpenAI’s DALL-E and Midjourney use a text prompt to create images on demand.

The main difference between generative AI and other AI models like those used for applications that identify the type of object in an image is the type of interaction and type of result presented. In the latter case, there’s usually a single input—the image—and a single result—the type of object and certainty of the match. Generative AI starts with a prompt that it must interpret and generates a result, such as some prose or an image. However, these systems take it a step further by allowing follow-on responses and including requests to explain the results.

Explainable AI

The ability of an ML model to explain how the results were achieved is useful because it’s usually not apparent and could have an impact on how the results may be used. It can also help when working with something like a chatbot, where subsequent interactions can be utilized to generate new responses.

The challenge for users is what kind of explanation can be provided and how informative and accurate is it? In general, chatbots can supply a general overview of their response and sometimes their source materials such as websites, etc. However, getting a detailed response may only be available to the owners of the system.

Shallow AI

I was hoping to provide some insights into the limitations, issues, and advantages of using chatbots. I used ChatGPT because it’s very well known and free to use, although it does have limits that can be addressed by a paid subscription. I did a number of sessions and will provide some feedback based on these, but I will only provide the full response to one of the first queries.

This is what ChatGPT provided me when I asked it to write an article about me. I included my name and the publication but not much more:

Title: Exploring the Legacy of William Wong: Editor Extraordinaire of Electronic Design Magazine

Introduction: Electronic Design magazine has long been a trusted source of information and insights in the world of electronics and technology. At the helm of this respected publication stands a dedicated and influential figure, William Wong. In this article, we delve into the life and contributions of William Wong, the editor who has played a pivotal role in shaping the discourse of Electronic Design.

Early Life and Education: William Wong's journey into the world of electronics likely began with a passion for technology from an early age. His educational background, which may include degrees in electrical engineering or related fields, laid the foundation for his career in electronics journalism.

Career at Electronic Design: William Wong's tenure as the editor of Electronic Design magazine has been marked by a commitment to providing engineers, designers, and tech enthusiasts with cutting-edge information and analysis. Under his leadership, the magazine has consistently delivered in-depth articles, expert reviews, and industry insights that have kept readers at the forefront of electronic design trends.

Innovative Contributions: Wong's influence on Electronic Design can be seen in the publication's innovative approach to covering emerging technologies, such as the Internet of Things (IoT), embedded systems, semiconductor advancements, and more. His keen editorial eye has helped bridge the gap between theoretical knowledge and practical applications, making complex topics accessible to a wide readership.

Thought Leadership and Impact: As a thought leader in the field of electronic design, William Wong's editorials and commentaries have not only informed but also stimulated discussions and debates within the industry. His insights and analyses have often served as a catalyst for innovation and creative problem-solving among engineers and designers.

Legacy and Future: William Wong's contributions to Electronic Design have undoubtedly left an indelible mark on the electronics and technology community. As he continues to guide the magazine, readers can look forward to more insightful content that empowers them in their electronic design endeavors.

Conclusion: William Wong's role as the editor of Electronic Design magazine has been pivotal in shaping the landscape of electronic design and technology journalism. His dedication to excellence, thought leadership, and commitment to informing and inspiring readers ensure that his legacy will endure for years to come, making him a respected figure in the world of electronic design.

 As you might guess, this flowery synopsis is grammatically correct but so nebulous that it could match almost anyone, and the claims are dubious at best. The response also lacks any specifics. I did a subsequent query asking about another Electronic Design editor, Joe Desposito, and received a similar response.

I tend to be wary of chatbots and this technology in general, but they still can be very useful.

Getting Something Beneficial from Generative AI

Asking a chatbot trained on internet data like ChatGPT can be useful if the queries are more specific and simple. For example, I asked it to provide a C program for an Arduino Uno that would blink the LED on the board. The response was a short, accurate program (see figure).

Of course, this is Arduino 101 and something that’s easily found online with a conventional search engine. ChatGPT was also nice enough to provide additional instructions on compiling and downloading the program using the Arduino IDE. It even mentions the need for a current-limiting resistor to prevent excessive current. Of course, these are all recommendations that would be found online as well, but not necessarily in one place.

I got a bit more ambitious and attempted to ask questions and get examples for other, more esoteric technology areas like discussing the use of modads in Haskell, a functional programming language. I also hit it up with requests for Rust programs starting with iterative and recursive Fibonnaci sequence programs, which it was kind enough to provide. They worked nicely, too.

When I asked it to write an accounting program for the Arduino, the response was humorous. It presented me with an application which generated a menu that an accounting program might use. But I was informed that it would be a complex process to write on and it was beyond its capabilities. Too bad I didn’t get a similar response when I asked it to write a story about me and Electronic Design.

Learning About Something New

What I haven’t done yet, to any great degree, is ask it about areas I am unfamiliar with. ChatGPT actually did a good job when I asked it to write a sort program in Ada/Spark using contracts. Its initial response was simple with minimal preconditions noted. It was able to add more, after asking, but this means I needed to know what to ask for:

with Ada.Text_IO;
with Ada.Integer_Text_IO;

procedure Sort_Array is
   type Integer_Array is array (Positive range <>) of Integer;

   procedure Swap(Arr: in out Integer_Array; Index1, Index2: in Integer) is
      Temp: Integer;
   begin
      Temp := Arr(Index1);
      Arr(Index1) := Arr(Index2);
      Arr(Index2) := Temp;
   end Swap;

   procedure Bubble_Sort(Arr: in out Integer_Array)
     with Pre => Arr'Length > 0,
     with Post => (for all k in Arr'Range => (for all j in Arr'Range => (if k < j then Arr(k) <= Arr(j)))),
     with Global => (Input  => Arr,
                     Output => Arr);
   is
      N : constant Integer := Arr'Length;
   begin
      for i in 1 to N - 1 loop
         for j in 1 to N - i loop
            if Arr(j) > Arr(j + 1) then
               Swap(Arr, j, j + 1);
            end if;
         end loop;
      end loop;
   end Bubble_Sort;

   Arr : Integer_Array(1..10); -- Change the size as needed
begin
   -- Initialize the array with values
   Ada.Text_IO.Put_Line("Enter 10 integers:");
   for I in Arr'Range loop
      Ada.Integer_Text_IO.Get(Arr(I));
   end loop;

   -- Sort the array
   Bubble_Sort(Arr);

   -- Display the sorted array
   Ada.Text_IO.Put_Line("Sorted Array:");
   for I in Arr'Range loop
      Ada.Text_IO.Put(Arr(I)'Img & " ");
   end loop;
   Ada.Text_IO.New_Line;
end Sort_Array;

In general, I found ChatGPT to be useful in aiming me in the right direction on the internet. Its explainability was fair but, unlike search engine results that tend to be exhaustive, ChatGPT provides more limited selections. It was also a little biased when I asked for the top 10 generative AI platforms—the top two were ChatGPT 3 and ChatGPT 4.

Generative AI is undoubtedly a valuable tool, and the free version is quite handy. Customized versions are cropping up all over the place as vendors try to improve their tools, customer service, etc. with generative AI tools. Some get used internally while others can be accessed by customers.

These days, use of generative AI tools tends to be voluntary, but they may become ubiquitous as time goes on. Search-engine companies like Google and Microsoft want to add them to their front ends. Tool developers want to incorporate them into their systems. They will likely be the first line of defense when getting online.

Please take our quick poll (below) and see what others are up to. You can also add comments below if you want to continue the conversation.

Read more articles in the TechXchangeGenerating AI.

Sponsored Recommendations

Comments

To join the conversation, and become an exclusive member of Electronic Design, create an account today!