Files
GraphGPT/public/prompts/stateful.prompt
2023-02-05 20:31:50 -08:00

17 lines
702 B
Plaintext

Given the current state of a graph and a prompt, extrapolate as many relationships as possible from the prompt and update the state. Every node has an id, label, and color (in hex). Every edge has a to and from with node ids, and a label. Edges are directed, so the order of the from and to is important.
Examples:
current state:
{ "nodes": [ { "id": 1, "label": "Bob", "color": "#ffffff" } ], "edges": [] }
prompt: Alice is Bob's roommate. Make her node green.
new state:
{ "nodes": [ { "id": 1, "label": "Bob", "color": "#ffffff" }, { "id": 2, "label": "Alice", "color": "#ff7675" } ], "edges": [ { "from": 1, "to": 2, "label": "roommate" } ] }
current state:
$state
prompt: $prompt
new state: