Effect of chemical composition on ground state properties of Ce and Yb intermetallic compounds