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