Chronic cough is a common complaint in children. This can come from either the upper or lower airways. A common cause of coughing coming from the upper airways is from a chronic sinusitis. Getting a CT scan of the sinuses is the best way to make this diagnosis, but this is sometimes not easy in a 3 year old. Allergy can be playing a role, but is not likely from what you have described.
In the lower airways, asthma is the most common problem to cause this. Sometimes, a physician may try a short course of oral steroids to see if it eliminates the cough for a while. If it is asthma and even some of the upper allergy problems, oral steroids should stop or diminish the cough. It is does not work, other causes should be pursued.