If a decision split activity on Journey Builder is based on a DE that has multiple entries for a Contact, which record is used for the decision making, is it random or the latest?
Actually neither one. JB will use all records. What will define the record that will be used is the order of the checks you had configured at the decision split.
So the first check that returns true will define the way the Contact will follow.
There is a Contact that has 2 records and a field named value. Let say one record with the value equals 1 and other with the value equals 2.
If you check if the value is equal 1 first ant if is 2 after, the way the Contact will follow is the 1. If you check if its is 2 first and 1 after the way that the Contact will follow is 2.
I also faced this issue and you can ensure the correct entry is selected when using a custom entry event with transaction keys.
Further information can be found in this related question: Decision Split not evaluated correctly for multiple entries to data extension (Contact Data entry event).
I also set up an example for such a custom event on my github account: Salesforce Marketing Cloud - Custom Event with Transaction Key