26 karma · joined Aug 4, 2023 (3y ago) · 8 submissions
comment 3mo ago · link · parent
A suggestion I heard here and in a few other places was to add some practical use case examples such as an LLM agent memory example, so in honour of 100 github stars I figured it was a good idea. So I borrowed a few details from FalkorDB and added some missing features (including BM25 full text indexing) to enable Graphiti to use slater as a backend store.
I added a sister repo with instructions called graphiti-slater which has everything you'll need to run a local docker compose stack with agent memory served through MCP.
Available here:
- Slater: https://github.com/hikari-systems/slater
- Slater adapter for graphiti: https://github.com/hikari-systems/graphiti-slater
- Graphiti itself: https://github.com/getzep/graphiti
2.
Slater gets full-text BM25 indexing and Graphiti Support(github.com ↗)
2 points · by rickkjp · 3mo ago · 1 comment
comment 4mo ago · link · parent
The wikidata image I was using (sourced from a huggingface dataset Arun Sharma kindly uploaded for LadybugDB) is about 10GB zipped I think, and when imported into Slater takes up about 20GB of disk space. It's about 133GB of raw Cypher.
So in bytes/edge, that's probably about 14.
In terms of how to shard (which I'm taking to mean allocation of nodes to ISAM blocks) during an initial build or during a consolidation step, it will try to pack neighbours into the same blocks along with metadata about neighbouring segments, with some additional heuristics to avoid superhubs causing over-filling issues. For on the fly writes it just uses a normal WAL that it builds tables out of until theres a segment merge, at which point it then uses the same logic as for the consolidation.
In terms of canonicalising, it asks for a pk property during import, and then uses a (label, key property, value) tuple for uniqueness. So in a sense it doesn't really do that itself, it relies on that being handled outside the import.
Hope that helps.
PS as a follow-up: one really important memory-saving trick I used was Elias-Fano encoding on the adjacency matrices. Each node keeps an array of nodes it's joined to, and Elias-Fano does an amazing job of compression on those, both on disk and in RAM.
comment 4mo ago · link · parent
comment 4mo ago · link · parent
Slater starts with the premise of a fixed memory budget applied to an LRU cache of what's on disk, then uses ISAM blocks and DiskANN/Vamana/PQ to allow paging the contents of the graphs and vectors you need into that cache. It's designed around read-heavy-write-light cases, and can be backed either by local disk or by S3/GCS buckets with an optional sized local disk L2 cache as well.
Speaks standard Bolt, and is GDPR friendly (encryption at-rest and in-transit). Multi-user-multi-graph with ACLs, Rust-with-forbid-unsafe and NFS-friendly too (no mmaps). It's Apache licensed.
Please give it a try if you get a chance. Would love any suggestions or feedback.
Full disclosure: yes, it was authored by Claude Code, although I provided the storage model and design it used, along with code samples and influences from other open source projects like FalkorDB and Memgraph for Bolt wire-compatibility.
Thanks
8.
Slater – Low-memory graphdb designed for read-heavy graphs(github.com ↗)
43 points · by rickkjp · 4mo ago · 14 comments