Overview
At some point, I eventually started using LLMs in my work, and at another point I also thought about what made sense regarding how I would use them. I posted some rules on my cubicle so I would remember to use them, and apparently when I wasn’t at my desk, people would come and photograph the printout!
I thought I would just share here, since somehow others have found it useful.
Rules When Coding with “AI” (LLMs)
Use a secure environment in which the model is contained and cannot steal data or intellectual property (we have HopGPT at my current lab).
If troubleshooting a chunk of code, first make a scratch flow diagram, e.g.:
-------------------------------------------------------------------
df1_in
|
|--> filter: variable_x == 1
|
|--> dcast: rows -> columns
df2_in -> join: by person_id--->|
|
|
▼
df_out
-------------------------------------------------------------------
- Ask only for specific information needed, e.g.:
- Is there a function or package that does [X]?
- What is error [Y]?
- Why does this code do [Z]?
Until further notice, do not directly copy + paste any code from LLM output
Ask the LLM to explain all generated code, step-by-step (mostly to know if the LLM added anything unnecessary)
Conclusion
That’s it - my famous guidelines for AI use. I know there are models incorporated into coding IDEs, and other people may have other approaches, but since I need to use a secured interface with models, I am limited to a standard prompt sort of interaction. And, this is fine. I would rather have things be secured, understand and have explanations, etc. mostly - only ask for specifics, ask it to explain itself, use common sense. There is no room for vibe coding in my research, but that doesn’t mean I can’t adapt to the times.