The commissioner shall establish and administer a pretrial services program that provides a pretrial risk assessment for all defendants detained in custody in a correctional facility following arrest and for any defendant for whom the prosecution requests to have a pretrial risk assessment at the next hearing or arraignment. The pretrial services program shall make recommendations to the court concerning pretrial release decisions and provide supervision of defendants released while awaiting trial as ordered by the court.