Live data from Hacker News

Ask HN: What's your experience with using graph databases for agentic use-cases?

news.ycombinator.com

31–40 of 56 posts

Re: Ask HN: What's your experience with using graph databases for agentic use-cases?

#31

Graph databases are one of those things that sound neat but you'll be hard pressed to find people using them that don't regret it. I memorably had a job interview which consisted almost entirely of their senior architect going over exactly why he regretted introducing Neo4J several years earlier and how all the work is really about getting away from it. That was just the most extreme example. The truth that people he…

> why he regretted introducing Neo4J

Even for use cases Graph dbs knock out of the park Neo4j (historically, I haven't used it in like 10 years) didn't work very reliably compared to modern competitors.

But as always it's about picking the right tool for the job - I tried to build a "social network" in mysql and neo4j, and (reliability aside) neo4j worked way better.

Re: Ask HN: What's your experience with using graph databases for agentic use-cases?

#32

I'm building https://www.ergodic.ai - and we are using a graphs as the primary objects in which the intelligence operates. I don't think every graph needs a graph database. For 99% of use-cases a relational database is the preferred solution to store a graph: provided that we have objects and ways to link objects, we're good to go. The advantages of graph dbs are in running more complex graph algorithms whenever that…

would you consider needing to do community detection as a reason for using graph over relational?

Re: Ask HN: What's your experience with using graph databases for agentic use-cases?

#33
I used a graph database in https://www.exploravention.com/products/askarch/ because software architects typically need to understand the dependencies of a complex software system before they can suitably lead that technology. A dependency graph is a good data structure to use when reasoning about dependencies and a graph database is a natural choice for capturing dependency graphs. See https://www.infoq.com/articles/architecting-rag-pipeline/ for more details on the architecture of this AI product. The graph database works very well for this use case.

If you are considering the use of a graph database for AI based search and you are not already familiar with graph database technology, then you should be advised that graph databases are not relational databases. If you cognitively model nodes = tables and edges = joins, then you will be in for some nasty surprises. You should consider some learning, and some unlearning, to do before proceeding with that choice.

Re: Ask HN: What's your experience with using graph databases for agentic use-cases?

#34
post #23

Earlier quoted context omitted.

>The truth that people here don't like is that the Couch/Mongo style document DB is far more compelling as a intermediate point of structured/unstructured. in my opinion Graph DBs should only be used for highly structured data, which after all is what a graph is. Generally anything you would represent in SQL with too many joins to do queries you commonly have to do.

What’s so much more compelling about a graph db than a “with recursive” sql call? And even such recursive sql calls should be fairly rare since you would rather cache frequently accessed foreign key relationships anyway.

Among other things, some graph DBs are designed to perform the equivalent of "with recursive", filtering by attributes as you chase links and/or calculating statistics over subgraphs, more efficiently than SQL databases.

If you're just pulling up a tree of comments on an article using parent-child relations, SQL will be fine, though for query latency you might be better off with a "flat list" article-comment relation instead and recovering the tree structure after fetching the comments.

Re: Ask HN: What's your experience with using graph databases for agentic use-cases?

#35
post #23

Earlier quoted context omitted.

>The truth that people here don't like is that the Couch/Mongo style document DB is far more compelling as a intermediate point of structured/unstructured. in my opinion Graph DBs should only be used for highly structured data, which after all is what a graph is. Generally anything you would represent in SQL with too many joins to do queries you commonly have to do.

What’s so much more compelling about a graph db than a “with recursive” sql call? And even such recursive sql calls should be fairly rare since you would rather cache frequently accessed foreign key relationships anyway.

Under the hood they're basically the same (modulo graph databases are generally less mature and less featureful in their storage implementation). The main difference is impedance match with the human writing the query. Graph databases offer query language semantics that are easier to write and reason about, for graphy workloads.

Re: Ask HN: What's your experience with using graph databases for agentic use-cases?

#36

i've been asking everyone. where can i find examples of 'agentic use-cases' and how does one define agentic workflows.

"agentic" just means "we hooked up the LLM's responses to some code that has some side-effect in the world". Like "search the web" or "create a file".

Re: Ask HN: What's your experience with using graph databases for agentic use-cases?

#38

I used a graph database in https://www.exploravention.com/products/askarch/ because software architects typically need to understand the dependencies of a complex software system before they can suitably lead that technology. A dependency graph is a good data structure to use when reasoning about dependencies and a graph database is a natural choice for capturing dependency graphs. See https://www.infoq.com/articles/…

I don't think the cognitive models are that distinct, just a different way in which relations are stored. In any case, not distinct enough to warrant 'unlearning' relational approaches. While I find graph based approaches more natural to some problems we can stretch the relational paradigm quite a bit.

Re: Ask HN: What's your experience with using graph databases for agentic use-cases?

#39
post #22

Earlier quoted context omitted.

What were some of the pain points mentioned?

Having worked with SQL for many years now, I truly disliked using graphql when I used it. Most of the time all I need is just a csv-like structure of the data I'm working with and I had a very difficult time with just getting something like that. Joining tables tended to be difficult where the pivot points between relationships was rather semantically unbounded, so it was difficult for me to create a reasonably rigid…

It's unfortunate GrapgQL co-opted the terminology because it's quite different from the kinds of graphs these databases attempt to model.

Re: Ask HN: What's your experience with using graph databases for agentic use-cases?

#40
I am using Neo4j to build an equipment database, I also use MySQL in the same project to store transactional data. It took some time to figure out right syntax for Spring Boot/Neo4j Cypher query, but now it works OK. The reason I chose Neo4j? Because I wanted to play with it:). I can say it is more flexible than relational databases. I would like to continue using it, but you can't create multiple instances within a database, I guess it is possible to do so by installing separate binaries, but I have not tried it yet.
Post reply on HN