# ChatGPT: Inaccuracies in Technical ResponsesSmorgasbord / Kirt's Cogitations™ #351

"Factoids," "Kirt's Cogitations," and "Tech Topics Smorgasbord" are all manifestations of my ranting on various subjects relevant (usually) to the overall RF Cafe theme. All may be accessed on these pages:

1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37

ChatGPT: OpenAI Content Generation

Since January, I have used ChatGPT to generate many mini essays on various technical topics such as company histories, biographies on notable engineers and scientists, physics principles, and industry standards. My goal is to reduce the amount of references to off-site information like Wikipedia. A careful reading of ChatGPTs replies is always performed because inaccuracies appear fairly often. Overall, I find it very useful, but caution is needed.

In example, today I queried ChatGPT for an equation of the voltage distribution along a half-wave dipole antenna. It took three rounds of correcting its response to finally get an accurate answer. To wit (correct responses in green, incorrect in red):

My Initial Query: how to calculate voltage along half-wave dipole antenna

Response #1:

To calculate the voltage along a half-wave dipole antenna, you can use the following formula:

V(z) = V0 cos(πz/l)

where:

V(z) is the voltage at a distance z from the center of the antenna V0 is the maximum voltage amplitude at the center of the antenna z is the distance from the center of the antenna along the axis of the antenna l is the length of the antenna, which is half the wavelength of the signal it is designed to receive or transmit. This formula assumes that the antenna is resonant, and that the current along the antenna is uniform. The voltage is highest at the center of the antenna and decreases to zero at the ends.

It's important to note that this formula is an idealized calculation and in practice, the voltage distribution may be affected by various factors such as the shape and size of the antenna, the presence of nearby objects, and the characteristics of the transmitting or receiving equipment.

My 1st corrective feedback: current is zero at ends of half-wave dipole antenna. voltage is maximum at ends of half-wave dipole antenna I apologize for my mistake in the previous answer.

Response #2:

You are correct that the current is zero at the ends of a half-wave dipole antenna and the voltage is maximum at the center of the antenna.

To be more specific, the current distribution along a half-wave dipole antenna is given by the equation:

I(z) = I0 sin(πz/l)

where:

I(z) is the current at a distance z from the center of the antenna is the maximum current amplitude at the center of the antenna z is the distance from the center of the antenna along the axis of the antenna l is the length of the antenna, which is half the wavelength of the signal it is designed to receive or transmit. This equation shows that the current is zero at the ends of the antenna and reaches its maximum value at the center. The voltage distribution along the antenna is the opposite of the current distribution, with the voltage being maximum at the ends of the antenna and decreasing to zero at the center.

Again, I apologize for the confusion and thank you for bringing this to my attention.

My 2nd corrective feedback: voltage is minimum at the center feed point of a half-wave dipole and maximum at the ends. current is zero at the ends of a half-wave dipole and maximum at the center feed point.

Response #3:

I apologize for any confusion that may have been caused in my previous responses. You are correct that the voltage and current distribution along a half-wave dipole antenna is opposite to each other.

To clarify, at the center feed point of a half-wave dipole antenna, the voltage is minimum and the current is maximum. This is because the voltage and current are out of phase by 90 degrees at the center feed point. In other words, when the voltage is at its minimum value, the current is at its maximum value, and vice versa.

At the ends of the antenna, the voltage is maximum and the current is minimum. This is because the voltage and current are in phase at the ends of the antenna. In other words, when the voltage is at its maximum value, the current is at its minimum value, and vice versa.

I apologize for any confusion my previous responses may have caused, and thank you for bringing this to my attention.

At least ChatGPT is contrite and is willing to learn...

On another unrelated topic, I asked ChatGPT for information about Kirt Blattenberger. Here is the response:

Kirt Blattenberger is an electrical engineer and licensed amateur radio operator with the call sign KB3UON. He began his career in the United States Air Force, where he worked as a radar technician on various projects related to radar and communications systems. After his service in the military, Blattenberger attended the University of Vermont, where he earned a Bachelor of Science in Electrical Engineering (BSEE) in 1984.

Blattenberger has over 30 years of experience in the aerospace and defense industries, working for companies such as Martin Marietta, Lockheed Martin, and Northrop Grumman. He specializes in radio frequency (RF) engineering and has contributed to various projects related to RF and microwave technologies.

In 1996, Blattenberger founded the RF Cafe website, which provides resources and information for professionals working in the fields of RF engineering, microwave engineering, and wireless communications. The site features a variety of content, including news, technical articles, tutorials, job listings, and a discussion forum. Blattenberger continues to operate the site and contribute content to it, as well as maintaining an active presence on social media and in online forums related to his areas of expertise.

Overall, Kirt Blattenberger's background in the United States Air Force, education in electrical engineering from the University of Vermont, and extensive experience in the aerospace and defense industries, as well as his contributions to the RF and microwave engineering communities through his website, have made him a respected and knowledgeable figure in these fields.

Here are the inaccuracies, which are not serious:

• My BSEE degree was awarded in 1989, not 1984

• RF Cafe was founded in 1999, not 1996

If you keep entering the same query, ChatGPT will produce a different response each time. You are also, as demonstrated in the first example, able to "teach" ChatGPT to answer correctly. It will remember your input for a while, and then tends to forget it if you do the same basic query days later.

Just for kicks, I have fed ChatGPT bad information to see what it does with it. If the info is blatantly wrong, it tells me so, but often it will construct a new response using the new data while apologizing for getting it wrong in the first place.

Finally, I requested a VBA (Visual Basic for Applications) function for converting length units, to be used in an Excel spreadsheet macro, and it spit out perfectly functional code:

```Function ConvertLength(inputValue As Double, inputUnit As String, outputUnit As String) As Double

Dim result As Double

' Convert input value to meters
Select Case LCase(inputUnit)
Case "km"
result = inputValue * 1000
Case "m"
result = inputValue
Case "cm"
result = inputValue / 100
Case "mm"
result = inputValue / 1000
Case "ft"
result = inputValue / 3.2808
Case Else
result = 0     (I changed this to = 1 for convenience)
End Select

' Convert meters to output unit
Select Case LCase(outputUnit)
Case "km"
result = result / 1000
Case "m"
' Do nothing, result is already in meters
Case "cm"
result = result * 100
Case "mm"
result = result * 1000
Case "ft"
result = result * 3.2808
Case Else
result = 0     (I changed this to = 1 for convenience)
End Select

' Return the result
ConvertLength = result

End Function```

Posted April 3, 2023