02. Naive RAG
Naive RAG
step
Perform Naive RAG

Preferences
Basic PDF-based Retrieval Chain creation
Here, we create a Retrieval Chain based on PDF documents. Retrieval Chain with the simplest structure.
However, LangGraph creates Retirever and Chain separately. Only then can you do detailed processing for each node.
First, use pdf_retriever to get your search results.
Pass the previously searched result to the context of the chain.
State definition
State : Defines the state of sharing between nodes and nodes in Graph.
Generally TypedDict Use format.
Node definition
Nodes: Nodes that handle each step. Usually implemented as a Python function. Input and output are state values.
Reference
StateUpdated after performing a defined logic with inputStateReturns.
Edges
Edges: CurrentlyStateRun next based onNodePython function to determine.
General edges, conditional edges, and more.
Visualize compa-like graphs.
Graph execution
configParameters convey the necessary setting information when running the graph.recursion_limit: Set the maximum number of recurses when running the graph.inputs: Pass the required input information when running the graph.
Reference
Message output streaming Everything in LangGraph streaming mode Please refer to.
Under stream_graph A function is a function that only streams certain nodes.
You can easily check the streaming output of a specific node.
Last updated