Transitive inference (TI) is a classic learning paradigm for which the relative contributions of experienced rewards and representation-based inference have been debated vigorously, particularly regarding the notion that animals are capable of logic and reasoning. Rhesus macaque subjects and human participants performed a TI task in which, prior to learning a 7-item list (ABCDEFG), a block of trials presented exclusively the pair FG. Contrary to the expectation of associative models, the high prior rate of reward for F did not disrupt subsequent learning of the entire list. Monkeys (who each completed many sessions with novel stimuli) learned to anticipate that novel stimuli should be preferred over F. We interpret this as evidence of a task representation of TI that generalizes beyond learning about specific stimuli. Humans (who were task-naïve) showed a transitory bias to F when it was paired with novel stimuli, but very rapidly unlearned that bias. Performance with respect to the remaining stimuli was consistent with past reports of TI in both species. These results are difficult to reconcile with any account that assigns the strength of association between individual stimuli and rewards. Instead, they support sophisticated cognitive processes in both species, albeit with some species differences.