Potassium sorbate and sodium benzoate are more effective in acidic foods due to their pH-dependent antimicrobial activity. They are primarily active against yeast, mold, and some bacteria, and their efficacy is enhanced in an acidic environment. In acidic conditions, these preservatives are present in their active, undissociated forms, which can penetrate microbial cells and inhibit their growth.
When the pH of a food product is high (more alkaline), potassium sorbate and sodium benzoate are less effective because they are predominantly in their dissociated forms (sorbate and benzoate ions). These ions are less able to penetrate microbial cells and hinder their growth. 

Therefore, in foods with a higher pH, other preservatives or preservation methods may be necessary to ensure the safety and shelf life of the product.
It's worth noting that the specific pH range at which potassium sorbate and sodium benzoate are most effective can vary. Potassium sorbate is generally more effective in mildly acidic to neutral pH ranges (pH 4-6), while sodium benzoate is effective at lower pH levels (pH 2.5-4.5). The optimal pH range for each preservative depends on factors such as the target microorganisms and the specific food product being preserved.
spam fails_task lang_mismatch pii not_appropriate hate_speech sexual_content quality toxicity humor helpfulness creativity violence