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