7 AI Tools

AI tools can be useful for research, coding, writing, learning, and brainstorming, but they must be used carefully. In Shen Lab, AI tools should support scientific work; they should not replace critical thinking, experimental validation, data checking, or responsible authorship.

This chapter gives practical guidance for using tools such as ChatGPT, Claude, open-source Qwen models, DeepSeek models, and other AI assistants.

7.1 General Principles

Use AI tools as assistants, not as authorities.

Good practice:

  • verify important claims against reliable sources;
  • do not paste sensitive, private, or unpublished data into public AI tools without approval;
  • keep track of prompts and outputs when AI use affects a project;
  • check code before running it;
  • rerun analyses from a clean environment;
  • disclose AI assistance when required by journals, funders, conferences, or collaborators;
  • ask the PI if you are unsure whether a use case is appropriate.

AI-generated text, code, citations, summaries, and analysis plans can contain errors. The lab member using the tool is responsible for checking the output.

7.2 ChatGPT

ChatGPT can be useful for:

  • explaining concepts;
  • drafting or improving text;
  • brainstorming analysis plans;
  • debugging code;
  • generating example scripts;
  • summarizing non-sensitive notes;
  • improving clarity of documentation.

Recommended use:

  • provide clear context and constraints;
  • ask for assumptions and limitations;
  • request citations only when you can verify them;
  • test generated code carefully;
  • avoid uploading unpublished data unless the tool and account are approved for that use;
  • keep final scientific decisions under human control.

ChatGPT is helpful for first drafts and troubleshooting, but final results should always be checked by the researcher.

7.3 Claude

Claude can be useful for long-context reading, writing support, code explanation, and structured editing. It may be helpful for:

  • reading long documents;
  • reorganizing drafts;
  • comparing sections of text;
  • explaining complex code;
  • producing structured summaries;
  • improving project documentation.

Recommended use:

  • provide the specific task and expected output format;
  • check whether summaries preserve the meaning of the original text;
  • verify references and factual claims;
  • review any generated code before use;
  • avoid sharing sensitive or restricted data unless approved.

7.4 Open-Source Models

Open-source models such as Qwen, DeepSeek, and related model families may be useful when local deployment, customization, cost control, or data-governance considerations matter.

Potential use cases:

  • local coding assistance;
  • internal document summarization;
  • controlled experiments with language models;
  • reproducible benchmarking;
  • research prototypes;
  • workflows where data should not leave an approved environment.

Important considerations:

  • model quality varies by task and version;
  • local deployment requires computing resources;
  • outputs still need human verification;
  • licenses and usage terms must be checked;
  • security and data policies still apply;
  • benchmark results should be documented rather than assumed.

Do not use an open-source model for sensitive work simply because it is open source. The deployment environment, access control, logs, and data handling still matter.

7.5 Coding With AI

AI tools can speed up coding, but generated code must be reviewed.

Good use cases:

  • explaining unfamiliar code;
  • writing small helper functions;
  • generating tests;
  • translating code between R and Python;
  • drafting command-line scripts;
  • suggesting debugging steps;
  • documenting functions.

Required checks:

  • read the generated code;
  • test it on small input;
  • check edge cases;
  • confirm package functions and arguments exist;
  • make sure paths and file operations are safe;
  • avoid overwriting data accidentally;
  • use version control before major changes.

Never run code that you do not understand on important data.

7.6 Writing With AI

AI tools can help improve writing clarity, structure, grammar, and tone.

Appropriate uses:

  • improving readability;
  • drafting outlines;
  • summarizing your own notes;
  • generating alternative phrasings;
  • preparing plain-language explanations;
  • checking consistency across a document.

Use caution with:

  • literature claims;
  • citations;
  • quantitative statements;
  • novelty claims;
  • clinical or biological interpretation;
  • text that may need journal-specific disclosure.

Do not let AI invent references, results, limitations, or author contributions.

7.7 Data Privacy And Security

Before using any AI tool, consider what information you are sharing.

Do not upload or paste:

  • identifiable human-subject data;
  • confidential collaborator data;
  • unpublished sensitive results;
  • grant or manuscript content under confidentiality restrictions;
  • passwords, API keys, tokens, or private keys;
  • proprietary data unless approved.

When in doubt, ask the PI before using an external AI service.

7.8 Responsible Use In Research

AI assistance should not obscure who did the work or how results were produced.

For research outputs:

  • keep human oversight over scientific interpretation;
  • document AI-assisted steps when they materially affect the work;
  • follow journal, conference, university, and funder policies;
  • verify citations and factual claims;
  • reproduce analyses independently of AI-generated suggestions;
  • be transparent with collaborators when AI use affects shared work.

AI tools are useful when they make research clearer, faster, or more reproducible. They are harmful when they hide uncertainty, create unsupported claims, or make results harder to verify.

7.9 Practical Prompting

Good prompts are specific and include context.

Useful prompt elements:

  • task goal;
  • background context;
  • input data format;
  • expected output format;
  • constraints;
  • examples;
  • what should not be done;
  • whether citations or verification are required.

Example:

I am writing an R script to clean LC-MS feature tables. Please suggest a safe workflow.
Do not assume compound identities from MS1 features. Include checks for missing values,
duplicate feature IDs, sample metadata matching, and output file naming.

7.10 When To Ask The PI

Ask the PI before using AI tools when:

  • the data is sensitive or unpublished;
  • collaborators have not approved external tool use;
  • the work involves human-subject information;
  • the AI output will affect a manuscript, grant, or official report;
  • you plan to deploy an open-source model on lab or institutional resources;
  • you are unsure about disclosure requirements.

When used responsibly, AI tools can be a strong part of the lab workflow. The key is to keep research traceable, verifiable, and scientifically honest.