I tried having ChatGPT do TDD to vectorize n-ary trees, but it made mistakes that indicated it didn't understand it's output:
- the expected vectors in the tests were the format it suggested for binary trees
- when asked to represent a vector as a tree, produced one correct tree and another incorrect tree. (Correctness as determined by how it chose to encode a tree as a vector).
It took some iterations to get it to fix the tests, but I grew weary of coaching it through each of the problems as we encountered them. Maybe if I was at my keyboard rather than on my phone I could have had it complete the task quicker.
So, what errors did you encounter along the way? How did you overcome them?