We have observed quantum well states on the Ag/Si(111) and Ag/β-Si3N4/Si(111) interfaces, by angle-resolved photoemission spectroscopy. This has been made it possible by the two-step growth technique, where silver is first deposited at low temperature and then is left recovering RT. The data display the full confinement of the electrons in the nitride gap for the Ag/β-Si3N4/Si(111) interface, at variance with the case of Ag/Si(111), where the QW states partially resonate with the continuum of the bulk silicon bands. Therefore, the nitride layer, although very thin (less than 1 nm), restores the vertical potential wall towards the highly n-doped silicon substrate, so that silver can show the valence electronic structure of a nearly free-standing layer.