Both `llm` and `chat_model` are objects that represent configuration for a particular model.
You can initialize them with parameters like `temperature` and others, and pass them around.
The main difference between them is their input and output schemas.
The LLM objects take string as input and output string.
The ChatModel objects take a list of messages as input and output a message.
We can see the difference between an LLM and a ChatModel when we invoke it.
```python
from langchain_core.messages import HumanMessage
text = "What would be a good company name for a company that makes colorful socks?"
messages = [HumanMessage(content=text)]
llm.invoke(text)
# >> Feetful of Fun
chat_model.invoke(messages)
# >> AIMessage(content="Socks O'Color")
```
The LLM returns a string, while the ChatModel returns a message.
## Prompt Templates
Most LLM applications do not pass user input directly into an LLM. Usually they will add the user input to a larger piece of text, called a prompt template, that provides additional context on the specific task at hand.