Close Menu
    Trending
    • MIT scientists debut a generative AI model that could create molecules addressing hard-to-treat diseases | MIT News
    • Why CrewAI’s Manager-Worker Architecture Fails — and How to Fix It
    • How to Implement Three Use Cases for the New Calendar-Based Time Intelligence
    • Ten Lessons of Building LLM Applications for Engineers
    • How to Create Professional Articles with LaTeX in Cursor
    • LLM Benchmarking, Reimagined: Put Human Judgment Back In
    • How artificial intelligence can help achieve a clean energy future | MIT News
    • How to Implement Randomization with the Python Random Module
    ProfitlyAI
    • Home
    • Latest News
    • AI Technology
    • Latest AI Innovations
    • AI Tools & Technologies
    • Artificial Intelligence
    ProfitlyAI
    Home » How To Build a Graph-Based Recommendation Engine Using EDG and Neo4j
    Artificial Intelligence

    How To Build a Graph-Based Recommendation Engine Using EDG and Neo4j

    ProfitlyAIBy ProfitlyAINovember 21, 2025No Comments17 Mins Read
    Share Facebook Twitter Pinterest LinkedIn Tumblr Reddit Telegram Email
    Share
    Facebook Twitter LinkedIn Pinterest Email


    On this tutorial, I’ll present you methods to handle a taxonomy in EDG and publish it to a Neo4j occasion, the place it may be populated with extra information to energy a advice engine. The taxonomy, which is constructed and maintained in TopQuadrant’s EDG, defines the construction. A set of (faux) 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 data is roofed underneath the Creative Commons CC0 1.0 Universal Public Domain Dedication.

    Observe 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 supplies 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 any such workflow. The professionals and cons of this strategy are listed under.

    Observe 2: Here is a video recording of what this demo appears to be like like.

    Observe 3: All photos on this put up are created by creator.

    What’s the purpose of all of this? The purpose is that loads 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 guardian–baby relationships, we will infer higher-level associations routinely. 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 manner. The taxonomy doesn’t simply classify, it permits reasoning over how subjects relate, so the info supply solely must document essentially the most related tag, and the hierarchy fills in the remainder.

    We’re separating the occasion degree data 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 need to construct with this sort of structure are:

    1. 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 guardian idea, Pc Science, might be inferred based mostly on the taxonomy.
    2. Aligning a number of programs: I can use one taxonomy to construct a advice engine in Neo4j and a GraphRAG utility in GraphDB. One crew 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.
    3. Change administration: If I need to recategorize Mathematical Software program as a department of Arithmetic reasonably than a department of Pc Science, I simply want to vary its guardian within the taxonomy. If I don’t have a separate taxonomy, I’d have to retag each doc tagged with Mathematical Software program. If I’ve a number of downstream apps utilizing the identical checklist of phrases, this turns into a nightmare. I’d have to retag each entity tagged with Mathematical Software program in each utility and guarantee all the opposite tags related to that doc are right.
    4. 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 will get the most effective of each worlds

    There are different architectural approaches to constructing one thing like this, in fact, and there are drawbacks to the strategy I define right here. A few of the principal ones embody:

    1. Overkill for easy use instances: This tutorial makes use of a easy demo, however the structure makes essentially the most sense when your information and use instances are advanced. Most graph databases, together with Neo4j, allow you to outline a schema or primary ontology and characterize taxonomies with hierarchical relationships. In case your information is comparatively easy, your taxonomy is easy, or just one crew wants to make use of it, it’s possible you’ll not want this many instruments.
    2. Skillset and studying curve: Utilizing EDG and Neo4j collectively assumes familiarity with two totally different paradigms: ontology modeling in RDF/SHACL and graph querying in property graphs/Cypher. Many groups are comfy with one however not the opposite.
    3. Extra transferring elements: Preserving a taxonomy separate from the info you’re tagging means it’s essential make sure that the tags align with the taxonomy. In the event that they drift, the graph stops becoming collectively cleanly within the database.
    4. 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 totally different graph applied sciences that, traditionally, haven’t been appropriate. EDG has lately constructed a Neo4j integration function, nevertheless, which permits customers to construct utilizing each applied sciences.

    Under 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 break up into inside information and exterior information. Inner information is the uncooked information you may be storing in an information lake, a content material administration system (CMS) like SharePoint, or a relational database. There might also be exterior datasets you need to combine into your app. These could possibly be public, free information sources like WikiData, higher degree 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 it’s essential purposes like Neo4j as wanted. You can even load information instantly out of your underlying information sources into Neo4j or another utility.

    Step 1: Get free variations of EDG and Neo4j

    First, we’re going to have to get free variations of those merchandise to mess around with.

    For EDG, you’ll have to go to this web site and request a free trial. You’ll get a hyperlink to obtain EDG together with a license in an electronic mail. After the obtain completes, there may be an executable file within the edg folder, additionally known as edg. Double click on that and it ought to begin operating in your browser. If you happen to don’t have Java put in, it would immediate you to put in Java first.

    EDG will then open in your browser in a brand new tab known as one thing like http://localhost:8083/. However it would say it isn’t registered. Click on on Product Registration after which add the license file that was additionally despatched within the electronic 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 is best to be capable to see the primary EDG touchdown web page.

    Now we’d like a free model of Neo4j. Go to this link to get began along with your free trial. If you happen to don’t have an account already, you have to 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.

    Whenever you click on “Create occasion” you may be proven your username and password. The username is normally 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 consumer icon (it appears to be like 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 are going to simply level to the Neo4j occasion we simply created. On the correct aspect of the empty Neo4j database line there’s a plus signal. Click on that and you may 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 have to to examine the Neo4j occasion you created in Neo4j. It would look one thing like this: neo4j+s://cd227570.databases.neo4j.io.

    Click on “Create and Choose”. Now you have to to enter your password. That is the one which Neo4j gave you whenever 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 checklist 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. Whenever you go to the taxonomy it is best to see a hierarchical checklist 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”.

    Whenever you click on this it is possible for you to to decide on which Neo4j integration you need 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 might be created. It would appear like the popup under. Click on the combination to navigate to it. In my instance under it’s known as “Integration with Neo4j database neo4jtest1”. Then click on “Okay”.

    The combination will now seem within the editor and we will 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 lessons”. That is the place we specify which lessons in our taxonomy we need to push to this Neo4j occasion. For this tutorial, choose “Idea”. This could embody every part within the taxonomy. This may increasingly appear pointless, however it is crucial for giant taxonomies with many sorts of lessons.

    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 have now established a Neo4j integration. A popup ought to seem that appears just like the picture under. If we have now a number of integrations configured with a number of totally different purposes, we’d see all of them right here. For this tutorial, it is best to simply see the one you made and it needs to be routinely chosen. Now click on “Okay”.

    It is best 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 Cases 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.

    Under 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 guardian ideas.

    Step 6: Add articles to Neo4j

    Obtain an inventory of journal articles from my GitHub here. It is a brief checklist of pretend educational journal articles. The concept right here is that we would like the taxonomy to return from EDG however the article metadata to return from someplace else.

    Now in Neo4j, click on “Import” on the left toolbar and “New information supply”. An inventory of choices will seem. You possibly can import your occasion information from wherever, however for this tutorial we are going to simply add the csv file instantly. The supply of knowledge 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 will 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 need to outline your mannequin. Choose “Generate from schema”.

    You’ll see Articles.csv pop up as a node. Click on the node. You’ll have to specify which property you need to use as the first key. There’s a property on this checklist of articles known as “id” which we are going to 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 at the start. It would take a second to run however then you’re going to 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 will 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 appear like this:

    Then press “Run”. You’ll see proper underneath 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 each one of these pink nodes are actually related to our inexperienced taxonomy!

    Step 8: Construct a advice engine

    We’re going to run some very primary 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 checklist 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;

    It is best to see the next output and the class “Mathematical Software program”.

    Suppose we need to discover articles much like this web page turner as a result of we need to suggest them to potential readers. We are able to search for different articles which can be additionally tagged with Mathematical Software program, however we will additionally benefit from taxonomical construction we have now in our graph. Mathematical Software program is a subclass of Pc Science, based on the STEM taxonomy. You possibly can return to EDG to discover the classes and their youngsters. For our advice engine, to search out articles much like our Mathematical Software program article, we need to discover different articles which can be tagged with Mathematical Software program, however ALSO articles tagged with different branches of laptop science.

    We are able to do 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 matter plus its guardian
    MATCH (me)-[:TAGGED_WITH]->(baby:Idea)-[:BROADER]->(guardian:Idea)  
    
    // 2) discover another article tagged with a sibling underneath that very same guardian
    MATCH (siblingChild:Idea)-[:BROADER]->(guardian)<-[:BROADER]-(baby)
    MATCH (rec:`Articles.csv`)-[:TAGGED_WITH]->(siblingChild)  
    WHERE rec <> me  
    
    // 3) compute advice rating
    WITH rec, rely(DISTINCT guardian) AS rating  
    
    // 4) now pull in all of the direct tags on every really useful article
    OPTIONAL MATCH (rec)-[:TAGGED_WITH]->(t:Idea)  
    
    // 5) return title, rating, and full tag checklist
    RETURN 
      rec.title                        AS advice,
      rating                            AS sharedParentCount,
      gather(DISTINCT t.prefLabel)    AS allTaggedTopics
    ORDER BY rating DESC, advice
    LIMIT 5;

    It is best 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 laptop science. “Advances in Computer systems and Society Research” is an article tagged with the class “Computer systems and Society”. That is really useful 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 motive you’d need 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 strive that.

    Suppose we need to recategorize Mathematical Software program as a department of Arithmetic reasonably 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 totally different. It is because our authentic article was tagged with Mathematical Software program, which we’ve now categorized as a department of Arithmetic. The opposite articles which can be really useful to us are different articles about math, not laptop science.

    Conclusion

    This straightforward demo reveals how a taxonomy can convey construction, flexibility, and intelligence to your information purposes. By separating your taxonomy (in EDG) out of your occasion metadata (in Neo4j), you achieve the flexibility 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.

    In regards to 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 via ontologies, taxonomies, and semantic applied sciences. Steve writes and speaks recurrently about information graphs, and the evolving function of semantics in AI programs.



    Source link

    Share. Facebook Twitter Pinterest LinkedIn Tumblr Email
    Previous ArticleNew McKinsey Report Shows Mostly Experimentation, Not Transformation, With AI So Far
    Next Article Meta’s Chief AI Scientist Leaving to Launch Startup Focused on “World Models”
    ProfitlyAI
    • Website

    Related Posts

    Artificial Intelligence

    MIT scientists debut a generative AI model that could create molecules addressing hard-to-treat diseases | MIT News

    November 25, 2025
    Artificial Intelligence

    Why CrewAI’s Manager-Worker Architecture Fails — and How to Fix It

    November 25, 2025
    Artificial Intelligence

    How to Implement Three Use Cases for the New Calendar-Based Time Intelligence

    November 25, 2025
    Add A Comment
    Leave A Reply Cancel Reply

    Top Posts

    AI toys are all the rage in China—and now they’re appearing on shelves in the US too

    October 7, 2025

    ChatGPT Agent Is Here

    July 22, 2025

    Demystifying Cosine Similarity | Towards Data Science

    August 8, 2025

    What Optimization Terminologies for Linear Programming Really Mean

    July 22, 2025

    How to Enrich LLM Context to Significantly Enhance Capabilities

    September 16, 2025
    Categories
    • AI Technology
    • AI Tools & Technologies
    • Artificial Intelligence
    • Latest AI Innovations
    • Latest News
    Most Popular

    Why GPT-4o Got Rolled Back (and What It Means)

    May 6, 2025

    Gamers Nexus avslöjar omfattande GPU-smugglingsimperium från Kina

    August 19, 2025

    Log Link vs Log Transformation in R — The Difference that Misleads Your Entire Data Analysis

    May 10, 2025
    Our Picks

    MIT scientists debut a generative AI model that could create molecules addressing hard-to-treat diseases | MIT News

    November 25, 2025

    Why CrewAI’s Manager-Worker Architecture Fails — and How to Fix It

    November 25, 2025

    How to Implement Three Use Cases for the New Calendar-Based Time Intelligence

    November 25, 2025
    Categories
    • AI Technology
    • AI Tools & Technologies
    • Artificial Intelligence
    • Latest AI Innovations
    • Latest News
    • Privacy Policy
    • Disclaimer
    • Terms and Conditions
    • About us
    • Contact us
    Copyright © 2025 ProfitlyAI All Rights Reserved.

    Type above and press Enter to search. Press Esc to cancel.