← all repositories
varunshenoy/GraphGPT

Teaching GPT-3 to draw knowledge graphs in JSON

Because traditional NLP pipelines are overkill for a weekend hack, this project uses carefully curated few-shot prompts to make GPT-3 emit structured graph JSON from plain text.

4.4k stars JavaScript Other AIRAG · Search
GraphGPT
Not currently ranked — collecting fresh signals.
star history

What it does

GraphGPT is a browser-based interface that feeds unstructured text—movie synopses, Wikipedia passages, or transcripts—to GPT-3 and renders the extracted entities and relationships as an interactive graph. Successive queries can mutate the existing structure by adding nodes and edges or tweaking visual properties like node color. The extraction logic is essentially a single few-shot prompt that guides GPT-3 to output JSON in the shape the renderer expects.

The interesting bit

The project treats prompt engineering as a complete replacement for a traditional NLP extraction and formatting stack; the only “backend” is the OpenAI API and the carefully curated examples in public/prompts/main.prompt.

Key highlights

  • Incremental graph updates: new text can extend or recolor an existing graph rather than rebuilding from scratch.
  • The prompt design is fully exposed and documented in a Twitter thread linked from the README.
  • The author openly calls it a toy weekend build and points to GPT Index for serious use.
  • Runs fully client-side in the browser, requiring only an OpenAI API key.

Caveats

  • Latency is a known pain point: the README warns that API responses can take up to 20 seconds.
  • The author explicitly recommends GPT Index for production knowledge-graph work.

Verdict

A neat reference if you are studying few-shot prompting or need a quick text-to-graph demo. Look elsewhere if you need a production-grade extraction pipeline.

Frequently asked

What is varunshenoy/GraphGPT?
Because traditional NLP pipelines are overkill for a weekend hack, this project uses carefully curated few-shot prompts to make GPT-3 emit structured graph JSON from plain text.
Is GraphGPT open source?
Yes — varunshenoy/GraphGPT is open source, released under the MIT license.
What language is GraphGPT written in?
varunshenoy/GraphGPT is primarily written in JavaScript.
How popular is GraphGPT?
varunshenoy/GraphGPT has 4.4k stars on GitHub.
Where can I find GraphGPT?
varunshenoy/GraphGPT is on GitHub at https://github.com/varunshenoy/GraphGPT.

heatdrop uses Google Analytics to see which pages get read — nothing else. Your call. How we handle data.