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.
AI 工具可以帮助科研、写代码、写作、学习和头脑风暴,但必须谨慎使用。在 Shen Lab,AI 应该辅助科研工作,不能替代批判性思考、实验验证、数据检查和负责任署名。
本章介绍 ChatGPT、Claude、开源 Qwen、DeepSeek 及其他 AI assistants 的使用原则。
把 AI 工具当作助手,而不是权威。重要结论必须用可靠来源核查;未经批准,不要把敏感、私人或未发表数据粘贴到公共 AI 工具;当 AI 使用影响项目时,应记录 prompt 和 output;运行 AI 生成代码前必须检查;必要时按照 journal、funder、conference 或 collaborator 要求披露 AI assistance。
AI 生成的文字、代码、引用、摘要和分析计划都可能出错。使用者需要对输出负责。
ChatGPT 可用于解释概念、起草或润色文字、头脑风暴分析计划、调试代码、生成示例脚本、总结非敏感 notes 和改进文档表达。使用时应提供清楚背景和限制,要求列出假设和局限,引用必须自行核查,代码必须测试。未经批准,不要上传未发表数据。
ChatGPT 适合做 first draft 和 troubleshooting,但最终科学判断必须由研究者完成。
Claude 常用于长文本阅读、写作支持、代码解释和结构化编辑。它适合阅读长文档、重组 draft、比较文本、解释复杂代码、生成结构化摘要和改进项目文档。使用时同样需要核查摘要是否忠实原文、事实和引用是否可靠、代码是否可运行,并避免上传敏感或受限数据。
Qwen、DeepSeek 等开源模型适合需要本地部署、定制、成本控制或数据治理的场景。可能用途包括本地代码助手、内部文档摘要、语言模型实验、benchmark、research prototype,以及数据不应离开批准环境的 workflow。
需要注意:不同模型和版本质量差异很大;本地部署需要计算资源;输出仍需人工核查;license 和使用条款必须检查;security、access control、logs 和 data handling 仍然重要。不要因为模型开源,就默认它适合处理敏感数据。
AI 可以提高 coding 效率,但生成代码必须 review。适合的用途包括解释陌生代码、写小型 helper functions、生成 tests、R/Python 代码互译、起草 command-line scripts、建议 debugging steps 和补充文档。
运行前必须读懂代码,用小输入测试,检查 edge cases,确认 package function 和 arguments 是否存在,确保路径和文件操作安全,避免意外覆盖数据。不要在重要数据上运行自己不理解的代码。
AI 可以帮助提高写作清晰度、结构、语法和语气,适合润色、写 outline、总结自己的 notes、生成替代表达、准备通俗解释和检查文档一致性。
涉及 literature claims、citations、quantitative statements、novelty claims、clinical/biological interpretation 和需要 journal disclosure 的文本时要格外谨慎。不要让 AI 编造 references、results、limitations 或 author contributions。
使用任何 AI 工具前,都要先判断你分享了什么信息。不要上传或粘贴可识别人类受试者数据、保密合作者数据、敏感未发表结果、受保密限制的 grant/manuscript 内容、密码、API keys、tokens、private keys,或未经批准的 proprietary data。
不确定时,先问 PI。
AI assistance 不应掩盖是谁完成了工作,也不应让结果变得不可追踪。科研产出中应保持人工监督,记录对工作有实质影响的 AI steps,遵守 journal、conference、university 和 funder policies,核查引用和事实,并确保分析可以独立复现。
AI 工具有价值的前提是让研究更清楚、更快或更可复现;如果它隐藏不确定性、制造无依据结论,或让结果更难验证,就不应这样使用。
好的 prompt 应具体,并包含任务目标、背景、输入数据格式、期望输出、限制、例子、不要做什么,以及是否需要引用或核查。
示例:
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.
以下情况请先问 PI:数据敏感或未发表;合作者没有批准使用外部工具;涉及 human-subject information;AI 输出会影响 manuscript、grant 或 official report;计划在实验室或机构资源上部署开源模型;不确定是否需要 disclosure。
负责任使用时,AI 工具可以成为实验室 workflow 的重要部分。关键是让研究保持可追踪、可验证和科学诚实。