{"repo": "bibinprathap/veritasgraph", "files": {"README.md": {"4c5b97f941b29f5086695bcce0061c42e04e378b": {"t": 1785674370.6760633, "n": 22437, "h": "e4153dc773009fbf", "c": "๏ปฟ# VeritasGraph โ€” The Governed, On-Prem GraphRAG & Agent Framework\r\n\r\n**Stop chunking blindly. Combine Tree-Search structure with Knowledge-Graph reasoning โ€” and wire it into governed AI agents. Runs 100% locally or in the cloud.**\r\n\r\n\"VeritasGraph\r\n\r\n[![PyPI version](https://badge.fury.io/py/veritasgraph.svg)](https://badge.fury.io/py/veritasgraph)\r\n[![Python 3.10+](https://img.shields.io/badge/python-3.10+-blue.svg)](https://www.python.org/downloads/)\r\n[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)\r\n[![CI](https://github.com/bibinprathap/VeritasGraph/actions/workflows/ci.yml/badge.svg)](https://github.com/bibinprathap/VeritasGraph/actions)\r\n[![GitHub Stars](https://img.shields.io/github/stars/bibinprathap/VeritasGraph?style=social)](https://github.com/bibinprathap/VeritasGraph)\r\n\r\n> **๐ŸŽฏ Traditional RAG guesses based on similarity. VeritasGraph reasons based on structure.**\r\n> Don't just find the document โ€” understand the connection, then act on it with governed agents.\r\n\r\nโญ [Star](https://github.com/bibinprathap/VeritasGraph) ยท ๐Ÿด [Fork](https://github.com/bibinprathap/VeritasGraph/fork) ยท ๐Ÿ’ฌ [Discuss](https://github.com/bibinprathap/VeritasGraph/discussions) ยท ๐Ÿ› [Report a bug](https://github.com/bibinprathap/VeritasGraph/issues)\r\n\r\n---\r\n\r\n## ๐Ÿ“š Featured Guide โ€” Build Governed AI Agents On-Prem\r\n\r\nA complete walkthrough of designing, wiring, and shipping governed AI agents entirely on your own infrastructure.\r\n\r\n**[๐Ÿ“„ Read the guide: *Build Governed AI Agents On-Prem* (PDF)](https://github.com/bibinprathap/VeritasGraph/blob/restored-main/Build-Governed-AI-Agents-On-Prem.pdf)**\r\n\r\n[![Build Governed AI Agents On-Prem โ€” walkthrough](https://img.youtube.com/vi/sA7ReEgdJfg/maxresdefault.jpg)](https://youtu.be/sA7ReEgdJfg)\r\n[![Import Any graph.json into VeritasGraph Studio โ€” Walkthrough](https://img.youtube.com/vi/Po2Z6QtqFks/maxresdefault.jpg)](https://youtu.be/Po2Z6QtqFks)\r\n> โ–ถ๏ธ **[Watch the walkthrough on YouTube](https://youtu.be/sA7ReEgdJfg)**\r\n\r\n---\r\n\r\n## ๐Ÿš€ Quick Start (2 lines, no GPU)\r\n\r\n```bash\r\npip install veritasgraph\r\nveritasgraph demo --mode=lite\r\n```\r\n\r\nThat's it โ€” an interactive demo using cloud APIs (OpenAI/Anthropic), no local models required.\r\n\r\n| Mode | Best For | Requirements |\r\n|------|----------|--------------|\r\n| `--mode=lite` | Quick demo, no GPU | OpenAI/Anthropic API key |\r\n| `--mode=local` | Privacy, offline use | Ollama + 8GB RAM |\r\n| `--mode=full` | Production, all features | Docker + Neo4j |\r\n\r\n```bash\r\nexport OPENAI_API_KEY=\"sk-...\" # Lite: cloud APIs, zero setup\r\nveritasgraph demo --mode=lite\r\n\r\nveritasgraph demo --mode=local --model=llama3.2 # 100% offline with Ollama\r\nveritasgraph start --mode=full # full GraphRAG pipeline\r\n```\r\n\r\n

\r\n \"Colab:\r\n  \r\n \"Colab:\r\n  \r\n \"Colab:\r\n

\r\n\r\n**Useful links:** [โšก Live docs](https://bibinprathap.github.io/VeritasGraph/index.html) ยท [๐ŸŽฎ Live demo](https://bibinprathap.github.io/VeritasGraph/demo/) ยท [๐Ÿ“– Article](https://medium.com/@bibinprathap/beyond-vector-search-building-trustworthy-enterprise-ai-with-the-veritasgraph-rag-pipeline-53fc8e9e8ff9) ยท [๐Ÿ“„ Research paper](VeritasGraph%20-%20A%20Sovereign%20GraphRAG%20Framework%20for%20Enterprise-Grade%20AI%20with%20Verifiable%20Attribution.pdf)\r\n\r\n---\r\n\r\n## ๐Ÿ› ๏ธ VeritasGraph Studio โ€” Build, wire & test governed agents locally\r\n\r\n**Studio** is a local Agent Build Workspace (FastAPI + single-page UI) that lets you build a knowledge graph from your own documents and **wire it into agents** alongside tools, memory, data logging, guardrails, and headroom-style context budgeting โ€” then chat with those agents live and watch every stage of the orchestration pipeline. Everything runs **100% locally** against [Ollama](https://ollama.com).\r\n\r\n\r\n\r\n> **[๐ŸŽฎ Try the Studio Live](https://bibinprathap.github.io/VeritasGraph/studio/)** โ€” *stable URL that always redirects to the current running studio tunnel.*\r\n\r\n**Run it:**\r\n\r\n```bash\r\npip install -r requirements.txt\r\nollama serve & ollama pull qwen3:latest # any local chat model\r\nSTUDIO_DATA_DIR=\"$PWD/studio_api/data\" \\\r\n uvicorn studio_api.main:app --host 127.0.0.1 --port 8200 --log-level warning\r\n# Studio UI โ†’ http://localhost:8200/studio ยท API docs โ†’ /docs\r\n```\r\n\r\n**One-command end-to-end demo** (builds a graph + drives a fully-wired agent through graph reasoning, memory recall, PII redaction, and a guardrail block):\r\n\r\n```bash\r\npython3 demos/agent-studio/sample_pipeline.py --model qwen3:latest\r\n```\r\n\r\n
\r\nWhat's inside โ€” full Studio feature set\r\n\r\n- ๐Ÿงฉ **Knowledge Graph builder & explorer** โ€” ingest text, extract entities/relationships locally, inspect nodes/edges with grounded evidence.\r\n- ๐Ÿ”Ž **Graph Q&A with citations** โ€” multi-hop answers backed by `[doc#chunk]` source attribution.\r\n- ๐Ÿค– **Agent workspace** โ€” create/edit agents with model selection, prompt/persona settings, and per-agent capability toggles.\r\n- ๐Ÿ”€ **Governed orchestration pipeline** โ€” per-turn flow of Guardrails โ†’ Memory โ†’ Knowledge Graph โ†’ Headroom budget โ†’ Tools โ†’ Data log, with full trace visibility.\r\n- ๐Ÿงฐ **Editable tools catalog** โ€” add, edit, enable/disable, test, and delete tools directly in Studio.\r\n- ๐ŸŒ **External real tool support** โ€” call real HTTP endpoints with configurable method, auth header, and custom headers.\r\n- ๐Ÿ”Œ **MCP bridge integrations** โ€” local MCP proxy connectors (e.g. Chrome DevTools MCP, Unity MCP) with health-aware probing.\r\n- ๐Ÿ›ก๏ธ **Guardrails** โ€” PII redaction and policy-block controls with visible guardrail-block metrics.\r\n- ๐Ÿง  **Memory + Data logs** โ€” per-agent short-term memory and interaction-log persistence.\r\n- ๐Ÿ“ˆ **Evaluation & fine-tune simulation** โ€” run eval suites, track pass-rate trends, and queue/monitor fine-tune jobs.\r\n- ๐Ÿ’ฌ **Playground** โ€” run governed agent conversations live and inspect the pipeline trace.\r\n- ๐Ÿ“Š **KPI dashboard** โ€” active agents, connected tools, eval pass rate, and guardrail-block counters.\r\n\r\nSee [`studio_api/README.md`](studio_api/README.md) for API and architecture, and [`docs/STUDIO_ENTERPRISE_TEST.md`](docs/STUDIO_ENTERPRISE_TEST.md) for enterprise test scenarios.\r\n\r\n
\r\n\r\n---\r\n\r\n## ๐ŸŒณ + ๐Ÿ”— Graph + Tree: the ultimate retrieval\r\n\r\n**Why choose?** VeritasGraph includes the hierarchical \"Table of Contents\" navigation of PageIndex **PLUS** the semantic reasoning of a Knowledge Graph.\r\n\r\n```\r\nDocument Root\r\nโ”œโ”€โ”€ [1] Introduction\r\nโ”‚ โ”œโ”€โ”€ [1.1] Background โ†โ”€โ”€ Tree Navigation\r\nโ”‚ โ””โ”€โ”€ [1.2] Objectives\r\nโ”œโ”€โ”€ [2] Methodology โ†โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€ Graph Links\r\nโ”‚ โ””โ”€โ”€ relates_to โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ†’ [3.1] Findings\r\nโ””โ”€โ”€ [3] Results\r\n```\r\n\r\n### ๐Ÿ“Š Feature comparison\r\n\r\n| Feature | Vector RAG | PageIndex | **VeritasGraph** |\r\n|---------|:----------:|:---------:|:----------------:|\r\n| **Retrieval type** | Similarity | Tree search | ๐Ÿ† Tree + Graph reasoning |\r\n| **Attribution** | โŒ Low | โš ๏ธ Medium | โœ… **100% verifiable** |\r\n| **Multi-hop reasoning** | โŒ | โŒ | โœ… |\r\n| **Tree navigation (TOC)** | โŒ | โœ… | โœ… |\r\n| **Semantic search** | โœ… | โŒ | โœ… |\r\n| **Cross-section linking** | โŒ | โŒ | โœ… |\r\n| **Visual graph explorer** | โŒ | โŒ | โœ… **Built-in UI** |\r\n| **100% local/private** | โš ๏ธ Varies | โŒ Cloud | โœ… **On-premise** |\r\n| **Open source** | โš ๏ธ Varies | โŒ Proprietary | โœ… **MIT license** |\r\n\r\n

\r\n \"Traditional\r\n

\r\n\r\n---\r\n\r\n## ๐ŸŽฌ See it in action\r\n\r\n[![VeritasGraph Master Demo](https://img.youtube.com/vi/oa8ektm7nLY/maxresdefault.jpg)](https://youtu.be/oa8ektm7nLY)\r\n\r\n

\r\n \"Watch\r\n  \r\n \"Convert\r\n

\r\n\r\n> **๐Ÿ’ก What you're seeing:** a query triggers multi-hop reasoning across the knowledge graph. Nodes light up as connections are discovered, showing exactly *how* the answer was found โ€” not just *what* was found.\r\n\r\n---\r\n\r\n## ๐Ÿ”Œ MCP Server โ€” connect your IDE agent to VeritasGraph\r\n\r\nVeritasGraph ships a dedicated **[Model Context Protocol](https://modelcontextprotocol.io/) server** โ€” *the first zero-trust, air-gapped Enterprise GraphRAG server for MCP.* Connect Claude Desktop, Cursor, VS Code, Windsurf, Cline, or Continue directly to the GraphRAG engine over JSON-RPC 2.0 stdio, with **zero external data egress**.\r\n\r\n```bash\r\npython -m veritasgraph_mcp # from repo root (needs local Ollama for ingest/query)\r\n```\r\n\r\nTools: `veritasgraph_ingest_document`, `veritasgraph_query` (multi-hop answers with `[doc#chunk]` citations), `veritasgraph_search_entities`, `veritasgraph_get_graph`, `veritasgraph_clear_graph`. See [`veritasgraph_mcp/README.md`](veritasgraph_mcp/README.md) for IDE registration snippets.\r\n\r\n---\r\n\r\n## ๐Ÿ“– Python API\r\n\r\n```python\r\nfrom veritasgraph import VisionRAGPipeline\r\n\r\npipeline = VisionRAGPipeline() # auto-detects available models\r\ndoc = pipeline.ingest_pdf(\"document.pdf\")\r\nresult = pipeline.query(\"What are the key findings?\")\r\nprint(result.answer)\r\n```\r\n\r\n
\r\n๐ŸŒณ Hierarchical tree navigation + graph search\r\n\r\n```python\r\nfrom veritasgraph import VisionRAGPipeline\r\n\r\npipeline = VisionRAGPipeline()\r\ndoc = pipeline.ingest_pdf(\"report.pdf\")\r\n\r\n# View the document's hierarchical structure (like a Table of Contents)\r\nprint(pipeline.get_document_tree())\r\n# Document Root\r\n# โ”œโ”€โ”€ [1] Introduction (pp. 1-5)\r\n# โ”‚ โ”œโ”€โ”€ [1.1] Background (pp. 1-2)\r\n# โ”‚ โ””โ”€โ”€ [1.2] Objectives (pp. 3-5)\r\n# โ””โ”€โ”€ [2] Methodology (pp. 6-15)\r\n\r\n# Navigate to a specific section (tree-based retrieval)\r\nsection = pipeline.navigate_to_section(\"Methodology\")\r\nprint(section['breadcrumb']) # ['Document Root', 'Methodology']\r\n\r\n# Or use graph-based semantic search\r\nresult = pipeline.query(\"What methodology was used?\")\r\n# โ†’ answer with section context: \"๐Ÿ“ Location: Document > Methodology > Analysis Framework\"\r\n```\r\n\r\n
\r\n\r\n
\r\n๐Ÿ”ง Custom configuration & ingestion modes\r\n\r\n```python\r\nfrom veritasgraph import VisionRAGPipeline, VisionRAGConfig\r\n\r\nconfig = VisionRAGConfig(ingest_mode=\"document-centric\") # tables stay intact!\r\npipeline = VisionRAGPipeline(config)\r\ndoc = pipeline.ingest_pdf(\"annual_report.pdf\")\r\n```\r\n\r\n| Mode | Description | Best For |\r\n|------|-------------|----------|\r\n| `document-centric` | Whole pages/sections as nodes (default) | Most documents |\r\n| `page` | Each page = one node | Slide decks, reports |\r\n| `section` | Each section = one node | Structured documents |\r\n| `chunk` | Traditional 500-token chunks | Legacy compatibility |\r\n\r\n
\r\n\r\n### CLI\r\n\r\n```bash\r\nveritasgraph --version # show version\r\nveritasgraph info # check dependencies\r\nveritasgraph init my_project # initialize a project\r\nveritasgraph ingest document.pdf --ingest-mode=document-centric # Don't Chunk. Graph.\r\nveritasgraph ingest https://youtube.com/watch?v=xxx # auto-extract transcript\r\nveritasgraph ingest https://example.com/article # extract web article\r\n```\r\n\r\n### Installation options\r\n\r\n```bash\r\npip install veritasgraph # basic (includes lite mode)\r\npip install veritasgraph[web] # Gradio UI + visualization\r\npip install veritasgraph[graphrag] # Microsoft GraphRAG integration\r\npip install veritasgraph[ingest] # YouTube & web-article ingestion\r\npip install veritasgraph[all] # everything\r\n```\r\n\r\n---\r\n\r\n## ๐Ÿ›๏ธ Enterprise Compliance โ€” VeritasGraph + VeritasReason\r\n\r\nGraphRAG is brilliant at *describing* what your documents say. But enterprise questions like **\"Which purchase orders violated our Segregation-of-Duties policy last quarter?\"** are **rule-evaluation problems** over structured records โ€” not similarity search.\r\n\r\nFor those, VeritasGraph ships a sister module: **[VeritasReason](veritas-reason/README_VERITASREASON.md)** โ€” a deterministic reasoning engine (forward-chaining + Rete + SPARQL) that fires policy rules over a triplet store and returns auditable answers with W3C PROV-O provenance.\r\n\r\n```\r\n Policy PDFs โ”€โ” โ”Œโ”€ ingest_structured.py (SQL โ†’ triples + text)\r\n โ–ผ โ–ผ\r\n VeritasGraph GraphRAG VeritasReason (TripletStore + RuleSet\r\n (quotes policy text) + ForwardChainer + PROV-O)\r\n โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜\r\n โ–ผ\r\n Compliance answer + violators table + clause citations\r\n```\r\n\r\n### 30-second smoke test (no install, stdlib only)\r\n\r\n```bash\r\npython tests/test_policy_compliance_demo.py\r\n```\r\n\r\nSeeds a fake ERP into a tiny in-memory triple store, evaluates four SoD rules from [rules/sod_policy.yaml](rules/sod_policy.yaml), and prints violators with citations:\r\n\r\n```\r\nโœ“ Reasoner fired. Detected 4 violation(s):\r\n po:PO-2204 SOD-01 Approved & paid by emp:E118\r\n po:PO-2301 SOD-02 Requested & approved by emp:E091\r\n po:PO-2317 SOD-03 $48,750.00 approved by emp:E091 (role:Manager, not Director)\r\n po:PO-2402 SOD-04 Vendor vendor:V77 related to approver emp:E140\r\n```\r\n\r\nOr install and run the packaged demo:\r\n\r\n```bash\r\npip install veritas-reason\r\nveritasreason-policy-demo\r\n```\r\n\r\n

\r\n \"VeritasGraph\r\n

\r\n\r\nThe same pattern applies to leave-policy violations (HRIS attendance), expense-report fraud (ledger + receipts), clinical protocol breaches (EHR + guidelines), or KYC/AML (transactions + watchlists). Define the SQL โ†’ triple mapping in [ingest_structured.py](graphrag-ollama-config/ingest_structured.py), write rules in `rules/*.yaml`, and ask in plain English. See [veritas-reason/plan.md](veritas-reason/plan.md) for a full walk-through.\r\n\r\n---\r\n\r\n## ๐Ÿ”— Interactive Graph Visualization\r\n\r\nVeritasGraph includes an **interactive 2D knowledge-graph explorer** (PyVis) that visualizes entities and relationships in real time.\r\n\r\n![Graph Explorer](assets/graph-explorer.png)\r\n\r\n| Feature | Description |\r\n|---------|-------------|\r\n| **Query-aware subgraph** | Shows only entities related to your query |\r\n| **Community coloring** | Nodes grouped by community membership |\r\n| **Red highlight** | Query-related entities shown in red |\r\n| **Node sizing** | Bigger nodes = more connections |\r\n| **Interactive** | Drag, zoom, hover for entity details |\r\n| **Full graph explorer** | View the entire knowledge graph |\r\n\r\n---\r\n\r\n## โš™๏ธ Provider Support (OpenAI-compatible)\r\n\r\nVeritasGraph works with **any OpenAI-compatible API** โ€” mix and match cloud and local:\r\n\r\n| Provider | API Base | API Key | Example Model |\r\n|----------|----------|---------|---------------|\r\n| **Ollama** (default) | `http://localhost:11434/v1` | `ollama` | `llama3.1-12k` |\r\n| **OpenAI** | `https://api.openai.com/v1` | `sk-proj-...` | `gpt-4-turbo-preview` |\r\n| **Groq** | `https://api.groq.com/openai/v1` | `gsk_...` | `llama-3.1-70b-versatile` |\r\n| **Together AI** | `https://api.together.xyz/v1` | your-key | `Meta-Llama-3.1-70B-Instruct-Turbo` |\r\n| **LM Studio** | `http://localhost:1234/v1` | `lm-studio` | (model loaded in LM Studio) |\r\n\r\nAlso supported: Azure OpenAI, OpenRouter, Anyscale, LocalAI, vLLM.\r\n\r\n```bash\r\ncd graphrag-ollama-config\r\ncp settings_openai.yaml settings.yaml\r\ncp .env.openai.example .env # edit with your provider settings\r\npython -m graphrag.index --root . --config settings_openai.yaml\r\npython app.py\r\n```\r\n\r\n> โš ๏ธ **Embeddings must match your index.** If you indexed with `nomic-embed-text` (768 dims), you must query with the same model โ€” switching embedding models requires **re-indexing**. Full details in [OPENAI_COMPATIBLE_API.md](graphrag-ollama-config/OPENAI_COMPATIBLE_API.md).\r\n\r\n---\r\n\r\n## ๐Ÿณ Deployment\r\n\r\n### Five-Minute Magic Onboarding (Docker)\r\n\r\nRun a full stack (Ollama + Neo4j + Gradio) with one command:\r\n\r\n```bash\r\ncd docker/five-minute-magic-onboarding\r\n# set your Neo4j password in .env, then:\r\ndocker compose up --build\r\n```\r\n\r\nServices: Gradio UI โ†’ http://127.0.0.1:7860 ยท Neo4j โ†’ http://localhost:7474 ยท Ollama โ†’ http://localhost:11434. See [`docker/five-minute-magic-onboarding/README.md`](docker/five-minute-magic-onboarding/README.md).\r\n\r\n### Share with your team (free)\r\n\r\n| Method | Duration | Local Ollama | Setup | Best For |\r\n|--------|----------|:------------:|-------|----------|\r\n| `python app.py --share` | 72 hours | โœ… | 1 min | Quick demos |\r\n| Ngrok tunnel | Unlimited* | โœ… | 5 min | Team evaluation |\r\n| Cloudflare tunnel | Unlimited* | โœ… | 5 min | Team evaluation |\r\n| Hugging Face Spaces | Permanent | โŒ (cloud LLM) | 15 min | Public showcase |\r\n\r\n_*Free tier has some limitations._\r\n\r\n---\r\n\r\n## ๐Ÿ—๏ธ Architecture\r\n\r\n```mermaid\r\ngraph TD\r\n subgraph \"Indexing Pipeline (one-time)\"\r\n A[Source Documents] --> B{Document Chunking};\r\n B --> C{\"LLM Extraction
(Entities & Relationships)\"};\r\n C --> D[Vector Index];\r\n C --> E[Knowledge Graph];\r\n end\r\n subgraph \"Query Pipeline (real-time)\"\r\n F[User Query] --> G{Hybrid Retrieval Engine};\r\n G -- \"1. Vector search for entry points\" --> D;\r\n G -- \"2. Multi-hop graph traversal\" --> E;\r\n G --> H{Pruning & Re-ranking};\r\n H -- \"Rich context\" --> I{LoRA-Tuned LLM Core};\r\n I -- \"Answer + provenance\" --> J{Attribution Layer};\r\n J --> K[Attributed Answer];\r\n end\r\n style A fill:#f2f2f2,stroke:#333,stroke-width:2px\r\n style F fill:#e6f7ff,stroke:#333,stroke-width:2px\r\n style K fill:#e6ffe6,stroke:#333,stroke-width:2px\r\n```\r\n\r\n**The four stages:**\r\n\r\n1. **Automated Knowledge Graph construction** โ€” chunk documents into `TextUnits`, extract `(head, relation, tail)` triplets, assemble nodes + edges in a graph DB (e.g. Neo4j).\r\n2. **Hybrid retrieval engine** โ€” vector search finds entry nodes, multi-hop traversal uncovers hidden relationships, pruning & re-ranking keeps the most relevant facts.\r\n3. **LoRA-tuned reasoning core** โ€” a locally hosted, LoRA-tuned open model generates attributed answers with efficient fine-tuning for reasoning + attribution.\r\n4. **Attribution & provenance layer** โ€” propagates source IDs, chunks, and graph nodes into a structured, traceable JSON output.\r\n\r\n
\r\nOn-premise prerequisites\r\n\r\n**Hardware:** 16+ CPU cores ยท 64GB+ RAM (128GB recommended) ยท NVIDIA GPU with 24GB+ VRAM (A100 / H100 / RTX 4090).\r\n**Software:** Docker & Docker Compose ยท Python 3.10+ ยท NVIDIA Container Toolkit.\r\nCopy `.env.example` โ†’ `.env` and populate with environment-specific values.\r\n\r\n
\r\n\r\n---\r\n\r\n## Why VeritasGraph?\r\n\r\n- โœ… **Fully on-premise & secure** โ€” 100% control over your data and models.\r\n- โœ… **Verifiable attribution** โ€” every claim traces back to its source.\r\n- โœ… **Advanced graph reasoning** โ€” answers complex, multi-hop questions.\r\n- โœ… **Hierarchical tree + graph** โ€” PageIndex-style TOC navigation with graph flexibility.\r\n- โœ… **Governed agents** โ€” guardrails, memory, tools, and context budgeting wired together in Studio.\r\n- โœ… **Open-source & sovereign** โ€” MIT-licensed, no vendor lock-in.\r\n\r\n**Who is it for?** Engineers building enterprise search, compliance assistants, research copilots, scientific literature explorers, and agent memory systems โ€” anywhere \"the answer\" depends on how facts *connect*, not just whether they appear near each other in a vector index.\r\n\r\n---\r\n\r\n## ๐Ÿ™Œ Acknowledgments\r\n\r\nBuilds on the foundational work of **HopRAG**, **Microsoft GraphRAG**, **LangChain & LlamaIndex**, and **Neo4j**.\r\n\r\n## ๐Ÿ† Awards & Citation\r\n\r\nPresented at the **International Conference on Applied Science and Future Technology (ICASF 2025)** โ€” [๐Ÿ“„ Appreciation Certificate](ICASF%202025%20-%20Appreciation%20Certificate.pdf).\r\n\r\n```bibtex\r\n@article{VeritasGraph2025,\r\n title={VeritasGraph: A Sovereign GraphRAG Framework for Enterprise-Grade AI with Verifiable Attribution},\r\n author={Bibin Prathap},\r\n journal={International Conference on Applied Science and Future Technology (ICASF)},\r\n year={2025}\r\n}\r\n```\r\n\r\n## Star History\r\n\r\n[![Star History Chart](https://api.star-history.com/svg?repos=bibinprathap/VeritasGraph&type=Date)](https://www.star-history.com/#bibinprathap/VeritasGraph&Date)\r\n\r\n---\r\n\r\n

\r\n \"stars\"\r\n \"issues\"\r\n \"forks\"\r\n \"license\"\r\n \r\n

\r\n\r\n

Licensed under MIT. โญ Star the repo to follow the roadmap for open-source, governed GraphRAG.

\r\n"}, "632056cae851281aad5e8083d854b82a0f258621": {"t": 1785846878.7107856, "n": 22437, "h": "e4153dc773009fbf", "c": "๏ปฟ# VeritasGraph โ€” The Governed, On-Prem GraphRAG & Agent Framework\r\n\r\n**Stop chunking blindly. Combine Tree-Search structure with Knowledge-Graph reasoning โ€” and wire it into governed AI agents. Runs 100% locally or in the cloud.**\r\n\r\n\"VeritasGraph\r\n\r\n[![PyPI version](https://badge.fury.io/py/veritasgraph.svg)](https://badge.fury.io/py/veritasgraph)\r\n[![Python 3.10+](https://img.shields.io/badge/python-3.10+-blue.svg)](https://www.python.org/downloads/)\r\n[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)\r\n[![CI](https://github.com/bibinprathap/VeritasGraph/actions/workflows/ci.yml/badge.svg)](https://github.com/bibinprathap/VeritasGraph/actions)\r\n[![GitHub Stars](https://img.shields.io/github/stars/bibinprathap/VeritasGraph?style=social)](https://github.com/bibinprathap/VeritasGraph)\r\n\r\n> **๐ŸŽฏ Traditional RAG guesses based on similarity. VeritasGraph reasons based on structure.**\r\n> Don't just find the document โ€” understand the connection, then act on it with governed agents.\r\n\r\nโญ [Star](https://github.com/bibinprathap/VeritasGraph) ยท ๐Ÿด [Fork](https://github.com/bibinprathap/VeritasGraph/fork) ยท ๐Ÿ’ฌ [Discuss](https://github.com/bibinprathap/VeritasGraph/discussions) ยท ๐Ÿ› [Report a bug](https://github.com/bibinprathap/VeritasGraph/issues)\r\n\r\n---\r\n\r\n## ๐Ÿ“š Featured Guide โ€” Build Governed AI Agents On-Prem\r\n\r\nA complete walkthrough of designing, wiring, and shipping governed AI agents entirely on your own infrastructure.\r\n\r\n**[๐Ÿ“„ Read the guide: *Build Governed AI Agents On-Prem* (PDF)](https://github.com/bibinprathap/VeritasGraph/blob/restored-main/Build-Governed-AI-Agents-On-Prem.pdf)**\r\n\r\n[![Build Governed AI Agents On-Prem โ€” walkthrough](https://img.youtube.com/vi/sA7ReEgdJfg/maxresdefault.jpg)](https://youtu.be/sA7ReEgdJfg)\r\n[![Import Any graph.json into VeritasGraph Studio โ€” Walkthrough](https://img.youtube.com/vi/Po2Z6QtqFks/maxresdefault.jpg)](https://youtu.be/Po2Z6QtqFks)\r\n> โ–ถ๏ธ **[Watch the walkthrough on YouTube](https://youtu.be/sA7ReEgdJfg)**\r\n\r\n---\r\n\r\n## ๐Ÿš€ Quick Start (2 lines, no GPU)\r\n\r\n```bash\r\npip install veritasgraph\r\nveritasgraph demo --mode=lite\r\n```\r\n\r\nThat's it โ€” an interactive demo using cloud APIs (OpenAI/Anthropic), no local models required.\r\n\r\n| Mode | Best For | Requirements |\r\n|------|----------|--------------|\r\n| `--mode=lite` | Quick demo, no GPU | OpenAI/Anthropic API key |\r\n| `--mode=local` | Privacy, offline use | Ollama + 8GB RAM |\r\n| `--mode=full` | Production, all features | Docker + Neo4j |\r\n\r\n```bash\r\nexport OPENAI_API_KEY=\"sk-...\" # Lite: cloud APIs, zero setup\r\nveritasgraph demo --mode=lite\r\n\r\nveritasgraph demo --mode=local --model=llama3.2 # 100% offline with Ollama\r\nveritasgraph start --mode=full # full GraphRAG pipeline\r\n```\r\n\r\n

\r\n \"Colab:\r\n  \r\n \"Colab:\r\n  \r\n \"Colab:\r\n

\r\n\r\n**Useful links:** [โšก Live docs](https://bibinprathap.github.io/VeritasGraph/index.html) ยท [๐ŸŽฎ Live demo](https://bibinprathap.github.io/VeritasGraph/demo/) ยท [๐Ÿ“– Article](https://medium.com/@bibinprathap/beyond-vector-search-building-trustworthy-enterprise-ai-with-the-veritasgraph-rag-pipeline-53fc8e9e8ff9) ยท [๐Ÿ“„ Research paper](VeritasGraph%20-%20A%20Sovereign%20GraphRAG%20Framework%20for%20Enterprise-Grade%20AI%20with%20Verifiable%20Attribution.pdf)\r\n\r\n---\r\n\r\n## ๐Ÿ› ๏ธ VeritasGraph Studio โ€” Build, wire & test governed agents locally\r\n\r\n**Studio** is a local Agent Build Workspace (FastAPI + single-page UI) that lets you build a knowledge graph from your own documents and **wire it into agents** alongside tools, memory, data logging, guardrails, and headroom-style context budgeting โ€” then chat with those agents live and watch every stage of the orchestration pipeline. Everything runs **100% locally** against [Ollama](https://ollama.com).\r\n\r\n\r\n\r\n> **[๐ŸŽฎ Try the Studio Live](https://bibinprathap.github.io/VeritasGraph/studio/)** โ€” *stable URL that always redirects to the current running studio tunnel.*\r\n\r\n**Run it:**\r\n\r\n```bash\r\npip install -r requirements.txt\r\nollama serve & ollama pull qwen3:latest # any local chat model\r\nSTUDIO_DATA_DIR=\"$PWD/studio_api/data\" \\\r\n uvicorn studio_api.main:app --host 127.0.0.1 --port 8200 --log-level warning\r\n# Studio UI โ†’ http://localhost:8200/studio ยท API docs โ†’ /docs\r\n```\r\n\r\n**One-command end-to-end demo** (builds a graph + drives a fully-wired agent through graph reasoning, memory recall, PII redaction, and a guardrail block):\r\n\r\n```bash\r\npython3 demos/agent-studio/sample_pipeline.py --model qwen3:latest\r\n```\r\n\r\n
\r\nWhat's inside โ€” full Studio feature set\r\n\r\n- ๐Ÿงฉ **Knowledge Graph builder & explorer** โ€” ingest text, extract entities/relationships locally, inspect nodes/edges with grounded evidence.\r\n- ๐Ÿ”Ž **Graph Q&A with citations** โ€” multi-hop answers backed by `[doc#chunk]` source attribution.\r\n- ๐Ÿค– **Agent workspace** โ€” create/edit agents with model selection, prompt/persona settings, and per-agent capability toggles.\r\n- ๐Ÿ”€ **Governed orchestration pipeline** โ€” per-turn flow of Guardrails โ†’ Memory โ†’ Knowledge Graph โ†’ Headroom budget โ†’ Tools โ†’ Data log, with full trace visibility.\r\n- ๐Ÿงฐ **Editable tools catalog** โ€” add, edit, enable/disable, test, and delete tools directly in Studio.\r\n- ๐ŸŒ **External real tool support** โ€” call real HTTP endpoints with configurable method, auth header, and custom headers.\r\n- ๐Ÿ”Œ **MCP bridge integrations** โ€” local MCP proxy connectors (e.g. Chrome DevTools MCP, Unity MCP) with health-aware probing.\r\n- ๐Ÿ›ก๏ธ **Guardrails** โ€” PII redaction and policy-block controls with visible guardrail-block metrics.\r\n- ๐Ÿง  **Memory + Data logs** โ€” per-agent short-term memory and interaction-log persistence.\r\n- ๐Ÿ“ˆ **Evaluation & fine-tune simulation** โ€” run eval suites, track pass-rate trends, and queue/monitor fine-tune jobs.\r\n- ๐Ÿ’ฌ **Playground** โ€” run governed agent conversations live and inspect the pipeline trace.\r\n- ๐Ÿ“Š **KPI dashboard** โ€” active agents, connected tools, eval pass rate, and guardrail-block counters.\r\n\r\nSee [`studio_api/README.md`](studio_api/README.md) for API and architecture, and [`docs/STUDIO_ENTERPRISE_TEST.md`](docs/STUDIO_ENTERPRISE_TEST.md) for enterprise test scenarios.\r\n\r\n
\r\n\r\n---\r\n\r\n## ๐ŸŒณ + ๐Ÿ”— Graph + Tree: the ultimate retrieval\r\n\r\n**Why choose?** VeritasGraph includes the hierarchical \"Table of Contents\" navigation of PageIndex **PLUS** the semantic reasoning of a Knowledge Graph.\r\n\r\n```\r\nDocument Root\r\nโ”œโ”€โ”€ [1] Introduction\r\nโ”‚ โ”œโ”€โ”€ [1.1] Background โ†โ”€โ”€ Tree Navigation\r\nโ”‚ โ””โ”€โ”€ [1.2] Objectives\r\nโ”œโ”€โ”€ [2] Methodology โ†โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€ Graph Links\r\nโ”‚ โ””โ”€โ”€ relates_to โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ†’ [3.1] Findings\r\nโ””โ”€โ”€ [3] Results\r\n```\r\n\r\n### ๐Ÿ“Š Feature comparison\r\n\r\n| Feature | Vector RAG | PageIndex | **VeritasGraph** |\r\n|---------|:----------:|:---------:|:----------------:|\r\n| **Retrieval type** | Similarity | Tree search | ๐Ÿ† Tree + Graph reasoning |\r\n| **Attribution** | โŒ Low | โš ๏ธ Medium | โœ… **100% verifiable** |\r\n| **Multi-hop reasoning** | โŒ | โŒ | โœ… |\r\n| **Tree navigation (TOC)** | โŒ | โœ… | โœ… |\r\n| **Semantic search** | โœ… | โŒ | โœ… |\r\n| **Cross-section linking** | โŒ | โŒ | โœ… |\r\n| **Visual graph explorer** | โŒ | โŒ | โœ… **Built-in UI** |\r\n| **100% local/private** | โš ๏ธ Varies | โŒ Cloud | โœ… **On-premise** |\r\n| **Open source** | โš ๏ธ Varies | โŒ Proprietary | โœ… **MIT license** |\r\n\r\n

\r\n \"Traditional\r\n

\r\n\r\n---\r\n\r\n## ๐ŸŽฌ See it in action\r\n\r\n[![VeritasGraph Master Demo](https://img.youtube.com/vi/oa8ektm7nLY/maxresdefault.jpg)](https://youtu.be/oa8ektm7nLY)\r\n\r\n

\r\n \"Watch\r\n  \r\n \"Convert\r\n

\r\n\r\n> **๐Ÿ’ก What you're seeing:** a query triggers multi-hop reasoning across the knowledge graph. Nodes light up as connections are discovered, showing exactly *how* the answer was found โ€” not just *what* was found.\r\n\r\n---\r\n\r\n## ๐Ÿ”Œ MCP Server โ€” connect your IDE agent to VeritasGraph\r\n\r\nVeritasGraph ships a dedicated **[Model Context Protocol](https://modelcontextprotocol.io/) server** โ€” *the first zero-trust, air-gapped Enterprise GraphRAG server for MCP.* Connect Claude Desktop, Cursor, VS Code, Windsurf, Cline, or Continue directly to the GraphRAG engine over JSON-RPC 2.0 stdio, with **zero external data egress**.\r\n\r\n```bash\r\npython -m veritasgraph_mcp # from repo root (needs local Ollama for ingest/query)\r\n```\r\n\r\nTools: `veritasgraph_ingest_document`, `veritasgraph_query` (multi-hop answers with `[doc#chunk]` citations), `veritasgraph_search_entities`, `veritasgraph_get_graph`, `veritasgraph_clear_graph`. See [`veritasgraph_mcp/README.md`](veritasgraph_mcp/README.md) for IDE registration snippets.\r\n\r\n---\r\n\r\n## ๐Ÿ“– Python API\r\n\r\n```python\r\nfrom veritasgraph import VisionRAGPipeline\r\n\r\npipeline = VisionRAGPipeline() # auto-detects available models\r\ndoc = pipeline.ingest_pdf(\"document.pdf\")\r\nresult = pipeline.query(\"What are the key findings?\")\r\nprint(result.answer)\r\n```\r\n\r\n
\r\n๐ŸŒณ Hierarchical tree navigation + graph search\r\n\r\n```python\r\nfrom veritasgraph import VisionRAGPipeline\r\n\r\npipeline = VisionRAGPipeline()\r\ndoc = pipeline.ingest_pdf(\"report.pdf\")\r\n\r\n# View the document's hierarchical structure (like a Table of Contents)\r\nprint(pipeline.get_document_tree())\r\n# Document Root\r\n# โ”œโ”€โ”€ [1] Introduction (pp. 1-5)\r\n# โ”‚ โ”œโ”€โ”€ [1.1] Background (pp. 1-2)\r\n# โ”‚ โ””โ”€โ”€ [1.2] Objectives (pp. 3-5)\r\n# โ””โ”€โ”€ [2] Methodology (pp. 6-15)\r\n\r\n# Navigate to a specific section (tree-based retrieval)\r\nsection = pipeline.navigate_to_section(\"Methodology\")\r\nprint(section['breadcrumb']) # ['Document Root', 'Methodology']\r\n\r\n# Or use graph-based semantic search\r\nresult = pipeline.query(\"What methodology was used?\")\r\n# โ†’ answer with section context: \"๐Ÿ“ Location: Document > Methodology > Analysis Framework\"\r\n```\r\n\r\n
\r\n\r\n
\r\n๐Ÿ”ง Custom configuration & ingestion modes\r\n\r\n```python\r\nfrom veritasgraph import VisionRAGPipeline, VisionRAGConfig\r\n\r\nconfig = VisionRAGConfig(ingest_mode=\"document-centric\") # tables stay intact!\r\npipeline = VisionRAGPipeline(config)\r\ndoc = pipeline.ingest_pdf(\"annual_report.pdf\")\r\n```\r\n\r\n| Mode | Description | Best For |\r\n|------|-------------|----------|\r\n| `document-centric` | Whole pages/sections as nodes (default) | Most documents |\r\n| `page` | Each page = one node | Slide decks, reports |\r\n| `section` | Each section = one node | Structured documents |\r\n| `chunk` | Traditional 500-token chunks | Legacy compatibility |\r\n\r\n
\r\n\r\n### CLI\r\n\r\n```bash\r\nveritasgraph --version # show version\r\nveritasgraph info # check dependencies\r\nveritasgraph init my_project # initialize a project\r\nveritasgraph ingest document.pdf --ingest-mode=document-centric # Don't Chunk. Graph.\r\nveritasgraph ingest https://youtube.com/watch?v=xxx # auto-extract transcript\r\nveritasgraph ingest https://example.com/article # extract web article\r\n```\r\n\r\n### Installation options\r\n\r\n```bash\r\npip install veritasgraph # basic (includes lite mode)\r\npip install veritasgraph[web] # Gradio UI + visualization\r\npip install veritasgraph[graphrag] # Microsoft GraphRAG integration\r\npip install veritasgraph[ingest] # YouTube & web-article ingestion\r\npip install veritasgraph[all] # everything\r\n```\r\n\r\n---\r\n\r\n## ๐Ÿ›๏ธ Enterprise Compliance โ€” VeritasGraph + VeritasReason\r\n\r\nGraphRAG is brilliant at *describing* what your documents say. But enterprise questions like **\"Which purchase orders violated our Segregation-of-Duties policy last quarter?\"** are **rule-evaluation problems** over structured records โ€” not similarity search.\r\n\r\nFor those, VeritasGraph ships a sister module: **[VeritasReason](veritas-reason/README_VERITASREASON.md)** โ€” a deterministic reasoning engine (forward-chaining + Rete + SPARQL) that fires policy rules over a triplet store and returns auditable answers with W3C PROV-O provenance.\r\n\r\n```\r\n Policy PDFs โ”€โ” โ”Œโ”€ ingest_structured.py (SQL โ†’ triples + text)\r\n โ–ผ โ–ผ\r\n VeritasGraph GraphRAG VeritasReason (TripletStore + RuleSet\r\n (quotes policy text) + ForwardChainer + PROV-O)\r\n โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜\r\n โ–ผ\r\n Compliance answer + violators table + clause citations\r\n```\r\n\r\n### 30-second smoke test (no install, stdlib only)\r\n\r\n```bash\r\npython tests/test_policy_compliance_demo.py\r\n```\r\n\r\nSeeds a fake ERP into a tiny in-memory triple store, evaluates four SoD rules from [rules/sod_policy.yaml](rules/sod_policy.yaml), and prints violators with citations:\r\n\r\n```\r\nโœ“ Reasoner fired. Detected 4 violation(s):\r\n po:PO-2204 SOD-01 Approved & paid by emp:E118\r\n po:PO-2301 SOD-02 Requested & approved by emp:E091\r\n po:PO-2317 SOD-03 $48,750.00 approved by emp:E091 (role:Manager, not Director)\r\n po:PO-2402 SOD-04 Vendor vendor:V77 related to approver emp:E140\r\n```\r\n\r\nOr install and run the packaged demo:\r\n\r\n```bash\r\npip install veritas-reason\r\nveritasreason-policy-demo\r\n```\r\n\r\n

\r\n \"VeritasGraph\r\n

\r\n\r\nThe same pattern applies to leave-policy violations (HRIS attendance), expense-report fraud (ledger + receipts), clinical protocol breaches (EHR + guidelines), or KYC/AML (transactions + watchlists). Define the SQL โ†’ triple mapping in [ingest_structured.py](graphrag-ollama-config/ingest_structured.py), write rules in `rules/*.yaml`, and ask in plain English. See [veritas-reason/plan.md](veritas-reason/plan.md) for a full walk-through.\r\n\r\n---\r\n\r\n## ๐Ÿ”— Interactive Graph Visualization\r\n\r\nVeritasGraph includes an **interactive 2D knowledge-graph explorer** (PyVis) that visualizes entities and relationships in real time.\r\n\r\n![Graph Explorer](assets/graph-explorer.png)\r\n\r\n| Feature | Description |\r\n|---------|-------------|\r\n| **Query-aware subgraph** | Shows only entities related to your query |\r\n| **Community coloring** | Nodes grouped by community membership |\r\n| **Red highlight** | Query-related entities shown in red |\r\n| **Node sizing** | Bigger nodes = more connections |\r\n| **Interactive** | Drag, zoom, hover for entity details |\r\n| **Full graph explorer** | View the entire knowledge graph |\r\n\r\n---\r\n\r\n## โš™๏ธ Provider Support (OpenAI-compatible)\r\n\r\nVeritasGraph works with **any OpenAI-compatible API** โ€” mix and match cloud and local:\r\n\r\n| Provider | API Base | API Key | Example Model |\r\n|----------|----------|---------|---------------|\r\n| **Ollama** (default) | `http://localhost:11434/v1` | `ollama` | `llama3.1-12k` |\r\n| **OpenAI** | `https://api.openai.com/v1` | `sk-proj-...` | `gpt-4-turbo-preview` |\r\n| **Groq** | `https://api.groq.com/openai/v1` | `gsk_...` | `llama-3.1-70b-versatile` |\r\n| **Together AI** | `https://api.together.xyz/v1` | your-key | `Meta-Llama-3.1-70B-Instruct-Turbo` |\r\n| **LM Studio** | `http://localhost:1234/v1` | `lm-studio` | (model loaded in LM Studio) |\r\n\r\nAlso supported: Azure OpenAI, OpenRouter, Anyscale, LocalAI, vLLM.\r\n\r\n```bash\r\ncd graphrag-ollama-config\r\ncp settings_openai.yaml settings.yaml\r\ncp .env.openai.example .env # edit with your provider settings\r\npython -m graphrag.index --root . --config settings_openai.yaml\r\npython app.py\r\n```\r\n\r\n> โš ๏ธ **Embeddings must match your index.** If you indexed with `nomic-embed-text` (768 dims), you must query with the same model โ€” switching embedding models requires **re-indexing**. Full details in [OPENAI_COMPATIBLE_API.md](graphrag-ollama-config/OPENAI_COMPATIBLE_API.md).\r\n\r\n---\r\n\r\n## ๐Ÿณ Deployment\r\n\r\n### Five-Minute Magic Onboarding (Docker)\r\n\r\nRun a full stack (Ollama + Neo4j + Gradio) with one command:\r\n\r\n```bash\r\ncd docker/five-minute-magic-onboarding\r\n# set your Neo4j password in .env, then:\r\ndocker compose up --build\r\n```\r\n\r\nServices: Gradio UI โ†’ http://127.0.0.1:7860 ยท Neo4j โ†’ http://localhost:7474 ยท Ollama โ†’ http://localhost:11434. See [`docker/five-minute-magic-onboarding/README.md`](docker/five-minute-magic-onboarding/README.md).\r\n\r\n### Share with your team (free)\r\n\r\n| Method | Duration | Local Ollama | Setup | Best For |\r\n|--------|----------|:------------:|-------|----------|\r\n| `python app.py --share` | 72 hours | โœ… | 1 min | Quick demos |\r\n| Ngrok tunnel | Unlimited* | โœ… | 5 min | Team evaluation |\r\n| Cloudflare tunnel | Unlimited* | โœ… | 5 min | Team evaluation |\r\n| Hugging Face Spaces | Permanent | โŒ (cloud LLM) | 15 min | Public showcase |\r\n\r\n_*Free tier has some limitations._\r\n\r\n---\r\n\r\n## ๐Ÿ—๏ธ Architecture\r\n\r\n```mermaid\r\ngraph TD\r\n subgraph \"Indexing Pipeline (one-time)\"\r\n A[Source Documents] --> B{Document Chunking};\r\n B --> C{\"LLM Extraction
(Entities & Relationships)\"};\r\n C --> D[Vector Index];\r\n C --> E[Knowledge Graph];\r\n end\r\n subgraph \"Query Pipeline (real-time)\"\r\n F[User Query] --> G{Hybrid Retrieval Engine};\r\n G -- \"1. Vector search for entry points\" --> D;\r\n G -- \"2. Multi-hop graph traversal\" --> E;\r\n G --> H{Pruning & Re-ranking};\r\n H -- \"Rich context\" --> I{LoRA-Tuned LLM Core};\r\n I -- \"Answer + provenance\" --> J{Attribution Layer};\r\n J --> K[Attributed Answer];\r\n end\r\n style A fill:#f2f2f2,stroke:#333,stroke-width:2px\r\n style F fill:#e6f7ff,stroke:#333,stroke-width:2px\r\n style K fill:#e6ffe6,stroke:#333,stroke-width:2px\r\n```\r\n\r\n**The four stages:**\r\n\r\n1. **Automated Knowledge Graph construction** โ€” chunk documents into `TextUnits`, extract `(head, relation, tail)` triplets, assemble nodes + edges in a graph DB (e.g. Neo4j).\r\n2. **Hybrid retrieval engine** โ€” vector search finds entry nodes, multi-hop traversal uncovers hidden relationships, pruning & re-ranking keeps the most relevant facts.\r\n3. **LoRA-tuned reasoning core** โ€” a locally hosted, LoRA-tuned open model generates attributed answers with efficient fine-tuning for reasoning + attribution.\r\n4. **Attribution & provenance layer** โ€” propagates source IDs, chunks, and graph nodes into a structured, traceable JSON output.\r\n\r\n
\r\nOn-premise prerequisites\r\n\r\n**Hardware:** 16+ CPU cores ยท 64GB+ RAM (128GB recommended) ยท NVIDIA GPU with 24GB+ VRAM (A100 / H100 / RTX 4090).\r\n**Software:** Docker & Docker Compose ยท Python 3.10+ ยท NVIDIA Container Toolkit.\r\nCopy `.env.example` โ†’ `.env` and populate with environment-specific values.\r\n\r\n
\r\n\r\n---\r\n\r\n## Why VeritasGraph?\r\n\r\n- โœ… **Fully on-premise & secure** โ€” 100% control over your data and models.\r\n- โœ… **Verifiable attribution** โ€” every claim traces back to its source.\r\n- โœ… **Advanced graph reasoning** โ€” answers complex, multi-hop questions.\r\n- โœ… **Hierarchical tree + graph** โ€” PageIndex-style TOC navigation with graph flexibility.\r\n- โœ… **Governed agents** โ€” guardrails, memory, tools, and context budgeting wired together in Studio.\r\n- โœ… **Open-source & sovereign** โ€” MIT-licensed, no vendor lock-in.\r\n\r\n**Who is it for?** Engineers building enterprise search, compliance assistants, research copilots, scientific literature explorers, and agent memory systems โ€” anywhere \"the answer\" depends on how facts *connect*, not just whether they appear near each other in a vector index.\r\n\r\n---\r\n\r\n## ๐Ÿ™Œ Acknowledgments\r\n\r\nBuilds on the foundational work of **HopRAG**, **Microsoft GraphRAG**, **LangChain & LlamaIndex**, and **Neo4j**.\r\n\r\n## ๐Ÿ† Awards & Citation\r\n\r\nPresented at the **International Conference on Applied Science and Future Technology (ICASF 2025)** โ€” [๐Ÿ“„ Appreciation Certificate](ICASF%202025%20-%20Appreciation%20Certificate.pdf).\r\n\r\n```bibtex\r\n@article{VeritasGraph2025,\r\n title={VeritasGraph: A Sovereign GraphRAG Framework for Enterprise-Grade AI with Verifiable Attribution},\r\n author={Bibin Prathap},\r\n journal={International Conference on Applied Science and Future Technology (ICASF)},\r\n year={2025}\r\n}\r\n```\r\n\r\n## Star History\r\n\r\n[![Star History Chart](https://api.star-history.com/svg?repos=bibinprathap/VeritasGraph&type=Date)](https://www.star-history.com/#bibinprathap/VeritasGraph&Date)\r\n\r\n---\r\n\r\n

\r\n \"stars\"\r\n \"issues\"\r\n \"forks\"\r\n \"license\"\r\n \r\n

\r\n\r\n

Licensed under MIT. โญ Star the repo to follow the roadmap for open-source, governed GraphRAG.

\r\n"}}}}