Allegri demands defensive concentration from Juve
The league leaders powered to victory at the Stadio Olimpico via goals to Carlos Tevez, Leonardo Bonucci and Alvaro Morata, but Allegri said his side gave too many chances to mid-table Milan.
Filippo Inzaghi's side lost for a third time in their past four league outings to sit ninth.
First-half Milan substitute Giampaolo Pazzini twice tested Juve goalkeeper Gianluigi Buffon early in the second half as the visitors tried to equalise at 2-2, but instead they conceded when Morata cleaned up the remnants of Claudio Marchisio's shot on goal, which came back off the woodwork.
Allegri said allowing Milan such chances was a mark on Juve's performance.
"Unfortunately we gave away too many chances and especially set plays because we weren't concentrated enough," he told Sky Sport Italia.
"There was a great Gigi [Buffon] save on Pazzini, but of the goals we have conceded this season, a large part of them were balls we had given away.
"We also need to be sharper when going clear on the counter, as we don't always make the right choices in those situations."
Juve did the double on Milan in Serie A, adding to their 1-0 win at San Siro in September, and made it six straight wins over their rivals in all competitions.
Allegri said he was planning for a fired-up Milan outfit to try and break the drought, and arrest their poor league form.
"I expected this attitude because Milan are a good side and played well tonight," Allegri added.
"We could've been more in control and while we were dangerous on corners when attacking, we were also less focused when defending corners.
"Sometimes the situations where you feel most confident can lead to relaxation and that is to be avoided."
Allegri said Juve should be scoring more goals from set pieces, with their second goal on Saturday coming from a corner - Tevez knocking down a ball for Bonucci, who produced the strike.
"I was pleased to score from a corner," the former Milan boss said.
"This was only our third from a set play and with [Andrea] Pirlo's prowess from dead-ball situations and the strong players in the air we've got, we really ought to be scoring more.
"The team defended in an organised fashion under pressure and that is a bonus too. A team should be able to soak up pressure and go on the counter at times.
"When you have possession for a long time, there can be a lack of concentration.
"Those are the worst moments, as you are then at risk of a counter-attack. It shouldn't happen, but sometimes it does."