7 ms·
Show HN: CozoDB, Hybrid Relational-Graph-Vector Database
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!
- marginalia_nu 3y agoNeat!
- zh217 3y agoThank you!
- srhtftw 3y agoWondering how it compares to rel¹. ¹- https://docs.relational.ai/rel/primer/basic-syntax https://docs.relational.ai/rel/primer/basic-syntax
- zh217 3y agoI'm not too familiar with rel, but from what I read, rel seems to be cloud only, and CozoDB always aims to be local-first. Another difference is that CozoDB has many whole-graph algorithms, and more can be added from user code (for example using Python), which I don't see rel having.
- vlmutolo 3y agoWell this all looks incredibly cool, and certainly beyond my current understanding of graph and vector databases. You mentioned in the release that you wrote your own knowledge management tool. Is that published somewhere?
- zh217 3y agoNot for the moment, it is not polished enough. Right now it is just a webapp written in React and prosemirror running on top of a CozoDB instance. And it is very rough around the edges (good enough for myself, but maybe not for others). 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.
- lupickup 3y agoHow are you modeling the notes cozodb? I'd interested in parsing my Obsidian nodes into cozoDB as a way to setup alternate views on them. Curious how you thought about storing the bullets and relations between them.
- luizfelberti 3y agoHow well does Cozo handle larger than RAM data? Does it only need to keep the query's answer set in memory? 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...
- zh217 3y agoYes this is correct, only the query's answer set need to be in memory. We are also working on streaming for the Rust API, in which case you don't even need to keep the whole set in memory for simple queries. 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 https://docs.cozodb.org/en/latest/releases/v0.3.html
- luizfelberti 3y agoThanks for the speedy response! Cozo is looking like a top-contender for my project so far :)
- zh217 3y agoFor the parquet question: currently CozoDB is developed by a single developer (me), but I am starting to explore ways of expanding the development team. Certainly a lot more features will be added if that happens, and parquet support looks like a really useful one.
- anonzzzies 3y agoAny contact info for you to discuss contributing?
- ssivark 3y agoIf you want folks playing with integrating CozoDB and LLMs, it might be worth adding a CozoDB wrapper to Langchain :-)
- zh217 3y agoThanks for the suggestion--will surely do that!
- freezed88 3y agowould love to have CozoDB be a part of llamaindex too! have a bunch of integrations with existing vector db's https://github.com/jerryjliu/llama_index/tree/main/gpt_index/vector_stores https://github.com/jerryjliu/llama_index/tree/main/gpt_index...
- dang 3y agoRelated: Show HN: Cozo – new Graph DB with Datalog, embedded like SQLite - https://news.ycombinator.com/item?id=33518320 https://news.ycombinator.com/item?id=33518320 - Nov 2022 (67 comments)
- pizza 3y agoNice, I think you've just invented the first cellular sheaf db that I'm aware of
- iFire 3y agoLink to the github repository. https://github.com/cozodb/cozo https://github.com/cozodb/cozo Rust and MPL2.0 License. https://github.com/cozodb/cozo/blob/main/LICENSE.txt https://github.com/cozodb/cozo/blob/main/LICENSE.txt
- canadiantim 3y agoWould using Cozo make sense for a social network? Certainly would make modelling comments easier but how well does it handle many concurrent users? 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!
- zh217 3y agoGreat questions! - As can be seen https://docs.cozodb.org/en/latest/releases/v0.3.html 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).
- canadiantim 3y agoAmazing! Thank you, all very encouraging answers. Congrats on everything you've achieved with Cozo so far!! One last question if possible. Is there a recommended way to do Full Text Search on data stored in Cozo?
- zh217 3y ago
- samsquire 3y agoWow this is awesome. 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.
- nerdyadventurer 3y ago> I like the notes about automated linking between notes in knowledge tools. May I ask where did you read about this? I am also interested.
- samsquire 3y agoThis section. https://docs.cozodb.org/en/latest/releases/v0.6.html#knowledge-management-for-ai https://docs.cozodb.org/en/latest/releases/v0.6.html#knowled...
- joshspankit 3y agoHow do you handle different LLMs having different vector spaces?
- zh217 3y agoThey need to be put into distinct indices and unfortunately you cannot “jump” between them in this case (if someone knows a way to achieve this, I would love to hear!)
- joshspankit 3y agoI think I’m understanding that the item’s vector in one LLM can be stored as one index and the vector in another LLM can be stored as a second index without them colliding or one having to overwrite the other. Is that right?
- zh217 3y agoYes, actually I already do that. Sbert is better than openai ada embeddings for many use cases.
- joshspankit 3y agoAmazing. Then as far as I’m concerned that functionally solves the problem until the industry figures out cross-embedding jumps
- joshspankit 3y agoApologies for kind-of sidetracking, but I went back and read the blog post about Cozo’s time travel feature and wanted to add this approach: since relationships are cheap, you can have a “current status” relationship and multiple “past and current status” relationships. When the user updates their status it replaces the “current status” while also adding itself as a “past and current status”. That way querying for the current status is a 1:1 graph lookup and you can reserve timestamp lookups for querying past statuses.
- blatant303 3y agoSomeone should try feeding those conceptual maps back to a multimodal agent as pictures. Also, to which extent is this related to quantum categorial grammars for NLP ?
- robcomptec 3y agoDoes this allow commit/rollback on a graph DB?
- assface 3y agoIs it called "CozoDB" or Cozo? Your README is inconsistent.
- zh217 3y agoSorry about that ... I will revise it to be more consistent. Cozo is a bit ambiguous, so now it is usually called CozoDB.
- avinassh 3y agoWhat is a vector database? and what makes better for LLMs?
- zh217 3y agoThe linked article explains these in details.
- deleted 3y ago[deleted]
- vecrvecr 3y agoI created this account to thank you for your work, this seems perfect for what I 'm working on! I'm about to finish the tutorial, it's very well done :)