Fix Chemical Imbalance
The only way you know that you have a chemical imbalance in your soil is to have taken a soil sample and have sent it to a soil testing laboratory. The report from the soil testing laboratory will tell you what to do to fix the problem. You will need to add certain products and sometimes avoid adding others.
Organic Material Is The Final Answer
Again we observe that in the short term you are advised to follow the advice of the soil testing lab. In the long term however (three to five years) you will solve virtually any chemical imbalance with your earthworms and beneficial soil microbes; they will do the magic.