A team of researchers has been using machine learning to teach a compact particle accelerator to produce customised beams for a number of different applications. This technique expands the conceivable range of applications for so-called laser-plasma accelerators, innovative compact next-generation accelerators that are currently under development.