Back to directory

SAG

An open-source knowledge base application, built on an original retrieval architecture called SAG, that turns uploaded documents into a searchable, source-traced knowledge graph and answers questions with citations back to the original text.

SAG

SAG is a retrieval architecture the project describes as replacing both traditional RAG and GraphRAG rather than combining them, using event-entity indexing and query-time dynamic hyperedges to do semantic retrieval and relational reasoning in one system. Its authors report it outperforms other approaches on the HotpotQA, 2WikiMultiHopQA and MuSiQue benchmarks.

The project ships a complete knowledge base application built on that architecture, for people and agents. An uploaded document is parsed, chunked, embedded, and has its events and entities extracted, while every retrieval result stays linked back to its source text; the result can be searched globally or within one source in a fast vector mode or a more precise multi-step mode, inspected as an event-entity graph, or queried through multi-turn, citation-grounded chat.

It is local-first and single-user by default, running on SQLite and LanceDB with no external database required, though it can move to PostgreSQL with pgvector for production. It exposes the same knowledge to other applications through a self-hosted REST/OpenAPI interface, an OpenAI-compatible chat endpoint, MCP, or a Python package.

More in RAG

See all 540
  • ai·rete·rag

    ai-rete-rag.com

    A platform that pairs a Rete rule engine with retrieval-augmented generation, so deterministic rules decide an outcome and grounded retrieval explains the decision in plain language.

  • Xtriever

    github.com

    A hybrid retrieval engine for retrieval-augmented generation, written in Rust to run on-device on a phone or a laptop, combining lexical BM25 search, dense embedding search, reciprocal-rank fusion and cross-encoder re-ranking with no server.

  • FileFlux

    github.com

    A .NET library that turns PDF, DOCX, HWP and other documents into optimized chunks for RAG systems, through a five-stage pipeline built on high-performance Rust FFI readers.