How does RNA polymerase determine which one is the template strand?
The RNA polymerase itself does not differentiate between two strands of the DNA. Instead, it is guided by the orientation of initiatory complex (composed of transcription factors). Initiatory transcription factors can recognize specific nucleotide sequences on the promoter, therefore, these proteins choose the template strand.