The core principle is to always make those above you - your bosses, mentors, or superiors feel comfortably superior.
If you display your talents too aggressively, you risk triggering their deep-seated insecurities, which can lead them to sabotage your career or remove you from your position.
Galileo Galilei handled this really well. When he discovered the moons of Jupiter he strategically named them after the ruling Medici family.
By making the discovery about their greatness rather than his own intellect, he secured their lifelong patronage.
However, if your superior is a "fading star" or is clearly about to fall, you do not need to be merciful. In these cases, it may be strategic to outshine them to hasten their downfall and position yourself as the natural successor.