Project
Paper and benchmarks
SAG's original architecture, query-time dynamic hyperedges, and public multi-hop results.The SAG paper is titled SAG: SQL-Retrieval Augmented Generation with Query-Time Dynamic Hyperedges and was written by Yuchao Wu, Junqin Li, XingCheng Liang, Yongjie Chen, Yinghao Liang, Linyuan Mo, and Guanxian Li.
First page of the SAG paper
An original third architecture
Traditional dense RAG retrieves chunks primarily by semantic similarity. GraphRAG extracts triples offline, merges entities, normalizes relationships, and maintains a global graph; incremental updates can require additional graph maintenance.
SAG replaces the combination of two systems with event-entity indexing and query-time dynamic hyperedges:
- one chunk corresponds to one semantically complete event;
- one chunk can contain multiple indexing entities;
- SQL connects events that share entities around the current query;
- only locally necessary hyperedges are instantiated;
- final output still maps back to source chunks.
Public results
With the same BGE-Large-EN-v1.5 Embedding and Qwen3.6-Flash LLM configuration, SAG reports the best result in 8 of 9 Recall@1/2/5 metrics across HotpotQA, 2WikiMultiHopQA, and MuSiQue.
| Dataset | Method | Recall@1 | Recall@2 | Recall@5 |
|---|---|---|---|---|
| HotpotQA | SAG | 47.80% | 91.55% | 96.50% |
| HotpotQA | HippoRAG 2 | 44.40% | 78.35% | 94.35% |
| 2WikiMultiHopQA | SAG | 43.53% | 82.30% | 88.00% |
| 2WikiMultiHopQA | HippoRAG 2 | 42.38% | 76.55% | 90.35% |
| MuSiQue | SAG | 36.17% | 64.05% | 80.04% |
| MuSiQue | HippoRAG 2 | 30.65% | 49.52% | 65.13% |
| Average | SAG | 42.50% | 79.30% | 88.18% |
| Average | HippoRAG 2 | 39.14% | 68.14% | 83.28% |
Interpreting the metrics
Recall@k measures whether the target evidence appears within the top k results. Multi-hop questions often need multiple critical pieces of evidence in a very small candidate set, making Recall@2 and Recall@5 especially relevant to Agent context cost.
Read benchmark results together with the paper settings and reproduction scripts. Changes in models, preprocessing, indexing parameters, or evaluation code affect the numbers. Do not combine results from different settings as a direct comparison.
From paper to product
Beyond the research architecture, the public SAG application adds document parsing, background jobs, users and JWT, cited generation, MCP, an OpenAI-compatible API, desktop applications, and multiple production storage backends.
The paper explains the retrieval method. The product repository shows how that method becomes an operational, verifiable knowledge base.