LangChain Architecture and LCEL
LangChain components, LCEL pipe syntax, chains, runnable interfaces, streaming chains.
What is LangChain?
LangChain is a framework for building LLM applications by composing reusable pieces: prompts, models, parsers, retrievers, and memory. Instead of hand-wiring API calls, you build chains that pass data from one component to the next.
pip install langchain langchain-openaiThe Core Building Blocks
Three components appear in almost every chain: a PromptTemplate (formats input into a prompt), a chat model (the LLM), and an output parser (cleans the result). LangChain connects them into a pipeline.
from langchain_openai import ChatOpenAI
from langchain_core.prompts import ChatPromptTemplate
from langchain_core.output_parsers import StrOutputParserAll lessons in this course
- LangChain Architecture and LCEL
- Document Loading, Splitting, and Embedding
- Vector Stores: Chroma and FAISS
- Building a RAG Q&A System End-to-End