|
9 | 9 | "\n", |
10 | 10 | "[](https://colab.research.google.com/github/structured-world/coordinode-python/blob/main/demo/notebooks/00_seed_data.ipynb)\n", |
11 | 11 | "\n", |
12 | | - "Populates CoordiNode with a **tech industry knowledge graph** you can explore\n", |
13 | | - "in notebooks 01–03.\n", |
| 12 | + "Populates CoordiNode with a **tech industry knowledge graph**.\n", |
| 13 | + "\n", |
| 14 | + "> **Note:** When using `coordinode-embedded` (`LocalClient(\":memory:\")`), the seeded data\n", |
| 15 | + "> lives only inside this notebook process — notebooks 01–03 will start with an empty graph.\n", |
| 16 | + "> To share the graph across notebooks, point all of them at the same running CoordiNode\n", |
| 17 | + "> server via `COORDINODE_ADDR`.\n", |
14 | 18 | "\n", |
15 | 19 | "**Graph contents:**\n", |
16 | 20 | "- 10 people (engineers, researchers, founders)\n", |
|
293 | 297 | "id": "a1b2c3d4-0000-0000-0000-000000000014", |
294 | 298 | "metadata": {}, |
295 | 299 | "outputs": [], |
296 | | - "source": [ |
297 | | - "print(\"=== Who works at Synthex? ===\")\n", |
298 | | - "rows = client.cypher(\n", |
299 | | - " \"MATCH (p:Person {demo_tag: $tag})-[:WORKS_AT]->(c:Company {name: $co, demo_tag: $tag}) \"\n", |
300 | | - " \"RETURN p.name AS name, p.role AS role\",\n", |
301 | | - " params={\"co\": \"Synthex\", \"tag\": DEMO_TAG},\n", |
302 | | - ")\n", |
303 | | - "for r in rows:\n", |
304 | | - " print(f\" {r['name']} — {r['role']}\")\n", |
305 | | - "\n", |
306 | | - "print(\"\\n=== What does Synthex use? ===\")\n", |
307 | | - "rows = client.cypher(\n", |
308 | | - " \"MATCH (c:Company {name: $co, demo_tag: $tag})-[:USES]->(t:Technology {demo_tag: $tag}) RETURN t.name AS name\",\n", |
309 | | - " params={\"co\": \"Synthex\", \"tag\": DEMO_TAG}\n", |
310 | | - ")\n", |
311 | | - "for r in rows:\n", |
312 | | - " print(f\" {r['name']}\")\n", |
313 | | - "\n", |
314 | | - "print(\"\\n=== GraphRAG dependency chain ===\")\n", |
315 | | - "rows = client.cypher(\n", |
316 | | - " \"MATCH (t:Technology {name: $tech, demo_tag: $tag})-[:BUILDS_ON*1..3]->(dep:Technology {demo_tag: $tag}) RETURN dep.name AS dependency\",\n", |
317 | | - " params={\"tech\": \"GraphRAG\", \"tag\": DEMO_TAG},\n", |
318 | | - ")\n", |
319 | | - "for r in rows:\n", |
320 | | - " print(f\" → {r['dependency']}\")\n", |
321 | | - "\n", |
322 | | - "print(\"\\n✓ Demo data ready — open notebooks 01, 02, 03 to explore!\")\n", |
323 | | - "client.close()" |
324 | | - ] |
| 300 | + "source": "print(\"=== Who works at Synthex? ===\")\nrows = client.cypher(\n \"MATCH (p:Person {demo_tag: $tag})-[:WORKS_AT]->(c:Company {name: $co, demo_tag: $tag}) \"\n \"RETURN p.name AS name, p.role AS role\",\n params={\"co\": \"Synthex\", \"tag\": DEMO_TAG},\n)\nfor r in rows:\n print(f\" {r['name']} — {r['role']}\")\n\nprint(\"\\n=== What does Synthex use? ===\")\nrows = client.cypher(\n \"MATCH (c:Company {name: $co, demo_tag: $tag})-[:USES]->(t:Technology {demo_tag: $tag}) RETURN t.name AS name\",\n params={\"co\": \"Synthex\", \"tag\": DEMO_TAG}\n)\nfor r in rows:\n print(f\" {r['name']}\")\n\nprint(\"\\n=== GraphRAG dependency chain ===\")\nrows = client.cypher(\n \"MATCH (t:Technology {name: $tech, demo_tag: $tag})-[:BUILDS_ON*1..3]->(dep:Technology {demo_tag: $tag}) RETURN dep.name AS dependency\",\n params={\"tech\": \"GraphRAG\", \"tag\": DEMO_TAG},\n)\nfor r in rows:\n print(f\" → {r['dependency']}\")\n\nprint(\"\\n✓ Demo data seeded.\")\nprint(\"To query it from notebooks 01–03, connect them to the same CoordiNode server (COORDINODE_ADDR).\")\nclient.close()" |
325 | 301 | } |
326 | 302 | ], |
327 | 303 | "metadata": { |
|
0 commit comments