
Retrieval as a Graph Step
RAG is just a node.
Retrieval as a Graph Step
RAG (Retrieval Augmented Generation) is often taught as a separate architecture. In LangGraph, it's just a subset of nodes.
The RAG Subgraph
- RetrieveNode: Takes query, returns docs.
- GradeNode (Optional): LLM checks if docs are relevant.
- GenerateNode: Takes docs + query, returns answer.
By making retrieval a discrete step, you can verify it. You can inspect the State after Step 1 to see exactly what the chunks were.