MCPcopy Index your code
hub / github.com/varunshenoy/GraphGPT

github.com/varunshenoy/GraphGPT @main

Chat with this repo
repository ↗ · DeepWiki ↗ · + Follow
7 symbols 18 edges 5 files 0 documented · 0% 3 cross-repo links updated 2y ago★ 4,42421 open issues
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

GraphGPT

Natural Language → Knowledge Graph

demo

Note: this is a toy project I built out over a weekend. If you want to use knowledge graphs in your project, check out GPT Index.

GraphGPT converts unstructured natural language into a knowledge graph. Pass in the synopsis of your favorite movie, a passage from a confusing Wikipedia page, or transcript from a video to generate a graph visualization of entities and their relationships.

Successive queries can update the existing state of the graph or create an entirely new structure. For example, updating the current state could involve injecting new information through nodes and edges or changing the color of certain nodes.

The current few-shot prompt guides GPT-3 in accurately understanding the JSON formatting GraphGPT requires for proper rendering. You can see the entire prompt in public/prompts/main.prompt. A major issue at the moment is latency. Due to the nature of OpenAI API calls, it takes up to 20 seconds to receive a response.

Prompts

Prompts are located in the public/prompts folder. Read this Twitter thread I put together to learn more about how these prompts were designed.

Setup

  1. Run npm install to download required dependencies (currently just react-graph-vis).
  2. Make sure you have an OpenAI API key. You will enter this into the web app when running queries.
  3. Run npm run start. GraphGPT should open up in a new browser tab.

Core symbols most depended-on inside this repo

reportWebVitals
called by 1
src/reportWebVitals.js
updateGraph
called by 1
src/App.js
queryStatelessPrompt
called by 1
src/App.js
queryStatefulPrompt
called by 1
src/App.js
queryPrompt
called by 1
src/App.js
clearState
called by 0
src/App.js
createGraph
called by 0
src/App.js

Shape

Function 7

Languages

TypeScript100%

Modules by API surface

src/App.js6 symbols
src/reportWebVitals.js1 symbols

Dependencies from manifests, versioned

@testing-library/react13.4.0 · 1×
react18.2.0 · 1×
react-dom18.2.0 · 1×
react-graph-vis1.0.7 · 1×
react-scripts5.0.1 · 1×
web-vitals2.1.4 · 1×

For agents

$ claude mcp add GraphGPT \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact