Show HN: CozoDB, Hybrid Relational-Graph-Vector Database (docs.cozodb.org)
Hi HN! We're thrilled to share CozoDB v0.6, a monumental update to our FOSS database, which already unifies relational and graph features. With the addition of vector search, CozoDB becomes an even better companion for LLMs like ChatGPT.
This release introduces vector search using HNSW indices within Datalog, enabling seamless integration with powerful features such as ad-hoc joins, recursive Datalog, and classical whole-graph algorithms. This update significantly broadens CozoDB's capabilities.
Check out the linked release note for an in-depth look at the new features, comparisons to other systems, and intriguing AI development possibilities. We'd love for you to take a look! I'll be here to answer any questions you might have.
Looking forward to your feedback!
52 comments
[ 3.3 ms ] story [ 124 ms ] thread¹- https://docs.relational.ai/rel/primer/basic-syntax
You mentioned in the release that you wrote your own knowledge management tool. Is that published somewhere?
Once local LLMs that are powerful enough become available, though, I think I will try to find time to polish and publish it, since it can then act as a showcase for what a thinking agent can achieve.
By larger than RAM I mean the entire WikiData knowledge graph (~100GB), with something like 16GB of RAM.
Another question: any plans for supporting Parquet files with query pushdown? I honestly doubt Parquet's efficiency can be matched with RocksDB (but I'm happy to be proven wrong), and having to convert big datasets is always a pain...
FYI here is a not very rigourous performance and memory usage analysis (for a previous version without the vector search capability): https://docs.cozodb.org/en/latest/releases/v0.3.html
Cozo is looking like a top-contender for my project so far :)
Show HN: Cozo – new Graph DB with Datalog, embedded like SQLite - https://news.ycombinator.com/item?id=33518320 - Nov 2022 (67 comments)
Rust and MPL2.0 License. https://github.com/cozodb/cozo/blob/main/LICENSE.txt
Can you intermix different storage engines as well? So e.g. a user could have a personal storage using sqlite but also easily save to a rocksDB storage as well?
In regards to the timetravel capabilities, can this be leveraged to implement git-like features querying these historical points in time in the data?
Also just curious your thoughts on how secure data is within Cozo? Or asked another way, how production-ready is Cozo. I know it's still early days but could Cozo be used as the primary database in a product being delivered today?
Great work all around, really awesome to see!
- As can be seen https://docs.cozodb.org/en/latest/releases/v0.3.html, for concurrent writes about 200K QPS can be achieved with 24 threads on a pretty old server. I think it is enough for a small to medium social network.
- You can start independent instances and use them together in your user code. You can have as many as you like, but data can only be exchanged through your code: they can't talk directly to each other.
- If by git-like you mean point-in-time queries, yes that's what the feature is for. But git comes with lots of other things such as merge logic, etc. These need to be implemented outside CozoDB.
- We do use CozoDB for data storage in production systems ourselves, and we back up a lot. So far nothing disastrous has happened. Note that CozoDB does not have any meaningful concept of user/authentication/authorization (yet), so you must make sure that only trusted clients can reach it (only an issue if you use the standalone server, since the embedded DBs do not open any ports).
One last question if possible. Is there a recommended way to do Full Text Search on data stored in Cozo?
Our current solution is to use mutation callbacks to synchronize texts to a dedicated text search engine. This is language specific: for example, for python: https://github.com/cozodb/pycozo#mutation-callbacks , and for Rust: https://docs.rs/cozo/latest/cozo/struct.Db.html#method.regis...
[1]: https://github.com/valeriansaliou/sonic
[2]: https://github.com/valeriansaliou/sonic/issues/150
> Note that CozoDB does not have any meaningful concept of user/authentication/authorization (yet)
Please please please implement the Palantir security model unless you already have a smarter idea coming down the pipe. Palantir regularly scrubs past media from the internet, but there is a blog post that has the ACL slides from the now-private video: https://onetwo.ren/级联GraphQL访问控制/
In terms of “timetravel”, I want to see exactly what an item was at a specific time (COW with metadata works decently, but I’d love graph snapshots/diffs)
And one more thing: 20% Parity data for everything that’s in the system, stored in a way that it can be verified at-rest and can also be exported then verified locally.
Yes, I know filesystems are great at reliability now but safely transferring between systems is beyond their scope
I like the notes about automated linking between notes in knowledge tools.
One of my ideas is to represent software architecture and system architecture as vector embeddings and transform the architecture dynamically.
Can scale from one box to internet levels of traffic with a Markov chain prompt
Edit: To clarify, I want to be capable of transforming existing software architecture with a prompt, that perhaps describes attributes of the system or describes capabilities.
May I ask where did you read about this? I am also interested.
https://docs.cozodb.org/en/latest/releases/v0.6.html#knowled...
Is that right?
That way querying for the current status is a 1:1 graph lookup and you can reserve timestamp lookups for querying past statuses.
Also, to which extent is this related to quantum categorial grammars for NLP ?