We analyse the metallicity histories of ∼4500 galaxies from the GAMA survey at z < 0.06 modelled by the SED-fitting code
PROSPECT using an evolving metallicity implementation. These metallicity histories, in combination with the associated star
formation histories, allow us to analyse the inferred gas-phase mass–metallicity relation. Furthermore, we extract the mass–
metallicity relation at a sequence of epochs in cosmic history, to track the evolving mass–metallicity relation with time. Through
comparison with observations of gas-phase metallicity over a large range of redshifts, we show that, remarkably, our forensic
SED analysis has produced an evolving mass–metallicity relationship that is consistent with observations at all epochs. We
additionally analyse the three-dimensional mass–metallicity–SFR space, showing that galaxies occupy a clearly defined plane.
This plane is shown to be subtly evolving, displaying an increased tilt with time caused by general enrichment, and also the
slowing down of star formation with cosmic time. This evolution is most apparent at lookback times greater than 7 Gyr. The
trends in metallicity recovered in this work highlight that the evolving metallicity implementation used within the SED-fitting
code PROSPECT produces reasonable metallicity results over the history of a galaxy. This is expected to provide a significant
improvement to the accuracy of the SED-fitting outputs.