Skip to main content
All posts
Protocols4 min read

Let each round's results choose the next conditions to test

This is how to optimize a lab protocol with AI: test a spread of conditions, fit a model to the readout and let it choose the next round. Elnora plans each round and writes the run, and a scientist approves it.

Carmen Kivisild

Carmen Kivisild

Founder and CEO

The answer to how to optimize a lab protocol with AI, when the protocol has many variables, is a loop: test a spread of conditions, fit a model to the readout, and let the model choose the next set, so each round starts from everything measured so far. Run that way on a cascade of three enzymes, Bayesian optimization reached optima comparable to a design of experiments with a third as many tested conditions.

A three-enzyme cascade, where the product of the first enzyme is the substrate of the second, has to be tuned for the ratio of the three enzymes, the pH, the temperature and the buffer composition at once. Adding more of the first enzyme helps the yield as long as the second keeps up with the intermediate, and the pH that suits one enzyme can slow another, so the settings have to be found together.

A cascade has too many interacting settings for a fixed grid

The number of combinations multiplies with each variable a scientist adds, so a grid that tests each setting at a handful of levels outgrows a stack of plates long before it covers the space. A design of experiments, a statistical plan that picks a spread of conditions to cover that space in fewer runs, cuts the count a long way, and it is still a plan fixed before the first result comes in.

The loop keeps the plan open. After each round the lab knows more about where the good conditions are, and the next round goes there.

Bayesian optimization picks the next conditions from the results so far

Bayesian optimization fits a statistical model of how the readout depends on the conditions, and that model also estimates how uncertain it is in each part of the space. It then picks the next conditions where a better result is most likely or where the model knows least, and each new round of measurements updates the model before the following round is chosen.

That is why it reached comparable optima with threefold fewer conditions than a design of experiments on the same cascades. The design spends runs on corners of the space that the first results have already shown to be poor, and the loop stops spending them there.

Small volumes and a label-free readout let the loop run for a week

A loop like this gains most when each round is cheap and fast. On a droplet microfluidic system using about 12 µL of aqueous phase per condition, at roughly 650 to 1,300 conditions a day, the loop completed 100 cycles and ran for seven days without anyone touching it, testing about 7,400 conditions in about 295,000 reactions.

The loop needs one number per condition and any readout that gives it works. One cascade, a pathway that detects glycerol, was read by fluorescence. The other, a pathway that breaks down 1,2,3-trichloropropane, was read by Raman spectroscopy, which identifies molecules by how they scatter light and needs no fluorescent label, so a reaction with no convenient dye can still be scored round after round.

A scientist sets the objective and reads the analysis

A week of a loop like this produced 2.1 GB of data. AI agents, software that takes a task, writes and runs code to do it and reports back, processed that data, found the patterns in it and wrote the summary. When five agent systems were compared on the same data for processing, multivariate analysis and reporting, three completed the tasks and two failed at the first one, so the scientist reads the analysis before the next round is pipetted.

The loop is also strongest when success is a single measured number, and a cascade that has to balance yield against enzyme stability or cost needs a scientist to write that trade-off into the objective and set the bounds of the search.

Elnora plans each round and a scientist approves the run

Elnora is the AI agent for lab work, and on an optimization like this one it designs each round, writes the run for the lab's own instruments and fits the results to choose the next round, while a scientist sets the objective and approves each run.

Say a scientist tuning a three-enzyme cascade on 96-well plates read by fluorescence asks Elnora to find the enzyme ratio, pH and buffer strength that give the highest signal, using at most four plates per round. Elnora searches the lab's knowledge base for earlier runs with these enzymes and lays out the first round as a design of experiments across the ranges the scientist set, with blanks and a reference condition on each plate. A critic agent reviews that layout, grading each problem it finds, such as a reference condition sitting in the edge wells, and suggesting a concrete change before anything is pipetted.

Elnora then writes the liquid-handler workflow in the scripting library the lab's automation platform already uses and runs it in simulation. The run pauses to print the deck it expects, position by position, until the operator confirms the bench matches. Once the fluorescence is read, the export from the plate reader is bound to the plate map, which gives Elnora a single table of signal against enzyme ratio, pH and buffer strength for each well.

The Z prime check marks any plate whose controls sit too close together to trust. Elnora then fits a Bayesian model to the results in its sandbox, the isolated workspace where it runs code, and proposes the conditions for round two.

Each round's table goes into the knowledge base beside the protocol that produced it, so round two, and the next cascade anybody in the lab tunes, starts from what this one measured. The scientist sets the objective and the ranges, confirms each deck, and decides when the best condition is good enough to write into the protocol.

Questions this post answers

How do I optimize a lab protocol that has many variables?
Run it as a loop: test a first spread of conditions, fit a model to the readout, let the model choose the next set and repeat. Used this way on three-enzyme cascades, Bayesian optimization reached optima comparable to a design of experiments with threefold fewer tested conditions.
What is Bayesian optimization in a lab experiment?
It is a method that fits a statistical model of how a readout depends on the conditions, including how uncertain the model is in each region, and picks the next conditions where a better result is most likely or the model knows least. Each round of measurements updates the model before the next round is chosen.
Can an AI agent analyze the data from an automated protocol optimization?
Yes. When five AI agent systems were given 2.1 GB of data from a week-long enzyme cascade optimization, three completed the processing, multivariate analysis and reporting, and two failed at the first task. A scientist reads the analysis before the next round runs and writes the trade-off between yield, stability and cost into the objective.
How does Elnora help optimize a protocol over several rounds?
Elnora lays out each round as a plate map, writes the liquid-handler workflow, simulates it and pauses for an operator to confirm the deck. The plate reader file binds to the plate map, Elnora fits a Bayesian model to the results and proposes the next round's conditions, and a scientist approves each run.
Carmen Kivisild

Carmen Kivisild

Founder and CEO, Elnora

PhD in molecular biology, ran a wet lab before founding Elnora. Writes about running a company with agents and about what scientists actually need from them.

Keep reading