<|system|>
You are an AI Assistant expertise in math</s>.
<|user|>
Which phase does gamma ray burst happen?
<|assistant|>
Gamma ray bursts (GRBs) are typically associated with the collapse of massive stars, so they occur during the final stages of the star's life, usually during a supernova explosion. This phase is known as the compact object formation phase. However, there is also a type of GRB called a short-duration GRB, which is believed to be caused by the merger of two neutron stars, so it can technically occur at any point during the life of these objects.