Learning by teaching is an important generative learning strategy which mainly promotes learners' knowledge building in educational psychology. It refers to learners teach others what they have learned as the role of a teacher after learning the materials. However, learners cannot fully retrieve all concept units contained in learning materials in the retrieval activities of learning by teaching, which hinders learners' active generation and final learning performance. According to the Retrieval Practice Theory (RPT) and Generative learning Theory (GLT), prompts can serve as a cue and activates learners' retrieval and generating activity. Therefore, the aim of current study was to explore the effects of different types of prompts on learning outcomes and subjective perceptions in learning by teaching. In Experiment 1, fifty-six college students were randomly assigned to teaching group and control group. Participants in teaching group were told to explain the learning materials by making a lecture video, then complete a final exam. The control condition didn't include teaching process. In Experiment 2, Participants were one hundred and fourteen college students that were randomly assigned to picture-prompt group, text-prompt group, keyword-prompt group and non-prompt group. Four conditions all include teaching process. The difference between conditions is whether there is a prompt when learners are teaching. In Experiment 3, to compare the effects of learners' passive reception and active generation of prompts, eighty-seven college students were randomly assigned to keyword-prompt group, generated-prompt group and non- prompt group. The results showed that: (1) the retention and transfer test performance of the teaching group were better than that of the control group; (2) picture and keyword prompts could effectively improve learners' retention test scores, while keyword prompts could also improve learners' transfer test scores; (3) the retention test performance of the keyword- prompt group and the generated- prompt group were better than those of the non-prompt group, while the transfer test performance of the generated-prompt group were better than those of the non-prompt group; (4) Experiment 2 and Experiment 3 both found that the number of concept units plays a mediating role in the effect of prompts on learning performance. The conclusions are as follows: (1) Providing picture prompts in the process of learning by teaching can promote knowledge retention, while providing keyword prompts can promote knowledge retention and transfer; (2) Compared to passively obtaining prompts, learners' active generation of prompts is more conducive to knowledge transfer. (3) The number of idea units generated by learners plays a mediating role in the effect of prompts on learning. Above all, the study verified the effectiveness of RPT and GLT in the process of learning by teaching in multimedia learning environment.