KnowledgeGraph GPT - Converting unstructured text into a Knowledge graph

Transform plain text into a visually stunning knowledge graph with GPT-3 technology! This app converts text into RDF tuples and colors them based on frequency, creating a dynamic and informative representation of your data. Download the resultant RDF Tuples as a JSON file for easy integration and analysis.

Example Prompt: Bob is Anna’s father. Anna’s mother is Angela. Anna also has a brother John son of Bob. Show me all the relationships that exist.

Github Repo: GitHub - iAmmarTahir/KnowledgeGraphGPT: Transform plain text into a visually stunning Knowledge Graph with GPT-4 (latest preview)! It converts text into RDF tuples, and highlights the most frequent connections with a vibrant color-coding system. Download the results as a convenient JSON file for easy integration into your own projects.
Website: KnowledgeGraph GPT

10 Likes

Wow, nice work! Great idea. Did you host it somewhere? I’d love to play with it.

Thanks!! Here’s the link: https://celebrated-kitten-367f1f.netlify.app/. You have to provide your OpenAI API key and you can generate the graphs by entering the prompt

1 Like

Any way you could make an option for exporting the resulting visuals to high resolution PNG? Works great otherwise!

I see you using gpt4 would it work with 3.5?

Note: The noted prompt does work with GPT-3.5 however the triples (tuples as the OP states) it creates could be more refined, they are more often phrases than just single words.

The prompt used is noted

the rest appears to be freeware

  1. npm >= v7.19.1
  2. node >= v14.17.4

Module parse failed: Unexpected token (1:4)
You may need an appropriate loader to handle this file type, currently no loaders are configured to process this file. It tells me to see webpack concept of loaders

You are given a prompt. Extrapolate as many relationships as you can from the prompt and generate tuples like (source, relation, target). Make sure there are always source, relation and target in the tuple.
| Example:
| prompt: John knows React, Golang, and Python. John is good at Software Engineering and Leadership

this is the error i get

Yes, it works with GPT-3.5 as well.

I have fixed this issue and merged the PR into the master.

Feel free to contribute an enhanced version of the prompt if you can make improvements.

1 Like