My contracts don't run that long, so I only have a clause for adjusting my firm's hourly rates at the beginning of each new calendar year.
I calculate them based on a mix of things. I consider CPI to adjust labor compensation, I look at direct and indirect costs/operating expenses and how they've changed, and I also look at construction costs in the region where I practice. The first two set a baseline to determine what I have to do in order to maintain my margins given my rising costs, and the second tells me what the market can likely bear so I can see what I can do to potentially increase my margins.
Best case scenario, the market increases more than my costs increase, and my margins increase. Worst case, my costs increase and the market contracts and my margins get gobbled up in the middle. (I suppose going into the red and having to shut down would be worse, but we'll not consider that here...)
Because these two both have a direct impact on my profitability but are not necessarily tied together, I'd be hesitant to tie the contract to them. If I had to choose, though, I'd probably go with CPI or whatever you tie your labor rates to. Because it's better to leave some money on the table but be sure that you can pay your bills than to see the market contract and your contract can no longer cover your expenses to do the work.