<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[theHarshlab]]></title><description><![CDATA[theHarshlab]]></description><link>https://theharshlab.hashnode.dev</link><generator>RSS for Node</generator><lastBuildDate>Sun, 01 Nov 2026 15:48:08 GMT</lastBuildDate><atom:link href="https://theharshlab.hashnode.dev/rss.xml" rel="self" type="application/rss+xml"/><language><![CDATA[en]]></language><ttl>60</ttl><item><title><![CDATA[Your AI Told Me the Old Policy. So We Built One That Comes Back to Fix It]]></title><description><![CDATA[How Ripple uses FalkorDB to remember who was told what, and to come back and correct them when a policy changes. Team: Sahil Mane and Harsh Gupta…]]></description><link>https://theharshlab.hashnode.dev/your-ai-told-me-the-old-policy-so-we-built-one-that-comes-back-to-fix-it</link><guid isPermaLink="true">https://theharshlab.hashnode.dev/your-ai-told-me-the-old-policy-so-we-built-one-that-comes-back-to-fix-it</guid><category><![CDATA[falkordb]]></category><category><![CDATA[graphdatabase]]></category><category><![CDATA[WeMakeDevs]]></category><category><![CDATA[hackathon]]></category><dc:creator><![CDATA[Harsh Gupta]]></dc:creator><pubDate>Sun, 18 Oct 2026 08:58:09 GMT</pubDate><enclosure url="https://cdn.hashnode.com/uploads/covers/6ad4857915799eb501ef3670/f1d52c9d-8e0b-48a1-999d-75bc121c93f1.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<hr />
<p><em>How Ripple uses FalkorDB to remember who was told what, and to come back and correct them when a policy changes.</em></p>
<p><strong>Team:</strong> Sahil Mane and Harsh Gupta <strong>Hackathon:</strong> WeMakeDevs × FalkorDB, <em>Graph Hacks: Context for AI Agents</em> (Oct 15–18, 2026), all three tracks <strong>Try it live:</strong> <a href="https://ripple-2.up.railway.app">ripple-2.up.railway.app</a> · <strong>Code:</strong> <a href="https://github.com/sahil1330/ripple">github.com/sahil1330/ripple</a></p>
<h2>The problem: your AI is confidently out of date</h2>
<p>On Jul 14, 2026, GitLab merged a change into its public handbook: personal VPN subscriptions stopped being reimbursable. Before, you could claim up to $150 a year. After, the answer is NordLayer, the company VPN.</p>
<p>The handbook page updated, and for most tools that is the end of the story. But think about everything that still holds the old answer:</p>
<ul>
<li><p>An employee, Priya, already asked the company assistant "Can I expense my ExpressVPN?" and was told <strong>yes, up to $150</strong>.</p>
</li>
<li><p>An accounts-payable agent has a cached rule that auto-approves personal VPN claims, and Priya's $150 claim is sitting in its queue.</p>
</li>
<li><p>Wiki pages and FAQ copies still cite the old rule.</p>
</li>
</ul>
<p>Search can find the new page. A vector index can embed it. <strong>Neither knows who was told the old version.</strong> That is a relationship problem, so we solved it with a graph.</p>
<img src="https://cdn.hashnode.com/uploads/covers/6ad4857915799eb501ef3670/18a63ea9-bd3f-40d4-a07b-4b542e30a144.png" alt="" style="display:block;margin:0 auto" />

<h2>Meet Ripple</h2>
<p>Ripple is a company's own AI assistant. It answers questions from a FalkorDB graph, <strong>records every answer it gives</strong>, and when a fact changes it <strong>finds everyone affected, blocks stale agent actions, and comes back to fix them</strong>.</p>
<p>Every company is its own graph in one FalkorDB instance. Switch the company in the UI and you get a different graph, different people, and a different assistant.</p>
<h2>What actually happens (try it yourself)</h2>
<p>We ran the live demo end to end. Here is the real sequence:</p>
<ol>
<li><p>Ask.** As Priya, we asked: <em>"Can I expense my ExpressVPN subscription?"</em></p>
<blockquote>
<p>"Yes — personal VPN subscriptions are reimbursable up to $150 per year, and a yearly subscription can be submitted in one claim."</p>
</blockquote>
<p>The answer cites the exact fact version it came from, and a "How I found this" panel shows the actual Cypher the agent ran. Ripple also records that it told Priya this version. That record is the whole trick.</p>
</li>
<li><p>The policy changes. The demo replays the real GitLab commit. A Sentinel agent writes the new fact version, which supersedes the old one, and a change card lands in every department's inbox: "Personal VPN subscriptions no longer reimbursable."</p>
</li>
<li><p>Trace. A Tracer agent follows every path from the old version and finds everyone and everything still holding it: people who were told, agents that cached the rule, docs that cite it, plans and pending actions that depend on it. Each one is ranked by time-to-harm, so what breaks soonest gets fixed first.</p>
</li>
<li><p>Guard. Before the accounts-payable agent approves Priya's claim, it calls check_fresh over MCP. Its rule derives from a superseded version, so the action is blocked, with the stale version, the current version, and the source change attached.</p>
</li>
<li><p><strong>Fix.</strong> Fixer agents claim tasks from the graph, patch the docs, refresh the caches, and replan the actions, until coverage reaches 100%.</p>
</li>
<li><p><strong>Correct.</strong> We asked again: <em>"Can I expense my ExpressVPN now?"</em></p>
<blockquote>
<p><em>"Earlier I told you: reimbursable up to $150 per year. That changed on Jul 14, 2026 (MR !20421). Starting July 15, 2026, ExpressVPN and other personal VPN subscriptions are not reimbursable; use NordLayer instead."</em></p>
</blockquote>
<p>That opening line is not the model improvising. It is enforced in code, from the record of what Ripple previously told this person.</p>
</li>
</ol>
<h3>Hit "Get explanation" on any change card and you get the before and after side by side, the <strong>graph path</strong> showing exactly why it reaches you (change → old version → WAS_TOLD → you), who else is affected, and what to do now.</h3>
<img src="https://cdn.hashnode.com/uploads/covers/6ad4857915799eb501ef3670/18b8dc43-c7fc-49f3-a35c-cd718f55df73.png" alt="" style="display:block;margin:0 auto" />

<h2><strong>How it works</strong></h2>
<p>The graph model is simple on purpose. Facts have versions. New versions <code>SUPERSEDE</code> old ones. People <code>WAS_TOLD</code> a version. Agents <code>CACHED</code> one. Plans <code>DEPEND_ON</code> derived facts. Because dependency edges point from the dependent to the dependency, a single breadth-first traversal from an old version answers the question no search engine can: <strong>who is still acting on this?</strong></p>
<p>On top of that:</p>
<ul>
<li><p><strong>An LLM agent grounded in Cypher.</strong> The assistant picks graph tools, runs real Cypher, and writes its answer only from tool results, with citations. Every answer shows its tool trace.</p>
</li>
<li><p><strong>A freshness guard over MCP.</strong> Any agent can ask the graph "is what I'm about to act on still current?" before it acts.</p>
</li>
<li><p><strong>Graph algorithms as ranking tools.</strong> PageRank over the real handbook link graph and betweenness centrality find the hubs that spread a stale fact furthest.</p>
</li>
<li><p><strong>Task nodes for coordination.</strong> Fixer agents claim work atomically from the graph, so nothing gets fixed twice and nothing gets missed.</p>
</li>
<li><p><strong>One graph per company.</strong> Tenants are separate graphs, not rows with a filter, so cross-company leaks are structurally impossible.</p>
</li>
</ul>
<img src="https://cdn.hashnode.com/uploads/covers/6ad4857915799eb501ef3670/de1bc2c3-e508-4b53-bb46-ef579eeee394.png" alt="" style="display:block;margin:0 auto" />

<h2><strong>Did it work? Our eval</strong></h2>
<p>We wrote a live evaluation that runs against the deployed app: 31 questions across both demo companies, covering policy before and after the change, team membership, multi-hop questions like "which agents rely on the VPN rule?", explain-why, corrections, unknown questions, a prompt-injection attempt, and a cross-tenant leak attempt.</p>
<p><strong>Result: 100% correct, 0 hallucinations, median latency about 1.66 seconds</strong>, with the full agent pipeline (change written, impact traced, stale actions blocked, tasks completed, coverage at 100%) verified at every step. The eval earned its keep too: early runs caught the model swapping names and one cross-tenant leak, which we fixed and re-ran.</p>
<h2><strong>Why FalkorDB</strong></h2>
<p>The questions Ripple exists to answer ("who was told this?", "which agent cached it?", "what pending action depends on it?") are edges, not embeddings. FalkorDB's built-in algorithms (BFS, PageRank, betweenness, shortest paths) run inside the same database our agents query, its serialised writes make atomic task claims free, and separate graphs per tenant gave us isolation without filtering hacks. We tested against both FalkorDB v4 and v6 and documented the quirks we hit in the repo.</p>
<h2><strong>Try it</strong></h2>
<ul>
<li><p><strong>Live:</strong> <a href="http://ripple-2.up.railway.app">ripple-2.up.railway.app</a> — ask "Can I expense my ExpressVPN?", click <strong>Next step</strong> through the demo, then ask again.</p>
</li>
<li><p><strong>Code:</strong> <a href="https://l.meta.ai/?u=https%3A%2F%2Fgithub.com%2Fsahil1330%2Fripple&amp;h=AUBWcioLqBv9mvra0Oaxy9IjryPaeUzCu-irPGBKzxCTJaZhbPXobbUngHarlGCSY9vKdbBopdWCvWTTdTWyUcvvefbIF4kKjzo7oT7NdugcY0W1z9L0TQ">github.com/sahil1330/ripple</a></p>
</li>
</ul>
<p><strong>Team:</strong> Sahil Mane (graph, agents, MCP, API) and Harsh Gupta (web UI, deployment, docs, demo video).</p>
<p><strong>AI disclosure:</strong> we used AI coding assistants while building Ripple. We reviewed, tested, and can explain every part of the code and architecture.</p>
<p><em>Built with</em> <a href="https://l.meta.ai/?u=https%3A%2F%2Fwww.falkordb.com%2F&amp;h=AUBWcioLqBv9mvra0Oaxy9IjryPaeUzCu-irPGBKzxCTJaZhbPXobbUngHarlGCSY9vKdbBopdWCvWTTdTWyUcvvefbIF4kKjzo7oT7NdugcY0W1z9L0TQ"><em>FalkorDB</em></a> <em>for WeMakeDevs Graph Hacks.</em></p>
]]></content:encoded></item></channel></rss>