Skip to content

dannyota/banhmi

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

162 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

🥖 banhmi · 🍜 laksa · 🍛 rendang

Evidence-only RAG corpus + MCP server for banking digital & technology regulation — one codebase, one corpus per country.

Vietnam → banhmi.danny.vn · Malaysia → laksa.danny.vn · Indonesia → rendang.danny.vn · Docs · Architecture · Plan

License Go MCP VN MY ID


banhmi crawls official government sources, extracts legal documents into a citable RAG corpus, and serves evidence over MCP — exact citations, validity, amendment relations, provenance, and coverage gaps. Multi-jurisdiction: Vietnam (banhmi), Malaysia (laksa), and Indonesia (rendang) are live; Thailand and Singapore are planned.

banhmi does not answer questions. Your agent/model connects over MCP, retrieves citations and validity, and decides the answer. No built-in LLM — repealed/superseded text is badged, never served as current.

Use it over MCP — live, free, no signup

Remote MCP (Streamable HTTP), public, HTTPS, no key:

Jurisdiction MCP endpoint Ask in Official sources
🥖 Vietnam https://banhmi.danny.vn/mcp English or Vietnamese VBPL · Công Báo · vanban.chinhphu · SBV
🍜 Malaysia https://laksa.danny.vn/mcp English AGC Laws of Malaysia · Bank Negara Malaysia · Securities Commission
🍛 Indonesia https://rendang.danny.vn/mcp English or Indonesian BPK JDIH · Bank Indonesia JDIH

Add as a custom connector (pick an endpoint above):

  1. Claude (Pro/Max/Team/Enterprise) → Settings → Connectors → Add custom connector → paste URL, no auth.
  2. ChatGPT (Plus/Pro/Team/Edu) → Developer mode → Settings → Apps & Connectors → Add → paste URL, no auth.
  3. Grok → Settings → Connectors → Add MCP server → paste URL.
  4. Gemini CLI → add under mcpServers in ~/.gemini/settings.json (httpUrl = endpoint).

No account or API key needed. Ask e.g. "What are the technology risk management requirements for banks?" — you get ranked provisions with citation, validity badge, and official source link.

Tools: search · document · corpus_status · quality_gaps · guide.

What it does

  • Scope-filtered discovery of banking digital/technology regulation (IT safety, cybersecurity, data protection, cloud, outsourcing, e-transactions, digital channels, payments, e-KYC) with cross-source dedup.
  • Verbatim authoritative sources — reconciled into one document per act, never paraphrased.
  • High-fidelity extraction — go-fitz (MuPDF) for DOCX/HTML/born-digital PDF; Document AI or EasyOCR (batched) for scanned PDFs.
  • Evidence, not answers — exact citations (VN Điều/Khoản, MY Section/Subsection), validity badges, confirmed relations, provenance, and gaps.
  • Change tracking — amendments, repeals, subsidiary legislation, validity over time.
  • MCP query surface — any agent connects, retrieves evidence, decides the answer.

Official data sources

Public legal data, crawled politely. Sources are pluggable — add your own under pkg/ingest/. See docs/design/SOURCES.md and docs/design/jurisdictions/.

🥖 Vietnam (banhmi)

Source Operator Provides
vbpl.vn National legal database — Bộ Tư pháp Discovery, DOCX/DOC/PDF/HTML, article structure, relation graph, validity
congbao.chinhphu.vn Official Gazette — Văn phòng Chính phủ New-document RSS + born-digital PDF/DOCX
vanban.chinhphu.vn Government legal DB Freshest central-law feed
sbv.hanoi.gov.vn State Bank of Vietnam portal Supplementary SBV sweep, deduped by số ký hiệu

🍜 Malaysia (laksa)

Source Operator Provides
lom.agc.gov.my Attorney General's Chambers — Laws of Malaysia Federal Acts (born-digital PDF), validity, P.U. relations
bnm.gov.my Bank Negara Malaysia Policy documents & guidelines (RMiT, cloud, e-KYC, payments, …)
sc.com.my Securities Commission Malaysia Capital-market technology guidelines

🍛 Indonesia (rendang)

Source Operator Provides
peraturan.bpk.go.id BPK JDIH — national audit body Laws (UU), Government Regulations (PP), OJK regulations (POJK/SEOJK)
jdih.bi.go.id Bank Indonesia JDIH PBI and PADG (payment system, monetary policy)

Architecture

flowchart TB
  subgraph LOCAL["cmd/pipeline (CPU) — per jurisdiction"]
    DISC["Discover · scope-filtered"] --> DL["Fetch official files"]
    DL --> EXT["Extract · go-fitz / Document AI OCR"]
    EXT --> NORM["Normalize · structure · validity · relations"]
    NORM --> IDX["Index · chunks + Qwen3-Embedding (Cloud Run L4 GPU / Kaggle)"]
  end

  subgraph RDS["AWS RDS · PostgreSQL 17 (Singapore) — one instance, one DB per country"]
    PGVN[("banhmi DB · pgvector+HNSW")]
    PGMY[("laksa DB · pgvector+HNSW")]
    PGID[("rendang DB · pgvector+HNSW")]
  end

  subgraph CR["GCP Cloud Run · scale-to-zero (asia-southeast1) — v0.3.0: AWS ECS Graviton"]
    MCPVN["banhmi-mcp · in-process Qwen3-Embedding ONNX"]
    MCPMY["laksa-mcp · in-process Qwen3-Embedding ONNX"]
    MCPID["rendang-mcp · in-process Qwen3-Embedding ONNX"]
  end

  IDX -->|write corpus over TLS| RDS
  MCPVN -->|vector search · current-law filter| PGVN
  MCPMY -->|vector search · current-law filter| PGMY
  MCPID -->|vector search · current-law filter| PGID
  FBVN["Firebase · banhmi.danny.vn/mcp"] --> MCPVN
  FBMY["Firebase · laksa.danny.vn/mcp"] --> MCPMY
  FBID["Firebase · rendang.danny.vn/mcp"] --> MCPID
  USERS["your agents — decide the answer<br/>Claude · ChatGPT · Gemini · Grok"] -->|remote MCP| FBVN & FBMY & FBID
Loading

Medallion pipeline (Bronze → Silver → Gold):

  1. Discover → Fetch (Bronze): scope-filtered crawl; download raw files.
  2. Extract → Normalize (Silver): go-fitz / MuPDF (scanned PDFs via Document AI / EasyOCR, batched); parse provision tree, validity, relations.
  3. Index (Gold): chunk by article + Qwen3-Embedding (ONNX FP16, 1024 dims) into pgvector. Hybrid retrieval — dense vectors + BM25 sparse vectors (sparsevec), RRF-fused with a query router, current-law pre-filter.
  4. Serve: Cloud Run (in-process Qwen3-Embedding ONNX, scale-to-zero) behind Firebase Hosting (v0.3.0: AWS CloudFront + ECS Graviton). Pipeline writes corpus over TLS to AWS RDS (Singapore, PG17).

See docs/ARCHITECTURE.md.

Status

MVP1 — VN, MY, and ID live. Validation and hardening ongoing.

Jurisdiction Endpoint Sources Status
🥖 Vietnam banhmi.danny.vn/mcp vbpl · congbao · vanban · SBV Live
🍜 Malaysia laksa.danny.vn/mcp AGC LOM · BNM · SC Live
🇮🇩 Indonesia rendang.danny.vn/mcp BPK · BI Live
🇹🇭 Thailand Proposed
🇸🇬 Singapore Proposed

See PLAN.md for the roadmap.

Self-host

Everything runs in podman — full guide in docs/DEVELOPMENT.md.

cp config/config.example.yaml config/config.yaml
export BANHMI_DATABASE_PASSWORD=banhmi
make dev-up        # Postgres+pgvector
make migrate       # apply schema
go run ./cmd/seed  # load config vocabularies

Build the corpus and serve MCP per docs/DEVELOPMENT.md. A fresh clone reaches ingesting + serving with no API keys. Deploy via docs/DEPLOYMENT.md.

Documentation

License

Apache 2.0.

About

Evidence-only RAG + MCP server for Vietnamese banking & fintech regulation — exact Điều/Khoản citations, validity status, and official government source links for your own AI. No hallucination.

Topics

Resources

License

Stars

2 stars

Watchers

0 watching

Forks

Packages

 
 
 

Contributors

Languages