With the increasing integration of AI in education, understanding how students engage cognitively in AI-assisted learning is crucial. Cognitive engagement in AI-assisted learning is important because it helps students interact meaningfully with AI tools, process information critically, and enhance their learning outcomes through effective AI-driven feedback and responses. To improve response quality in AI, one effective method is utilizing prompting techniques, which guide AI to generate more accurate, relevant, and structured responses, enhancing student learning experiences. This research investigates students' cognitive engagement when learning with AI-based tools using different prompting techniques, including Zero-Shot, Chain of Thought, Interactive Prompting, and Elaborate Prompting. A total of 54 students participated, and their engagement was assessed using a cognitive engagement questionnaire. The results, analyzed through a One-Sample T-test, reveal that students demonstrate significantly positive in cognitive engagement when using prompting techniques in AI-based learning. Furthermore, the findings suggest that effective prompting enhances the quality of AI-generated responses, positioning AI Chatbots as valuable learning assistants. This study provides important insights into optimizing AI-based learning strategies, highlighting the role of prompting in fostering deeper student interaction and engagement with AI tools.