HippoRAG 2 is a memory framework for large language models (LLMs) that recognizes and uses the connections in new knowledge, modeled on the hippocampal indexing theory of human long-term memory. It combines an LLM, a knowledge graph built by open information extraction (OpenIE), and the Personalized PageRank algorithm so that documents added over time are integrated rather than retrieved in isolation.
The project's experiments report gains in associativity (multi-hop retrieval) and sense-making (integrating large, complex contexts) over other retrieval-augmented generation (RAG) systems without losing ground on simpler factual tasks, measured on NaturalQuestions, PopQA, NarrativeQA, MuSiQue, 2Wiki, HotpotQA and LV-Eval. Online retrieval stays cost- and latency-efficient, and offline indexing uses fewer resources than other graph-based approaches such as GraphRAG, RAPTOR and LightRAG. The first paper appeared at NeurIPS 2024 and the HippoRAG 2 paper at ICML 2025.
The Python library indexes documents, retrieves passages, and answers questions. It talks to OpenAI, Azure OpenAI and any OpenAI-compatible chat and embedding endpoint, such as a local vLLM server or a hosted gateway, with separate keys for the LLM and embedding endpoints when needed. Amazon Bedrock models route through LiteLLM, and OpenAI models on Bedrock Mantle use its Responses API. Local inference also runs through Transformers or vLLM offline batch mode, which indexes more than 3× faster than a vLLM online server. Embeddings are stored in local Parquet files by default, or in Qdrant, ChromaDB or Milvus.
Each persisted index is bound to the endpoint, deployment, model, normalization and component identity that produced it, and an index whose identity no longer matches the active configuration is rejected rather than mixed silently. An MCP server serves a persistent index to agents and MCP clients such as Claude Code, Claude Desktop, Cursor or VS Code, and the repository doubles as a Claude Code plugin marketplace that bundles the server with a skill and an index-folder command. Tool calls run one at a time on a worker thread, so a long index call delays later calls without blocking the session.
Features
- Graph-based memory: OpenIE extracts entities and facts into a knowledge graph, and Personalized PageRank ranks passages for multi-hop retrieval
- Continual integration: new documents are added to an existing index and passages already present are skipped, so knowledge accumulates across runs
- Provider options: OpenAI, Azure OpenAI, any OpenAI-compatible endpoint, gateway prefixes, Amazon Bedrock through LiteLLM, Bedrock Mantle, and local Transformers or vLLM
- Token accounting: OpenAI-compatible endpoints must return usage data, and a response whose token cost cannot be accounted for is not cached
- Vector store backends: local Parquet files by default, or Qdrant, ChromaDB or Milvus (including Milvus Lite with no separate server), with per-index namespaces
- Index identity: persisted vectors and OpenIE state are bound to the models and settings that produced them, and mismatched indexes are rejected
- MCP server: retrieve, rag_qa, index, delete and index_stats tools over stdio or Streamable HTTP, with a read-only mode and a redacted config resource
- Claude Code plugin: a marketplace entry that bundles the MCP server, a skill describing when to use each tool, and an index-folder command, with the index shared across projects
- Reproduction: a unified entry point for the paper experiments, sample datasets, OpenIE outputs for gpt-4o-mini and Llama-3.3-70B-Instruct, and a standard dense-retrieval baseline
- Custom datasets: a corpus JSON format with optional query files for evaluating retrieval and QA on your own data



