Project Name
PageIndex Retrieval-Augmented Generation System for High-Precision Enterprise Document QA
A leading enterprise organisation operating across financial reporting, legal contract review, and technical product documentation needed a high-precision question-answering chatbot over proprietary internal documents, including annual reports, SEC filings, regulatory contracts, and technical manuals. Frontline analysts, compliance teams, and operational staff needed accurate, verifiable, and cited answers rather than approximate matches. The organisation’s existing vector RAG implementation was delivering only about 50% accuracy on financial document QA tasks, with no reasoning trace or source citation, making it unsuitable for audit-grade use. The organisation engaged Ksolves to evaluate and implement a fundamentally different retrieval architecture capable of meeting the precision, explainability, and compliance requirements of regulated enterprise workflows.
Ksolves, an AI-first company, designed and implemented a PageIndex-based RAG system that eliminates vector databases and fixed-size chunking entirely, replacing them with LLM-driven hierarchical document reasoning. The solution raised exact-match QA accuracy to 98.7% on the FinanceBench benchmark, achieved 100% retrieval recall on target sections, reduced manual review effort by 60%, and delivered full ROI within 8 months.
The challenges faced by the client are as follows:
- Vector RAG Delivering Only Around 50% QA Accuracy: Traditional chunk-level vector RAG, splitting documents into fixed 512 to 1024 token chunks and retrieving via cosine similarity, achieved only approximately 50% exact-match accuracy on FinanceBench, an operationally unacceptable level for finance, legal, and compliance teams.
- Arbitrary Chunking Destroying Document Structure: Fixed-size text splitting frequently divided tables, cross-references, and multi-part paragraphs at arbitrary boundaries, stripping the contextual structure that makes financial statements and technical specifications meaningful.
- No Reasoning Trace or Source Citation for Auditability: Traditional vector RAG returned black-box top-K chunk retrieval with no explanation of why chunks were selected, making the system unsuitable for compliance-grade use regardless of retrieval accuracy.
- Embedding-Based Retrieval Failing on Precise Terminology: Embedding models excel at conceptual matching but perform poorly when queries require distinguishing precise identifiers, negations, or near-identical technical terms, consistently failing to retrieve without lexical fallbacks.
- Multi-Hop, Cross-Section Answers Beyond Single-Chunk Retrieval: Many queries required answers spanning multiple sections, such as financial assumptions alongside footnote disclosures, which fixed-chunk retrieval had no mechanism to navigate.
- No Scalable Path to Compliance-Grade QA Across the Document Estate: As the document estate grew, the organisation needed a retrieval system that maintained accuracy across diverse document types, enforced strict data privacy, and produced audit logs, none of which the vector RAG baseline could deliver without significant bespoke development.
Ksolves designed and implemented a PageIndex-based RAG system, a fundamentally different retrieval architecture that builds a hierarchical, LLM-generated table of contents for each document and uses LLM reasoning to navigate it at query time, rather than embedding chunks and retrieving by similarity.
- LLM-Generated Hierarchical Document Tree: Implemented the PageIndex indexing pipeline, which processes source documents page by page using GPT-4o to summarise each section and automatically generate a hierarchical tree of chapters, sections, and page ranges, reused for all subsequent queries without re-indexing.
- LLM-Driven Tree Querying with No Vectors or Embeddings: Replaced vector similarity retrieval with tree-search prompting, where the LLM reasons over node titles and summaries to identify relevant sections, then fetches exact page text with no chunking, embedding, or cosine similarity involved.
- Multi-Hop Cross-Section Navigation: Enabled the LLM to descend into multiple branches of the document tree when an answer spans sections, a capability structurally impossible with flat chunk retrieval and a primary driver of the accuracy improvement.
- Citation-Backed Answer Generation with Compliance Guardrails: Deployed a two-step GPT-4o pipeline where tree-search selects relevant nodes and a context-only prompt generates answers grounded exclusively in retrieved page text, with section citations attached to every answer.
- Multi-Level Caching Architecture: Implemented three-tier caching using Redis across the document index, retrieval outputs, and final answers, reducing average cost per query from around $0.25 to $0.10 and cutting latency by approximately 30%.
- Kubernetes Production Deployment with Prometheus and Grafana Monitoring: Deployed the system on Kubernetes with horizontal autoscaling triggered by query queue depth and CPU utilisation, with dashboards monitoring retriever recall, answer accuracy, latency, and cache hit rate in real time.
Technology Stack
| Category | Technology |
|---|---|
| RAG Architecture | PageIndex (Vectorless, Hierarchical Tree RAG) |
| LLM and Reasoning | GPT-4o (Tree Indexing and Answer Generation) |
| Baseline Comparison | FAISS / Pinecone with LangChain |
| Orchestration | LangChain and PageIndex Client API |
| Infrastructure | Kubernetes, Redis, Prometheus, and Grafana |
- QA Accuracy Lifted from About 50% to 98.7% on FinanceBench: PageIndex RAG using GPT-4o achieved 98.7% exact-match accuracy, a 48.7 percentage point improvement, and consistently outperformed vector RAG by 35 to 50 percentage points on cross-domain legal and technical document tests.
- Retrieval Recall Improved from Around 91.7% to 100%: PageIndex's tree-based querying achieved 100% recall on target sections across evaluated queries, eliminating the silent recall failures that previously drove vector RAG inaccuracy.
- Manual Review Effort in Finance Audit Workflows Cut by 60%: Higher accuracy and citation-backed output reduced the manual verification burden on compliance analysts, allowing spot-checks rather than systematic re-verification of every AI answer.
- Full Project ROI Achieved Within 8 Months: Efficiency gains from reduced manual review, faster document QA turnaround, and eliminated rework from accuracy failures delivered full payback against a total project investment of approximately $380,000.
- Audit Trail Coverage Reached 100% of Answers Cited: Every PageIndex RAG answer now includes a complete reasoning trace and a citation linked to the exact page text used for generation, compared with zero citation coverage under the previous vector RAG setup.
Ksolves helped the organisation move from a vector RAG implementation that was structurally unsuitable for compliance-grade use to a PageIndex-based architecture that delivers both high accuracy and full explainability. By replacing fixed-size chunking and vector similarity retrieval with LLM-driven hierarchical document reasoning, the solution closed the gap between a system that performs well in benchmarks and one that can actually be trusted in production audit, legal, and financial analysis workflows. The PageIndex architecture also provides a scalable foundation for a hybrid enterprise retrieval strategy, using vector search to identify relevant documents at corpus scale and PageIndex reasoning for precise answers within them. Through Custom RAG Development services, Ksolves enables enterprises to deploy document QA systems that meet the accuracy and audit requirements of regulated industries.
Is your RAG system getting half your document questions right, with no way to tell which half?