How to hide internal geometry

I wrote this shader some years ago that might be usefull in this situation.
Note that the back part of the object will also be rendered, just what’s inside the object won’t.

What do you mean by ‘alpha’? are you dealing with transparent shaders or refractive shaders?
Anyway, that script might work with transparent shaders as well…

Another thing you could do, is to set something like:
If Transparent ray * ray depth > 0, then full transparent; else your default transparent shader.