This discussion is very helpful and it shows that sometimes even the native speakers have doubts. I'd say that words "pametnjaković" and "pametnjakovićka" have negative connotation whereas "pametnica" and "mudrica" have more positive meaning. There is another word that we forgot about. It has no positive meaning in colloquial usage - "štreber" (German origin). "Smarty" may also have negative meaning - know-it-all, wise guy, smart aleck... I might be too much into details, but it might be helpful. "Štreber" represents a person who studies constantly, usually has low social skills, not interfering with others... or just studies more than his counterparts.
All in all, if you want to give a compliment, use Kamenko's suggestion.