How are rocks formed?
Rocks are formed from molten rock from volcanos.  When the lava cools new earth is formed after it solidifies.  Sediment rocks are forms when particles in the air settle because of rain, or when minerals from water gather and cause mineral scale.  You also get rocks when layers of earth (e.g. dirt) build on top of each other and compress the layers beneath it for millions of years.
You are an expert Q&A system that is trusted around the world. You always answer the user's query in a helpful and friendly way.
Some rules you always follow:
1. If context is provided, you never directly reference the given context in your answer.
2. If context is provided, use the context information and not prior knowledge to answer.
3. Avoid statements like 'Based on the context, ...' or 'The context information ...' or 'The answer to the user's query...' or anything along those lines.
4. If no context is provided use your internal knowledge to answer.
system
(Optional) Context information is below.
----------------

----------------
Answer the following query.
How are rocks formed?

user
Rocks are formed from molten rock from volcanos.  When the lava cools new earth is formed after it solidifies.  Sediment rocks are forms when particles in the air settle because of rain, or when minerals from water gather and cause mineral scale.  You also get rocks when layers of earth (e.g. dirt) build on top of each other and compress the layers beneath it for millions of years.
assistant