2000 GMC sierra codes P0174 P0171

I have a 2000 GMC sierra 1500 5.3 L V8. Recently I have noticed that when I first start my truck, especially if it’s a cold start, it doesn’t seem to be running right. It sounds almost as if it’s not getting enough fuel to me but I’m not sure. It will first run really good, and then it will drop in RPM’s pretty rapidly and almost sound as if it was about to die, which it has died a couple of times in the past from this problem. Once I give it some gas it seems as if it comes back to life, but if I happen to stop at a red light or stop sign pretty soon after driving, I will encounter the same problem, where it sounds as if it may be about to die. After I get going though, the problem disappears and the truck runs great. I decided to pull the codes finally today, and code P0174 and code P0171 popped up. I have looked at the vacuum hoses and they all seem to be in good shape, but like I said earlier, I could be wrong. Does anyone have any suggestions for me on this problem?

Linking to a good looking answer.

http://www.gmtruckhq.com/diagnostic-trouble-codes-dtcs/p0171-p0174-fuel-system-too-lean-bank-1-2-a-3934.html