As Beacon Hill gears up to debate changes to the criminal justice system, a new poll shows that most voters think the goal of the system should be prevention and rehabilitation instead of punishment.

According to MassINC Polling Group, 41 percent of voters say prevention, education and youth programs should be the top priority of the criminal justice system, while 25 percent said rehabilitation programs for inmates.

“Massachusetts voters across the political spectrum see the need for major change to the criminal justice system,” MassINC Polling Group president Steve Koczela said upon release of the poll.

The findings come as the Legislature prepares to debate a bill to address programs and services for incarcerated criminals this summer. That bill, offered by Gov. Charlie Baker and supported by Legislative leaders, does not address mandatory minimum sentencing, a topic justice activists say is crucial to lowering the prison population.

The poll found that 46 percent of voters say judges should have sentencing discretion within guidelines, and 41 percent think judges should have total discretion. But only eight percent think mandatory minimum sentences should be required.

Beacon Hill leaders say a debate over sentencing reform will have to wait.

The poll also found that 94 percent of voters feel safe in their neighborhood.