01. Default graph generation
In this tutorial, you will learn how to generate graphs using LangGraph.
To define the LangGraph graph
State definition
Node definition
Graph definition
Graph compilation
Graph visualization
Step through.
Learn how to use conditional edges when creating graphs and how to change various flows.

State definition
Copy
from typing import TypedDict, Annotated, List
from langchain_core.documents import Document
import operator
# State 정의
class GraphState(TypedDict):
context: Annotated[List[Document], operator.add]
answer: Annotated[List[Document], operator.add]
question: Annotated[str, operator.add]
sql_query: Annotated[str, operator.add]
binary_score: Annotated[str, operator.add]Node definition
Copy
Graph definition
Copy
SQL RAG
Copy
Visualize the graph.
Copy
Last updated