Qlik Lab

Beyond Binary Relations

How Qlik Made Hypergraph RAG More Reliable and Cheaper to Run

🎉 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.

Figure 1 — The same fact, two representations. On the left, the statement is split into independent binary edges: the A380's inaugural route becomes indistinguishable from any other aircraft sharing a departure, a destination, and a year. On the right, a single hyperedge preserves the whole fact involving all entities without any loss.

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.

The structural payoff is substantial. On the Fiction corpus, the share of isolated hyperedges drops from 62% to 20% — meaning almost every extracted fact is now anchored to at least one entity and reachable during search. Average entity degree rises, multiplying the propagation paths available for multi-hop reasoning. On the MAUD corpus, hyperedge descriptions grow from 28 to 49 tokens (+72% richer semantics) and entities per connected hyperedge climb from 1.96 to 2.41 (+23%).

Figure 2 — EXT++ produces hypergraphs that are more connected, more descriptive and structurally richer.

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

The second limitation was in how chunks of text were retrieved. Even with a beautifully constructed hypergraph, the original HyperGraphRAG system still used standard vector search — "find the passages that are semantically closest to this query" — to identify relevant document chunks. This is like navigating a city by only considering how geographically close each destination is to your starting point, ignoring roads, bridges, and connectivity entirely.

Figure 3 — Personalized PageRank (PPR) based Retrieval in three stages to redistribute importance by structural proximity.

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

Our approach (HyperGraphRAG + EXT++ + PPR) ranks first on nearly every metric across all three corpora.

Figure 4 — Relative gains over the HyperGraphRAG baseline: Contextual recall improves 69% on MAUD and 51% on Fiction, with completeness up 11% on both, relative to the HyperGraphRAG baseline.

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.

Figure 5 — Four reader models on identical retrieved context. Correctness clusters inside a 1.28-point band; completeness pulls apart, and the gap widens as the domain gets more specialized.

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.

At Qlik, our focus is on making data meaningful and trustworthy at scale. This research is a step toward AI retrieval systems that are not just faster or cheaper, but fundamentally more accurate in how they represent and navigate knowledge.

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

Ready to get started?