HippoRAG

Stale
GitHub Python MIT

Description

NeurIPS 2024 RAG framework inspired by human long-term memory, combining knowledge graphs with personalized PageRank for continuous knowledge integration in LLMs.

Key Features

  • Neurobiologically inspired RAG framework modeled after human hippocampal memory system
  • Knowledge graph construction with personalized PageRank for associative multi-hop retrieval
  • Continuous non-parametric learning that integrates new knowledge without retraining
  • Cost and latency efficient with significantly fewer offline indexing resources than GraphRAG or RAPTOR
  • Supports both OpenAI API and local vLLM deployment for flexible model integration
  • Published at NeurIPS 2024 and ICML 2025 with proven benchmarks on sense-making and associativity tasks

Use Cases

💡 Building long-term memory systems for LLM-powered conversational agents
💡 Multi-hop question answering over large document collections
💡 Enterprise knowledge management requiring continuous knowledge integration
💡 Research applications needing associative reasoning across diverse information sources
💡 Retrieval-augmented generation for complex reasoning tasks like NarrativeQA and MuSiQue

Quick Start

1. Install: `conda create -n hipporag python=3.10 && pip install hipporag`
2. Set environment variables: `export OPENAI_API_KEY=<key>`
3. Initialize and index documents:
```python
from hipporag import HippoRAG
hipporag = HippoRAG(save_dir='outputs', llm_model_name='gpt-4o-mini', embedding_model_name='nvidia/NV-Embed-v2')
hipporag.index(docs=docs)
```
4. Run RAG QA: `results = hipporag.rag_qa(queries=queries)`

Related Projects