When Daenerys is scouting for an army, the Unsullied are initially made out to be an extremely strong and fearless force. However, they get their butts kicked each time by the Harpies - particularly in the scene in the alleyway. How is that ? Are we made to think the Harpies are better fighters than the Unsullied ?
The books do talk a bit about this:
The unsullied are field warriors and only fight well when organized in ranks and fighting with sufficient numbers. Unsullied don't do well when only a few of them are fighting together and aren't in open territory.
They can be easily "jumped" and outnumbered when alone or in small groups (as seen in the alleyway scenes).
Taken from the wiki:
Unsullied battle tactics are based on the legions of the old Ghiscari Empire, involving large groups of them fighting in lock-step phalanxes using spear and shield, though they are also trained to use shortswords for close-quarters combat. Slave-eunuchs who have been trained from birth to fight, the Unsullied are renowned for their utter discipline on the battlefield, both in their usage of incredibly coordinated large unit phalanx formations, and because they will never break in the face of overwhelming odds, even to the point of death.
Phalanx formations don't work if you don't possess sufficient numbers or are surrounded by the enemy.
It's also worth pointing out that the unsullied are poorly equipped to fight in these tight situations. They are all armed with spears, when they should be equipped with short swords for tighter situations.
The unsullied are very similar to our world's Roman forces and when they came to Britain they had a hard time fighting against the guerrilla tactics of the Celts. This was partly the reason Hadrians Wall was constructed to keep them out and so they don't have to deal with them. Being a similar force to the Romans the Unsullied also prefer to fight in groups in phalanx formations in open fields. As we see in scenes of them attacking Casterly Rock:
Note that when the Unsullied are getting killed most of the time they are alone or in small patrols and so with the advantage of surprise the harpies win 9 times out of 10.
Note that when the Harpies don't have the element of surprise the Unsullied individuals fighting training kicks in and they do very well solo. This is shown with Gray Worm's fighting scene with Baristan Selmy, although Gray Worm may be a better fighter, as he was elected leader, any difference should be negligible as they all undergo the same training.