The Rig Veda, the earliest Vedic text, introduces the concept of varna which formed the basis of the later Varnashrama system.