bibinprathap/VeritasGraph

VeritasGraph — open-source Knowledge Graph & GraphRAG framework on GitHub. Build multi-hop reasoning, ontology-aware retrieval, and verifiable attribution over your own data. Nodes, edges, RDF, linked-data — runs locally or in the cloud.

VeritasGraph – Governed, On‑Prem GraphRAG & Agent Framework

What it is

  • An open‑source Python package that replaces traditional vector‑based Retrieval‑Augmented Generation (RAG) with a graph‑plus‑tree retrieval approach. It builds a knowledge graph from your documents, stores provenance (which chunk of which document created each node/edge), and lets LLM‑driven agents reason over that graph.
  • Designed for privacy‑first deployments: it can run entirely on a local machine (via Ollama) or in a containerised production stack (Docker + Neo4j). No data leaves the premises unless you explicitly use a cloud LLM API.

Key capabilities

Feature How it works
GraphRAG ingestion Parses PDFs, text, or other sources, extracts entities/relationships, and writes them to a Neo4j‑style graph with evidence edges that point back to the original document chunk.
Tree‑plus‑graph retrieval Combines hierarchical page‑index navigation (tree) with semantic graph links, enabling deterministic multi‑hop reasoning and exact citation of sources.
Governed agents A built‑in “Studio” UI lets you create agents, attach guard‑rails (PII redaction, policy blocks), memory, and tool catalogs. The orchestration pipeline is fully observable per turn.
MCP server Exposes the engine over the Model Context Protocol (JSON‑RPC) so IDE‑based assistants (Claude Desktop, Cursor, VS Code, etc.) can query the graph without any external network traffic.
Modes lite (cloud LLMs, quick demo), local (Ollama models, offline), full (Docker + Neo4j for production).
Extensible examples Includes demos for medical clinical‑note KG, construction‑drawing take‑off, and a municipality incident‑report chatbot, showing how to plug in vision models, CV validation, and custom tools.

Typical workflow

  1. Ingest – veritasgraph ingest <doc> (or run the Studio UI) to create a KG with provenance.
  2. Query – veritasgraph query "…" returns a multi‑hop answer plus citations like [doc3#chunk12].
  3. Agent – Define an agent in Studio, attach tools (e.g., HTTP calls), set guard‑rails, and chat. The UI visualises each step: guard‑rail → memory → graph lookup → tool call → response.
  4. Deploy – Run the MCP server (python -m veritasgraph_mcp) and point any MCP‑compatible IDE assistant to it.

Why it matters

  • Attribution by design – provenance is stored at write‑time, eliminating hallucinated citations.
  • Deterministic retrieval – graph traversal yields the same evidence trace every run, unlike stochastic vector similarity.
  • Explicit abstention – if the graph lacks a needed edge, the agent can reply “insufficient evidence” instead of guessing.
  • Enterprise‑ready – on‑prem, audit logs, PII redaction, and role‑based access are built in.

Getting started

pip install veritasgraph
veritasgraph demo --mode=lite   # quick cloud‑API demo
# or for full offline use
veritasgraph demo --mode=local --model=llama3.2

For a full production stack see the Docker/Neo4j instructions in the repo.

Resources

  • Live demo site, Studio UI, and Colab notebooks linked in the README.
  • PDF guide Build Governed AI Agents On‑Prem (walkthrough of architecture and deployment).
  • YouTube talks demonstrating the graph reasoning visualisation and vision‑RAG extensions.

Bottom line: VeritasGraph is a genuine, MIT‑licensed framework for building trustworthy, on‑prem AI agents that reason over structured knowledge graphs rather than raw vector similarity, with full auditability and zero‑trust integration options.

Related

  • Project
  • Project
  • Project
  • Project
  • Project