HippoRAG is a retrieval framework that builds a knowledge graph over a document corpus and retrieves across it with Personalized PageRank, so a query can reach passages connected to the best match rather than only passages that resemble the query text. The design follows the hippocampal indexing theory of human long-term memory, and it combines a language model, a knowledge graph, and graph retrieval into one indexing and question-answering pipeline.
HippoRAG 2 extends the first version toward multi-hop retrieval and toward integrating large, complex contexts, while keeping performance on simpler single-hop tasks. Reported evaluations cover factual memory (NaturalQuestions, PopQA), sense-making (NarrativeQA), and associativity (MuSiQue, 2Wiki, HotpotQA, LV-Eval). Offline indexing uses fewer resources than other graph-based approaches such as GraphRAG, RAPTOR, and LightRAG.
The Python package targets Python 3.10 and exposes a single HippoRAG object: you give it a save directory, a language-model name, and an embedding-model name, then call index() on your documents and ragqa() on your queries. A standard dense-retrieval baseline is available through --ragtype standard for comparison, and custom corpora follow a documented JSON format for passages and optional questions.
Models can come from OpenAI, Azure OpenAI, any OpenAI-compatible endpoint including a local vLLM server, Amazon Bedrock and its Mantle Responses API, or the OrcaRouter gateway, which routes requests to OpenAI, Anthropic, Google Gemini, and DeepSeek models under a vendor/model namespace. Embedding models include NV-Embed, GritLM, and Contriever. An offline batch mode for vLLM indexes more than three times faster than the online server. OpenAI-compatible chat and embedding endpoints must return standard usage data; a response whose token cost cannot be accounted for is not cached.
Embeddings are stored in local Parquet files by default, with Qdrant, ChromaDB, and Milvus selectable through BaseConfig.vectorstoretype; remote collections are isolated by a per-index namespace and the backend endpoint is recorded in the index manifest. From version 2.0.0a5, a persisted index is bound to the endpoint, deployment, model, normalization, and component identity that produced it. An index without a manifest, or one whose identity no longer matches the active configuration, is rejected instead of being mixed, so a configuration change means re-indexing into a fresh save directory.
Features
- Graph-based retrieval: open information extraction builds a knowledge graph offline, and Personalized PageRank retrieves over it at query time
- Multi-hop and sense-making: retrieval reaches passages connected through the graph rather than only lexically or semantically similar ones
- Single-object API: index() and rag_qa() on one HippoRAG instance cover indexing, retrieval, and question answering
- Provider choice: OpenAI, Azure OpenAI, Amazon Bedrock and Bedrock Mantle, OrcaRouter, and any OpenAI-compatible endpoint
- Local deployment: a vLLM server serves models locally, with an offline batch mode for faster indexing
- Vector-store backends: local Parquet by default, or Qdrant, ChromaDB, or Milvus with per-index namespaces
- Index identity binding: a manifest pins the endpoint, model, and component identity behind persisted vectors and rejects mismatched reuse
- Baseline comparison: a dense-retrieval mode shares the same loading and evaluation path for side-by-side runs
- Reproduction datasets: sample and paper evaluation datasets, plus published extraction outputs for a MuSiQue sample
