Introducing SAG2: A New State of the Art, 7,000× Faster Indexing, No Vectors, Just Files

SAG2 combines keyword indexing with dynamic multi-hop retrieval. Explore indexing performance, public benchmarks, SAG Wiki and applications in agent memory.

Hi everyone, I am Jomy.

Last year, we introduced SAG, a RAG method that achieved state-of-the-art multi-hop retrieval.

It worked well, but the engineering was still somewhat complicated. An LLM had to analyze documents and extract events and entities, then convert text into vectors and build an index.

I kept asking myself: could we remove vectors entirely and achieve similar results?

When JEV appeared this year, I saw an opportunity.

I designed SAG2 around the core ideas of SAG, then refined it through multiple rounds of experiments and optimization.

To my surprise, it ultimately achieved a new state of the art on three public benchmarks.

A New State of the Art

Paper: https://arxiv.org/abs/2610.22588

We tested 1,000 questions each on MuSiQue, 2WikiMultiHopQA and HotpotQA.

Recall@5 measures how much of the required evidence appears in the first five results; Recall@10 measures the first ten. We examine both because agents need complete evidence from as few results as possible.

Across three datasets and two metrics, SAG2 set new state-of-the-art results throughout.

SAG2 retrieval benchmark results

On the more difficult MuSiQue dataset, SAG2 achieved 80.68% Recall@5, 15.55 percentage points above HippoRAG 2. Recall@10 was 86.62%, an improvement of 12.86 percentage points.

Compared with our previous state-of-the-art method, SAG, Recall@5 increased from 93.34% to 97.35% on 2WikiMultiHopQA and from 96.50% to 98.45% on HotpotQA. Recall@10 improved by 3.25, 3.86 and 1.30 percentage points across the three datasets.

7,000× Faster Indexing

SAG already simplified knowledge graph structure. Traditional graphs break a passage into entity–relationship–entity triples. SAG retains a complete event and connects its multiple entities through a one-to-many hyperedge. This preserves context and avoids extracting every relationship individually.

However, SAG still calls an LLM for each passage to extract events and entities. SAG2 directly builds a keyword index over the original text and uses BM25 to find content by keyword relevance. Indexing requires neither an LLM nor embeddings.

Consider MuSiQue. For the same 11,656 passages, the original SAG paper (https://arxiv.org/html/2606.15971v2) reported 4.57 hours of indexing and 28.26 million tokens.

This time, on a Mac with an M4 Pro and 64 GB of memory, we rebuilt the database from scratch three times. The median time was just 2.36 seconds.

The difference between 4.57 hours and 2.36 seconds is approximately 7,000-fold.

SAG and SAG2 indexing performance

We also tested a larger corpus: 511,962 documents and approximately 2.465 billion characters. File inventory, indexing and integrity checks took 8 minutes and 32 seconds in total.

That is about 200 milliseconds per million characters.

Any File Can Become Part of a Knowledge Base

Speed changes what is possible.

When indexing takes so little time, product assumptions change. Previously, creating a knowledge base meant selecting files, uploading them and waiting for model processing. Now any readable file can become part of the knowledge base directly.

We built a desktop application on SAG2: SAG Wiki. Select a local folder to search and ask questions about supported documents, notes and code, then return to the original text to verify the evidence.

The installer remains small: approximately 9.5 MB on Windows and 12.5 MB on macOS. Files stay in their original directories. When you ask a question, your configured model answers using retrieved evidence.

A retrieval usually takes 1–3 seconds, depending on its parameters.

The application is open source. Please give it a try:

https://github.com/Zleap-AI/SAG-Wiki

Why Is It Fast and Effective?

I have long believed in a “conservation of intelligence” principle: intelligence depends on computation.

Embeddings provide a limited form of intelligence between simple computation and LLMs, enabling fast, approximate matching. JEV (https://typesafe.ai/blog/introducing-system-one-models-and-jev) occupies a similar position and specializes in quickly judging whether content is useful.

Give it a question, candidate passages and evidence already found, and it returns a relevance score directly, without generating a long explanation. Semantic judgments can therefore happen at query time, processing only candidates relevant to the current question.

Multi-hop retrieval also requires connections between dispersed pieces of content. That is the core idea SAG passes on to SAG2.

SAG organizes content through dynamic event–entity hyperedges, demonstrating the retrieval benefits of this structure.

SAG2 turns these into dynamic keyword–passage hyperedges. One keyword connects multiple passages, and each passage contains multiple keywords. The connections come directly from the source text.

SAG: event → entity → another event
SAG2: passage → keyword → another passage

Retrieval starts with BM25 candidates, then JEV judges which contain useful evidence. The algorithm selects keywords from those passages and searches for related passages. JEV assesses the new material in the context of evidence already found.

SAG2 multi-hop retrieval process

Consider this question from the paper: which county contains Erik Hort's birthplace?

The first retrieval finds a biographical passage saying he was born in Montebello. The algorithm then searches for Montebello and finds a passage about that place. Combining the two original passages answers the question.

That is multi-hop retrieval. SAG2 retains the structural advantages of SAG's dynamic hyperedges while removing the need to extract events and entities in advance.

Testing on Half a Million Enterprise Documents

Beyond academic question answering, we ran the complete EnterpriseRAG-Bench evaluation (https://arxiv.org/abs/2605.05253). The collection of over half a million documents mentioned earlier comes from this dataset.

It constructs documents around enterprise knowledge scenarios, simulating email, messages, tickets and meeting records. Evidence for a question may be spread across projects and files, with constraints and conflicting information. It is closer to enterprise requirements than Wikipedia question answering.

Its scale makes a full experiment expensive. At 2.465 billion characters, a sample-based estimate puts the source text alone at approximately 600 million tokens. Passage-by-passage LLM processing adds repeated prompts and generated output.

In a scaling study of EnterpriseRAG-Bench (https://arxiv.org/html/2607.26497v3), none of four graph-based methods completed a full evaluation under the study's conditions. LightRAG processed 2,254 documents, MS-GraphRAG 8,750, and HippoRAG 2 and LinearRAG stopped at 131,876. None reached the full collection of approximately 510,000 documents.

Our earlier estimate suggested that first-generation SAG might take seven days on a local GPU. Frameworks that rely on LLM preprocessing of each passage make even one experiment expensive, let alone repeated evaluations of different versions.

SAG2 completed retrieval evaluation on all 511,962 documents, with the full scoring run taking just over an hour.

Of these questions, 470 include reference documents to retrieve. SAG2 found 81.10% of the required documents among its first ten results: document Recall@10.

EnterpriseRAG-Bench document retrieval results

The benchmark paper reported 68.4% for BM25, 46.0% for vector retrieval and 55.8% for Bash Agent. SAG2 improved on BM25 by 12.70 percentage points.

Bash Agent asks an LLM to execute search commands, read material and decide what to do next. SAG2 uses no LLM in its retrieval process: the algorithm chooses search steps, while JEV assesses evidence. It exceeded Bash Agent by 25.30 percentage points in this test.

SAG Wiki combines these capabilities. A Bash Agent calls SAG2 through the command line, retrieves relevant evidence and decides whether further searching is needed.

An agent using SAG2 can be more accurate than SAG2 alone. On 1,000 MuSiQue questions, this combination increased Recall@10 from 86.62% to 95.39%. SAG2 retrieves accurately; the agent further interprets the question and requests supplementary searches.

Built for Harnesses and Memory

This approach also fits today's agent harnesses.

SQLite is a file. Both source text and indexes remain in the file system, with no separate database service to deploy. A single search gives an agent original evidence gathered through multi-hop retrieval, allowing it to continue its task.

In one experiment, we replaced grep with SAG2 as an agent tool. Token use fell by approximately two-thirds on the relevant tasks, and completion quality improved.

Its simplicity, low cost and accuracy could make SAG2 a widely used file retrieval solution for harnesses.

The same applies to memory. Agents must find relevant content across records, identify connections and apply them to the current task. SAG2's multi-hop structure and low cost fit this process too.

Without any adaptation, we also achieved state-of-the-art results on the LOCOMO and LongMemEval memory datasets. The paper will be published soon; consider this a preview.

There is also an option for local deployment. We tried replacing JEV with a reranking model for candidate judgments and obtained acceptable Recall@10. JEV is not open source and its architecture is unpublished. Current local alternatives do not match its speed or quality, leaving room for further improvement.

Now Open Source

Today, we are publishing the SAG2 paper and open-sourcing the method and SAG Wiki application.

SAG attracted considerable interest, and people have sent us feedback about useful applications they built with it. It is gratifying to see research used in practice.

For me, SAG2 is another major change. A simpler structure and lower cost make precise multi-hop retrieval available to more people.

If you find this work useful, please star our open-source projects and share the article so more people can discover and use the technology.

We also look forward to the applications you build with SAG2, whether knowledge bases, agent memory or future recommendation systems. Join our WeChat group to discuss ideas and experiences.

Paper: https://arxiv.org/abs/2610.22588

Research code: https://github.com/Zleap-AI/SAG-Benchmark

Desktop application: https://github.com/Zleap-AI/SAG-Wiki

Website: https://zleap.com/

Discussion group: Open the Zleap official WeChat account, select Contact Us, and scan the code to join.