I like the idea conceptually since it rewards diplomatic/stealth solutions. In a system with different leveling pathways with dedicated XP to each one would be really interesting.
But D&D is essentially a combat system, how your mage will learn powerful spells if he essentially talks his way through?