Create a custom field that will hold the GroupID (use the master record ID as the value for 2+ duplicate records).
Update the GROUPID field for the relevant records using your CSV (import the CSV file with the update option, use DataLoader, or use ZaapIT’s import for that).
Create a merge job with ZaapIT, using the GROUPID field as the main criteria.