Recently, I have been reading more about the Chilean coup.
Where do you think Allende made his error that resulted in his downfall?
If you were in his position (having been elected as a socialist and successfully taken power, while in the shadow of the United States and having a military hostile to you), what would you have done differently?
He didn't purge the army
This. He literally left guns in the hands of his enemies.
I'm not too familiar with the history of Allende's Chile but... how do you go about purging an army?
Not sure it would work. Remember that Allende thought Pinochet would support him if a coup happened.