🧠Reasoning-Based RAG with PageIndex
We provide a simple example of using PageIndex to build reasoning-based retrieval systems for documents.
Preprocessing Workflow
- Process documents using PageIndex to generate tree structures
- Store the tree structures and their corresponding document IDs in a database table
- Store the contents of each node in a separate table, indexed by node ID and tree ID
Reasoning-Based RAG Pipeline
-
Query Preprocessing
- Analyze the query to identify the required knowledge
- Break down complex queries into sub-queries
-
Document Search (Learn more →)
- Search the relevant documents and their IDs
- Fetch corresponding tree structures from the database
-
Node Search (Learn more →)
- Search through tree structures to identify relevant nodes
- Prioritize nodes based on relevance and context
-
LLM Generation
- Fetch the corresponding contents of the selected nodes
- Format and extract the relevant information
- Send the assembled context with the original query to the LLM
- Generate contextually informed responses
📢 Stay Tuned!
We are continuously updating our documentation with new examples and best practices.
Last updated: 2025/05/01