Skip to content
← Radar
2

X2f X2f

backend · 12 signals · 1 source

Evidence

  • I Replaced My AI Agent's Flat Fact Store with a Graph Database — # I Replaced My AI Agent's Flat Fact Store with a Graph Database and It Runs in 85MB<p>I've been building LocalClaw, a local-model-first AI agent framework running on personal hardware through Ollama. No cloud, no API costs. A few weeks ago I posted about the router/specialist architecture. A lot of people asked about the memory system so here's that.<p>## The Problem<p>Started with a JSONL fact store and embedding similarity retrieval. Simple enough until it wasn't. After a few weeks of real use I had 14 near-duplicate facts about the same topics from different sessions. Layered dedup on top of dedup and it still wasn't clean.<p>The bigger problem was relationships. "Peter works at DevMesh" and "DevMesh is building an outreach platform" were two separate embeddings. You could retrieve each one but you couldn't traverse from one to the other. No multi-hop. No fact evolution. Old facts and new facts coexisted with no signal about which was current.<p>Four iterations on the flat store later I accepted I was patching the wrong thing.<p>## Why FalkorDB<p>Looked at Neo4j (Community Edition is intentionally crippled), Memgraph (no native vector search), and FalkorDB.<p>FalkorDB runs in Docker, uses the Redis wire protocol, has native HNSW vector search, and the entire thing sits at 85MB at my current scale. Graph traversal, vector similarity, and hybrid keyword search in one container. No separate Qdrant, no sync issues between two stores.<p>## What the Graph Enables<p>Every fact connects to the entities it references via ABOUT edges. Multi-hop traversal becomes natural - find everything connected to a project, find all entities mentioned alongside a technology.<p>When a fact changes, the new fact gets a SUPERSEDES edge to the old one. Both persist with timestamps. Temporal queries now work. "What did the system know about this last month?" is a real query.<p>The vector index runs inside FalkorDB on 4096-dimensional embeddings from qwen3-embedding:8b. O(log n) HNSW search. No external database.<p>## The Part That Surprised Me<p>Entity extraction by a small local model is unreliable blind. phi4-mini classified DGX Spark as software and created separate nodes for singular and plural forms of the same entity.<p>Fix: before extracting entities from a new fact, query existing typed entities from the graph and inject them into the NER prompt as reference context. Now phi4-mini sees "DGX Spark → hardware, FalkorDB → software" before it classifies anything new. Each correctly typed entity makes future extractions more consistent. The graph teaches the model over time without any additional training.<p>## Scoring<p>Pure vector similarity surfaces whatever is semantically closest regardless of whether it matters. The scoring formula:<p>``` score = similarity × 0.5 + recency × 0.2 + importance × 0.3 ```<p>Importance uses a 1-5 tier (critical health/family = 5, job/identity = 4, preference = 3, context = 2, ephemeral = 1). A moderately relevant but critical fact scores higher than a highly relevant but ephemeral one. Your wife's health condition surfaces above yesterday's weather.<p>## What I Learned<p>The model computes nothing. Code handles which facts changed, which are duplicates, what the scores are. The model handles what it means. The moment you let a model do arithmetic or hash-based dedup you get failures you can't explain.<p>Importance tiers need concrete examples in the extraction prompt. phi4:14b defaulted everything to tier 2 until I added few-shot examples with emotional weight. Abstract instructions don't calibrate a model.<p>The graph beats flat storage the moment you need relationship reasoning. SUPERSEDES chain alone justified the migration.<p>Runs entirely on a Mac Mini. 85MB for the graph. Everything local.<p>GitHub: https://github.com/PeterGreenAppliedAI/LocalClaw

    HACKER_NEWS

  • Show HN: Graphiti – LLM-Powered Temporal Knowledge Graphs — Hey HN! We're Paul, Preston, and Daniel from Zep. We've just open-sourced Graphiti, a Python library for building temporal Knowledge Graphs using LLMs.<p>Graphiti helps you create and query graphs that evolve over time. Knowledge Graphs have been explored extensively for information retrieval. What makes Graphiti unique is its ability to build a knowledge graph while handling changing relationships and maintaining historical context.<p>At Zep, we build a memory layer for LLM applications. Developers use Zep to recall relevant user information from past conversations without including the entire chat history in a prompt. Accurate context is crucial for LLM applications. If an AI agent doesn't remember that you've changed jobs or confuses the chronology of events, its responses can be jarring or irrelevant, or worse, inaccurate.<p>Before Graphiti, our approach to storing and retrieving user “memory” was, in effect, a specialized RAG pipeline. An LLM extracted “facts” from a user’s chat history. Semantic search, reranking, and other techniques then surfaced facts relevant to the current conversation back to a developer for inclusion in their prompt.<p>We attempted to reconcile how new information may change our understanding of existing facts:<p>Fact: “Kendra loves Adidas shoes”<p>User message: “I’m so angry! My favorite Adidas shoes fell apart! Puma’s are my new favorite shoes!”<p>Facts:<p>- “Kendra used to love Adidas shoes but now prefers Puma.”<p>- “Kendra’s Adidas shoes fell apart.”<p>Unfortunately, this approach became problematic. Reconciling facts from increasingly complex conversations challenged even frontier LLMs such as gpt-4o. We saw incomplete facts, poor recall, and hallucinations. Our RAG search also failed at times to capture the nuanced relationships between facts, leading to irrelevant or contradictory information being retrieved.<p>We tried fixing these issues with prompt optimization but saw diminishing returns on effort. We realized that a graph would help model a user’s complex world, potentially addressing these challenges.<p>We were intrigued by Microsoft’s GraphRAG, which expanded on RAG text chunking with a graph to better model a document corpus. However, it didn't solve our core problem: GraphRAG is designed for static documents and doesn't natively handle temporality.<p>So, we built Graphiti, which is designed from the ground up to handle constantly changing information, hybrid semantic and graph search, and scale:<p>- Temporal Awareness: Tracks changes in facts and relationships over time. Graph edges include temporal metadata to record relationship lifecycles.<p>- Episodic Processing: Ingests data as discrete episodes, maintaining data provenance and enabling incremental processing.<p>- Hybrid Search: Semantic and BM25 full-text search, with the ability to rerank results by distance from a central node.<p>- Scalable: Designed for large datasets, parallelizing LLM calls for batch processing while preserving event chronology.<p>- Varied Sources: Ingests both unstructured text and structured data.<p>Graphiti has significantly improved our ability to maintain accurate user context. It does a far better job of fact reconciliation over long, complex conversations. Node distance reranking, which places a user at the center of the graph, has also been a valuable tool. Quantitative data evaluation results may be a future ShowHN.<p>Work is ongoing, including:<p>1. Improving support for faster and cheaper small language models.<p>2. Exploring fine-tuning to improve accuracy and reduce latency.<p>3. Adding new querying capabilities, including search over neighborhood (sub-graph) summaries.<p>## Getting Started<p>Graphiti is open source and available on GitHub: <a href="https://github.com/getzep/graphiti">https://github.com/getzep/graphiti</a>.<p>We'd love to hear your thoughts. Please also consider contributing!

    HACKER_NEWS

  • Show HN: Zero downtime embedding model upgrades — People use embedding models all the time for rag/semantic retrieval. However, when a newer, more desireable model comes out, there is an expensive (both in time and computational) cost of re-embedding every document in the database.<p>However, I figured out an interesting way to forgo that upfront embedding cost.<p>algo:<p>old model/index -> retrieve top-K docs -> score those docs with the new model -> cache/materialize the new embeddings<p>so instead of rebuilding the entire vector store upfront, the old index keeps getting retrieved from, while the new model reranks those candidates.<p>This works surprisingly well for some model pairs, (i tested 63 source-> target migrations on h100s, on upto 1M documents).<p>For example, on a 1M document Natural Questions dataset,<p>native Qwen3-Embedding-8B: 0.6812 nDCG@10 Qwen3-4B -> Qwen3-8B, K=50: 0.6816 Qwen3-0.6B -> Qwen3-8B, K=50: 0.6638 MiniLM -> Qwen3-8B, K=50: 0.6486<p>(the hard part is determining k, I held the k constant above to give some sense of migratability).<p>You can install it with pip<p>pip install embedflow<p>and the code is on github<p><a href="https://github.com/arnsri33/embedflow" rel="nofollow">https://github.com/arnsri33/embedflow</a>

    HACKER_NEWS

🔒 9 more evidence quotes with Pro

See every signal, who said it, and where — across all sources.

Unlock with Pro