Automated reliability assessment for spectroscopic redshift measurements