Automatic question generation (AQG) has been researched extensively for educational purposes. This study proposed an automatic system for generating contextualized and personalized mathematic word problems (MWP) in authentic contexts using the Generative Pre-trained Transformers (GPT). It comprises (1) authentic contextual information acquisition through image recognition by TensorFlow and augmented reality (AR) measurement by AR Core, (2) a personalized mechanism based on instructional prompts to generate three difficulty levels for learner’s different needs, and (3) MWP generation through GPT. A quasi-experiment was conducted using 52 fifth-grade students to evaluate the effectiveness of the proposed AQG on their geometry learning performances. The learning behaviors were analyzed concerning authentic context, mathematics, and reflective behavior aspects. The results revealed that students who learned with the proposed AQG outperformed students who learned with a decontextualized way on geometry learning performances. Moreover, it was found that learning behavior related to authentic context (i.e., problem context understanding and identifying contextual information) and mathematics (i.e., applying math concepts and the total number of the correct solution for medium-level MWP) significantly improved geometry learning performances. Meanwhile, learners showed positive perceptions toward the proposed AQG. Therefore, our proposed AQG is useful to promote geometry problem-solving activity in an authentic context.