🧊 White Walker
Multimodal Agentic RAG — Index PDFs & Markdown into hierarchical tree structures, persist in Supabase, and query with LLM-powered retrieval.
White Walker transforms documents into navigable tree indexes using LLM-based structural analysis, stores them in Supabase (or locally), and answers questions by intelligently traversing the tree to find relevant sections.
✨ Features
- 🌲 Hierarchical Tree Indexing — Automatically detects document structure (TOC, sections, subsections) and builds a navigable tree
- 🗄️ Supabase Persistence — Trees, raw pages, and metadata stored in PostgreSQL via Supabase
- 🤖 Agentic Retrieval — LLM navigates the tree to find relevant sections, then synthesizes answers with citations
- 📄 PDF & Markdown Support — Works with academic papers, technical docs, and any structured document
- ⚡ Rate-Limited API — Built-in token-bucket rate limiter for NVIDIA NIM API (38 RPM, configurable)
- 🔌 Pluggable LLM Backend — Default: NVIDIA NIM API, easily extensible
📦 Installation
pip install white-walker
🚀 Quick Start
1. Set Environment Variables
# .env file
SUPABASE_URL=https://your-project.supabase.co
SUPABASE_KEY=your-anon-key
NVIDIA_API_KEY=your-nvidia-nim-api-key
2. Set Up Supabase Tables
Run the SQL in setup_supabase.sql in your Supabase SQL editor to create the required tables (rag_documents, rag_raw_pages, rag_tree_nodes).
3. Index & Query
from white_walker import WhiteWalkerClient
client = WhiteWalkerClient()
# Index a PDF
doc_id = client.index("paper.pdf")
# Query the indexed document
result = client.query(doc_id, "What is the main contribution of this paper?")
print(result["answer"])
print(result["citations"])
print(result["confidence"]) # "high", "medium", or "low"
🏗️ Architecture
PDF / Markdown
│
▼
┌─────────────────┐
│ PDF Ingestor │ Extracts text, detects TOC, builds hierarchical tree
└────────┬────────┘
│
▼
┌─────────────────┐
│ Tree Indexer │ LLM-based section detection, title verification,
│ │ page-number alignment, node summarization
└────────┬────────┘
│
▼
┌─────────────────┐
│ Supabase Store │ Persists tree nodes, raw pages, document metadata
└────────┬────────┘
│
▼
┌─────────────────┐
│ Agent Retriever │ LLM navigates tree → finds relevant nodes →
│ │ fetches page content → synthesizes cited answer
└─────────────────┘
⚙️ Configuration
White Walker uses white_walker/config.yaml for defaults:
| Parameter | Default | Description |
|---|---|---|
model |
moonshotai/kimi-k2.6 |
NVIDIA NIM model for indexing & retrieval |
toc_check_page_num |
20 |
Max pages to scan for table of contents |
max_page_num_each_node |
10 |
Max pages per tree node |
max_token_num_each_node |
20000 |
Max tokens per tree node |
Override at initialization:
client = WhiteWalkerClient(model="meta/llama-3.1-70b-instruct")
🔑 Environment Variables
| Variable | Required | Description |
|---|---|---|
NVIDIA_API_KEY |
✅ | NVIDIA NIM API key for LLM calls |
SUPABASE_URL |
Optional | Supabase project URL (falls back to local storage) |
SUPABASE_KEY |
Optional | Supabase anon/service key |
📊 Evaluation
White Walker includes a RAGAS-based evaluation pipeline for benchmarking against multimodal agentic RAG datasets. See evaluate_pipeline.py for details.
📄 License
MIT License — see LICENSE for details.
🙏 Acknowledgments
Built on the foundation of VectifyAI/PageIndex, re-architected for local processing, Supabase persistence, and pluggable LLM backends.
Metadata
Release files for White-Walker 0.7.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| white_walker-0.7.0.tar.gz | 28.9 kB | Without provenance | Details for white_walker-0.7.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| white_walker-0.7.0-py3-none-any.whl | Python 3 | none | any | Details for white_walker-0.7.0-py3-none-any.whl |
Total release size: 62.2 kB
Release files / white_walker-0.7.0.tar.gz
| Download URL | white_walker-0.7.0.tar.gz |
|---|---|
| Size | 28.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
240533cfc8bfdd71be1c511109e3333541dac346cf4ac67e5264a49383776742
|
|
BLAKE2b-256 checksum How to use checksums |
0d1a5801e571f3dc8cc1b1c3eba0a36a6b2b254843611c1d778dd80d1634bf8f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.12.0
|
Release files / white_walker-0.7.0-py3-none-any.whl
| Download URL | white_walker-0.7.0-py3-none-any.whl |
|---|---|
| Size | 33.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
af67a676debc52289355317cdde23bd027f911fbfb6ecba3a9ffb845956dc0d8
|
|
BLAKE2b-256 checksum How to use checksums |
40cf255530e063f90577d600dd9d81d9b2414d35519cd13e7fa7b7978d371395
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.12.0
|
Security for White-Walker 0.7.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.