Make sure your comments are relevant and appropriate to the conversation. Don’t stray from the topic – stay focused.
To remind yourself to think before saying something, pinch yourself on the finger or somewhere discreet (gently, but just enough to get yourself on track). If you develop a routine for answering a question, you will be less likely to say the first thing that comes to mind.