Abstract In the era of artificial intelligence, this paper uses big data analysis to construct a data model of the knowledge system of law, with the help of clustering analysis, cluster students and resources to form a structured knowledge system of law. Combined with the natural language model, which accurately extracts important information, it provides personalized learning resources for students. Eventually, the teaching content is dynamically adjusted according to students’ characteristics, resulting in the integrated design of a personalized teaching mode. The comparison found that the achievement improvement of students using the traditional teaching mode only ranged from 1.8% to 12.6%, and the achievement improvement interval was from 1.9 to 12.6 points. After applying the AI model-based instructional model, the relative improvement in student performance ranged from 19.2% to 19.8%, with an improvement interval of 14.2 to 15.7 points. The students showed a significant teaching effect by demonstrating a 25-point increase in their communication skills performance compared to the control class.