Built by the team at Pardus AI – The fastest AI Data Analysis Platform.
HashIndex is the core indexing engine we use at Pardus AI to process 50MB+ CSVs and PDFs in seconds. We are open-sourcing our Python implementation so you can build better RAG pipelines without the bloat of LangChain.
Want to analyze documents without coding? Try our no-code platform: Pardus AI Dashboard (Free for huge files).
# Clone the repository
git clone https://github.com/JasonHonKL/HashIndex.git
cd HashIndex
# Install with uv (recommended - faster and more reliable)
uv venv # Create virtual environment
uv sync # Install dependencies and package in editable modesource .venv/bin/activate # Activate the virtual environment (Linux/Mac)# or
.venv\Scripts\activate # Activate the virtual environment (Windows)# Alternatively, install with pip
pip install -e .fromhashindeximportindex_pdf, query_index, HashIndex# Index a PDF documentindex=index_pdf("document.pdf")
# Save the indexindex.save("document.index.json")
# Load an existing indexindex=HashIndex.load("document.index.json")
# Query the indexanswer=query_index(index, "What is the main conclusion?")
print(answer)cp .env.example .envthen just modify the config we support almost all api !
fromhashindeximportHashIndex, Model, ListKeys, GetSummary, GetContent# Create a custom modelmodel=Model(model="anthic/claude-3.5-sonnet")
# Work with index objects directlyindex=HashIndex()
# ... customize indexing logic ...# Use verbose=False for silent operationfromhashindeximportindex_pdf, query_indexindex=index_pdf("document.pdf", verbose=False)
answer=query_index(index, "Your question", verbose=False)
# Access pages directlyforkey, objinindex.PageTable.items():
print(f"{key}: {obj.summary}")HashIndex outperforms standard paradigms in specific Long-Context Narrative tasks where causality matters more than keyword matching.
| Method | Topology | Context Management | Robustness (Unstructured Data) | Latency |
|---|---|---|---|---|
| Vector RAG | Disconnected Chunks | Additive (FIFO overflow) | High | Low (O(1)) |
| PageIndex | Hierarchical Tree | Path-Dependent | Low (Requires Clean Headers) | High (O(log n)) |
| RAPTOR | Recursive Tree | Cluster-Based | Medium | Medium |
| HashIndex (Ours) | Hash Table | Dynamic Pruning (Agent-led) | High (Mechanical Split) | Medium-Low |
By treating document chunks as Hash Table entries rather than Vector Embeddings, HashIndex avoids the 'Lost in the Middle' phenomenon common in vector search.
If you use HashIndex in your research or project, please cite it as follows:
@software{HashIndex2026,
author = {Hon, Jason and Pardus AI Team},
title = {HashIndex: LLM-optimized Document Indexing without vector search},
year = {2026},
publisher = {Pardus AI}
}