智能体
news.ycombinator.com ·
Show HN:AI·rete·RAG——用 Rete 规则引擎做决策,RAG 解释原因
作者发布 ai·rete·rag,针对贷款、欺诈、临床分诊等需可审计决策的场景,将纯 Python Rete 规则引擎与 RAG 串联:规则引擎基于 YAML 规则和事实给出唯一判定,RAG 从自有政策文档检索并让 LLM 生成带引用的自然语言解释,但解释不能改变判定。特性包括规则图(嵌套 all/any/not、前向链)、审计模式逐条记录被评估规则(含未触发)并保存规则集快照以重放、规则可约束检索范围、可视化编辑器及 LLM 起草规则(须人工审核),并提供 MCP server 供 agent 调用 /decide。作者说明引擎与平台暂不开源,MCP 客户端为 MIT 开源,产品为托管制含免费层。
AI推荐理由 Show HN 项目,作者自述将纯 Python Rete 规则引擎与 RAG 串联:判定只由 YAML 规则引擎给出,LLM 仅基于自有政策文档生成带引用的解释,不能改变结论。具体新信息包括规则图(嵌套 all/any/not、前向链)、审计模式记录每条被评估规则(含未触发规则)及规则集快照以支持重放、规则可反向约束检索、可视化编辑器与 LLM 起草规则(需人工审核)、提供 MCP server 供 Claude 等 agent 调用 /decide。局限:作者明确说明引擎与平台当前不开源,仅 MCP 客户端为 MIT 开源,且为托管产品含免费层;正文未提供准确率、延迟或生产部署等可验证数据,效果描述均为作者自述。
62
正文
https://ai-rete-rag.com/ Show HN: AI·rete·RAG – a Rete rule engine decides, RAG explains why (ai-rete-rag.com ) 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 "guardrails" after the fact.It runs the two in series instead: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. 2. 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't change the verdict.A few things that went further than I expected: - Rules are a graph, not flat lists: nested all/any/not, and rules can assert facts that other rules consume (forward chaining). The decision trace shows the causal chain. - Audit mode records every rule evaluated, including the ones that didn't fire, condition by condition, with a snapshot of the rule set for replay. - Rules can steer retrieval (a fired rule narrows which documents get searched), and retrieved text can be turned into facts for the engine. - 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.The landing page has a live demo with no signup (8 demo domains: loan, fraud, clinical, insurance, legal, ops, e-commerce, blockchain). There's also an MCP server, so Claude and other agents can call /decide as a tool: `uvx ai-rete-rag-mcp`.To be upfront: it's a hosted product with a free tier. The MCP client is open source (MIT, github.com/zaharajabeen13-create/ai-rete-rag-mcp); the engine and platform are not open source right now.I'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? help Guidelines | FAQ | Lists | https://github.com/HackerNews/API API | Security | https://www.ycombinator.com/legal/ Legal | https://www.ycombinator.com/apply/ Apply to YC | Contact Search: