Socialize, socialize and socialize them some more. When you are totally sick of socializing them keep at it. That whole myth that if your dog is bonded with humans they will not protect livestock is just that in my opinion and experience. The more socialized your dog is, the better equipped they are to make decisions. Just make sure that puppy goes with you about your routine when you are caring for your birds and or other livestock. Yes young pups will want to "play" inappropriately with them, that is when you nip it in the bud. The first LGD is usually the hardest because they don't have an older dog to learn from.
As far as using LGD's to protect livestock and locking the birds up at night I learned a very valuable lesson last week. I have had chickens for well over a year now and never had any predator losses except from a 2 legged and the dogs weren't outside when that happened. I have a secure coop with an attached run that has buried wire, hot wire and hawk proof avian netting over the top. I frequently have coyotes around and a 5 pack of big noisy barking dogs. I hadn't locked the chickens in at night in over a year. Last week we had a thunderstorm where the sky opened up for about 2.5 to 3 hours, starting at dusk, during which I let ALL the dogs come inside. It was also during that lapse in security that a massacre occurred. It has been determined that a mama bobcat got on top of the outside run ripped through the avian netting and proceeded to use my birds as training tools for her babies. I lost 21 out of 36 birds. I found carcasses and body parts of 19 of my birds. I found blood on the spurs of my Jersey Giant roo, he also had fur grasped in his feet. (I miss him deeply, thankfully my best broody hens made it) My dogs were on edge and immediately sounding the alarm when I let them out after the rain stopped. I didn't hear anything from the coop which is about 30 yards outside my back door.
The lesson that I learned was two part, 1) The birds ALWAYS get locked up at night, 2) The working dogs do not get time off due to rain.