Back to directory

pg-raggraph

A Python library and toolkit for GraphRAG built entirely on plain PostgreSQL, combining vector search, full-text search, and knowledge-graph traversal in a single SQL query without Neo4j or a separate vector database.

pg-raggraph

pg-raggraph is a Python library for GraphRAG that runs entirely on PostgreSQL: pointed at a directory of documents, it ingests them into chunks, embeddings, extracted entities, relationships, and a full-text index, then answers queries by combining vector similarity, BM25, and graph traversal in one round trip to Postgres. It supports two retrieval workloads: classic GraphRAG over static corpora such as technical documentation and code Q&A with multi-hop entity reasoning, and evolving-knowledge retrieval for corpora where the correct answer depends on time, version, or retraction status.

Around the core library, the project also provides a CLI (pgrg), an optional FastAPI server with a web UI, and an MCP server for clients such as Claude Desktop, Cursor, and Zed. Ingestion can run synchronously, returning once the graph is built, or deferred with a background worker that backfills entities, relationships, and a code call graph out of band, including a command for code knowledge bases that rebuilds call, inheritance, and implementation edges without blocking initial ingest.

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.