According to Vedic tradition: Ego (Rishi) arises from the mind. The ego desires that which it perceives is lacking (not known). This initiates the process of knowing (Devata) which arises in the intellect. The known (Chandas) is then inventoried in the mind as memory, and it's from these stored memories that the desires of the ego rise again and again.
Rishi, Devata and Chandas: Rishi (I am, ego) is the knower and is ruled by Sun. Devata (intellect) is the process of knowing and is ruled by Mercury. Chandas (mind) is the known and is ruled by Moon.
Rishi is the knower or ego of the jiva. Each one of us senses this knower aspect of ourselves. It is that aspect that we identify as our Self. Rishi is a viewpoint of the universe that is uniquely personal, like a window through which an individual perceives the world.
Devata is the intellect or faculty of discrimination which connects the knower with the known, and completes the circuit that gives rise to knowledge.
Chandas: In the self-referral process of knowing, rishi becomes devata and devata becomes chandas and chandas is the new knowledge, which is the new rishi. The new rishi is different from the original rishi because of the assimilation of the knowledge.