Unit 01.00: What the framework actually adds
LangChain is often described as what makes an LLM application possible. It is more accurate, and more useful, to say what it saves you from writing.
Three conveniences, no intelligence
A template with named inputs, a uniform invoke across providers, and a parser. That is the substance of a basic chain, and each piece is worth exactly what it saves.
The code builds one. Note that it uses a fake model - every example in this course runs with no API key, which is a property worth having from the start.
from langchain_core.prompts import ChatPromptTemplate
from langchain_core.output_parsers import StrOutputParser
from langchain_core.language_models.fake_chat_models import FakeListChatModel
# A chain is three composable pieces. Every example in this course runs with a
# fake model, so nothing here needs an API key.
prompt = ChatPromptTemplate.from_messages([
("system", "Answer in one sentence."),
("human", "{question}"),
])
model = FakeListChatModel(responses=["Refunds are allowed within 7 days."])
chain = prompt | model | StrOutputParser()
print(chain.invoke({"question": "What is the refund window?"}))
# What the framework added: a template with named inputs, a uniform `invoke`
# across providers, and a parser. What it did not add: any intelligence. Those
# three are conveniences, and they are worth exactly what they save you.
print("\npieces:", [type(step).__name__ for step in (prompt, model, StrOutputParser())])
The pipe operator composes the three. prompt | model | parser reads left to right, and each step's output is the next step's input.
What the framework did not add is any intelligence. The model is the same model; the answer would be the same answer through the provider's own SDK. Being clear about that makes the next unit's question - when *not* to use it - answerable rather than heretical.
The mistake this prevents
The mistake is treating the framework as the application. The parts that make your system correct - the business rules, the validation, the thresholds - are things you write, and Unit 04 argues they should live outside the framework entirely.
Takeaway
A chain is a template, a model and a parser composed with |. The framework contributes convenience and uniformity, not capability.
