Completion notes — AHU help knowledge generation & ingestion (2026-07-08)
Ask (Efran): generate help docs from the AHU codebases + prod DB so the chatbot answers better — Public = citizen-facing procedural RAG articles, Internal = Data-Agent schema/business-rule grounding, wired straight into the system. Both delivered, ingested live, verified end-to-end.
Sources mined (read-only; nothing in the AHU repos modified)
- SABH / ahu-online (Yii): pesan-nama pipeline (BaseController::pesannama, OrderName*), pendirian/perubahan/pembubaran PT (PerseroanController, TransaksiPerseroan, FormDataPerseroanPerubahanTipe), status/enum constants, SIMPADHU billing codes.
- PT Perorangan (NestJS+Prisma): full enum ground truth (
prisma/main/schema.prisma), pendirian eligibility (≥18 th, 1×/tahun, nama unik ≥3 kata), 7-hari konfirmasi, laporan-keuangan perbaikan max 1×, peralihan kepemilikan, DJP/CTAS NPWP integration, PNBP kode level 001001071–076. - Apostille (NestJS+Prisma): Apostille vs Legalisasi by destination country, 2-stage verification (Verifikator→Kasi), bayar ≤7 hari + voucher 60 hari, jumlah cetak 1–5, file PDF/JPG/PNG ≤5MB, spesimen-tangguhan 7-day auto-cancel, public QR verification endpoints, helpdesk contact from authoritative email templates.
- Prod DB AHU_BADAN_HUKUM (read-only via the agent container): 2283 tables surveyed (shard families mapped),
tbl_tarif(Pesan Nama 200.000 / Pendirian 1.580.000 / Perubahan 1.500.000 — quoted as system-recorded, SIMPADHU authoritative),tbl_perseroan+tbl_order_nameDESCRIBEs.
Three parallel Explore subagents did the codebase extraction (file-cited); non-authoritative frontend mock content was explicitly excluded (e.g. apostille FAQ dummy "3-5 hari kerja").
Public surface — 12 RAG articles (corpus generated-help)
PT Perorangan ×5 (pendirian syarat/alur, arti status permohonan, perubahan+peralihan, pembubaran+lapkeu+beralih-ke-PT, biaya/PNBP) · Apostille ×5 (pengantar apostille-vs-legalisasi, alur+syarat berkas, verifikasi+pembayaran, pencetakan+pengambilan+cetak-ulang, verifikasi keaslian QR) · SABH ×2 (aturan pesan nama + masa berlaku 60 hari, pendirian/perubahan PT via notaris). Bahasa Indonesia, one h1_section chunk each, source = official portal URLs (citations render correctly).
Ingestion: upserted via the ai-ahu-rag container's own MilvusService (keyed by chunk_id — idempotent; no repo files edited). Collection 757→769 chunks. Coverage gap closed: PTP and Apostille had zero prior corpus presence.
Verified live: 3 search probes all rank new chunks #1 (0.72–0.84); full /api/orchestrate turn on an apostille question streamed an accurate answer citing Bantuan Apostille (apostille.ahu.go.id).
Internal surface — 4 Data-Agent business-knowledge entries
- Status Codes & Enum Semantics (SABH) — literal value→meaning maps (order_name is_active/is_proses/status_verifikasi/is_approve; verifikasi status+flag_tolak; status_transaksi incl. 4=blokir/5=peleburan/6=merger-child + the
NOT IN (2,3,5,6)active-company filter; PS-voting codes; tbl_perseroan enums). - Tarif & PNBP (SABH) — tbl_tarif rows + "authoritative tariffs live in AHU_BILLING_SIMPADHU (separate DB, not reachable) — say so, don't guess" + SIMPADHU kode layanan.
- Pesan Nama Lifecycle & Rules — 60-day expiry math, auto-deactivation, renewal resets verification, name rules, perseroan-vs-yayasan table split.
- Cross-system scope guard — PTP (
m_ptp/tr_ptp_*, Postgres) and Apostille (tr_apl_*) are separate systems; prevents hallucinated SQL against AHU_BADAN_HUKUM.
Ingestion: POST /knowledge/business (upsert) on the live internal agent → POST /admin/reload-schema hot-loaded both agents (preloaded context 40 454 chars). Complements — does not duplicate — the 26 existing entries.
Verified live: staff Tanya Data answered "arti status_transaksi 5 dan 6 + filter perseroan aktif" exactly per the grounding (Peleburan / Merger child / NOT IN (2,3,5,6)).
Durability
Artifacts + re-ingestion runbook committed at docs/knowledge-sources/ (gen_help_chunks.json, agent_business_knowledge.py, README): both ingest paths are idempotent re-runs; documented that ingest_all.py --reset and load_knowledge --recreate each drop this content and how to restore (interim mitigation for roadmap item "knowledge export/backup").
Notes / caveats
- Fee figures are the production system's recorded values, phrased with "sesuai tarif PNBP yang berlaku"; SIMPADHU is authoritative.
- PTP modal/UMK rupiah caps are NOT enforced in code — deliberately not claimed in articles.
- No cleanup needed: no test data created; all operations additive upserts.