It’s random. Functionally though, most use-cases for the xG3 (lifting small objects, detecting large current pulses) don’t distinguish between magnet poles. What did you have in mind?
My significant other and I got our first magnet implants together. We worked with my body mod artist to arrange the magnets with opposite polarities facing outward. For awhile, we could stick together. Eventually our magnets failed and she decided not to get another one until they’re sorted. It was an interesting experiment, though.
Unlike programming an x-series transponder implant, you could probably detect the orientation of an xG3 through the syringe. Start with a weaker ceramic or bar magnet, and hold it parallel to the injector near the plunger side. Don’t put a magnet near the syringe side, you don’t want it rushing out of the syringe and somehow popping the safety cap off. Also the metal will weaken the field from that side, so it would be harder to detect.