Skip to main content

LLM created knowledge graphs

Project description

llmgraph

llmgraph enables you to create knowledge graphs in GraphML, GEXF, and HTML formats from a given source entity Wikipedia page. The knowledge graphs are generated by extracting world knowledge from ChatGPT or other large language models (LLMs).

Features

  • Create knowledge graphs from a source entity Wikipedia page.
  • Support for generating knowledge graphs in HTML, GraphML, and GEXF formats.
  • Utilizes the power of ChatGPT and other large language models to extract world knowledge.

Installation

You can install llmgraph using pip:

pip install llmgraph

Example Usage

llmgraph concepts-general "https://en.wikipedia.org/wiki/Many-worlds_interpretation" --levels 2

Required Arguments

  • entity_type (TEXT): Entity type (e.g. movie)
  • entity_wikipedia (TEXT): Full Wikipedia link to the root entity

Optional Arguments

  • --entity-root (TEXT): Optional root entity name override if different from the Wikipedia page title [default: None]
  • --levels (INTEGER): Number of levels deep to construct from the central root entity [default: 2]
  • --max-sum-total-tokens (INTEGER): Maximum sum of tokens for graph generation [default: 200000]
  • --output-folder (TEXT): Folder location to write outputs [default: ./_output/]
  • --llm-model (TEXT): The model name [default: gpt-3.5-turbo]
  • --llm-temp (FLOAT): LLM temperature value [default: 0.0]
  • --llm-use-localhost (INTEGER): LLM use localhost:8081 instead of OpenAI [default: 0]
  • --help: Show this message and exit.

Example Output

TODO: llmgraph concepts-general "https://en.wikipedia.org/wiki/Knowledge_graph" --levels 3
TODO: llmgraph company ??? TODO: llmgraph software-engineering TODO: llmgraph machine-learning TODO: llmgraph movie

Contributing

We welcome contributions to llmgraph. To contribute, please follow these steps:

  1. Fork the repository.
  2. Create a new branch for your feature or bug fix.
  3. Make your changes and commit them.
  4. Create a pull request with a clear description of your changes.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

llmgraph-0.3.0.tar.gz (13.1 kB view details)

Uploaded Source

Built Distribution

llmgraph-0.3.0-py3-none-any.whl (15.8 kB view details)

Uploaded Python 3

File details

Details for the file llmgraph-0.3.0.tar.gz.

File metadata

  • Download URL: llmgraph-0.3.0.tar.gz
  • Upload date:
  • Size: 13.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.6.1 CPython/3.10.6 Darwin/22.5.0

File hashes

Hashes for llmgraph-0.3.0.tar.gz
Algorithm Hash digest
SHA256 4712382fea27344bf86875e61f546f5af6fb8296556f5336c0cedc7573a57577
MD5 c5efaf13d20cc5b624c0270a6b33187e
BLAKE2b-256 c3f9d9428a8a0273fd34732dca2c5554332c5eee695eec87e13abb437331a6c4

See more details on using hashes here.

File details

Details for the file llmgraph-0.3.0-py3-none-any.whl.

File metadata

  • Download URL: llmgraph-0.3.0-py3-none-any.whl
  • Upload date:
  • Size: 15.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.6.1 CPython/3.10.6 Darwin/22.5.0

File hashes

Hashes for llmgraph-0.3.0-py3-none-any.whl
Algorithm Hash digest
SHA256 cec537fcdb0408b69a7212ae9bc8934960e02f276eeab0b5fb47b18556deef99
MD5 01aecda2911da6be66eaf8c6640e9b83
BLAKE2b-256 577591d3b2e23685361068d4a253138c470af9438a2929ef72aba32a5ea4582f

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page