AI as a Checked Assistant

AI can now write much of the routine code in bioinformatics. It can also invent references, recommend software that does not exist, and write code that runs perfectly and gives the wrong answer. This module teaches you to use it for speed while staying the person who checks.

Mini-course module ~1 hr In your browser

What you'll be able to do

  • Say what AI assistants do well in bioinformatics, and where they fail.
  • Recognise three common AI failures: invented references, invented packages, and code that runs but is wrong.
  • Use a five-step checking workflow on any AI output before you rely on it.
  • Use AI in a way that builds your skills instead of replacing them.

Before you start

  • Modules 1 to 4 of Thinking Like a Researcher, especially the sanity checks in Module 4.
  • A little Python helps for the hands-on box; Python basics is enough.
  • No particular AI product is needed. Everything here applies to any assistant, because the tools change every few months.
Module 5, part 1 of 4

What AI is good at, and what it is not

AI assistants are now good at routine code. In one study, researchers gave ChatGPT 184 exercises from an introductory bioinformatics course. It solved about three in four on the first try, and almost all of them within seven tries when given feedback (Piccolo et al. 2023). AI tools have changed a lot since this 2023 study, but the checking habits below still apply.

What AI is not good at is knowing when it is wrong. It writes a correct answer and an invented one in the same confident tone. So the useful question is not "can AI do this?" but "how will I know if it did it right?"

Usually a good useNeeds careful checking
Explaining an error message or an unfamiliar functionFacts, numbers and references it states
Drafting routine code you can read and testWhich statistical method or design is right for your data
Suggesting how to structure a scriptPackage names and install commands
Tidying wording in your own writingAny result you cannot check against something you already know
Module 5, part 2 of 4

Three ways AI gets it wrong

1. Invented references

Asked to write short literature reviews, one older model (GPT-3.5) invented more than half of its references, and a newer one (GPT-4) about one in five. Many of the real ones had errors in details such as dates or page numbers (Walters and Wilder 2023). An invented reference can look perfect, with authors, a journal and a DOI.

2. Invented packages

AI sometimes tells you to install a software package that does not exist. Researchers tested 16 code-writing models and found this happens again and again, often with the same made-up names (Spracklen et al. 2025). That creates a security risk: someone can register the invented name and fill it with harmful code, waiting for people to install it.

3. Code that runs but gives the wrong answer

This is the most dangerous failure, because nothing looks wrong. A classic example from this site: DESeq2 code that runs perfectly but compares the groups the wrong way round, so every fold change has the wrong sign. Errors like this are why Module 4 told you to check positive controls.

Decode the jargonHallucination

When an AI states something false as if it were true, such as a paper or package that does not exist, it is called a hallucination. The model is not lying on purpose; it produces text that sounds right without checking whether it is.

Module 5, part 3 of 4

The checking workflow

Use these five steps for any AI output you plan to rely on. Most take a minute or two.

1. Askclearly, withyour context 2. Readevery linebefore running 3. Teston an exampleyou can check 4. Verifypackages andreferences exist 5. Recordthat AI helped,and how you checked If a test fails, go back to step 1 with what you learned.
Five steps, for code, facts and references alike.
  1. Ask clearly. Say what your data looks like, which language and packages you use, and what result you expect.
  2. Read every line before running it. If you cannot explain a line, ask the AI to explain it, then check that explanation too.
  3. Test on an example where you already know the answer. A tiny made-up input, or a positive control gene, catches most silent errors.
  4. Verify anything that points outside the conversation. Look up every package on its official page before installing, and open every reference before citing it.
  5. Record it. Note in your methods that an AI tool helped, with what, and how you checked it. Published guidance for scientists recommends this kind of transparency (Smith et al. 2024).

Try it: test an AI-written function

An AI assistant wrote the function below to calculate GC content. It looks fine. Press Run and compare each result with the answer you expect. One test exposes a real problem.

The last test fails: the function only counts capital letters. Many reference genome files write repeated regions in lowercase (called soft-masking), so on real data this function would quietly report GC content that is too low. The fix is one line: convert the sequence first with seq = seq.upper(). Try adding it and running again. Bonus: what happens with an empty sequence, gc_content("")? (It crashes with a ZeroDivisionError, because you cannot divide by a length of zero. Good code checks for empty input.)

Module 5, part 4 of 4

Learn with AI, not instead of learning

A controlled study of 69 beginners aged 10 to 17 found that an AI code generator helped them write code and did not hurt what they remembered a week later. The authors still warned that leaning on AI too heavily might reduce learning (Kazemitabaar et al. 2023). This is early evidence, so treat it with care. Still, a sensible habit is:

The habit to build

Try first, then ask. Write your own attempt, even a messy one. Then ask the AI to explain an error, critique your code, or show another way. You do the thinking, and the AI becomes your feedback.

Never paste these into an AI tool

Patient or other identifiable human data, unpublished data you are not allowed to share, and passwords or API keys. Check your institution's rules before using AI with any research data.

Module 5 check

Five reasoning questions. Aim for at least 4 out of 5.

An AI assistant gives you a citation, with a DOI, that perfectly supports your argument. What do you do before putting it in your report?
Invented references can look complete, DOI included. Only the real paper can confirm both that it exists and that it supports your claim. Asking the AI again is not a check, because it can confirm its own invention.
Your AI assistant tells you to run pip install fastgenomics-utils, a package you have never heard of. What is the safest next step?
AI sometimes recommends packages that do not exist, and attackers can register those invented names with harmful code. A minute checking the package page protects your computer and your data.
AI-written DESeq2 code runs without errors, but a gene that dexamethasone is known to switch on comes out strongly negative. What should you check first?
Code that runs is not code that is right. A positive control (a gene with a known direction) catches reversed comparisons, one of the most common silent errors in AI-written and human-written analyses alike.
You are learning Python and want AI to help you get better, not just get answers. Which habit does this module recommend?
Researchers warn that over-reliance on AI code generators may hurt learning. Attempting first means you do the thinking, and the AI becomes feedback rather than a replacement. This evidence is still early, so treat it as a sensible habit, not a law.
You used an AI assistant to help write part of your analysis code. What belongs in your methods section?
Transparency lets readers judge your work, and many journals now ask for it. Responsibility for the analysis stays with you, which is exactly why the checking workflow matters.

Sources & further reading

  1. Piccolo SR, Denny P, Luxton-Reilly A, Payne SH, Ridge PG. Evaluating a large language model's ability to solve programming exercises from an introductory bioinformatics course. PLoS Comput Biol 19(9): e1011511, 2023. doi:10.1371/journal.pcbi.1011511
  2. Walters WH, Wilder EI. Fabrication and errors in the bibliographic citations generated by ChatGPT. Sci Rep 13: 14045, 2023. doi:10.1038/s41598-023-41032-5
  3. Spracklen J, Wijewickrama R, Sakib AHMN, Maiti A, Viswanath B, Jadliwala M. We have a package for you! A comprehensive analysis of package hallucinations by code generating LLMs. 34th USENIX Security Symposium, pp. 3687-3706, 2025. usenix.org
  4. Smith GR, Bello C, Bialic-Murphy L, et al. Ten simple rules for using large language models in science, version 1.0. PLoS Comput Biol 20(1): e1011767, 2024. doi:10.1371/journal.pcbi.1011767
  5. Kazemitabaar M, Chow J, Ma CKT, Ericson BJ, Weintrop D, Grossman T. Studying the effect of AI code generators on supporting novice learners in introductory programming. CHI '23, 2023. doi:10.1145/3544548.3580919

Last reviewed: November 2026. AI tools change quickly, so this module is reviewed every six months.

Put it into practice

Capstone: reproduce a published RNA-seq result →