{"by":"ZaharaHussain","descendants":11,"id":49803683,"kids":[49910693,49806185,49811819,49816208,49818067,49824723,49806638,49890059,49852224,49814308,49806089,49812349,49805272,49826922],"score":46,"text":"Hi HN, I built ai·rete·rag because I kept seeing teams put an LLM in charge of decisions that need to be auditable (lending, fraud, clinical triage), then bolt on &quot;guardrails&quot; after the fact.<p>It runs the two in series instead:<p>1. A pure-Python Rete engine evaluates YAML rules against your facts. The verdict comes only from here. Same facts, same verdict, every time, with salience-based conflict resolution.\n2. RAG retrieves passages from your own policy documents, and an LLM writes a plain-English explanation of the decision that was already made, citing those passages. It can&#x27;t change the verdict.<p>A few things that went further than I expected:\n- Rules are a graph, not flat lists: nested all&#x2F;any&#x2F;not, and rules can assert facts that other rules consume (forward chaining). The decision trace shows the causal chain.\n- Audit mode records every rule evaluated, including the ones that didn&#x27;t fire, condition by condition, with a snapshot of the rule set for replay.\n- Rules can steer retrieval (a fired rule narrows which documents get searched), and retrieved text can be turned into facts for the engine.\n- Non-technical authors can build rules in a visual editor, or paste a policy document and get LLM-drafted rules with citations. Drafts are never saved without review. YAML is still there for engineers.<p>The landing page has a live demo with no signup (8 demo domains: loan, fraud, clinical, insurance, legal, ops, e-commerce, blockchain). There&#x27;s also an MCP server, so Claude and other agents can call &#x2F;decide as a tool: `uvx ai-rete-rag-mcp`.<p>To be upfront: it&#x27;s a hosted product with a free tier. The MCP client is open source (MIT, github.com&#x2F;zaharajabeen13-create&#x2F;ai-rete-rag-mcp); the engine and platform are not open source right now.<p>I&#x27;d especially like to hear from anyone who has had to explain an automated decision to a regulator or an auditor: what did they actually ask for?","time":1790093706,"title":"Show HN: AI·rete·RAG – a Rete rule engine decides, RAG explains why","type":"story","url":"https://ai-rete-rag.com/"}