  The upcoming generation of optical spectrographs on four meter-class
telescopes, with their huge multiplexing capabilities, excellent spectral
resolution, and unprecedented wavelength coverage, will provide high-quality
spectra for thousands of galaxies. These data will allow us to examine of the
stellar population properties at intermediate redshift, an epoch that remains
unexplored by large and deep surveys. We assess our capability to retrieve the
mean stellar metallicity in galaxies at different redshifts and S/N, while
simultaneously exploiting the UV and optical rest-frame wavelength coverage.
The work is based on a comprehensive library of spectral templates of stellar
populations, covering a wide range of age and metallicity values and built
assuming various SFHs. We simulated realistic observations of a large sample of
galaxies carried out with WEAVE at the WHT at different redshifts and S/N
values. We measured all the reliable indices on the simulated spectra and on
the comparison library. We then adopted a Bayesian approach to obtain the
probability distribution of stellar metallicity. The analysis of the spectral
indices has shown how some mid-UV indices can provide reliable constraints on
stellar metallicity, along with optical indicators. The analysis of the mock
observations has shown that even at S/N=10, the metallicity can be derived
within 0.3 dex, in particular, for stellar populations older than 2 Gyr. Our
results are in good agreement with other theoretical and observational works in
the literature and show how the UV indicators can be advantageous in
constraining metallicities. This is very promising for the upcoming surveys
carried out with new, highly multiplexed, large-field spectrographs, such as
StePS at the WEAVE and 4MOST, which will provide spectra of thousands of
galaxies covering large spectral ranges at relatively high S/N.
