AI as a tool for teaching critical thinking: a case study