# HyperRAG

A retrieval-augmented generation system that represents facts involving more than two entities as hyperedges in a hypergraph, using a memory-guided beam retriever and a trained retriever to reason over them.

HyperRAG addresses a limitation of conventional retrieval-augmented generation systems: their inability to represent n-ary facts, relationships that involve more than two entities at once, without losing context when decomposed into simple binary edges. It instead encodes such facts as hyperedges in a hypergraph, where one edge can connect any number of nodes.

The system combines two modules: HyperMemory, which uses a language model's own parametric memory to guide beam search over these n-ary facts without extra training, and HyperRetriever, a trained MLP-based retriever that scores candidate hyperedges for a query by fusing structural and semantic signals. It builds on the earlier HyperGraphRAG codebase and was accepted at The Web Conference 2026.

Website: https://github.com/Vincent-Lien/HyperRAG
