The full upstream README, mirrored here for reference. Install config, tool schemas, adoption signals, and an original overview live on the Veritasgraph listing page.
Stop chunking blindly. Combine the structure of Tree-Search with the reasoning of Knowledge Graphs. Runs locally or in the cloud.
🎯 Traditional RAG guesses based on similarity. VeritasGraph reasons based on structure.
Don't just find the document—understand the connection.
|
Why choose? VeritasGraph includes the hierarchical "Table of Contents" navigation of PageIndex PLUS the semantic reasoning of a Knowledge Graph. |
| Feature | Vector RAG | PageIndex | VeritasGraph |
|---|---|---|---|
| Retrieval Type | Similarity | Tree Search | 🏆 Tree + Graph Reasoning |
| Attribution | ❌ Low | ⚠️ Medium | ✅ 100% Verifiable |
| Multi-hop Reasoning | ❌ | ❌ | ✅ |
| Tree Navigation (TOC) | ❌ | ✅ | ✅ |
| Semantic Search | ✅ | ❌ | ✅ |
| Cross-section Linking | ❌ | ❌ | ✅ |
| Visual Graph Explorer | ❌ | ❌ | ✅ Built-in UI |
| 100% Local/Private | ⚠️ Varies | ❌ Cloud | ✅ On-Premise |
| Open Source | ⚠️ Varies | ❌ Proprietary | ✅ MIT License |
| Cross-section linking | ❌ | ❌ | ✅ |
VeritasGraph is a production-ready framework that solves the fundamental problem with vector-search RAG: context blindness. While traditional RAG chunks your documents into isolated fragments and hopes cosine similarity finds the right one, VeritasGraph builds a knowledge graph that actually understands how your information connects.
The result? Multi-hop reasoning that answers complex questions, transparent attribution for every claim, and a hierarchical tree structure that navigates documents like a human would—all running on your own infrastructure.
No GPU? No problem. Try VeritasGraph instantly:
That's it. This launches an interactive demo using cloud APIs (OpenAI/Anthropic)—no local models required.
▶️ Watch VeritasGraph build reasoning paths in real-time.
▶️ Convert Charts & Tables to Knowledge Graphs in Minutes | Vision RAG Tutorial
💡 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.
| Mode | Best For | Requirements |
|---|---|---|
--mode=lite | Quick demo, no GPU | OpenAI/Anthropic API key |
--mode=local | Privacy, offline use | Ollama + 8GB RAM |
--mode=full | Production, all features | Docker + Neo4j |
Once you're ready to integrate VeritasGraph into your code:
The Power of PageIndex's Tree + The Flexibility of a Graph
VeritasGraph now combines two powerful retrieval paradigms:
| Traditional RAG | VeritasGraph with Trees |
|---|---|
| Chunks documents randomly | Preserves document structure |
| Loses section context | Maintains parent-child relationships |
| Can't navigate by structure | Supports TOC-style navigation |
| No hierarchy awareness | Full tree traversal (ancestors, siblings, children) |
VeritasGraph offers multiple ways to ingest content into your knowledge graph:
Traditional RAG splits documents into arbitrary 500-token chunks, destroying context. VeritasGraph's document-centric mode treats whole pages or sections as single retrievable nodes:
Add content to your knowledge graph with one click:
| Source | How It Works |
|---|---|
| 📺 YouTube | Paste URL → auto-extracts transcript |
| 📰 Web Articles | Paste URL → extracts main content |
| 📄 PDFs | Upload → document-centric extraction |
| 📝 Text | Paste directly → instant indexing |
| Mode | Description | Best For |
|---|---|---|
document-centric | Whole pages/sections as nodes (default) | Most documents |
page | Each page = one node | Slide decks, reports |
section | Each section = one node | Structured documents |
chunk | Traditional 500-token chunks | Legacy compatibility |
🎮 Try Live Demo - Stable URL - always redirects to current server
Maintain 100% control over your data and AI models, ensuring maximum security and privacy.
Every generated claim is traced back to its source document, guaranteeing transparency and accountability.
Answer complex, multi-hop questions that go beyond the capabilities of traditional vector search engines.
Combines PageIndex-style TOC navigation with graph flexibility. Navigate documents like humans do (through sections and subsections) while also leveraging semantic search across the entire graph.
Explore your knowledge graph with an interactive 2D graph explorer powered by PyVis, showing entities, relationships, and reasoning paths in real-time.
Build a sovereign knowledge asset, free from vendor lock-in, with full ownership and customization.
A brief video demonstrating the core functionality of VeritasGraph, from data ingestion to multi-hop querying with full source attribution.
🎬 Watch on YouTube: VeritasGraph - Enterprise Graph RAG Demo
The following diagram illustrates the end-to-end pipeline of the VeritasGraph system:
Clone the repo and run a full VeritasGraph stack (Ollama + Neo4j + Gradio app) with one command:
docker/five-minute-magic-onboarding/.env with your Neo4j password (defaults for the rest).See docker/five-minute-magic-onboarding/README.md for deeper details.
Share VeritasGraph with your team using these free deployment options:
Run with the --share flag to get a public URL instantly:
This creates a temporary public URL like https://xxxxx.gradio.live that works for 72 hours. Perfect for quick demos!
Keep Ollama running locally while exposing the UI to the internet:
Install ngrok: https://ngrok.com/download (free account required)
Start your app locally:
In another terminal, create the tunnel:
Share the ngrok URL (e.g., https://abc123.ngrok.io) with developers.
For a permanent demo (without local Ollama), deploy to Hugging Face Spaces:
graphrag-ollama-config folder| Method | Duration | Local Ollama | Setup Time | Best For |
|---|---|---|---|---|
--share | 72 hours | ✅ Yes | 1 min | Quick demos |
| Ngrok | Unlimited* | ✅ Yes | 5 min | Team evaluation |
| Cloudflare | Unlimited* | ✅ Yes | 5 min | Team evaluation |
| HF Spaces | Permanent | ❌ No (use cloud LLM) | 15 min | Public showcase |
*Free tier has some limitations
VeritasGraph supports any OpenAI-compatible API, making it easy to use with various LLM providers:
| Provider | Type | Notes |
|---|---|---|
| OpenAI | Cloud | Native API support |
| Azure OpenAI | Cloud | Full Azure integration |
| Groq | Cloud | Ultra-fast inference |
| Together AI | Cloud | Open-source models |
| OpenRouter | Cloud | Multi-provider routing |
| Anyscale | Cloud | Scalable endpoints |
| LM Studio | Local | Easy local deployment |
| LocalAI | Local | Docker-friendly |
| vLLM | Local/Server | High-performance serving |
| Ollama | Local | Default setup |
Copy the configuration files:
Edit .env with your provider settings:
Run GraphRAG:
Mix different providers for LLM and embeddings (e.g., Groq for fast LLM + local Ollama for embeddings):
📖 Full documentation: See OPENAI_COMPATIBLE_API.md for detailed provider configurations, environment variables reference, and troubleshooting.
You can easily switch between different LLM providers by editing your .env file. Here are the most common configurations:
Best of both worlds - powerful cloud LLM with local embeddings for privacy:
| Provider | API Base | API Key | Example Model |
|---|---|---|---|
| Ollama | http://localhost:11434/v1 | ollama | llama3.1-12k |
| OpenAI | https://api.openai.com/v1 | sk-proj-... | gpt-4-turbo-preview |
| Groq | https://api.groq.com/openai/v1 | gsk_... | llama-3.1-70b-versatile |
| Together AI | https://api.together.xyz/v1 | your-key | meta-llama/Meta-Llama-3.1-70B-Instruct-Turbo |
| LM Studio | http://localhost:1234/v1 | lm-studio | (model loaded in LM Studio) |
⚠️ Important: Embeddings must match your index! If you indexed with
nomic-embed-text(768 dimensions), you must query with the same model. Switching embedding models requires re-indexing your documents.

I'm using Ollama ( llama3.1) on Windows / Linux and Ollama (nomic-text-embed) for text embeddings
Please don't use WSL if you use LM studio for embeddings because it will have issues connecting to the services on Windows (LM studio)
Ollama's default context length is 2048, which might truncate the input and output when indexing
I'm using 12k context here (10*1024=12288), I tried using 10k before, but the results still gets truncated
Input / Output truncated might get you a completely out of context report in local search!!
Note that if you change the model in setttings.yaml and try to reindex, it will restart the whole indexing!
First, pull the models we need to use
Then build the model with the Modelfile in this repo
First, activate the conda enviroment
Clone this project then cd the directory
Then pull the code of graphrag (I'm using a local fix for graphrag here) and install the package
You can skip this step if you used this repo, but this is for initializing the graphrag folder
Create your .env file
Move your input text to ./input/
Double check the parameters in .env and settings.yaml, make sure in setting.yaml,
it should be "community_reports" instead of "community_report"
Then finetune the prompts (this is important, this will generate a much better result)
You can find more about how to tune prompts here
Then you can start the indexing
You can check the logs in ./output/<timestamp>/reports/indexing-engine.log for errors
Test a global query
First, make sure requirements are installed
Then run the app using
To use the app, visit http://127.0.0.1:7860/
VeritasGraph includes an interactive 2D knowledge graph explorer that visualizes entities and relationships in real-time!
Interactive knowledge graph showing entities, communities, and relationships
Query responses with full source attribution and graph visualization
| Feature | Description |
|---|---|
| Query-aware subgraph | Shows only entities related to your query |
| Community coloring | Nodes grouped by community membership |
| Red highlight | Query-related entities shown in red |
| Node sizing | Bigger nodes = more connections |
| Interactive | Drag, zoom, hover for entity details |
| Full graph explorer | View entire knowledge graph |
Use the checkbox "🔗 Show Graph Visualization" in the left panel to enable/disable automatic graph updates after each query.
VeritasGraph integrates four critical components into a cohesive, powerful, and secure system:
The VeritasGraph pipeline transforms unstructured documents into a structured knowledge graph for attributable reasoning.
TextUnits.(head, relation, tail).Traditional RAG fails at complex reasoning (e.g., linking an engineer across projects and patents).
VeritasGraph succeeds by combining:
Hardware
Software
.env.example → .envVeritasGraph is founded on the principle that the most powerful AI systems should also be the most transparent, secure, and controllable.
The project's philosophy is a commitment to democratizing enterprise-grade AI, providing organizations with the tools to build their own sovereign knowledge assets.
This stands in contrast to reliance on opaque, proprietary, cloud-based APIs, empowering organizations to maintain full control over their data and reasoning processes.
Planned future enhancements include:
Expanded Database Support – Integration with more graph databases and vector stores.
Advanced Graph Analytics – Community detection and summarization for holistic dataset insights (inspired by Microsoft’s GraphRAG).
Agentic Framework – Multi-step reasoning tasks, breaking down complex queries into sub-queries.
Visualization UI – A web interface for graph exploration and attribution path inspection.
This project builds upon the foundational research and open-source contributions of the AI community.
We acknowledge the influence of the following works:
HopRAG – pioneering research on graph-structured RAG and multi-hop reasoning.
Microsoft GraphRAG – comprehensive approach to knowledge graph extraction and community-based reasoning.
LangChain & LlamaIndex – robust ecosystems that accelerate modular RAG system development.
Neo4j – foundational graph database technology enabling scalable Graph RAG implementations.
Presented at the International Conference on Applied Science and Future Technology (ICASF 2025).