Absolutely not IMO - my betta is in a 55 gal. and he hunts 24/7. If your tank was larger, I would suggest that if you want to get an invertibrate for the tank, you try a couple dwarf CPOs. They are two to three times longer than a shrimp. I have three in the tank with the betta and 30 neon tetras and they are living peacefully together. At first, the betta got too close to one of the CPOs and the CPO latched onto the betta's tail and went for a fast ride around the tank. No one was injured after close inspection. But, since that time, the betta now knows to not lurk/hunt over the CPOs and everyone gets along fine. Of course, this is a 55 gal. in comparison to your 5 gal. so I believe it would be a problem for the betta to manuever around and not get near the CPO.