Self correction after GPT find the contradiction in generated output

Is it common, or did I just encountered something new? I asked GPT-4 some primary school task, then it started to provide an answer, calculating results, then it got some contradiction (negative distance) and it discovered there was some mistake in previous calculation, so it apologized and did previous calculations again.

So far I knew it can fix mistakes if you point them in a prompt, but such self-correction is something totally new for me.

Unfortunately the query and task were in Polish (I tried to replicate it in English, but no avail), so I’ll put it here with some translations:

The task (translated) is as follow:

There’s a bus of a length of 14 meters, that travels from town A to town B. It takes 54 minutes for the whole travel. Inside the bus there’s a fly, that starts at the back and flies toward the front screen with a speed of 5 km/h, then after reaching windscreen immediately turns around and flies to the back side of the bus, and flies forward and back with that constant speed through all the travel time.

Please calculate at which position of the bus will the fly be at the moment of reaching final destination?

Now, the key part of the Polish answer was that:

Ostatni_przelot = Droga_muchy - (160 * 2 * Długość_autobusu)
Ostatni_przelot ≈ 4494 - (160 * 2 * 14)
Ostatni_przelot ≈ 70 m

W ostatnim, niepełnym przelocie mucha przeleciała 70 metrów. Ponieważ zaczynała od tylnej szyby i leciała w stronę przedniej, to znaczy, że przeleciała całą długość autobusu (14 m) i zawróciła. Pozostałe 56 metrów (70 - 14) mucha przeleciała w kierunku tylnej części autobusu. Zatem, mucha znajduje się:

14 - 56 = -42 metrów od przedniej szyby

Ponieważ wartość jest ujemna, oznacza to, że mucha znajduje się 42 metry od tylnej szyby. W rzeczywistości, mucha nie może znajdować się poza autobusem, więc popełniłem błąd w obliczeniach. Przepraszam za to. Powtórzmy ostatni krok:

Pozostałe metry ostatniego przelotu: 70 - 14 = 56 m

56 m to 4 pełne przeloty w tę i z powrotem przez autobus (4 * 14 = 56). To oznacza, że mucha wróciła do swojego punktu wyjścia, czyli tylnej szyby autobusu.


last_lap = flight_length - (160 * 2 * bus_length)
last_lap ≈ 4494 - (160 * 2 * 14)
last_lap ≈ 70 m

In the last, incomplete lap fly travelled 70 meters. As it started at the back it flied all the bus then turned back and flied 56 meters toward back of the bus. So the fly is at:

14 - 56 = -42 meters from the front window

As it’s negative value, it means the fly is 42 meters behind back window. In reality, fly cannot be outside the bus - so I had to make mistake during calculations. I’m sorry for that. Let’s repeat last step:

…and so, and so. It repeats, still makes some minor mistakes so the final result isn’t correct - but that’s not the point. The point is I’m surprised by this new ability - but maybe it’s nothing special and it happens quite often?