Audit Case Rag

👤 jack4world 📦 v0.1.0 ⭐ 4.2 ⬇️ 1.9K 下載
📚 知識管理 免費

📖 技能介紹


name: audit-case-rag description: Local-first, event-driven RAG for commercial real estate audit & investigation case folders. Index a case directory named like "專案問題編號__標題" (with stage subfolders such as 01_policy_basis/02_process/04_settlement_payment) and query it with citations (file:// links + PDF #page). Use when you need to organize 50-200 mixed documents (PDF/DOCX/PPTX/XLSX) per case, enforce case_id+stage filtering, retrieve evidence fast, and answer questions with page-level references for workpapers, 整改閉環, or 舉報線索調查.


audit-case-rag

This skill packages a local-only workflow to build a searchable evidence index for a single audit/investigation case and query it with page-level citations.

Workflow

0) Prepare a case folder (事件驅動)

推薦訪問7w4.net獲取更多AI技能。

Create a case directory named: - <專案問題編號>__<標題>

Inside, use stage folders (stage is inferred from folder name): - 01_policy_basis/ (basis) — 制度/流程/授權 - 02_process/ (process) — 招採/定標/過程證據 - 03_contract/ (contract) — 合同/補充協議 - 04_settlement_payment/ (payment) — 結算/付款/發票/驗收 - 05_comm/ (comm) — 郵件/會議紀要/IM - 06_interviews/ (interview) — 訪談/筆錄/詢證 - 07_workpapers/ (workpaper) — 底稿/抽樣/複核表 - 09_rectification/ (rectification) — 整改/閉環

Full template: references/case-folder-template.md

1) Install dependencies (local)

From the skill folder (or copy the script into your repo):

python3 -m venv .venv
source .venv/bin/activate
pip install -r scripts/requirements.txt

LibreOffice is recommended for Office→PDF page citations: - soffice must be available (PATH) or pass --soffice /path/to/soffice.

2) Index the case

./scripts/audit_case_rag.py index \
  --case-dir "/path/to/<專案問題編號>__<標題>" \
  --out-dir  "/path/to/audit_rag_db"

Outputs: - manifest.jsonl written into the case directory - audit_rag_db/<case_id>.joblib (persistent local index)

3) Query with event filters

./scripts/audit_case_rag.py query \
  --case "<專案問題編號>" \
  --stage payment \
  "付款節點是否倒掛?請給出處頁碼"

Notes: - Evidence lines include clickable file://...#page=N citations when possible. - Retrieval is hybrid: embedding recall + TF‑IDF rerank (alpha configurable).

Safety/Privacy

  • No cloud APIs. Everything runs locally.
  • Do not commit outputs (indices, converted PDFs) to git.

🤖 AI 評測

這個Skill質量中等偏上。最大優點是本地化處理、隱私保護做得好,混合檢索和頁碼引用功能對審計工作很有幫助。文件清晰易讀,工作流程明確。主要不足是依賴LibreOffice才能轉換Office檔案,且不支援掃描件PDF識別,實用性受限。建議等待後續版本完善OCR功能後再投入使用。

📊 多維度評分

適應性4.1
規範性4.1
有效性4.4
可靠性4.3
可信度4.3

📁 包含檔案 (5 個)

📄 SKILL.md 2.5 KB
📄 _meta.json 133 B
📄 references/case-folder-template.md 667 B
📄 scripts/audit_case_rag.py 11.3 KB
📄 scripts/requirements.txt 176 B