KRAGEN  by EpistasisLab

RAG engine for knowledge graph question-answering

created 1 year ago
675 stars

Top 51.1% on sourcepulse

GitHubView on GitHub
Project Summary

KRAGEN is a knowledge retrieval augmented generation (RAG) engine designed for complex problem-solving using natural language. It combines knowledge graphs, RAG, and Graph of Thoughts (GoT) prompting to break down problems, retrieve relevant facts from a vectorized knowledge graph (via Weaviate), and synthesize solutions, aiming to reduce hallucinations. The target audience includes researchers and power users working with complex datasets and LLMs.

How It Works

KRAGEN converts knowledge graphs into a vectorized database using Weaviate. It then employs a Graph of Thoughts (GoT) approach to decompose complex queries into smaller, manageable subproblems. For each subproblem, it retrieves relevant factual information via RAG from the vectorized knowledge graph. The retrieved facts are used to guide the LLM's reasoning process, which is visualized through a custom React-based viewer, allowing users to inspect and validate the GoT structure and logic.

Quick Start & Requirements

  • Install: Clone the repository, copy .env.sample to .env, update OPENAI_API_KEY and WEAVIATE_URL, build Docker images (docker compose build), optionally set up Weaviate with data (docker compose run kragen setup test.csv), and start the GUI (docker compose up gui).
  • Prerequisites: Docker, OpenAI API key.
  • Resources: Tested on Ubuntu 22.04 LTS (i7, 32GB RAM) and macOS 14.4 (M1 Max, 64GB RAM). Initial Docker image build may take a few minutes.
  • Links: Official Docker Installation Guide, Weaviate Documentation, KRAGEN GUI.

Highlighted Details

  • Integrates knowledge graphs with RAG and Graph of Thoughts (GoT) prompting.
  • Utilizes Weaviate for vectorized knowledge graph storage.
  • Provides a custom React-based GUI for visualizing and interacting with the GoT reasoning process.
  • Aims to limit LLM hallucinations by grounding responses in retrieved knowledge.

Maintenance & Community

  • Forked original Graph of Thoughts logic from spcl/graph-of-thoughts.
  • Further details on community, roadmap, or specific contributors are not explicitly detailed in the README.

Licensing & Compatibility

  • Licensed to be "as widely usable as possible." Specific license type is not detailed in the README, directing users to the repository license file.
  • Commercial use and closed-source linking compatibility depend on the specific license.

Limitations & Caveats

The setup requires an OpenAI API key, and the process may be affected by VPN services. The README mentions a test.csv for demonstration, but users need to format their own data according to specified formats.

Health Check
Last commit

4 months ago

Responsiveness

1 week

Pull Requests (30d)
0
Issues (30d)
0
Star History
14 stars in the last 90 days

Explore Similar Projects

Starred by Elie Bursztein Elie Bursztein(Cybersecurity Lead at Google DeepMind), Joe Walnes Joe Walnes(Head of Experimental Projects at Stripe), and
1 more.

KAG by OpenSPG

0.7%
8k
Logical reasoning framework for domain knowledge bases
created 10 months ago
updated 6 days ago
Feedback? Help us improve.