Drawing a duplicate creates one of the most common decision points. Here is how to decide.
The Decision Framework
Consider: what is the rank, what is your hand state, and what phase of the game are you in.
Keep Both When
Keep when they are middle cards (4-8) that can form sequences in either direction, or when you are early in the game.
Discard When
Discard when the card is a high-value face card and you are near completion, or when the duplicate has low utility.