You may be thinking of "The Fun They Had", a 1951 short story by Isaac Asimov, which was also the answer to this old question and this one and this one, and part of the answer to this one. It has been reprinted in many places, including The Magazine of Fantasy and Science Fiction, February 1954, available at the Internet Archive . The story has its own Wikipedia page, and the text is available here.
The A.I. was in the kid's room, who only had to learn from it for a couple hours a day, and could then go play outside with the other neighborhood kids. It completely replaced traditional school - everyone had one.
Margie went into the schoolroom. It was right next to her bedroom, and the mechanical teacher was on and waiting for her. It was always on at the same time every day except Saturday and Sunday, because her mother said little girls learned better if they learned at regular hours.
The screen was lit up, and it said: "Today's arithmetic lesson is on the addition of proper fractions. Please insert yesterday's homework in the proper slot."
Margie did so with a sigh. She was thinking about the old schools they had when her grandfather's grandfather was a little boy. All the kids from the whole neighborhood came, laughing and shouting in the schoolyard, sitting together in the schoolroom, going home together at the end of the day. They learned the same things so they could help one another on the homework and talk about it.
And the teachers were people. . . .
I think it learned the child's learning style to better teach them.
"And all the kids learned the same thing?"
"Sure, if they were the same age."
"But my mother says a teacher has to be adjusted to fit the mind of each boy and girl it teaches and that each kid has to be taught differently."