human
How do I know when to use a semicolon vs. a comma?
assistant
When you are writing, it is important to pay attention to the rules of grammar. The main rule for using a semicolon vs. a comma is that a semicolon should be used when two independent clauses are joined together and a comma should be used when two related independent clauses are joined together. For example, "I went to the store; I bought some food."