The Italy international has been a big hit at San Siro since arriving from Manchester City in January, with the forward's goals having played a key role in securing a place in this season's Champions League.
The enigmatic 23-year-old cut a frustrated figure during Wednesday's win over Celtic, having been forced wide in order to accommodate new signing Alessandro Matri up front, but Allegri feels that both Balotelli and the strike partnership will come good as long as the Palermo native maintains the right attitude.
"Balotelli sacrificed himself a lot for the team in the last game with Matri," the Rossoneri boss told reporters on Saturday.
|AC MILAN LATEST
|5/1||Mario Balotelli is 5/1 with BetVictor to score two or more goals against Napoli
"Matri runs hard up front and Balotelli finds more space because of that. The longer the game goes on, the more the teams will stretch and that makes it easier to Mario to find space.
"The understanding between the two is good and it'll get better with time. We shouldn't forget that it was the first game that they played together."
Allegri was speaking on the eve of Sunday's mouthwatering match-up with Napoli at San Siro. Marek Hamsik is seen by some as the Partenopei's principal threat but the Milan coach insists that he is no longer disappointed that the Rossoneri failed in their pursuit of the Slovakian attacker last summer.
“Hamsik is not a regret," he remarked. "He's a player with great quality and can still improve a lot.
"I liked him even when he was playing for Brescia. He's an international-level player with technique, strength and even has a great character."