DEV Community

Helio
Helio

Posted on

I Wrote a Knowledge Graph Render by LangChain

Hello and good morning.

I am a student from Chain. Recently, our teacher let us to write a KnowledgeGraph(as KG) render and save the graph to a graph database like neo4j.

Yeah, I know LangChain already provide the function to generate the graph data, but I still want to build my own version of KG. I tried many models like phi-3-mini, llama3-8b, but none of them work very well, so I changed my mind to use GLM-4 powered by ZhiPuAI, and it works very well. Here is the showcase: A very large image.

KG

Although the showcase shows that KG render works very well, but I have some problem to fix:

  • I save graph to neo4j, but for the same label nodes, they are all connected to a same label nodes, although they have different type. Just like the word Key, Key could be related to many different fields like keyboard or database.

  • If I enable the update in args, render image will slow down the speed entirely, If there is a better way to show real time graph?

Sentry image

See why 4M developers consider Sentry, “not bad.”

Fixing code doesn’t have to be the worst part of your day. Learn how Sentry can help.

Learn more

Top comments (0)

Billboard image

The Next Generation Developer Platform

Coherence is the first Platform-as-a-Service you can control. Unlike "black-box" platforms that are opinionated about the infra you can deploy, Coherence is powered by CNC, the open-source IaC framework, which offers limitless customization.

Learn more

👋 Kindness is contagious

Please leave a ❤️ or a friendly comment on this post if you found it helpful!

Okay