Is there a general rule of thumb you can apply here?
Chess isn't that easy.
The only applicable general rule that I can think of is that unmotivated exchanges will almost always be disadvantageous. Only exchange if you have something specific in mind.
I have been trying out the Nimzo-Indian Defense for the black pieces over the past couple of months and had reasonable success with it (i would still consider myself a beginner) but there are many variations in which the c and d pawns can either exchange or just stay at c5 and d5 (facing white pawns on c4 and d4) and i am never sure what to do. Is there a general rule of thumb you can apply here?