How to Write Good Prompts in Drylab

Get Started

No headings found on page
The Core Principle

Specificity beats brevity. A well-formed prompt gives the AI enough context to act without asking follow-up questions. Think of it as briefing a skilled scientist — tell them the data, the goal, and any constraints.

The Anatomy of a Good Prompt

[What you have] + [What you want] + [How you want it] + [Any constraints]

For Analysis Tasks

Weak vs Strong Prompts

Weak Prompt

Strong Prompt

"Analyze my data"

"Load the CSV at data/samples.csv, filter rows where pvalue < 0.05, and plot a volcano plot colored by log2FC"

"Do clustering"

"Run Leiden clustering on the AnnData object with resolution 0.5 and plot UMAP colored by cluster"

"Make a plot"

"Plot a boxplot of gene_expression grouped by condition, with individual data points overlaid, saved as PDF"

"Run differential expression"

"Run Wilcoxon rank-sum DE between treated vs control in adata.obs['group'], FDR < 0.05, log2FC > 1"

For Research Tasks

Weak Prompt

Strong Prompt

"Find papers about cancer"

"Search for papers on KRAS G12D inhibitors in pancreatic cancer published after 2022"

"What is BRCA1?"

"Summarize the role of BRCA1 in DNA double-strand break repair and its clinical significance in breast cancer"

"Find drug targets"

"Query DrugBank for FDA-approved drugs targeting EGFR and return their mechanism of action and approval year"

Prompt Templates by Task Type

Loading & Exploring Data

Load [file path or dataset name]. Show the first 5 rows, number of rows/columns, and data types of each column.

Statistical Analysis

Run [test name] comparing [group A] vs [group B] in the [column name] column. Use a significance threshold of [value] and correct for multiple testing using [method].

Visualization

Plot a [plot type] of [variable] grouped by [category]. Use a colorblind-safe palette, add axis labels, and save as PDF to the output folder.

Database Query

Query [database name] for [gene/protein/drug name]. Return [specific fields: e.g. pathways, interactions, variants].

Pipeline / Workflow

I have [data type] data at [file path]. Run [pipeline name] with [key parameters]. Save results to [output path].

7 Rules for Better Prompts
  1. Name your files and columns — say data/expr.csv, column "log2FC", not "my file"

  2. State the goal, not just the action — "I want to identify differentially expressed genes between tumor and normal" gives the AI context to choose the right method

  3. Specify thresholds — FDR cutoff, minimum cell count, resolution, number of clusters

  4. Mention the output format — "save as PDF", "return a table", "print the top 10 results"

  5. Say what organism/genome — human, mouse, GRCh38, mm10 — this matters for databases and pipelines

  6. Reference prior steps when continuing — "Using the filtered AnnData from the previous step, run PCA with 50 components"

  7. One task per prompt — if you need 5 things, ask them in sequence so you can verify each result

When to Add More Context

Add context when the task involves:

  • Custom data — describe columns, format, units

  • Scientific decisions — explain the biological question

  • Preferences — color scheme, figure size, statistical test preference

  • Constraints — memory limits, time limits, specific package versions

Quick Checklist Before Sending a Prompt
  • [ ] Did I specify the data source (file path, database, variable name)?

  • [ ] Did I state the exact goal?

  • [ ] Did I include key parameters (thresholds, methods, group names)?

  • [ ] Did I specify the output format?

  • [ ] Is this one focused task, or should I split it into steps?

Related Tutorial

Science is ready for a leap forward.
Join us and make it happen.

Science is ready for a leap forward.
Join us and make it happen.

Science is ready for a leap forward. Join us and make it happen.