🎉 Presented at APIA 2026. This work has been published at the 12th Conference on Practical Applications of Artificial Intelligence (APIA), held as part of PFIA 2026 in Arras, France, June 29 – July 3, 2026.
Enterprise questions are rarely simple lookups. "Which covenants survive termination in the agreements we signed last quarter, and under what conditions?" is not a sentence sitting in a document waiting to be found. It is an answer that has to be assembled from fragments scattered across documents, clauses and definitions.
That assembly step is exactly where most retrieval-augmented generation (RAG) systems quietly fail. Our Qlik Research team has just published Optimizing Hypergraph-Based RAG: Toward Better Fact Extraction and Chunk Retrieval, which tackles the problem head-on. The short version: with two targeted changes to how knowledge is extracted and how passages are retrieved, we lifted contextual recall by up to 69% and answer completeness by 11% over a strong hypergraph RAG baseline — and the better extraction method turned out to be cheaper and faster than the baseline.
Everything below is reproducible. The code and evaluation data are open source at qlik-oss/HyperGraphRAG.
Why Your AI Retrieval Still Gets Facts Wrong
Most AI systems today use a technique called Retrieval-Augmented Generation, or RAG. The idea is straightforward: instead of relying purely on what a model memorized during training, you give it access to a document collection. Standard RAG chops documents into chunks, embeds them, and retrieves whatever looks similar to the question. It is fast and it works for targeted lookups, but it flattens the relationships between entities, so cross-document reasoning falls apart.
To enable multi-hop reasoning, researchers introduced knowledge graphs into RAG systems, giving rise to GraphRAG. Instead of treating documents as bags of text chunks, a knowledge graph turns information into a web of entities and relationships. This representation enables multi-hop traversal, entity disambiguation, and global queries — for example, "what are the main themes?" But most systems rely on classical knowledge graphs that only express binary relations and struggle to represent n-ary real-world facts (a three-way commercial partnership, a merger clause conditioned on a date and a jurisdiction, etc.). This leads to information fragmentation and loss.
Hypergraphs: From Fragmented Binary to Cohesive N-ary Relationships
A hyperedge — the building block of a hypergraph — can connect any number of entities at once, so an n-ary fact stays whole. HyperGraphRAG (Luo et al., NeurIPS 2025) established this paradigm and clearly outperforms binary-graph systems.
We adopted hypergraph representation as our foundation — and then found two significant weaknesses in the baseline system:
The extraction of hyperedges from text was prone to omitted entities, missing facts, and imperfect coreference.
The retrieval mechanism under-uses the graph topology. Any entity or fact that is structurally connected but sits two or three hops out is invisible.
What We Built: Two Complementary Improvements
1. EXT++: Making Extraction More Reliable
Our extraction method, EXT++, extends HyperGraphRAG's few-shot extraction with a self-consistency prompt inspired by the Universal Self-Consistency paradigm. For each chunk, the model performs three independent extraction passes inside a single LLM call, then merges them by union with semantic deduplication. Convergence across passes statistically filters out speculative relations; the union maximises coverage of the ones that survive. We also restructured the prompt instructions:
Coreference resolution happens during extraction — pronouns are substituted with the full named entity.
Counterintuitively, EXT++ is also faster and cheaper than standard extraction. The more structured prompt benefits more from the model's prefix caching mechanism, and the internal aggregation merges redundant extractions and reduces the total number of tokens generated. It's a case where doing more careful work upfront actually costs less overall. The result is better graphs at reduced cost. This matters at enterprise scale, where hypergraph extraction means one LLM call per chunk — over 1,500 calls for the MAUD corpus alone.
2. Personalized PageRank over Hypergraphs: Not Just Semantically Similar, but Also Structurally Connected
We replaced this with an algorithm called Personalized PageRank (PPR), adapted for hypergraphs and inspired by the HippoRAG2 system. Rather than just measuring semantic similarity, PPR propagates a relevance signal through the entire graph structure. Entities and hyperedges that were identified as relevant to the query act as "seed nodes," and the algorithm flows outward — discovering document passages that are structurally connected to those seeds, even if their text wouldn't score highly on a pure similarity search.
The practical overhead of running PPR is remarkably low: less than 0.2 seconds per query, as it operates on a local subgraph seeded on query-relevant entities rather than the entire hypergraph.
How It Performs
We evaluated our approach across three different datasets: a collection of long literary novels (Fiction), dense computer science textbooks (CS), and complex legal merger agreements (MAUD). These were deliberately chosen to span a wide range of difficulty and domain specificity. Baselines spanned Standard RAG, Anthropic's contextual chunking, LangChain's Graph Transformer, HippoRAG2, and the original HyperGraphRAG. We measured contextual recall (RAGAS) plus correctness and completeness via LLM-as-a-judge with GPT-4.1-mini.
Our approach (HyperGraphRAG + EXT++ + PPR) ranks first on nearly every metric across all three corpora.
MAUD is the clearest illustration of why structure matters. Standard RAG collapses there, at 10% contextual recall and 3/10 correctness, because dozens of contracts contain near-identical clause language and dense similarity has no way to tell them apart. Contextual chunking helps by tagging each chunk with a document-level summary, but it also amplifies frequent-yet-undiscriminative lexical signals, which can steer retrieval toward contextually adjacent but irrelevant passages. Binary-graph approaches hit a different wall: LangChain's Graph Transformer suffers fragmentation and the depth-versus-noise trade-off inherent in hop-based traversal, while HippoRAG2's PPR propagation improves scores but leaves completeness low, because binary triplets cannot faithfully carry n-ary, temporal, or modal relations.
Choosing Your Reader Model: Quality Against Cost
Because extraction and generation are decoupled in our pipeline, we can fix extraction to a cheap model and swap the reader. We fixed extraction to GPT-4o mini and compared four models (Claude Sonnet 4.5, GPT-5.1, Gemini Flash 3, and GPT-4o mini) for answer generation. That isolates a single variable: how well each model exploits the context our hypergraph retrieval hands it.
All achieved high correctness scores (above 8.6/10), suggesting that the hypergraph retrieval architecture is doing its job of supplying enough good context regardless of which model you use. Where models diverged was in completeness: Claude Sonnet 4.5 scored 9.51 on fiction and 8.93 on legal documents, while GPT-4o mini scored 7.94 and 5.80 respectively (a 16–35% degradation). Stronger readers are simply better at discriminating relevant passages inside noisy context and covering every key point.
Why This Matters Beyond the Benchmark
The practical implication of this research extends well beyond academic benchmarks. Enterprise AI systems are increasingly being asked to reason over complex, interconnected information — contracts, financial filings, technical documentation, customer interaction histories. In these settings, the difference between a system that retrieves structurally connected context and one that retrieves semantically similar text can be the difference between a useful answer and a dangerously incomplete one.
If you're building AI systems that need to reason over complex, interconnected information, we'd love to hear from you.
In this article:
Qlik Lab
