Dev.to
7/6/2026

Open Source Project of the Day (#116): SAG — Multi-Hop RAG Retrieval via SQL JOINs Instead of PageRank
Short summary
SAG is an open-source RAG framework by Zleap-AI that solves multi-hop retrieval using SQL JOINs instead of PageRank scoring. It converts documents into event-entity graph structures and expands queries deterministically at runtime, avoiding PageRank decay and expensive offline graph construction. Benchmarks show 80% Recall@5, outperforming triple-based approaches, with TypeScript + PostgreSQL implementation and MCP agent integration.
- •Solves multi-hop RAG using SQL JOINs instead of PageRank, eliminating score decay on long chains
- •Event-entity graph model persisted in PostgreSQL enables query-time expansion without offline graph construction
- •Benchmarks achieve 80% Recall@5 vs 77.1% for triple approaches, with MCP agent integration and full TypeScript stack
Generated with AI, which can make mistakes.
Is this a good recommendation for you?



