knowledge-graph-llms  by thu-vu92

Extract knowledge graphs from text using LLMs

Created 3 months ago
559 stars

Top 57.4% 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

3 months ago

Responsiveness

Inactive

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

Explore Similar Projects

Feedback? Help us improve.