When to use which
One call or simple chat: the raw SDK. RAG pipeline: LangChain. Single-loop agent: a plain loop or createReactAgent. Branches, approvals, memory: LangGraph.
Last updated
Analogy
You don't need Kubernetes for a static site. Pick the lightest tool that handles the job.
In an agent
The common criticism is that LangChain hides what's happening. Your answer: you built the raw loop first, so you know what it abstracts.
Practice
Interview questions
- Why LangChain / LangGraph, and why not?
- LangChain saves boilerplate for RAG: loaders, splitters, retrievers.
- LangGraph gives state, checkpoints, interrupts and routing for complex agents.
- For simple cases, skip them and use the SDK directly to avoid needless abstraction.
Questions people ask
When should I use the raw SDK, LangChain or LangGraph?
Use the raw SDK for one call or a simple chat. Use LangChain for a RAG pipeline with loaders, splitters and retrievers. Use a plain loop or createReactAgent for a single-loop agent. Use LangGraph when you need branches, approvals, memory across sessions or crash recovery.
How do I answer the interview criticism that LangChain hides too much?
Agree that abstractions hide details, then say you built the raw loop first, so you know exactly what the framework does underneath. You use it for the boring parts like loaders and checkpoints, and you can drop to the raw SDK when you need control. That answer shows judgement, not loyalty to a tool.