Here's a simple exercise of awareness and context:
Am I having a phone conversation using Bluetooth? Holding a water bottle? Enjoying the scenery, or something else? You can train to have an informed situational awareness and observe particular cues with training. You can position yourself strategically, and you can also train to evade effectively when needed. But one thing is for certain: if you're within contact distance and someone attacks while covering a lot of range with speed and power in very little time, your options are severely limited – especially if a weapon is involved and you're not fully paying attention. For many dynamic situations, however, you can survive with the right training.