On this tutorial, I’ll present you the right way to handle a taxonomy in EDG and publish it to a Neo4j occasion, the place it may be populated with further information to energy a suggestion engine. The taxonomy, which is constructed and maintained in TopQuadrant’s EDG, defines the construction. A set of (pretend) educational journal articles serves because the occasion information that populates Neo4j. I’ll use a small hierarchy of STEM classes because the taxonomy to prepare the articles. This information is roofed below the Inventive Commons CC0 1.0 Common Public Area Dedication.
Notice 1: Full disclosure — I work at TopQuadrant, the corporate that makes EDG, so I’m naturally biased towards the instruments I do know properly. Each Neo4j and TopQuadrant’s EDG are industrial merchandise and never open supply. They every provide free trial variations appropriate for following together with this tutorial: Neo4j gives one free cloud database occasion (with limits on information quantity, reminiscence, and CPU), and TopQuadrant gives a 90-day free trial of EDG Desktop. Additionally, whereas the structure outlined right here has its advantages, it’s not the one strategy, and these aren’t the one distributors able to supporting this sort of workflow. The professionals and cons of this strategy are listed beneath.
Notice 2: Right here is a video recording of what this demo seems to be like.
Notice 3: All pictures on this publish are created by creator.

What’s the purpose of all of this? The purpose is that plenty of which means lives within the taxonomy itself. Every article is tagged with essentially the most particular class that applies, however as a result of the taxonomy encodes dad or mum–youngster relationships, we are able to infer higher-level associations mechanically. For instance, if an article is tagged with Mathematical Software program, it’s additionally about Pc Science and STEM, even when it isn’t explicitly tagged that approach. The taxonomy doesn’t simply classify, it allows reasoning over how subjects relate, so the information supply solely must report essentially the most related tag, and the hierarchy fills in the remaining.
We’re separating the occasion stage info on what a person article is about from the meta details about the subjects themselves and the way they relate to one another.
The explanations you’d wish to construct with this type of structure are:
- Inferencing: Tag with one idea however use the taxonomy to affiliate many different ideas to the content material. As a substitute of tagging an article with Mathematical Software program and Pc Science, I can simply tag it with Mathematical Software program. The taxonomy is aware of that Mathematical Software program is a department of Pc Science. The dad or mum idea, Pc Science, could be inferred based mostly on the taxonomy.
- Aligning a number of programs: I can use one taxonomy to construct a suggestion engine in Neo4j and a GraphRAG utility in GraphDB. One workforce can use vector-based tagging on content material saved in SharePoint whereas one other makes use of NLP rule-based tagging on content material saved in Adobe Expertise Supervisor (AEM). All of those apps are aligned as a result of they’re all utilizing the identical reference information.
- Change administration: If I wish to recategorize Mathematical Software program as a department of Arithmetic somewhat than a department of Pc Science, I simply want to vary its dad or mum within the taxonomy. If I don’t have a separate taxonomy, I’d must retag each doc tagged with Mathematical Software program. If I’ve a number of downstream apps utilizing the identical listing of phrases, this turns into a nightmare. I’d must retag each entity tagged with Mathematical Software program in each utility and guarantee all the opposite tags related to that doc are appropriate.
- Play to instruments’ strengths: EDG is nice and managing metadata and taxonomies and guaranteeing these issues are aligned and ruled properly. Neo4j and different graph databases are nice at high-performance graph analytics at scale however wrestle with the metadata administration aspect of issues. With this arrange, we are able to get the very best of each worlds
There are different architectural approaches to constructing one thing like this, after all, and there are drawbacks to the strategy I define right here. Among the primary ones embody:
- Overkill for easy use circumstances: This tutorial makes use of a easy demo, however the structure makes essentially the most sense when your information and use circumstances are advanced. Most graph databases, together with Neo4j, allow you to outline a schema or fundamental ontology and symbolize taxonomies with hierarchical relationships. In case your information is comparatively easy, your taxonomy is simple, or just one workforce wants to make use of it, it’s possible you’ll not want this many instruments.
- Skillset and studying curve: Utilizing EDG and Neo4j collectively assumes familiarity with two completely different paradigms: ontology modeling in RDF/SHACL and graph querying in property graphs/Cypher. Many groups are snug with one however not the opposite.
- Extra shifting elements: Holding a taxonomy separate from the information you’re tagging means you’ll want to be sure that the tags align with the taxonomy. In the event that they drift, the graph stops becoming collectively cleanly within the database.
- Vendor lock-in: Each Neo4j and EDG are industrial merchandise so there may be at all times going to be some lock-in and potential migration prices. The requirements underlying EDG (RDF, SHACL, and SPARQL), are open supply requirements from the W3C, which does mitigate total technical lock-in.
Neo4j is a labeled property graph (LPG). EDG is a information graph curation instrument based mostly in RDF and SHACL. LPGs and RDF are two completely different graph applied sciences that, traditionally, haven’t been appropriate. EDG has not too long ago constructed a Neo4j integration function, nonetheless, which permits customers to construct utilizing each applied sciences.
Beneath is a visible illustration of how these two applied sciences can work collectively.

At the backside in pink, you have information storage. I’ve this cut up into inner information and exterior information. Inner information is the uncooked information you may be storing in a knowledge lake, a content material administration system (CMS) like SharePoint, or a relational database. There may additionally be exterior datasets you wish to combine into your app. These might be public, free information sources like WikiData, higher stage ontologies like gist, or proprietary reference datasets like SNOMED or MedDRA (medical taxonomies).
EDG can then act because the semantic layer between the underlying information and downstream apps. You possibly can handle your ontologies, taxonomies, reference information, and metadata in a single place and push what you’ll want to functions like Neo4j as wanted. It’s also possible to load information straight out of your underlying information sources into Neo4j or every other utility.
Step 1: Get free variations of EDG and Neo4j
First, we’re going to must get free variations of those merchandise to mess around with.
For EDG, you’ll must go to this web site and request a free trial. You’ll get a hyperlink to obtain EDG together with a license in an e-mail. After the obtain completes, there may be an executable file within the edg folder, additionally referred to as edg. Double click on that and it ought to begin working in your browser. If you happen to don’t have Java put in, it’s going to immediate you to put in Java first.

EDG will then open in your browser in a brand new tab referred to as one thing like http://localhost:8083/. However it’s going to say it’s not registered. Click on on Product Registration after which add the license file that was additionally despatched within the e-mail. Then click on “Register Product”.

After importing the license, you possibly can return to the house display by clicking the TopQuadrant emblem within the prime left nook. Now it’s best to be capable of see the principle EDG touchdown web page.

Now we’d like a free model of Neo4j. Go to this hyperlink to get began together with your free trial. If you happen to don’t have an account already, you will want to make one. After you create a Neo4j account you’ll land on a display like this:

Click on “Create occasion” after which choose the free possibility.

Once you click on “Create occasion” you can be proven your username and password. The username is often simply “Neo4j” however the password is exclusive, so write it down someplace.
Step 2: Arrange integration
In EDG, within the prime proper nook, click on on the person icon (it seems to be like an individual). Then click on “Server Administration”. It will take you to a display with a bunch of choices. Click on “Product Configuration Parameters”. On the left toolbar you will note a bunch of integration choices. Click on “Neo4j”.

You possibly can configure this to push to a number of Neo4j databases, however for this tutorial we’ll simply level to the Neo4j occasion we simply created. On the precise aspect of the empty Neo4j database line there’s a plus signal. Click on that and you can be prompted to enter the Neo4j credentials.

You possibly can title this configuration something however I selected “neo4jtest1”. The ID needs to be autofilled by EDG. For the Neo4j database URL, you will want to examine the Neo4j occasion you created in Neo4j. It should look one thing like this: neo4j+s://cd227570.databases.neo4j.io.
Click on “Create and Choose”. Now you will want to enter your password. That is the one which Neo4j gave you once you created your Neo4j occasion.

Now we’re all configured.
Step 3: Import taxonomy
Go to my GitHub and obtain this taxonomy. It is a listing of STEM subjects in a hierarchy i.e. a taxonomy.
Click on “New +” on the prime of the display in EDG then “Import asset collections from TriG or Zip file”. Select the zip file you bought from my GitHub and cargo it into EDG. Click on End. Once you go to the taxonomy it’s best to see a hierarchical listing of a bunch of various STEM classes.

Step 4: Push taxonomy to Neo4j
Click on the cloud dropdown to handle integrations. Within the dropdown menu you will note the choice to “Hyperlink to Neo4j Database”.

Once you click on this it is possible for you to to decide on which Neo4j integration you wish to use. Click on the one you created in step 2 above.

After you choose the Neo4j integration, the combination between this taxonomy and your Neo4j occasion can be created. It should seem like the popup beneath. Click on the combination to navigate to it. In my instance beneath it’s referred to as “Integration with Neo4j database neo4jtest1”. Then click on “Okay”.

The combination will now seem within the editor and we are able to change any settings if we would like. You’ll discover subsequent to the cloud dropdown there’s a icon for pushing to built-in programs that appears like a cloud with an arrow on it.

Click on edit after which scroll right down to “included courses”. That is the place we specify which courses in our taxonomy we wish to push to this Neo4j occasion. For this tutorial, choose “Idea”. This could embody every thing within the taxonomy. This will likely appear pointless, however it is vital for giant taxonomies with many sorts of courses.

Additionally choose “at all times overwrite” to be “True”. This ensures that once we push, we overwrite no matter is within the Neo4j occasion.

Now click on “Save Modifications”.
Again within the editor interface, click on the cloud push icon that’s within the prime toolbar now that we now have established a Neo4j integration. A popup ought to seem that appears just like the picture beneath. If we now have a number of integrations configured with a number of completely different functions, we’d see all of them right here. For this tutorial, it’s best to simply see the one you made and it needs to be mechanically chosen. Now click on “Okay”.

You need to see a progress bar of your ideas getting pushed to Neo4j.

Step 5: Discover information in Neo4j
Now return to your Neo4j Aura occasion. If you happen to click on Situations on the left toolbar you will note the occasion we created in Step 1. Now you will note that there are Nodes and Relationships in it!

You possibly can click on “Join” after which “Discover” which can take you to a visible illustration of your graph.

Beneath is the visible explorer of Neo4j Aura. You possibly can simply search on the generic time period “Useful resource – BROADER – Useful resource” to see the entire ideas we pushed from EDG together with their dad or mum ideas.

Step 6: Add articles to Neo4j
Obtain an inventory of journal articles from my GitHub right here. It is a quick listing of pretend educational journal articles. The thought right here is that we would like the taxonomy to come back from EDG however the article metadata to come back from some place else.
Now in Neo4j, click on “Import” on the left toolbar and “New information supply”. An inventory of choices will seem. You could possibly import your occasion information from wherever, however for this tutorial we’ll simply add the csv file straight. The supply of information doesn’t matter, what issues is that the occasion information is tagged with phrases that come from the taxonomy that we’re managing in EDG. That’s how we are able to align the article metadata with our taxonomy and broader semantic layer.

Add the csv you downloaded from my GitHub. You’ll then be requested the way you wish to outline your mannequin. Choose “Generate from schema”.

You’ll see Articles.csv pop up as a node. Click on the node. You’ll must specify which property you wish to use as the first key. There’s a property on this listing of articles referred to as “id” which we’ll use as the first key. To set this as the important thing, click on the important thing icon within the backside proper for the “id” row. Then choose “Run Import”.

You’ll be prompted to enter the password for this occasion, which is the one you wrote down firstly. It should take a second to run however then you’ll get this popup of Import outcomes.

You possibly can see that 15 nodes had been created. The csv file contained 15 articles and every of them turned a node. Now we are able to return to the Discover function and seek for “Articles.csv”. You’ll see Articles present up within the visible in pink alongside the STEM classes in inexperienced. That is nice however they aren’t but linked. To attach the occasion information (articles) to the classes, we have to run a cypher question.

Step 7: Join occasion information with taxonomy
Click on Question within the left toolbar. Within the question field enter:
// 1) Match each imported article node that has a topicUri
MATCH (a:`Articles.csv`)
WHERE a.topicUri IS NOT NULL
// 2) Discover the corresponding Idea by its uri property
MATCH (c:Idea {uri: a.topicUri})
// 3) Create the TAGGED_WITH relationship (idempotent)
MERGE (a)-[:TAGGED_WITH]->(c)
// 4) Return a sanity test
RETURN rely(*) AS totalTaggedRelationships;
It ought to seem like this:

Then press “Run”. You’ll see proper below that question one thing that may say “Created 15 relationships”. That’s signal. Now return to the Explorer. Now seek for “Articles.csv – TAGGED_WITH – Useful resource”. You’ll see that every one of these pink nodes at the moment are linked to our inexperienced taxonomy!

Step 8: Construct a suggestion engine
We’re going to run some very fundamental similarity queries to display the way you’d use the graph we simply constructed for suggestions. First, let’s have a look at an article and which class it’s tagged with. Enter this cypher question into question interface. It will listing the classes that the article “Advances in Mathematical Software program Research #7” was tagged with.
MATCH (a:`Articles.csv` {title: 'Advances in Mathematical Software program Research #7'})
MATCH (a)-[:TAGGED_WITH]->(c:Idea)
RETURN a.title AS article, c.prefLabel AS tag, c.uri AS uri
ORDER BY tag;
You need to see the next output and the class “Mathematical Software program”.

Suppose we wish to discover articles just like this web page turner as a result of we wish to suggest them to potential readers. We are able to search for different articles which might be additionally tagged with Mathematical Software program, however we are able to additionally benefit from taxonomical construction we now have in our graph. Mathematical Software program is a subclass of Pc Science, in line with the STEM taxonomy. You possibly can return to EDG to discover the classes and their youngsters. For our suggestion engine, to seek out articles just like our Mathematical Software program article, we wish to discover different articles which might be tagged with Mathematical Software program, however ALSO articles tagged with different branches of pc science.
We are able to try this with the next cypher question:
// 0) Seed article by its actual label
MATCH (me:`Articles.csv` {title: 'Advances in Mathematical Software program Research #7'})
// 1) get every tagged subject plus its dad or mum
MATCH (me)-[:TAGGED_WITH]->(youngster:Idea)-[:BROADER]->(dad or mum:Idea)
// 2) discover every other article tagged with a sibling below that very same dad or mum
MATCH (siblingChild:Idea)-[:BROADER]->(dad or mum)<-[:BROADER]-(youngster)
MATCH (rec:`Articles.csv`)-[:TAGGED_WITH]->(siblingChild)
WHERE rec <> me
// 3) compute suggestion rating
WITH rec, rely(DISTINCT dad or mum) AS rating
// 4) now pull in all of the direct tags on every advisable article
OPTIONAL MATCH (rec)-[:TAGGED_WITH]->(t:Idea)
// 5) return title, rating, and full tag listing
RETURN
rec.title AS suggestion,
rating AS sharedParentCount,
gather(DISTINCT t.prefLabel) AS allTaggedTopics
ORDER BY rating DESC, suggestion
LIMIT 5;
You need to get the next outcomes:

There are not any different articles tagged with Mathematical Software program, however there are articles tagged with different branches of pc science. “Advances in Computer systems and Society Research” is an article tagged with the class “Computer systems and Society”. That is advisable as a result of the graph is aware of that each Computer systems and Society and Mathematical Software program are branches of Pc Science.
Step 9: Adjusting our taxonomy
I discussed earlier that one purpose you’d wish to separate your taxonomy out of your graph database is so you can also make modifications to your taxonomy and simply see the downstream results in your apps. Let’s attempt that.
Suppose we wish to recategorize Mathematical Software program as a department of Arithmetic somewhat than a department of Pc Science. To do that in our taxonomy, we simply drag and drop the time period within the tree construction in EDG.

Now push the taxonomy again into Neo4j utilizing the identical cloud button.

Now once we return to Neo4j and run the advice algorithm once more, the outcomes are completely completely different. It’s because our unique article was tagged with Mathematical Software program, which we’ve now labeled as a department of Arithmetic. The opposite articles which might be advisable to us are different articles about math, not pc science.

Conclusion
This straightforward demo reveals how a taxonomy can convey construction, flexibility, and intelligence to your information functions. By separating your taxonomy (in EDG) out of your occasion metadata (in Neo4j), you achieve the power to deduce relationships, align programs, and evolve your mannequin over time, with out having to retag or rebuild downstream apps. The result’s a modular structure that makes your graph smarter as your understanding of the area grows.
Concerning the creator: Steve Hedden is the Head of Product Administration at TopQuadrant, the place he leads the technique for EDG, a platform for information graph and metadata administration. His work focuses on bridging enterprise information governance and AI by ontologies, taxonomies, and semantic applied sciences. Steve writes and speaks commonly about information graphs, and the evolving function of semantics in AI programs.


