Live data from Hacker News

Show HN: In-Browser Graph RAG with Kuzu-WASM and WebLLM

blog.kuzudb.com

1–10 of 30 posts

Show HN: In-Browser Graph RAG with Kuzu-WASM and WebLLM

#1
We show the potential of modern, embedded graph databases in the browser by demonstrating a fully in-browser chatbot that can perform Graph RAG using Kuzu (the graph database we're building) and WebLLM, a popular in-browser inference engine for LLMs. The post retrieves from the graph via a Text-to-Cypher pipeline that translates a user question into a Cypher query, and the LLM uses the retrieved results to synthesize a response. As LLMs get better, and WebGPU and Wasm64 become more widely adopted, we expect to be able to do more and more in the browser in combination with LLMs, so a lot of the performance limitations we see currently may not be as much of a problem in the future.

We will soon also be releasing a vector index as part of Kuzu that you can also use in the browser to build traditional RAG or Graph RAG that retrieves from both vectors and graphs. The system has come a long way since we open sourced it about 2 years ago, so please give us feedback about how it can be more useful!

Show HN: In-Browser Graph RAG with Kuzu-WASM and WebLLM
blog.kuzudb.com

Re: Show HN: In-Browser Graph RAG with Kuzu-WASM and WebLLM

#4
This is very cool. Kuzu has a ton of great blog content on all the ways they make Kuzu light and fast. WebLMM (or in the future chrome.ai.* etc) + embedded graph could make for some great UXes

At one time I thought I read that there was a project to embed Kuzu into DuckDB, but bringing a vector store natively into kuzu sounds even better.

Re: Show HN: In-Browser Graph RAG with Kuzu-WASM and WebLLM

#5
post #2

The example is not ideal for showcasing a graph analytics database because they could have used a traditional relational database to answer the same query, Which of my contacts work at Google?

Hi, I work at Kuzu and can offer my thoughts on this.

You're making a fair observation here and it's true for any high level query language - SQL and Cypher and interchangeable unless the queries are recursive, in which case Cypher's graph syntax (e.g., the Kleene star * or shortest paths) has several advantages. One could make the argument that Cypher is easier for LLMs to generate because the joins are less verbose (you simply express the join as a query pattern). This post is not necessarily about graph analytics. It's about demonstrating that it's very simple to develop a relatively complex application using LLMs and a database fully in-browser, which can potentially open up new use cases. I'm sure many people will come up with other creative ways putting these fully in-browser technologies, both graph-specific, and not, e.g., using vector search-based retrieval. In fact, there are already some of our users doing this right now.

Re: Show HN: In-Browser Graph RAG with Kuzu-WASM and WebLLM

#7
post #2

The example is not ideal for showcasing a graph analytics database because they could have used a traditional relational database to answer the same query, Which of my contacts work at Google?

Hi, I work at Kuzu and can offer my thoughts on this. You're making a fair observation here and it's true for any high level query language - SQL and Cypher and interchangeable unless the queries are recursive, in which case Cypher's graph syntax (e.g., the Kleene star * or shortest paths) has several advantages. One could make the argument that Cypher is easier for LLMs to generate because the joins are less verbose…

This is really cool, but I'm super anxious about entering my personal data, especially LinkedIn connections.

Is there some other demo you could do with public graph data? It'd be just as cool of a demo, but with less fear of information misuse.

I'm even more anxious about leaking information about my professional connections as I am leaking my own data.

Re: Show HN: In-Browser Graph RAG with Kuzu-WASM and WebLLM

#8

Don't the resource requirements from even small LLMs exclude most devices/users from being able to use stuff like this?

True, but there are likely innovations happening in multiple dimensions all at once: WebGPU improvements that better utilize a device's compute, Wasm64. And of course, LLMs over time become SLMs (smaller and smaller models), that can do a surprisingly large variety of things well.

Putting aside LLMs for a minute, even applications that do not need LLMs, but benefit from a graph database, can be unlocked to help build interactive UIs and visualizations that retain privacy on the client side without ever moving the data to a server. Loads of possibilities!

Re: Show HN: In-Browser Graph RAG with Kuzu-WASM and WebLLM

#9

This is very cool. Kuzu has a ton of great blog content on all the ways they make Kuzu light and fast. WebLMM (or in the future chrome.ai.* etc) + embedded graph could make for some great UXes At one time I thought I read that there was a project to embed Kuzu into DuckDB, but bringing a vector store natively into kuzu sounds even better.

Great point! Several years ago there was a project GRainDB, which along with GraphflowDB (a purely in-memory graph database) formed the ideas of what is now Kuzu :)

https://graindb.github.io/ https://github.com/graphflow/graphflow-columnar-techniques

Re: Show HN: In-Browser Graph RAG with Kuzu-WASM and WebLLM

#10
post #7

Earlier quoted context omitted.

Hi, I work at Kuzu and can offer my thoughts on this. You're making a fair observation here and it's true for any high level query language - SQL and Cypher and interchangeable unless the queries are recursive, in which case Cypher's graph syntax (e.g., the Kleene star * or shortest paths) has several advantages. One could make the argument that Cypher is easier for LLMs to generate because the joins are less verbose…

This is really cool, but I'm super anxious about entering my personal data, especially LinkedIn connections. Is there some other demo you could do with public graph data? It'd be just as cool of a demo, but with less fear of information misuse. I'm even more anxious about leaking information about my professional connections as I am leaking my own data.

Your concern makes sense, but in the demo we show, all your private data AND the graph database AND the LLM (basically, everything) is confined to your client session in the browser, and no data actually ever leaves your machine. That's the whole point of Wasm!

The graph that you build is more for your own exploration and not for sharing with the outside world.

Post reply on HN