https://github.com/aayatech/knowledge-graph-llms
Knowledge Graph Generator is a Streamlit app that extracts graph data from text using LangChain and OpenAI's GPT models. π It creates interactive graphs, allowing users to visualize entities and relationships easily. π οΈ
https://github.com/aayatech/knowledge-graph-llms
awesome awesome-kg awsome-list bert-models bioinformatics bioinformatics-algorithms commonsense gpt4 graph graphml knowledge knowledge-base language-models large-language-models llm prompt retrieval-augmented-generation streamlit
Last synced: 3 months ago
JSON representation
Knowledge Graph Generator is a Streamlit app that extracts graph data from text using LangChain and OpenAI's GPT models. π It creates interactive graphs, allowing users to visualize entities and relationships easily. π οΈ
- Host: GitHub
- URL: https://github.com/aayatech/knowledge-graph-llms
- Owner: Aayatech
- License: mit
- Created: 2025-06-01T03:43:52.000Z (4 months ago)
- Default Branch: main
- Last Pushed: 2025-06-22T21:00:11.000Z (4 months ago)
- Last Synced: 2025-06-22T22:17:49.602Z (4 months ago)
- Topics: awesome, awesome-kg, awsome-list, bert-models, bioinformatics, bioinformatics-algorithms, commonsense, gpt4, graph, graphml, knowledge, knowledge-base, language-models, large-language-models, llm, prompt, retrieval-augmented-generation, streamlit
- Language: Jupyter Notebook
- Size: 18.6 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Knowledge Graphs with LLMs π
Welcome to the **Knowledge Graphs with LLMs** repository! In this project, I explored how to extract knowledge graphs from text using large language models (LLMs), such as OpenAI's GPT-4. This document will guide you through the project structure, setup, usage, and contribution guidelines.
[](https://github.com/Aayatech/knowledge-graph-llms/releases)
## Table of Contents
- [Introduction](#introduction)
- [Project Overview](#project-overview)
- [Installation](#installation)
- [Usage](#usage)
- [Features](#features)
- [Contributing](#contributing)
- [License](#license)
- [Contact](#contact)## Introduction
Knowledge graphs play a crucial role in organizing information. They represent relationships between entities in a structured format, making it easier to retrieve and analyze data. With the advent of LLMs, extracting knowledge from unstructured text has become more efficient and accurate. This project aims to leverage LLMs, particularly OpenAI's GPT-4, to automate the extraction of knowledge graphs from text.
## Project Overview
The primary goal of this project is to demonstrate how LLMs can be utilized to extract knowledge graphs from various text sources. The project includes:
- A detailed explanation of knowledge graphs.
- Methods for text processing.
- Implementation of extraction techniques using GPT-4.
- Examples and use cases.The extracted knowledge graphs can be used in various applications, such as search engines, recommendation systems, and data analytics.
## Installation
To get started with this project, you need to clone the repository and install the required dependencies. Follow these steps:
1. **Clone the repository:**
```bash
git clone https://github.com/Aayatech/knowledge-graph-llms.git
cd knowledge-graph-llms
```2. **Install dependencies:**
Ensure you have Python 3.7 or higher installed. You can create a virtual environment for better package management.
```bash
python -m venv venv
source venv/bin/activate # On Windows use `venv\Scripts\activate`
pip install -r requirements.txt
```3. **Download necessary models:**
You may need to download pre-trained models for LLMs. Follow the instructions in the `models/README.md` file.
## Usage
To extract knowledge graphs from text, you can use the provided scripts. Hereβs a quick guide:
1. **Prepare your text data:**
Create a text file containing the information you want to process. For example, `input.txt`.
2. **Run the extraction script:**
Execute the following command to start the extraction process:
```bash
python extract_knowledge_graph.py --input input.txt --output output_graph.json
```3. **View the results:**
The extracted knowledge graph will be saved in `output_graph.json`. You can visualize it using tools like Neo4j or Gephi.
For more detailed usage instructions, refer to the `docs/USAGE.md` file.
## Features
- **Automated Extraction:** Leverage LLMs to automate the extraction of knowledge graphs from unstructured text.
- **Customizable Input:** Support for various text formats and sources.
- **Output Formats:** Save extracted graphs in JSON, CSV, or GraphML formats.
- **Visualization Tools:** Integrate with popular graph visualization tools for better insights.## Contributing
We welcome contributions to improve this project. Hereβs how you can help:
1. **Fork the repository.**
2. **Create a new branch for your feature or bug fix.**
3. **Make your changes and commit them.**
4. **Push your branch and submit a pull request.**Please ensure your code follows the existing style and includes appropriate tests.
## License
This project is licensed under the MIT License. See the [LICENSE](LICENSE) file for details.
## Contact
For any inquiries or feedback, feel free to reach out:
- **Email:** [your.email@example.com](mailto:your.email@example.com)
- **GitHub:** [Aayatech](https://github.com/Aayatech)You can also check the [Releases](https://github.com/Aayatech/knowledge-graph-llms/releases) section for updates and new features.
Thank you for visiting the Knowledge Graphs with LLMs repository! Your support and contributions are greatly appreciated.