05 Graphs and Entities
neode-notebookstutorials
Export
[ ]
Working with Graphs
Graphs allow you to organize triples into separate namespaces or domains.
List Existing Graphs
[13]
š Your Graphs:
----------------------------------------
⢠geography_knowledge (ID: 2df6caa7-ca18-4dae-8135-0ad5a1ecd03c)
⢠history_knowledge (ID: 4d257886-f857-4a75-b544-34d32ff24410)
⢠technology_knowledge (ID: 836b209e-331b-427f-931e-36c9d67dd5c0)
⢠geography_knowledge (ID: f09dfc5b-ca32-45c4-ace4-ad7177fc3ef5)
⢠history_knowledge (ID: 16ff5bfa-2ad0-418d-890a-662ebda93105)
⢠technology_knowledge (ID: fbd58fdb-fb7c-486e-8efa-4de7074092d6)
⢠science_knowledge (ID: bf481a7a-f475-4e9f-bf60-4f7b6597c177)
⢠mputer in the 1830s. (ID: 679019c0-eb40-44a5-b7e1-08ecd71be5b0)
⢠The history of computing spans several decades of innovation. (ID: 28426999-66f5-4b9a-9a9c-c3b24246345d)
⢠Rust is a systems programming language developed by Mozilla. It was first released in 2010. (ID: f7b1c0f6-5eee-40cc-89d1-7c4a1a136526)
⢠JavaScript was developed by Brendan Eich at Netscape in 1995. (ID: dc36e383-d7be-49de-ba23-8c81cf20beb8)
⢠Python was created by Guido van Rossum and first released in 1991. (ID: 465a77e2-c94e-49db-999d-3009cf3f41b3)
⢠Generated Graph (ID: 405c2b0e-a57e-48e2-818b-8400d6d334a2)
⢠Generated Graph (ID: 8cab6ec0-c433-442a-8d88-fb654311fa5f)
⢠Generated Graph (ID: 55e0e87c-4299-4d47-b48e-6e97506f972f)
⢠Generated Graph (ID: 33f13221-a199-4cf2-97e8-fedc90c2aa5e)
⢠Stripe's org structure (ID: 0e8e6a2b-51a7-49be-8fd8-0da20c547439)
⢠Generated Graph (ID: 22321cfc-f292-4e03-83b5-cbfbdf09cf7f)
⢠Generated Graph (ID: 6c78dbd9-6ce8-4f45-b93a-8517248af469)
⢠OpenAI's investors (ID: a66abbf3-2368-4dd1-a70e-c1dde4123fe8)
⢠OpenAI's investors (ID: e83961e3-2f17-4d74-93fa-1e341c81d94e)
⢠OpenAI's investors (ID: fa84c54e-a08a-4a2f-b25c-3a607d192978)
⢠Image exploration 2/20/2026 (ID: c7ddb8a2-96c8-4b9e-9cbc-998c0669ea92)
⢠OpenAI's investors (ID: 90179788-a43a-4a65-b516-f66b8d37c0c7)
⢠OpenAI's investors (ID: 6596e221-de5e-4a46-90e6-ed83e119f218)
⢠Alan Turing Institute https://www.turing.ac.uk/ (ID: f9fbc1ea-5932-47d4-8ab1-e55928d26b55)
⢠AI companies (ID: 66e0c54c-4de4-45a3-93da-9d0103232eef)
⢠OpenAI's investors (ID: eb9dae9c-b126-47f8-939a-3057d1f13a77)
⢠OpenAI's investors (ID: 28b128ae-48e6-455c-8263-494d446a0fbb)
⢠Four seasons private residences in Austin:
I need... (ID: 4f45a1c0-1d8a-4542-af6a-86918c6edc31)
⢠Kone https://www.kone.us/ (ID: 8a327a4b-0c60-49b8-a86a-0f5d8802337c)
⢠Kone https://www.kone.us/ (ID: d4de8a8e-856b-404b-b41b-54a682629b33)
⢠Kone https://www.kone.us/ (ID: ddec3747-fb66-4435-8ba5-4cdaf98a5901)
⢠science_knowledge (ID: 11147228-7a10-437a-af02-568ab14c3592)
⢠Stripe's org structure (ID: dfa0de90-2053-43f1-bf37-5de9d88c6632)
⢠Cold (https://cold.app) (ID: 0e402bad-c5e3-4123-b490-1782d4b67d8d)
⢠Important people of china and korea (ID: 107f53f7-4b1b-44e7-a4c0-e838a9bbc9b1)
⢠companies palantir invested in (ID: 90780bdc-bad2-4d00-bea5-41d3c2fb19f7)
⢠companies Palantir invested in (ID: dda451fa-e3ea-404f-9f0a-b164fa1d2d23)
⢠companies that use jupyter (ID: 25215295-c112-4866-9753-91e54284d292)
⢠JPMorganChase
Lawrence Livermore National Laborato... (ID: e39e1b03-8079-4dc2-944d-2c1bd05bcbb6)
⢠2i2c ā International Interactive Computing Collabo... (ID: c2457269-f37c-4a4e-8da9-8ff9888e2fcb)
⢠All of these companies and organizations.
2i2... (ID: cd20e569-f218-423d-8c50-1aaa5a78a78d)
⢠Plug and Play (ID: 1d63e96d-8447-4f02-bc1c-c97a6b5c40de)
⢠YC (ID: e9b6fc1d-ce21-4f19-a5cc-adb1bf302612)
⢠Fortune 500 (ID: cac0a99a-69c5-41cd-b386-730559c11a30)
⢠VCs in San Francisco (ID: bc48760b-5a9c-410d-b065-8bd807b583a1)
Create a New Graph
[14]
ā Created graph: science_knowledge ID: 07e4850d-73c3-4b44-b502-d39ef45c25a1
Adding Knowledge to a Graph
Now that we have a graph created, let's populate it with knowledge by generating triples from unstructured text. The generate_triples method extracts structured subject-predicate-object relationships and disambiguate automatically.
[36]
š Input Text: Albert Einstein developed the theory of general relativity in 1915. He was born in Ulm, Germany, and later became a Swiss citizen. Einstein received the Nobel Prize in Physics in 1921 for his explanation of the photoelectric effect. He worked at the Institute for Advanced Study in Princeton, New Jersey. š Generated Triples: ------------------------------------------------------------ Albert Einstein ā developed ā general relativity Albert Einstein ā developed ā the theory of general relativity Albert Einstein ā published ā the general theory of relativity in 1915 Albert Einstein ā born_on ā 14 March 1879 Albert Einstein ā born_in ā Ulm Ulm ā located_in ā Germany Albert Einstein ā became_citizen_of ā Switzerland Albert Einstein ā became_Swiss_citizen_in ā 1901 Albert Einstein ā received ā the Nobel Prize in Physics (1921) Albert Einstein ā received_Nobel_Prize_in_Physics_for ā his discovery of the law of the photoelectric effect Albert Einstein ā served_as_faculty_member_at ā Institute for Advanced Study
Get Graph Details
[35]
š Graph Details: Name: science_knowledge ID: 07e4850d-73c3-4b44-b502-d39ef45c25a1
Create Multiple Domain Graphs
[19]
ā Created 'technology_knowledge' (ID: fc00c718-2fe6-4e04-9923-a8978219fc01) ā Created 'history_knowledge' (ID: f0f4611d-ccfd-48a3-b1f5-d0e09e4fe90b) ā Created 'geography_knowledge' (ID: 772d9fa6-1115-46be-adf1-a8f9bc978fc7) š Domain graphs created: ['technology', 'history', 'geography']
Working with Entities
Entities are the subjects and objects in your knowledge graph. You can manage them directly.
List Entities
[20]
š¤ Entities in your knowledge graph: ---------------------------------------- ⢠Alan Turing (ID: 8f3a16a3-f0a7-4fb0-b081-9ee9726bad6e) ⢠Ada Lovelace (ID: c05b1d4a-28e6-441f-bcdc-d30705b08dd9) ⢠Analytical Engine (ID: 6474f56f-21b0-447e-a09f-61dd879bda0a) ⢠Charles Babbage (ID: bd2f1e33-12e8-4ef6-a2ea-1ffb2d315b88) ⢠John Collison (ID: f7810390-9109-48fe-b6a7-dd384bcd89c2) ⢠Patrick Collison (ID: 6c94f04d-e0cd-4cd5-abb5-58efb1daf8d8) ⢠Luigi Menabrea (ID: b96abd7c-e5bc-4780-99a8-1e4e338e4c32) ⢠Babbage's Difference Engine project (ID: dd491c17-e214-4fbe-9a1a-8765cdec7460) ⢠Difference Engine (ID: b1cfd953-7e24-42b6-b296-44c1dc25ec50) ⢠British government (ID: 6eb5a529-5ea1-451c-b4a5-20a03fca1743)
Create an Entity
[22]
ā Created entity: Artificial Intelligence ID: cd93305d-1e67-4452-8741-ef07c92ea874
Get Entity Details
[24]
š¤ Entity Details: Name: Artificial Intelligence ID: cd93305d-1e67-4452-8741-ef07c92ea874
Update an Entity
[26]
ā Updated entity: Artificial Intelligence (AI)
Delete an Entity
[29]
Created temporary entity: b6526775-2f50-47b6-a94f-b0a035b20436 ā Deleted entity: b6526775-2f50-47b6-a94f-b0a035b20436
Working with Indexes
Indexes improve search performance for specific fields.
List Indexes
[30]
š Indexes: ---------------------------------------- ⢠notebooks2 ⢠notebooks ⢠Example ⢠companies ⢠Public ⢠corporate ⢠history ⢠Raising ⢠Alph Leads
Create an Index
[32]
ā Created index: predicate_index
Organizing Knowledge by Domain
Here's a pattern for organizing knowledge into domain-specific graphs:
[33]
ā Created domains: ['physics', 'biology']
Cleanup: Delete Test Graphs
[ ]
Summary
You've learned how to:
- ā Create and manage multiple graphs
- ā Work with entities (CRUD operations)
- ā Create indexes for performance
- ā Organize knowledge by domain
Complete Cookbook Series
- 01_getting_started.ipynb - Setup and basics
- 02_working_with_triples.ipynb - CRUD operations
- 03_semantic_search.ipynb - Natural language queries
- 04_ai_triple_generation.ipynb - AI-powered extraction
- 05_graphs_and_entities.ipynb - Organization and management (this notebook)
For more information, visit neode.ai/docs