Retrieval-Augmented Generation (RAG) has become a widely adopted architecture for building AI applications that combine Large Language Models (LLMs) with external knowledge sources.
Traditional RAG pipelines rely heavily on vector embeddings and similarity search to retrieve relevant documents. While this works well for many scenarios, it introduces challenges such as:
· Requires chunking documents into small segments
· Important context can be split across chunks
· Embedding generation and vector databases add infrastructure complexity
We have covered traditional RAG in out earlier article : Implementing Rag [Retrieval Augmented Generation] AI
Vectorless RAG is a retrieval-augmented generation approach that retrieves relevant information from documents without relying on vector embeddings. Instead, it organizes content into indexed pages or structured sections, allowing fast keyword‑based retrieval before passing the selected context to a language model for generating accurate responses.
Vectorless Reasoning-Based RAG is emerging to address these challenges. One framework enabling this approach is PageIndex, an open-source document indexing system that organizes documents into a hierarchical tree structure and allows Large Language Models (LLMs) to perform reasoning-based retrieval over that structure.
The Problem with Traditional RAG
Most RAG systems follow this pipeline:
![5]()
Loss of Structure: Chunking destroys this structure by breaking documents into arbitrary pieces.
Context Fragmentation: Chunk-based retrieval may return only part of the information needed to answer a question.
Retrieval Noise: Vector similarity can retrieve text that is semantically similar but contextually incorrect.
For example, a query about clinical trial results might retrieve text from the introduction simply because the terminology overlaps.
Infrastructure Complexity: Traditional RAG pipelines require additional infrastructure:
Vector databases
Embedding pipelines
Chunking strategies
Similarity tuning
Introducing PageIndex
PageIndex is a vectorless, reasoning-based retrieval framework.
Instead of embedding chunks into a vector database, PageIndex converts documents into a tree-structured index.
Each node represents a section of the document.
![6]()
Each node contains:
This structure preserves the original organization of the document.
Rather than searching through fragments, the system can navigate the document hierarchy intelligently.
How does it work?
PageIndex works in three major steps.
While ordinary OCR processes each page, which can lead to disorganised headings and lists, PageIndex’s OCR understands the entire document as a single structure and digitises it neatly while preserving headings and tables.
Convert documents directly into a hierarchical structure, like a table of contents. A tree structure with chapters, sections, and subsections is created, making it easy to navigate even long reports without getting lost.
The AI searches the tree based on the question and picks up all relevant parts. It also knows which pages and chapters have been visited, so the search results are well-founded.
PageIndex Vs Conventional RAG
Conventional RAG vectorises entire documents and stores them in a vector database. It then searches for relevant documents based on the similarity between the user’s question and the content of the documents.
However, this method relies only on the statistical similarity of words and sentences, so it may not always capture true relevance.
Long documents are also broken into chunks, which disrupts context and hides important connections. PageIndex solves these problems by using the inherent hierarchical structure of documents without breaking them down into small pieces
This allows LLMs to retrieve information based on contextual semantic relevance rather than simple word similarity.
Let’s explore vector less RAG with an example, where we provide a document as a context or a knowledge base and then we query to a RAG which uses this document as a reference to generate an output by implementing vector less RAG process.
In here we are using .md file as input and convert its context into a array of chunk in Json format.
![1]()
Based on logical reference within a document, chunks categorized into keywords, section and title into Json format.
![2]()
We can save this chunks locally or in database as per requirements and uses for reference to infer the query from Json format context.
![3]()
We can query based on specific topic within the context or in combination to summarized output. Your output would be as accurate and precise as possible based on the prompt and AI model you used to generate the output.
![4]()
I’ll be sharing the prompt for generating the chunks and retrieve the data using query and context for your reference.
![7]()
![8]()
It serves the same purpose as traditional RAG process but with better approach and efficiently.
Conclusion
AI systems are rapidly evolving from simple chat interfaces into powerful research tools capable of analysing large bodies of information.
The future of document intelligence may not lie in bigger vector databases, but in smarter ways of representing and reasoning over knowledge.
By combining hierarchical indexing with LLM reasoning, PageIndex offers a compelling alternative to traditional RAG pipelines, the key reason being it is simpler, more explainable, and closer to how humans actually read documents.