Runnables & LCEL
Every composable piece in LangChain — prompts, chat models, parsers, retrievers, custom functions — implements the same interface: Runnable. LCEL (LangChain Expression Language) is just the | operator composing Runnables into a RunnableSequence, as shown in Your First Chain.
Chat Models
initchatmodel builds a chat model from a model name and provider string, so switching providers is a one-line change rather than a different import per vendor.
Prompt Templates
A prompt template turns a dict of variables into a PromptValue the model can consume. ChatPromptTemplate is the one you'll use almost everywhere; PromptTemplate produces a plain string instead of a message list.
Messages
A chat model's input and output are both lists of typed message objects, not raw strings. Each message type maps to a role.
Output Parsers
An output parser sits at the end of a chain and reshapes a model's raw output into something your code can use.
Structured Output
withstructuredoutput wraps a chat model so it returns a validated Pydantic object instead of prose you then have to parse. The provider enforces the schema at generation time (constrained decoding or native tool-calling), which is far more reliable than parsing free-form output after the fact.