메뉴
HN
Hacker News • 3일 전

쇼 HN: AI·rete·RAG – 룰 엔진이 결정하고 RAG가 근거를 설명

IMP
5/10
핵심 요약

감사가 필요한 영역(대출, 사기 탐지, 임상 분류 등)에서 LLM이 결정을 내리는 대신, 순수 파이썬 Rete 룰 엔진이 YAML 규칙으로 결정을 내리고 RAG가 정책 문서를 인용해 그 결정을 설명하는 도구입니다. 결정은 항상 동일한 사실에 동일한 결과를 내며 감사 모드로 재현 가능해 규제 대응이 중요한 실무자에게 유용합니다.

번역된 본문

안녕하세요 HN, 저는 ai·rete·rag를 만들었습니다. 감사 가능성이 필요한 결정(대출, 사기 탐지, 임상 트리아지)에 LLM을 투입하고 나서 사후에 '가드레일'을 덧붙이는 팀들을 계속 봤기 때문입니다.

이 도구는 두 단계를 순차적으로 실행합니다:

  1. 순수 파이썬 Rete 엔진이 사실(facts)에 대해 YAML 규칙을 평가합니다. 판정(verdict)은 오직 여기서만 나옵니다. 같은 사실에는 매번 같은 판정이 나오며, salience 기반 충돌 해결을 지원합니다.
  2. RAG가 자체 정책 문서에서 구절을 검색하고, LLM이 이미 내려진 결정에 대해 그 구절을 인용하면서 평이한 영어로 설명을 작성합니다. LLM은 판정을 바꿀 수 없습니다.

예상보다 더 나아간 부분들:

  • 규칙이 플랫 리스트가 아닌 그래프 구조입니다: 중첩된 all/any/not을 지원하고, 규칙이 다른 규칙이 소비하는 사실을 주입할 수 있습니다(전방 추론, forward chaining). 결정 트레이스에 인과 사슬이 표시됩니다.
  • 감사 모드는 발동되지 않은 규칙을 포함해 평가된 모든 규칙을 조건별로 기록하고, 재현을 위한 규칙 세트 스냅샷을 저장합니다.
  • 규칙이 검색을 유도할 수 있습니다(발동된 규칙이 검색 대상 문서 범위를 좁힘). 검색된 텍스트는 엔진용 사실로 변환될 수도 있습니다.
  • 비개발자도 비주얼 에디터로 규칙을 만들 수 있고, 정책 문서를 붙여넣으면 LLM이 인용과 함께 규칙 초안을 작성해 줍니다. 초안은 검토 없이는 저장되지 않습니다. 엔지니어를 위한 YAML도 그대로 남아 있습니다.

랜딩 페이지에 가입 없이 사용할 수 있는 라이브 데모가 있습니다(대출, 사기, 임상, 보험, 법률, 운영, 이커머스, 블록체인 등 8개 데모 도메인). MCP 서버도 있어서 Claude 등 에이전트가 /decide를 도구로 호출할 수 있습니다: uvx ai-rete-rag-mcp.

솔직히 말씀드리면: 호스팅型 제품이며 무료 티어가 있습니다. MCP 클라이언트는 오픈소스(MIT, github.com/zaharajabeen13-create/ai-rete-rag-mcp)지만, 엔진과 플랫폼은 현재 오픈소스가 아닙니다.

특히 자동화된 결정을 규제기관이나 감사인에게 설명해야 했던 분들의 의견을 듣고 싶습니다: 실제로 무엇을 요구받으셨나요?

원문 보기
원문 보기 (영어)
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. 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&#x27;t change the verdict.<p>A few things that went further than I expected: - 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. - 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. - 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.<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?