baSeq Chat & the AI engine
baSeq uses AI in two distinct ways: an engine that writes and runs your analysis code, and an assistant that helps you interpret it. Knowing the difference helps you trust and use both.
Two separate systems
- The analysis engine
- Runs when you submit a step. It writes Python for that step against your real data and runs it, returning a plot, table, and explanation.
- baSeq Chat
- Answers questions and interprets your results. It cannot run steps or change your data.
baSeq Chat
Open the assistant from the Chat button in the small floating bar of icons in the bottom corner of the workspace, alongside a Notes button (a per-session scratchpad, see The analysis workspace) and a Workflow button (see Plan a whole workflow). Type a question in plain language and the answer streams back as it is written.
Give it your results as context
By default the chat is set to Current step, so it automatically sees the plot and result you are looking at, with no extra clicks. The context picker next to the message box also offers No context, All steps, or any individual completed step. When a step is attached, the assistant sees that step's plot, its results table, and the code that produced it, so it interprets your data rather than generic examples. For a differential-expression step it focuses on the top significant genes. For GSEA, the top pathways.
What it will and will not do
- It interprets plots and results: what the figure shows, what patterns to look for, what they may mean biologically, and sensible next steps.
- It only recommends steps that exist in your pipeline, and it checks that prerequisites are met before suggesting one.
- It knows every analysis step by its exact name in the app, so it can point you to the right one in the step bar.
- It can describe the settings you chose for steps you have already run, and refer to your recent results.
- It can tell you the platform's standard thresholds when you ask (for example, a gene counts as significant when its adjusted p-value is below 0.05 and its absolute log2 fold-change is above 1.0), but it will not make up other numbers.
- It does not invent numbers, p-values, gene lists, or cluster names. If it needs a detail, it asks.
- It can look things up in public sources when that helps an answer: articles in Europe PMC (which includes PubMed), what a gene's protein does in UniProt or NCBI Gene, and public datasets in GEO. A line over the answer says what it looked up, it cites what it used as [1], and the sources it cited are listed under the answer. Those services get only the search words; a word that looks like one of your sample, dataset, analysis or project names, an email address or an internal code is kept back, and the line says so. It does not search the open web.
- For human and mouse genes, it knows what public records say about them, from baSeq's own copy of Open Targets, refreshed with each release: how many papers name each gene with the disease your analysis is about, genetic studies of the disease, mouse models, the drugs that act on a gene, research compounds, what blocking a gene is known to do (curated safety reviews), whether a drug could reach its protein, whether cell lines depend on it (DepMap) and how people tolerate losing one copy (gnomAD). For a mouse gene, all but the mouse models are its human counterpart's (Ensembl's orthologs), and the answer says so. An analysis that names no organism is taken to be the one its genes show. Ask about the genes you name, or about your result's genes (Which of the genes higher in non-responders are new for ulcerative colitis?), and the answer joins those records with your numbers and with your other analyses where the same genes changed. The line over the answer says what it looked up, and each record it used is listed under it. The copy is on baSeq's server, so your list of genes is not sent anywhere; only the few papers and genetic studies an answer reads are fetched by their public IDs. Drugs are named by what they do; how far a drug got in trials is shown only to accounts that have it switched on.
- When what was looked up is not enough, it reads more while it answers (papers by subject or by their authors, a paper you link, GEO records, genes, your data and your other results), and the line over the answer names each look-up. Ask it to fill in the analysis's Context and it writes the fields for you to check and save.
- It can run steps and workflows and save to Notes. It checks each against your data first, and puts it on a card under the answer: Run step runs a step with the settings from the conversation, and Set up this step opens it filled in for you to check and Submit. Choose Always allow on a card and, in that analysis, the chat starts what you ask for itself, follows it, and tells you what came out when it finishes, until you choose Ask first. A step it only recommends still waits for you.
The assistant and the Workflow planner
If you describe a whole analysis rather than a single step, the assistant points you to the Workflow planner, opened from the Workflow button in the small bar of icons in the bottom corner (next to Chat and Notes). There you type what you want to achieve, click Preview plan to review the proposed steps, then run them in order. When you ask the assistant for a bigger piece of work, it sets it up there as a workflow, and with Always allow it starts it for you. The planner becomes available once your data is uploaded and set up.
When a step asks for genes, a gene set, or a pathway, ask baSeq Chat. For example: "Which genes should I look at for T-cell exhaustion?" Then paste its suggestions into the step.
The referee
A third use of AI, on request: Referee in a plot's toolbar asks a second model to review that one result, from its parameters, code, table and plot, the sample design and the steps before it. It answers with at most three one-line findings, each marked Major, Minor or Note, or No concerns. See The analysis workspace.
The analysis engine, step by step
When you submit a step, here is what happens behind the progress bar:
-
Pre-flight check
Before any code is generated, baSeq looks at your current data and the step's prerequisites (for example that clustering or PCA has run, or that there are enough replicates). Steps that are not ready are flagged before you click: hover the step and it tells you why in plain language, naming the step to run first (such as "Run PCA first."), noting that a step does not apply to this session's organism, or pointing to a data issue such as needing at least two replicates. A guaranteed failure, such as a singular experimental design, is stopped up front with a clear explanation.
-
Code generation
It reads the real structure of your data (the actual columns, categories, and computed results) and writes Python for the step that references your real labels rather than guessing.
-
Sandboxed execution
The code runs in an isolated environment, sealed off from the internet apart from the reference databases a step reads. Your plot and table are saved and shown to you as soon as they are ready.
-
Automatic retry
If the code fails, baSeq rewrites the step and tries again. If it still fails, you see the actual reason, not a generic message: for example a missing result or column, a gene that could not be found, or that the step ran out of memory. When the problem is the experimental design itself (a singular, rank-deficient design, for example two confounded factors or a group with too few replicates), baSeq stops right away rather than retrying, because rewriting the code cannot fix a data and design issue.
-
Explanation
A moment after the plot appears, a written summary and detailed explanation are added to the Details tab.
After automatic retries, a step may still fail on unusual data or an ambiguous request. Open the step again and adjust the free-text prompt to be more specific, then submit. The chat can help you phrase it.
When you use the Workflow planner, the preview may flag a step that would fail as planned (for example a group with too few replicates) in a "Heads up" note, so you can adjust before running.
Reproducibility and provenance
Every step stores the code that ran, the parameters, and the data it read and produced, and each session uses a fixed random seed. That means you can reproduce a result, see exactly how it was made (open the Code tab), and export the underlying data object. See Core concepts and Results, reports & downloads.
Text written by AI is marked
A line under the chat box says its answers are written by an AI model and can be wrong. A result's
Details and a Referee note say the same of themselves. The PDF report says under its title which of
its texts a model wrote (captions, methods, references) and which model; the notebook says so in its first cell and
the slides on their first slide. The reproducibility package holds ai_generated.json, which lists the
files with text a model wrote, with the model and the date. Plots and tables are the analysis's own results, and a
lab script's step writes its explanation without a model.
Your data and privacy
To generate code and explanations, baSeq sends the structure of your dataset (column names and the values of design columns such as condition or batch), result tables and plots of completed steps, and any context text you type to its AI providers, OpenAI and Anthropic, under data processing agreements. Sample, donor and patient identifiers are replaced by tokens before sending and swapped back in what comes back; you can turn this off under Account, and a lab's owner or admin can require it for every member. If that cannot be done, nothing is sent. A Danish CPR number in what you write is removed before anything is sent, also with the tokens turned off. Raw reads, raw count matrices and whole uploaded files are not sent; plots go as images, so a name drawn on a plot is not replaced; reading an uploaded table's layout sees its column names and a few gene identifiers, never its counts. The full list of companies that receive data, with what they get, where they are and how long they keep it, is at baseq.dk/agreements/subprocessors. How baSeq handles personal data, and your rights, are in the privacy notice. If you work with embargoed or confidential data, confirm your organization's policy and ask the team at [email protected] about deployment options before uploading.