05. Add query rewrite module
Add query rewrite module
step
Perform Naive RAG
Check relevance for searched documents (Groundedness Check)
Web Search
(This tutorial) Query Rewrite
Reference
It's an extension from the previous tutorial, so there may be overlapping parts. Please refer to the previous tutorial for insufficient explanation.

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.
Reference
As covered in the previous tutorial, we omit the detailed description.
State definition
State : Defines the state of sharing between nodes and nodes in Graph.
Generally TypedDict Use format. This time, we add the results of the relevance check to the state. Reference
this time
questionDefine it as list format. This is to store additional rewritten Query.
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.
Add Query Rewrite node
Rewrite existing questions by utilizing the prompts to rewrite Query.
Last updated