The best approach to using AI for assignments is to clear it with your instructor before you do so. Some instructors place requirements for AI in their syllabus, others may give oral instructions. Permission to use AI may vary from assignment to assignment. It is the responsibility of the student to ensure that they are operating within the expectations of their course.