SamauSamau, 2 bytes
▌τ Hex dump:
dd ab Yes, it's 2 bytes. Samau uses CP737 as its default character encoding.
▌ read a number τ test if it is a prime τ uses the isCertifiedPrime function in the haskell package arithmoi. It's not a probabilistic algorithm.
There's also a 7-bytes answer if built-ins are not allowed:
▌;\│Σ2= Hex dump:
dd 3b 5c b3 91 32 3d Most mathematical functions in Samau automatically thread over lists.
▌ read a number, let's call it n ; duplicate \ range from 1 to n | return 1 for divisors of n, and 0 for the other numbers Σ take the sum =2 if the sum is 2, then it's a prime