Skip to content

About

Unified, modular Graph-based Retrieval-Augmented Generation (GraphRAG) framework with atomic operators and ConGraphDB

Topics

Resources

Contributing

Stars

0 stars

Watchers

0 watching

Forks

Repository files navigation

CongraphRAG

CongraphRAG is a unified, modular Graph-based Retrieval-Augmented Generation (RAG) framework designed to decouple retrieval logic into atomic operators. Built for state-of-the-art performance and diversity, it supports multiple graph structures and specialized retrieval engines, standardized around ConGraphDB v0.1.10.

🚀 Key Features

  • Operator-Based Retrieval: Over 16+ reusable atomic units (e.g., PPR, VDB, One-hop expansion) for complex graph traversals.
  • Unified Schema: Standardized storage backend using ConGraphDB for Entity, Chunk, Fact, and Community hierarchies.
  • Engine Diversity: Native support for multiple RAG methodologies (PathRAG, LightRAG, HippoRAG, MS-GraphRAG).
  • Benchmark Driven: Integrated evaluation suite for Fact Retrieval, Complex Reasoning, and Creative Generation.
  • Multi-LLM Support: Built-in support for OpenAI, Anthropic, Azure, and local Ollama deployments.

📁 Repository Structure

congraph-rag/
├── src/
│   ├── core/           # Standardized interfaces and types
│   ├── llm/            # Multi-provider LLM & Embedding integration
│   ├── storage/        # ConGraphDB schema & storage logic
│   ├── operators/      # Atomic retrieval building blocks
│   ├── benchmark/      # Evaluation & benchmarking tools
│   ├── engines/        # Engine implementations (PathRAG, HippoRAG, etc.)
│   ├── orchestrator/   # Retrieval pipeline composition
│   ├── server/         # Fastify-based API server
│   ├── dashboard/      # React-based visual debugger
│   └── cli/            # Command-line interface
├── docs/               # Detailed documentation
└── scripts/            # Build and utility scripts

📖 Documentation

🛠 Prerequisites

📦 Installation

# Clone the repository
git clone https://github.com/your-repo/congraph-rag.git
cd congraph-rag

# Install dependencies
pnpm install

# Build the project (compiles TypeScript to the dist folder)
pnpm run build

Note

The build process uses tsup and is configured to automatically handle self-referencing package imports (e.g. congraph-rag/core) as external dependencies. This ensures that the codebase can be built cleanly from scratch even when the dist directory is completely empty.

🚦 Quick Start

Configuration

Create a .env or configuration object following the ConfigSchema:

const config = {
  storage: {
    type: 'congraphdb',
    connectionString: './data/congraph.db',
  },
  llm: {
    provider: 'openai',
    model: 'gpt-4-turbo',
    apiKey: process.env.OPENAI_API_KEY,
  },
};

Running a Query

Using the CLI:

# Example query using PathRAG engine
npx tsx src/cli/bin.ts query "How are entity X and entity Y related?" --engine path

Roadmap

  • Operator-Based Model - Atomic retrieval units (VDB, PPR, Louvain, Link, WeightedPath)
  • Engine Diversity - Support for PathRAG, HippoRAG, LightRAG, MS-GraphRAG, RAPTOR, ToG
  • ConGraphDB Native Storage - Direct integration with v0.1.10 schemas (Entity, Chunk, Fact, Community)
  • Logic Score Validation - Graph-based hallucination detection via GraphValidator
  • Benchmark Rotation - Multi-dataset rotation (Da Vinci, Newton, Tesla) for accuracy testing
  • Interactive Dashboard - Cytoscape-based visualization of retrieved subgraphs
  • Multi-LLM Provider Support - Native integrations for OpenAI, Anthropic, Azure, and local Ollama
  • Streaming Operator Pipeline - Parallelized execution of retrieval operators for lower latency
  • Dynamic Strategy Routing - Agentic engine selection based on query intent analysis
  • Incremental Indexing - Delta-indexing for HippoRAG and RAPTOR without full graph rebuilds
  • Cross-Graph Federated Search - Retrieving from multiple distributed graph databases simultaneously
  • Operator Auto-Tuning - Bayesian optimization for hyperparameter pruning and expansion limits
  • Graph-Enriched Fine-Tuning - Pipelines for training small models on operator execution traces
  • WebAssembly Operator Core - Running heavy graph operators in the browser/edge environments

🤝 Contributing

We welcome contributions! Please see CONTRIBUTING.md for guidelines.

⚖️ License & Disclaimer

This project is licensed under the ISC License. Please read the DISCLAIMER.md regarding AI-generated content and professional advice.

About

Unified, modular Graph-based Retrieval-Augmented Generation (GraphRAG) framework with atomic operators and ConGraphDB

Topics

Resources

Contributing

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages