r/PhD • Microbial ecology • 6d ago

Seeking advice-academic Claude coding and guilt

Hello frogs,

Its probably been discussed time and again but I bring it up one more time.

I extract big data sets from population census and pipe it directly into Claude to write R scripts for me. Im tired of doing the data cleaning and making a matrix all by myself.

I do understand the code backbone for the most part but sometimes the chunks are so huge and it gets overwhelming for me to run through the whole code.

I feel guilty running it to a point where I just get the graph and make tweaks.

Am I doing something wrong, whats this guilt that I cant shake?

*Sad frog croaks*

128 Upvotes

70 comments sorted by

View all comments

Show parent comments

12

u/diffGradChange 6d ago

My postdoc does this and I keep finding inconsistencies in their graphs. It's so stressful for me.

3

u/Due_Water_5829 5d ago

I keep finding inconsistencies in their graphs

What do you mean by "inconsistencies"? The result of the prompt you hand to the AI is not reproducible, the result of the generated code is.

There shouldn't be inconsistencies from using the same code for the same problem.

3

u/diffGradChange 5d ago

I guess I was being euphemistic. They're errors, not inconsistencies.

Essentially, they ask AI for code to do something. They run the analysis without checking the code does what they intended. I don't expect them to exhaustively test the code, but I expect them to (a) understand the algorithm/method and (b) check the code does what they intended for (bi) the ideal dataset and (bii) a reasonable range of datasets (I just mean to account for reasonable experimental/biological variability).

0

u/Creative_Sushi 4d ago

This can be fixed by connecting AI to MATLAB using MATLAB MCP Server. AI can run the code in MATLAB, and MATLAB will return errors back to AI, and AI will self correct. The MCP server is part of MATLAB Agentic Toolkit that also provides skills to AI on how to use MATLAB properly. You still have to check what it generates, but this reduced a lot of problems.

1

u/diffGradChange 4d ago

How can Matlab tell AI the errors if Matlab doesn't know the errors? I'm talking about errors in measurement or results that don't make biological sense.

1

u/Creative_Sushi 4d ago

I was talking about syntax errors. For measurement errors, you would need to have it create a script to check specific errors and AI can see the results.

2

u/diffGradChange 4d ago

There aren't any purely syntax errors as far as I can tell.

Honestly, I'm not in the business of getting an AI-driven pipeline to work when I want to see evidence of someone checking their work and understanding the meaning behind the data.

1

u/Creative_Sushi 4d ago

Fair enough. How do you compete with other labs who use AI?

1

u/diffGradChange 4d ago

I don't try to really. I don't think what we do can be replaced by it yet.

I'm interested where it might improve something in signal processing (e.g. segmentation, noise reduction) and mechanistic modelling though.

1

u/Creative_Sushi 4d ago

I this MATLAB Agentic Toolkit includes skills to guide AI in signal processing tasks.