knowledge-graph-llms  by thu-vu92

Extract knowledge graphs from text using LLMs

Created 7 months ago
661 stars

Top 50.9% on SourcePulse

GitHubView on GitHub
Project Summary

This project provides a Streamlit application for generating interactive knowledge graphs from text using OpenAI's GPT-4o model and LangChain. It targets users who need to visualize relationships and entities within textual data, offering a user-friendly interface for input and exploration.

How It Works

The application leverages LangChain's experimental graph transformers, specifically integrating with OpenAI's GPT-4o model. This combination extracts entities and their relationships from provided text, structuring this information into a graph format. The generated graph is then visualized interactively using PyVis, which acts as a Python interface for the vis.js library.

Quick Start & Requirements

  • Install: pip install -r requirements.txt
  • Prerequisites: Python 3.8+, OpenAI API key.
  • Setup: Clone the repository, create a .env file with OPENAI_API_KEY=your_openai_api_key_here.
  • Run: streamlit run app.py
  • Docs: https://github.com/thu-vu92/knowledge-graph-llms

Highlighted Details

  • Extracts entities and relationships using OpenAI GPT-4o.
  • Interactive knowledge graph visualization via PyVis/vis.js.
  • Supports text file uploads (.txt) or direct text input.
  • Customizable graph display with physics-based layout.

Maintenance & Community

This repository appears to be a personal project tutorial, with no explicit mention of a dedicated community or ongoing maintenance beyond the initial tutorial scope.

Licensing & Compatibility

Licensed under the MIT License, permitting free use, modification, and distribution, including for commercial purposes.

Limitations & Caveats

The project relies on OpenAI's GPT-4o model, requiring an API key and incurring associated costs. It is presented as part of a tutorial, suggesting it may not be production-hardened or extensively tested for diverse real-world scenarios.

Health Check
Last Commit

7 months ago

Responsiveness

Inactive

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

Explore Similar Projects

Starred by Chip Huyen Chip Huyen(Author of "AI Engineering", "Designing Machine Learning Systems") and Elvis Saravia Elvis Saravia(Founder of DAIR.AI).

llm-graph-builder by neo4j-labs

0.4%
4k
LLM app builds Neo4j graphs from unstructured data
Created 2 years ago
Updated 2 days ago
Feedback? Help us improve.