Sounds like that system could use a rework. It would be much better if it had designated outcomes, with a small % chance of course. Also if you placed the same type in, you should receive the same in return. Example:

5x Strength I > 80% chance of getting Strength II or 20% chance of getting Strength I plus a Allagan piece.

5x Random Materia I > 80% chance of getting Random Materia II or 20% chance of getting Random Materia I plus an Allagan piece.

And then with each additional tier the % chance of increasing in level would go down 10% or so.

I > II = 80%
II > III = 70%
III > IV = 60%
IV > V = 50%
V > VI = 40%

However the Allagan Piece you get for each failed level would also increase making the blow not as bad. Tin, Bronze, Silver, Gold, Ect...