The game guide briefly explains the Caldesann’s Despair recipe: Mind the words “Ancient”, “Flawless Royal gem”, “Legendary Gem of Rank …”
https://us.diablo3.com/en/game/guide/items/kanais-cube#recipes
I have further explanation here.