AI Arrived in Year Two of My PhD

โ€ข

AI arrived in the second year of my PhD. It took away my backup plan of working as a coder, and it took away the advantage of having a more technical modelling background than many of the people around me. However, it also made me much faster. As a research assistant I translated an entire model from R to C++, which took a year. Today the same translation would take about a week.

Using AI in the terminal makes me much more confident about the context that AI is drawing from. Most researchers I talk to don't know this is possible, so here is how I set it up.

Work in the terminal, not a chat window

A terminal tool, such as Claude Code, reads and edits the files in your project directly. It can run your code, see the error and fix it, and show you the changes as a diff before you accept them.

Use plan mode for anything large. In plan mode the tool reads your project and proposes a plan, and nothing is changed until you've reviewed it. For a job like translating a model between languages, the plan is where you catch wrong assumptions, such as a function that doesn't have an equivalent or a random number generator that behaves differently. Reviewing a plan takes minutes, and untangling a wrong rewrite takes days.

Build a personal library of publications

Keep the papers and notes you rely on in a folder in your project, with a README โ€” or your CLAUDE.md โ€” that says what's in it. Convert PDFs to plain text or markdown where you can, because the tool reads those more reliably. I keep a notes folder this way, with course notes, reading notes and a reading list, organised so the AI can draw on it.

It also changes how you read. Instead of asking the AI what the literature says, ask it what your papers say, and ask it to point to the passage. Then you can check it.

This is different from training a model. Files you give the tool in a session are context for that conversation, so the AI can answer from your sources, with the full text, instead of from whatever it remembers about a paper. Check the data and training terms of the tool you use, and your university's rules on unpublished work, before putting anything in it that isn't public. If you have your own notes then you can be sure of the context going into the model (although internal biases will still exist).

Keep the manuscript and the code in one project

Put the manuscript and the code in the same folder structure, under version control:

project/
  code/
  data/
  figures/
  manuscript/
  notes/
  CLAUDE.md

When you change the model, the text that describes it needs to change as well: the methods, the parameter tables, the numbers in the results. If they live in the same project, you can ask the tool to find every place in the manuscript affected by a change to the code and update it, then review the diff. Nothing quietly goes out of date.

Generate figures and tables from the code, so the manuscript uses what the model actually produced. If a number in the text came from a run, you should be able to trace it back.

Use git

Git isn't about AI, but it matters more now. Every commit is a point you can go back to, so if a change breaks the model you can return to the version that worked. It also gives the AI the history of your project. The tool can search it to see when a parameter changed, why a function was rewritten, or when a result first started to look different, which is hard to do from the current files alone.

Commit small and often, with messages that say what changed and why. Then reviewing and undoing an AI-made change is easy.

Review everything

The tool will sometimes be wrong with confidence. Read the diffs, run the tests, and don't accept a change you don't understand. Being faster only helps if you can still tell whether the result is right.

That includes references. You need to be able to explain and check every reference the tool finds, exactly as you would with anything from Google or another search engine. Open the paper, confirm it says what's claimed, and don't cite something you haven't read.

Smaller things

  • Time isn't the measure any more. The question and the assumptions are what's left.
  • Ask what tools exist. At my university we have access to one AI model, and nobody has compared it with the alternatives. I only learned about terminal tools because I have friends in computer science. Ask people who use them every day.
  • Check publishers' rules early. AI-generated images are fine in a presentation but looked down upon in writing, and journal policies are ambiguous and differ from journal to journal.
  • Writing support is worth having. As a dyslexic writer, I used to rely on people to check my writing. Now I can ask for suggestions at any time. The claims and the argument stay mine.
  • More papers isn't more science. It's easier than ever to write many papers, and the result has been backlogs. I'd rather ask whether the question is worth answering.

What's still unresolved

Most papers sit behind a paywall that an AI can't get past, which means the information people rely on has a selection bias. It's like Google's, though it matters more when an assistant tells you what the literature says. I can't fix that, but it's one more reason to read the papers the tool finds and to make my own work open where I can.