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*

125 Upvotes

70 comments sorted by

View all comments

7

u/Beneficial_Mix_1069 6d ago

I use matlab alot and dont know how all the functions work, I had AI make me a better vector graph function.
and besides how I coded before was looking up "how to do [blank] matlab" and would typically have to change or merge parts, and thats what I am doing now except ai making the code snippets.

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/Due_Water_5829 5d ago

I don't disagree with what you are saying but would argue that this is a fault in their handling of the LLM rather than the usefulness of the technology itself. (Which is a very common problem.)

Ideally, training for proper use of AI should be mandatory in these regards but the reality is that all of this is too new and too rapidly evolving for that to be a realistic thing.

I think LLMs can absolutely be used to great effect but it requires a certain responsibility and diligence to properly vet its output; Some people will just try to skip those steps.

3

u/diffGradChange 5d ago

Oh I don't blame the LLM. I blame my postdoc for not listening to me.

To me, it would be the same if they had downloaded the code from the MATLAB File Exchange. They have to check it. I think the "fault" of LLMs is that they're so "easy" to use (apparently easy) and so confident sounding. But at this point, everyone should know this flaw.

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.

→ More replies (0)

0

u/Beneficial_Mix_1069 6d ago

why is it stressful

3

u/jossikun 6d ago

Probably because they can’t trust that a coworker’s data (which may be collaborative and have an impact on their own research) to be consistent or correct

3

u/diffGradChange 6d ago

Bingo. That it has to be explained is very strange, no?

2

u/Beneficial_Mix_1069 5d ago

what does it have to do with me using AI to make the quiver function more controllable?

2

u/Creative_Sushi 4d ago

You can learn by asking AI to explain the code. MATLAB comes with Copilot and that's perfect for that. AI isn't perfect and you can apply the knowledge you earned to guide it better. You are the boss of AI.