My understanding of the research is that the most effective correctional programs take place when offenders are motivated to be involved in those programs, which is usually earlier in their sentences rather than later in their sentences. Those programs can be effective when offenders have the cognitive abilities to achieve success in them, and that means basic literacy and educational requirements have to be addressed first. Those programs work best when they are tailored to the specific needs or deficits that offenders may have. If they are fetal alcohol-affected or are otherwise brain-injured, or if they have mental health issues, you have to address those underlying issues.
All of that being said, when you're dealing with mentally ill offenders, for example, the best way to prevent future criminality is to treat that mental illness, but we're talking about a prison system and not a health system. The best way to ensure that these folks don't come into conflict with the law, I suppose, is to make sure they're getting adequate services and the treatments they need in the community before they enter corrections. This is an area that's well beyond my scope or mandate, but certainly in other jurisdictions, particularly the United States, there has been a lot of work in looking at how to use increased diversion, mental health treatment courts, and those kinds of initiatives to prevent mentally ill offenders who have come into conflict with the law from being incarcerated .
To conclude, I think it's fair to say, based on the research, that if offenders don't get the benefit of rehabilitative programs while they're incarcerated, then there's no reason to expect that their behaviour will be terribly different upon their release.