Some impressive ChatGPT responses

Michael Brodacz-Geier
7 min readDec 21, 2022

OpenAI recently made a new AI-based chatbot available for the public. The chatbot uses ChatGPT (GPT = Generative Pre-trained Transformer) which is an AI language model optimized for dialogue.

I played around with ChatGPT version Dec 15 2022 and it produced really impressive responses, with a few exceptions. Some of the best responses I am sharing in this article.

I offered ChatGPT various challenges:

  • Understanding not only English, but also German
  • Drawing ASCII art and turtle graphics
  • Writing lyrics and screenplays
  • Coding in Kotlin and fixing its own mistakes.

Drawing a Christmas Tree

First, I asked ChatGPT to draw me a Christmas tree made from letters and numbers. At first, the tree’s trunk was a bit off. After I asked ChatGPT to move the trunk to the center, it printed out a perfectly symmetrical tree.

ChatGPT drawing a Christmas tree with digits
ChatGPT drawing a Christmas tree with digits

A Simple “Good Bye Noodles” Program

Next, I asked ChatGPT to write me a simple program in the Kotlin programming language. As I am a software developer, I am especially interested in ChatGPT’s coding capabilities. I started asking for the simplest possible program, a “Hello World” program which, when run, just prints out “Hello World”. Of course, I wanted to challenge ChatGPT a little bit, so I asked to change the output to something else. That way I wanted to make sure it doesn’t just copy and paste the code but instead actually understands what it’s writing.

ChatGPT writing a simple Hello World program
ChatGPT writing a simple Hello World program

This looks right (and thank you for the explanation).

VOY S07Exx: Sisko’s Return

As a fan of Star Trek: Voyager, I asked ChatGPT to write me a new episode in which Deep Space Nine’s Benjamin Sisko meets Voyager. I asked in German, but I got back an English response.

My German question was: Write a screenplay for an episode of Star Trek: Voyager Season 7 that surprisingly stars Deep Space Nine’s Sisko.

ChatGPT writing a new Star Trek: Voyager episode
ChatGPT writing a new Star Trek: Voyager episode

My first reaction was positive, but when thinking about it more, I wasn’t really satisfied with some parts of the story, specifically with the ending. Why would Sisko and Janeway continue their journey separately? So, I asked ChatGPT to change Act IV accordingly:

ChatGPT’s new ending for the generated Star Trek: Voyager episode
ChatGPT’s new ending for the generated Star Trek: Voyager episode

Apart from the ending, I am unsure about the exact temporal relation between DS9 and VOY and about what information the Voyager crew is expected to have at this time. DS9’s episode The Search introducing the Defiant took place on stardate 48212.4, according to Memory Alpha, while Voyager left Deep Space Nine later, on stardate 48315.6. So, Voyager should be aware of the Defiant. Also, Voyager already has regular contact with Earth in Season seven, which is why I believe the Defiant should not be “unfamiliar” to Voyager. But let’s leave it at that.

Kotlin: Make it a One-Liner

The next Kotlin program I asked for was a little more complicated than a simple “Hello World” program. I asked ChatGPT to write a program which sums up the numbers 1 to n.

ChatGPT wrote a program which first reads a number n from the user’s input. Then, it chose to use a for-loop to sum up the numbers 1 to n. Finally, the program prints the result.

The program works perfectly fine, but there are shorter and at the same time better understandable ways of writing the addition, which is why I asked ChatGPT to replace the for-loop with a one-liner.

ChatGPT changing a loop to a one-liner
ChatGPT changing a loop to a one-liner

I like (1..n).sum() much better. Well done.

Lyrics Breaking the Rules

In my next task for ChatGPT I asked to create a new Rammstein song.

My German query was the following: Write lyrics of a song with a play on words, based on “Du Hast” by Rammstein. The verses should rhyme. The theme of the song is the lust that comes with eating. However, the lyrics should still be written in the style of Rammstein.

Overall, the lyrics look interesting, but some sentences seem incomplete. Additionally, ChatGPT suspects that it’s breaking its own content guidelines with these lyrics.

ChatGPT generating a new Rammstein song
ChatGPT generating a new Rammstein song

OpenAI’s content policy states that it’s forbidden to generate content which promotes eating disorders. Cannibalism might be fitting lyrics for a Rammstein song, but the topic doesn’t seem to be suitable for ChatGPT.

OpenAI’s content policy for ChatGPT
OpenAI’s content policy for ChatGPT

Drawing an Analog Clock

I wanted to see if German input works as well as English for creating program code. Also, I asked ChatGPT for something more complicated now.

My German prompt was: Create a program in Kotlin that prints the current time as ASCII art in the style of an analog clock with a minute hand and an hour hand. The hands and the outline of the clock should be made of ASCII characters.

ChatGPT’s first attempt to create an ASCII art clock
ChatGPT’s first attempt to create an ASCII art clock

The generated code looked quite complex, but ChatGPT’s German explanation was helpful. However, when I ran above code in Kotlin Playground I got an ArrayIndexOutOfBoundsException.

That’s why I asked ChatGPT to fix the code: When I run the program, I get an ArrayIndexOutOfBoundsException. Please fix the program so no exception occurs.

ChatGPT’s fixed ASCII art clock
ChatGPT’s fixed ASCII art clock

I copied the improved code to Kotlin Playground. A few minutes after 10 am the program produced the following output:

Kotlin Playground running ChatGPT’s final version of the ASCII art clock program
Kotlin Playground running ChatGPT’s final version of the ASCII art clock program

Try it yourself: Go to this Kotlin Playground — the code is already there. Just hit the Run button once Kotlin Playground loaded and it will run the code and print the current time as ASCII art clock in the output window.

Note: change the line val now = LocalTime.now() to val now = LocalTime.now(ZoneId.of(“Europe/Paris”)) and add import java.time.ZoneId at the top to choose a different time zone than the default one.

Turtle Drawing — Hexagon

ASCII art is nice, but what about drawing with lines? For this next challenge I asked ChatGPT to draw a hexagon using Python’s turtle library.

When drawing with turtles, as a programmer, you control a turtle which starts at coordinates 0,0 and draws a line when it moves. There are commands such as “go forward x units” or “turn to the right by x degrees”. Using these commands ChatGPT was able to write a program which draws a hexagon.

ChatGPT writing Python turtle code for drawing a hexagon
ChatGPT writing Python turtle code for drawing a hexagon

The generated code looks plausible, but I still ran the code in Python Sandbox (turtle mode) to verify. The result is indeed as expected, a hexagon.

Python Sandbox running and drawing the “hexagon” program ChatGPT wrote

Turtle Drawing — A house

Now, it got even more challenging for ChatGPT. I wanted it to draw a house with three windows and two doors.

ChatGPT writing Python turtle code for drawing a house
ChatGPT writing Python turtle code for drawing a house

By just looking at the code it’s hard to imagine what the resulting drawing will look like. Therefore, I used Python Sandbox again to visualize the result.

Python Sandbox running and drawing the “house” program ChatGPT wrote
Python Sandbox running and drawing the “house” program ChatGPT wrote

Well, one needs some good imagination to see a house in this drawing. But ChatGPT thought about adding three (round) windows and two doors, as requested. So, not too bad — only positions and rotations should be improved. And the roof is not visible, unfortunately.

I tried to make ChatGPT fix the errors with several more commands, but the result was similar every time. Apparently, currently, it looks like drawing a house exceeds ChatGPT’s capabilities.

Conclusion: impressive, but with a grain of salt

Overall, ChatGPT (Dec 15 2022 version) impressed with very accurate results. Many times, the first or second attempt generated a satisfying response. However, users are advised to be very cautious and to not blindly trust ChatGPT’s responses. ChatGPT often produces results which look perfectly fine at first glance. Even ChatGPT’s explanations usually seem to make sense. However, when digging deeper (or in the case of program code: when running the code) it sometimes turns out that the result is wrong or doesn’t make sense.

Tools used

--

--