Data Science Agent and Code Transformation
labs.google.com
labs.google.com
One would have to check the resulting code carefully to see if the meaning is still as originally intended, or replaced with code that is more probable to be correct (but no longer working).
For instance, it replaces this:
if dataset == 'animals':
if dataset == 'turtle':
x_train, y_train, x_test, y_test = datasets.load_turtles(with_bowtie=False)
elif dataset = 'formal_turtle':
x_train, y_train, x_test, y_test = datasets.load_turtles(with_bowtie=True)
else:
with this: if dataset == 'turtle':
x_train, y_train, x_test, y_test = datasets.load_turtles(with_bowtie=False)
elif dataset == 'formal_turtle':
x_train, y_train, x_test, y_test = datasets.load_turtles(with_bowtie=True)
The before-code responds to dataset='animals' with `load_turtles(...)` and to dataset='turtle' or 'formal_turtle' with an error; In the after-code this is reversed, although the apparent logic error and the assignment/equals sign error are resolved. elif dataset = 'formal_turtle':
are both invalid syntax.I think 'clean up' here means something closer to 'convert this to what I'm trying to write'.
It's almost impossible to for LLM to tell all the invalid rows at once since the data cannot be fit into the context window. If we prompt the model to thoroughly do data cleaning, there will be many try-and-fail steps. This happens to me as a human, I clean some rows, expect my program to run with the data, only to find there are more malformed data. LLM cannot get it right for now, actually I see many cases that LLM fails because it wants to convert types (e.g. string to date).
Based on my experience, the best way is simply to skip the data cleaning step in the planning stage (you can provide feedback asking the tool to not do any steps).
This is great for a more technical user (or student) who want to parse generated code and hack away. Instead [1] generates a dashboard app which is faster to use, but sacrifices interpretability.
Why does developing with Google have to be so hard?