179 questions
No questions match those filters.
Explain LangGraph's core concepts: State, Nodes, and Edges.
This is one of the questions in the full AI/ML interview bank. Pro unlocks all 1789 questions; Premium includes the same bank plus the highest daily Practice limit.
See plansThree concepts, and understanding how they compose is what lets you actually build something with LangGraph rather than just describe it:
- State — a typed object (a dict, in practice) that flows through every node in the graph. Any node can read the current state and return updates to it, and that’s the only channel information moves through between steps.
- Nodes — plain functions that do the real work: call the LLM, run a tool, transform data. Each node takes the current state as input and returns the fields it wants to update.
- Edges — the connections between nodes. A regular edge always moves from one node to the next; a conditional edge routes to different nodes depending on what the state currently holds.
The conditional edge is the piece that actually enables agent behavior: an “agent” node reasons and updates the state with what it needs next; a conditional edge checks that state and routes either to a “tool” node if a tool call is needed, or to an “answer” node if the agent already has enough to respond — and the tool node routes back to the agent node afterward, closing the loop that a plain chain has no way to express.