Empowering beginners in bioinformatics with ChatGPT

Evelyn Shue, Li Liu, Bingxin Li, Zifeng Feng, Xin Li, Gangqing Hu

Abstract

Bioinformatics education is often hindered by the "programming hurdle," where students struggle to master the computational tools necessary for biological data analysis. This paper introduces the OPTIMAL model (Optimization of Prompts Through Iterative Mentoring and Assessment with an LLM chatbot), a systematic framework for using ChatGPT as a virtual teaching assistant. By leveraging iterative prompt refinement and Chain-of-Thought reasoning, the model enables beginners to perform complex tasks such as NGS alignment and phylogenetic tree construction while mitigating the risks of AI hallucinations.

Introduction

Bioinformatics serves as the critical bridge between biology and big data, yet for many students, this bridge is blocked by a steep learning curve. Proficiency in R, Python, and command-line tools often takes years to master, creating a barrier to entry for those primarily trained in the life sciences. While Large Language Models (LLMs) like ChatGPT are capable of generating code, they are not infallible. Without a structured approach, beginners may encounter "hallucinations"—non-existent functions or incorrect logic—that lead to invalid results. This paper addresses the challenge of systematically using AI as a reliable educational tool rather than a shortcut.

The OPTIMAL Framework

The authors propose the OPTIMAL model: Optimization of Prompts Through Iterative Mentoring and Assessment with an LLM chatbot. Rather than relying on a single prompt, the framework follows a recursive loop designed to foster both successful analysis and student learning:

  1. Preparation: The student reviews the scientific question and defines the expected outputs.
  2. Drafting: Creating prompts that describe the task at varying levels of detail.
  3. Interaction: Inputting prompts into the LLM to generate and execute code.
  4. Evaluation: Assessing the output. If the code fails, the student decides whether to ask the chatbot to debug or to fix it manually.
  5. Refinement: Repeating the process until the code is robust and the results are scientifically valid.

A key component of this model is Chain-of-Thought (CoT) prompting. By breaking complex problems into smaller, manageable sub-problems—a "divide-and-conquer" approach—students can guide the AI toward more sophisticated and accurate solutions.

Experimental Validation

The OPTIMAL model was validated using several real-world bioinformatics and data science scenarios:

  • Next-Generation Sequencing (NGS): Using ChIP-seq data from the ENCODE Project, the authors successfully generated code to align short reads to the human genome and visualize them in the Integrative Genomics Viewer (IGV) within just two iterations of prompt refinement.
  • Molecular Evolution: The model successfully wrote R code to build phylogenetic trees for the TP53 tumor suppressor gene across nine species. While the AI struggled with advanced tasks like "outgroup rooting," the iterative framework allowed for human-led corrections.
  • Mathematical Complexity: For tasks involving robust circle fitting (relevant for identifying organelles in biomedical images), a single prompt failed. However, using the CoT approach, the student guided the AI to build a sophisticated algorithm incorporating Bayesian priors—a task typically requiring advanced programming expertise.

Key Insights and Discussion

The AI as a Virtual Teaching Assistant

ChatGPT’s most valuable role is not just writing code, but teaching the logic of data analysis. By interacting with the bot, students learn how to decompose complex biological questions into computational steps. The act of refining a prompt is, in itself, a learning process that requires the student to understand the underlying biology.

The Human-in-the-Loop

The study emphasizes that human intervention remains mandatory. Because LLMs occasionally "fake" package names or create non-existent functions, students must cross-reference AI output with official software manuals. The OPTIMAL model is a collaborative process where the human provides the critical assessment that the AI lacks.

Conclusion and Future Work

The OPTIMAL model provides a robust pathway for bioinformatics beginners to overcome technical barriers. However, the authors acknowledge that the model may not always converge for highly specialized problems and that the inherent randomness of LLMs can lead to inconsistent results. Future work should focus on controlled classroom trials to test the model's effectiveness against traditional lecturing and the creation of community-vetted "reference prompt" repositories for common bioinformatics tasks.

Summary updated

Abstract

The impressive conversational and programming abilities of ChatGPT make it an attractive tool for facilitating the education of bioinformatics data analysis for beginners. In this study, we proposed an iterative model to fine-tune instructions for guiding a ChatGPT in generating code for bioinformatics data analysis tasks. We demonstrated the feasibility of the model by applying it to various bioinformatics topics. Additionally, we discussed practical considerations and limitations regarding the use of the model in chatbot-aided bioinformatics education.
BibTeX
@article{shue2023empowering,
  author = {Evelyn Shue and Li Liu and Bingxin Li and Zifeng Feng and Xin Li and Gangqing Hu},
  title = {{Empowering beginners in bioinformatics with ChatGPT}},
  journal = {Quant. Biol},
  year = {2023},
  doi = {10.15302/j-qb-023-0327},
}
Figure