LLM Frameworks¶
Intermediate · 4 topics
The RAG series built every piece by hand: loaders, chunkers, retrieval, prompts, citations, evals. That was deliberate. Frameworks are much easier to judge once you know what they're wrapping. This series covers the three you'll meet in almost every GenAI job description, and ends with the question interviewers increasingly ask: when would you not use a framework at all?
# Framework examples are marked "no-run" (they need packages and an API key):
pip install langchain langchain-openai langgraph llama-index
# Each page also has a small plain-Python version of what the framework does, which runs offline.
| # | Topic | Sub-topics |
|---|---|---|
| 1 | LangChain | What it is in 2026 · chat models and messages · prompts and LCEL pipes · structured output · tools and create_agent · RAG in LangChain · when it helps |
| 2 | LlamaIndex | Documents, nodes, indexes · a RAG app in five lines · customising parsing, chunking and retrieval · reranking and parent–child · chat engines · agents and workflows |
| 3 | LangGraph | State, nodes, edges · a state graph from scratch · conditional edges and loops · corrective RAG · tool-calling agents · checkpoints, memory and human-in-the-loop · multi-agent |
| 4 | When plain SDK code is better | What frameworks cost · a tool loop in 40 lines · decision table · a hybrid approach · how to answer it in interviews |
flowchart LR
SDK[Plain SDK<br/>openai, anthropic, google-genai] --> LC[LangChain<br/>models, prompts, tools,<br/>integrations]
SDK --> LI[LlamaIndex<br/>ingestion, indexes,<br/>query engines]
LC --> LG[LangGraph<br/>stateful graphs, loops,<br/>memory, human-in-the-loop]
LI -. can be orchestrated by .-> LG
These libraries change fast
Examples target LangChain 1.x, LangGraph 1.x and llama-index-core 0.12+. Imports and class names have moved several times over the years. If an import fails, check the library's current docs. The concepts on these pages are stable even when the import paths aren't.
Before you start
These pages assume the RAG series and structured output & tool calling. Each framework page maps the framework's pieces back to the code you've already written by hand.
Back to: Notes overview