Skip to main content
U.S. flag

An official website of the United States government

Official websites use .gov
A .gov website belongs to an official government organization in the United States.

Secure .gov websites use HTTPS
A lock ( ) or https:// means you’ve safely connected to the .gov website. Share sensitive information only on official, secure websites.

Taking Measure

Just a Standard Blog

Robots and AI Are Working Together to Bring You Better Medicines, Shampoo and More

Peter Beaucage wears safety glasses as he stands in the lab, holding a piece of equipment on display.

Reformulating a consumer product can take months of research and a lot of money. In the Autonomous Formulation Laboratory at NIST, AI helps develop “recipes” that can then be tested as part of product development.

Credit: M. King/NIST

Every time you squeeze toothpaste onto your toothbrush, spray perfume on your skin, or swallow a pill, you’re using the result of a carefully crafted recipe made in a lab. These are called formulations. 

Formulations aren’t just simple mixtures — they’re complex arrangements of ingredients designed to work together in specific ways. 

Getting the recipe right can mean the difference between a product that sits on the shelf (or never makes it to the shelf) and one that changes lives.

Here at NIST, we’re revolutionizing how scientists create and improve formulations. We hope the result will be better products you use every day. 

The process combines robotics, artificial intelligence and analysis of advanced materials. For example, we can use neutrons or X-rays to take pictures of how molecules millions of times smaller than a human hair are arranged in materials.

It’s not just about making better products. It’s about making them in ways that are faster and more efficient while leaving a lighter footprint on health and the environment. This happens in our Autonomous Formulation Laboratory (AFL) at NIST’s campus in Gaithersburg, Maryland. 

How Your Products Are Made Now 

Let’s say you own a shampoo company, and a key ingredient in your shampoo is no longer available due to supply chain issues. 

You now have to remake your formulation to put in a replacement ingredient. But what ingredient? How much of it? What if that new ingredient has an unintended consequence that affects other parts of the recipe?

This is the challenge of product formulation today. Reformulating a consumer product can take months of research and a lot of money. It often requires trial and error or expert know-how. While that knowledge is valuable, experts may have difficulty adapting to new or changing ingredients.

Three men in safety glasses pose standing around a large clear plastic box on a lab table. The box holds several small pieces of equipment.
NIST researchers Tyler Martin (left front), Peter Beaucage (right front) and Duncan Sutherland are using AI to help speed up and improve the product formulation process.
Credit: M. King/NIST

But as a scientific community, we can do better. NIST has experts who use tools to examine the structure of materials and measure them at the smallest scales. But the sheer number of samples would make this challenging to do in a traditional formulation lab. 

Enter AI. 

An Intelligent, Interactive Loop

Here’s how this process works:

Step 1: Precision Mixing

Much like cooking, we start by gathering the ingredients. Instead of putting them in an oven, we put them into small vials about the size of a film canister and tell a computer about what they are. The computer then controls a robotic system equipped with a pipette. This computer precisely measures and mixes tiny amounts of chemicals from different vials. The amount of mixture is minuscule — about 30 microliters, less than a dot of ink from a fine-tip pen.

Step 2: Advanced Structural Analysis

Once the sample is prepared, we analyze it at a very detailed level, using equipment that works like an advanced microscope. We call these advanced scattering techniques. 

These techniques allow us to observe how different chemicals organize themselves into larger structures within the formulation. We can then make predictions about how products will behave once our “recipe” is made. 

These scattering techniques usually happen at a neutron source, such as the NIST Center for Neutron Research on our Gaithersburg campus. They also sometimes happen at a machine about a half-mile long that makes incredibly bright X-rays, known as a synchrotron. 

Step 3: AI-Driven Optimization and Learning

Here’s where the magic happens. During the formulation measurement process, we collect a wealth of data and feed it into an artificial intelligence system. The AI analyzes the information, learns about it and predicts which formulation structure will work best given the manufacturer’s goals. It then instructs the robotic system to create this new formulation based on what it’s learned from past tasks. 

But it doesn’t stop there. The robot analyzes the new formulation and feeds the results back into the AI. With each iteration, the AI learns, refines its understanding and makes increasingly sophisticated predictions. It’s as if the system is thinking, learning and evolving its approach in real time.

Two researchers in safety glasses stand looking at a computer screen in a lab filled with equipment.
NIST researchers Peter Beaucage (left) and Tyler Martin (right) work at a computer in the lab.
Credit: M. King/NIST

This creates a loop of experimentation and improvement, dramatically accelerating the development process for medicines and other consumer products. What might have taken months or years of trial and error can now be accomplished in hours or days.

Of course, AI is not perfect, and you can’t trust it without extensive product testing. The companies involved in this process still test their products. AI helps them develop their “recipes” much more quickly and easily than they could before. 

Real-World Impact

In a recent collaboration with a pharmaceutical company, the AFL tackled a complex formulation issue in just hours — a process that might have taken months using traditional methods. 

By focusing on the structural arrangement of the formulation’s components and learning from each try, the team could quickly identify and resolve issues affecting the drug’s performance.

But the AFL’s impact extends beyond pharmaceuticals. 

We’re helping manufacturers improve a wide range of products by optimizing their structural compositions. This applies to everything from shampoos and paints to automotive fluids and cleaning detergents. 

The AFL can handle pretty much any liquid formulation right now. We’re exploring ways to adapt it to analyze structured solids in the future.

Making a Difference With Industrial Science 

Like a lot of people who do this type of work, I love an interesting problem. 

When I first came to NIST as a postdoctoral researcher, I was pretty naive. I’d worked in the specialty chemical industry for a time, but I thought that most industrial problems were closer to engineering than deep science.

But I started working on this project that involves pulling the salt out of seawater. This is how drinking water is made in many parts of the Middle East and South Africa. It’s being used at a massive scale, and no one really understands why it works. 

It was so eye-opening to see this incredible process responsible for keeping millions of people alive, and there are still fundamental questions about why it works. These questions hold us back from engineering something better. 

Through that work, I got involved with a consortium of companies that works with NIST, called nSoft. I quickly learned that this sort of problem was fairly typical.

Wherever I looked in the members’ science — from removable adhesive strips for hanging pictures on the wall to soap bubbles — there were deep, foundational questions about the universe involved. Teams of some of the brightest people I’ve ever met are looking at these questions and trying to understand. I was converted. 

Peter Beaucage stands in the lab holding up a vial of yellowish liquid.
In the Autonomous Formulation Laboratory, Peter Beaucage and other experts are revolutionizing the way product formulations, such as medicines and shampoo, are created and improved.
Credit: M. King/NIST

Just before the pandemic, my colleague Tyler Martin started a project that involved buying and building robots for automatic solution mixing. Tyler invited me to look at the hardware and help with a few small issues. When the devices arrived, I kept slipping out to the lab to work on the software for them and tinker with how they moved solutions around. I wanted to understand and exploit the capabilities to get real results. Eventually, this “hobby” became my main scientific focus.

This project has been so fulfilling to me. We’re getting great results and really solving meaningful problems with the companies we work with. What started as a small team of two has grown into a network of students, postdocs, scientific collaborators and other facility scientists who span the globe. 

When you get to come to work and build and troubleshoot robots to tackle fundamental questions about the universe that impact billions of people, you have a pretty great job. I’m especially lucky to work with the fantastic team we’ve built; there’s literally nothing I would rather be doing. I’m living my 10-year-old self’s dream life — building robots and changing the world. 

Looking Ahead

While this approach has tremendous promise, we need to scale it up so that more companies can use it in their product formulation processes. 

We’re publishing our methodology for anyone who wants to recreate it. We’re also working with the companies in the nSoft consortium and providing them with hands-on support in recreating this in other facilities like ours around the country.

As this technology continues to evolve, we can look forward to more effective and innovative products across a wide range of industries — all thanks to a system that never stops learning and improving.

About the author

Peter Beaucage

Peter Beaucage is a chemical engineer at NIST, focused on developing automated and autonomous experimental systems for small-angle neutron and X-ray scattering. Peter's Ph.D. in materials science and engineering at Cornell University focused on making superconductors with 3D mesoscale order using block copolymers. Peter is originally from Cincinnati, Ohio, where he received his B.S. in chemical engineering (cum laude) from the University of Cincinnati.

Related posts

Comments

Add new comment

CAPTCHA
Image CAPTCHA
Enter the characters shown in the image.
This question is for testing whether or not you are a human visitor and to prevent automated spam submissions.
Please be respectful when posting comments. We will post all comments without editing as long as they are appropriate for a public, family friendly website, are on topic and do not contain profanity, personal attacks, misleading or false information/accusations or promote specific commercial products, services or organizations. Comments that violate our comment policy or include links to non-government organizations/web pages will not be posted.