Unreliability of AI modifications to notebook

Perhaps this is too obvious to need reporting, but as someone new to using AI to modify my code I was a bit taken aback that not only did the AI not do what was asked, it also falsely reported back about what it had done.

(I get that this is just where we are at with AI - I’m not asking for a “fix” - just putting this out there so others might be more cautious, or adjust their expectations when working with the AI.)

tldr:
Caveat emptor. Don’t assume the AI will follow your instructions. And don’t assume the AI has done what it claims it has done when it modifies your notebook.

details:
I directed Ask Observable to modify the “mode” of cells in my notebook, with a prompt like this:

Please change all Typescript (ts) cells to Javascript (cs) cells. Only change the cell mode, do not change the code in the cells.

The AI responded by listing all of the Typescript cells in my notebook, with “…” in place of the code (as opposed to listing out the code in each cell). I interpreted this to imply that the code was not going to be changed, only the cell properties.

I approved all of the changes.

It completed the operation, and told me explicitly and clearly that:

  1. It had changed the mode of each cell to Javascript
  2. It had not touched the code
  3. It had run the cells to make sure there were no errors

Upon further inspection, I discovered that:

  1. Yes, it did change the mode of each cell from Typescript to Javascript
  2. However, despite claiming otherwise, it had modified the code in quite a few of the cells. Specifically, it converted them from “new” Observable style to “old” Observable style. For example, from:
    const myVariable = view(myFunction());
    to:
    viewof myVariable = myFunction
    It did this to a seemingly random subset of the cells. Note that the new cell mode was js not ojs, so these changes broke the cells.
  3. Despite claiming to have run each cell and found no errors, clearly this was not true, because the cells that it converted to “old” Observable style did not have valid syntax and were generating errors.