惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

Exploit-DB.com RSS Feed
Exploit-DB.com RSS Feed
美团技术团队
腾讯CDC
V
V2EX
G
Google Developers Blog
博客园 - Franky
博客园 - 司徒正美
Stack Overflow Blog
Stack Overflow Blog
阮一峰的网络日志
阮一峰的网络日志
Microsoft Azure Blog
Microsoft Azure Blog
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
T
The Blog of Author Tim Ferriss
Recent Announcements
Recent Announcements
Google DeepMind News
Google DeepMind News
罗磊的独立博客
C
Check Point Blog
MyScale Blog
MyScale Blog
aimingoo的专栏
aimingoo的专栏
F
Fortinet All Blogs
酷 壳 – CoolShell
酷 壳 – CoolShell
V2EX - 技术
V2EX - 技术
The Last Watchdog
The Last Watchdog
www.infosecurity-magazine.com
www.infosecurity-magazine.com
有赞技术团队
有赞技术团队
Security Archives - TechRepublic
Security Archives - TechRepublic
S
Security @ Cisco Blogs
W
WeLiveSecurity
D
DataBreaches.Net
Forbes - Security
Forbes - Security
V
Visual Studio Blog
P
Proofpoint News Feed
S
Secure Thoughts
H
Help Net Security
Cloudbric
Cloudbric
云风的 BLOG
云风的 BLOG
Microsoft Security Blog
Microsoft Security Blog
N
News and Events Feed by Topic
Schneier on Security
Schneier on Security
Engineering at Meta
Engineering at Meta
Attack and Defense Labs
Attack and Defense Labs
CTFtime.org: upcoming CTF events
CTFtime.org: upcoming CTF events
S
Security Affairs
L
LangChain Blog
Last Week in AI
Last Week in AI
Martin Fowler
Martin Fowler
Hacker News: Ask HN
Hacker News: Ask HN
H
Heimdal Security Blog
M
MIT News - Artificial intelligence
The Register - Security
The Register - Security

Hacker News: Ask HN

The New Window Delete ChatGPT Atlas Spyware Tell HN: Qwen Free Tier Is Discontinued Ask HN: SeedLegals Partnerships in London, worth it? Ask HN: How to highlight talent from untraditional backgrounds? Ask HN: We dont need a programming language now? Durable Object alarm loop: $34k in 8 days, zero users, no platform warning What if Time at the subatomic level has multiple arrows? How to add MidnightBSD Key to UEFI Secure Boot DBX? (Revoked and Forbidden Keys) Ask HN: What's your experience working at xAI as an AI tutor? Any engineers here with experience of clinical data standards? Ask HN: Who is using OpenClaw? Agent Skills for Software Test Automation Ask HN: Who needs contributors? Claude Code is thinking too much Ask HN: What Is the Big-O Order of a Jigsaw Puzzle? Ask HN: Stepping into a new role as a Senior, mentoring dos and dont's? Founder from Zurich heading to SF and Austin for the first time Hacker News No Manual Screenshots: I Built a Scalable Screenshot API Using Cloud Playwright Ask HN: Thought experiment: AGI giving us answers we don't like? Ask HN: I quit my job over weaponized robots to start my own venture 1% Vacancy, 81% Preleased: Where Midmarket Compute Deploys in 2026 Ask HN: Preferred pricing model for sound effects libraries? Copy of the email I sent to my undergraduate professors on Nov 30, 2025 Model API Performance | Hacker News Ask HN: Are open-weight LLMs the new offline encyclopedias? Valgrind 3.27 RC1 is out Claude Code OAuth down for >12 hours Ask HN: What's Better?–Tauri or Electron? Technical SEO vs. content optimization: which one moves rankings? Hacker News Ask HN: Can you cut off AI usage immediately? Nvidia's moat is not what it used to be Ask HN: What's your experience with PoW captchas against form spam? Ask HN: What are all the bad things that AI companies have done which we forgot Ask HN: Is Zero Trust Architecture Overkill? Ask HN: What is the best way to get your first users? Tell HN: OpenAI silently removed Study Mode from ChatGPT Ask HN: How to build an "AI native" company? Tell HN: docker pull fails in spain due to football cloudflare block Launchfolio – Create a portfolio in minutes for free, no account needed 120k USD compute credits from various providers Ask HN: How do you retain what you learn from podcasts? Ask HN: How is everyone dealing with the increase of code reviews? Ask HN: Agentic AI just makes me sad Ask HN: Do you trust AI agents with API keys / private keys? Ask HN: Anyone using Nostr as a lightweight back end/DB for rapid prototyping? Ask HN: What should I do with my app? 130 downloads 3 real subscribers Strong feeling: we are in a folded AI reality Hacker News What comes after Open Source? Ask HN: Former grok-code-fast-1 users, what coding model are you using now? When career anxiety becomes gameplay: lessons in China 'young-faculty simulator' I propose a new programming language, CPC Ask HN: Do you remux WebM to MP4 without re-encoding? Ask HN: How to have a macOS devcontainer in VS Code? I built a free 30-day habit tracker in Google Sheets Ask HN: What is the most annoying part of scheduling meetings? Ask HN: Has anyone reconsidered Antivirus software after recent security news? Tell HN: See the AI Doc Ask HN: Why have we not stepped back on the moon again? Ask HN: How did you specialize as a software engineer? Ask HN: Agentic Permutation of Testing Paths In A System Ask HN: Will AI Redefine Programming? Ask HN: How do you stop playing 20 questions with your AI coding tools Ask HN: Is the telehealth consulting for psychiatry even works? Ask HN: Im back end engineer, not front end – is this just excuse? What tools do you use to visualize algorithms? Tor Browser on Android leaks IP in desktop mode Published on Rapid API | Hacker News Persistent vs. Stubborn / Genius vs. Intelligent Is the pitch deck culture making founders worse at building businesses? Do founders' political views affect how you see a product? Ask HN: Easiest UX for Seniors My app hit 1,152 first-time downloads in a single day Claude API Error: 529 | Hacker News My AI workflow evolved from prompts to a near-autonomous workflow Hacker News Ask HN: Best books on building a programming language I collected startup ideas. It changed how I think about ideas completely Is algorithm still relevant in 2026 Is VC the new PMF strategy? Ask HN: Would you take your engineering team to Buenos Aires for an offsite? Hacker News Artemis 2 Coming Home | Hacker News Ask HN: Recommendations on which models to pay how much for? Open Source card game cuttle.cards has its world championship Saturday at 1pm ET Scanners are too late for AI-driven actions Ask HN: Negotiating Intern Pay Ask HN: Hiring in the age of AI-assisted coding: what works? Amazon Luna Shuts Down without refunds? The Weather Channel RetroCast Now Behind the Scenes and Technical / Design V1.21 Update for Gpumkat | Hacker News Valence and HYVE, RT Physics Attention and a "Synthetic Organism" Ask HN: Its either I or Agent code. Both of us on same codebase is a disaster Ask HN: Does Sam Altman know how to code? Ask HN: Is a purely Markdown-based CRM a terrible idea? Optimized for LLM agents Ask HN: Improving as mid-level dev with forced use of LLMs I built ClawIDE: A web-based IDE for managing multiple Claude Code sessions
I Replaced My AI Agent's Flat Fact Store with a Graph Database
grawl_dorgie · 2026-06-03 · via Hacker News: Ask HN

# I Replaced My AI Agent's Flat Fact Store with a Graph Database and It Runs in 85MB

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.

## The Problem

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.

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.

Four iterations on the flat store later I accepted I was patching the wrong thing.

## Why FalkorDB

Looked at Neo4j (Community Edition is intentionally crippled), Memgraph (no native vector search), and FalkorDB.

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.

## What the Graph Enables

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.

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.

The vector index runs inside FalkorDB on 4096-dimensional embeddings from qwen3-embedding:8b. O(log n) HNSW search. No external database.

## The Part That Surprised Me

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.

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.

## Scoring

Pure vector similarity surfaces whatever is semantically closest regardless of whether it matters. The scoring formula:

``` score = similarity × 0.5 + recency × 0.2 + importance × 0.3 ```

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.

## What I Learned

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.

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.

The graph beats flat storage the moment you need relationship reasoning. SUPERSEDES chain alone justified the migration.

Runs entirely on a Mac Mini. 85MB for the graph. Everything local.

GitHub: https://github.com/PeterGreenAppliedAI/LocalClaw