A cough with yellow sputum is often indicative of an inflammatory response in the organism. Under normal circumstances the body only secretes a small amount of mucus to keep the mucous membrane of the respiratory tract moist and does not cough up sputum. When the respiratory tract is infected with pathogens such as bacteria, the capillary exudate and mucus produced by the mucous membrane of the respiratory tract increases, mixed with bacteria-consuming pus cells, and the sputum can then turn yellow and be expelled through the cough reflex.