MCP-RagMax
RAG backend แบบ deterministic/LLM-free สำหรับคลังเอกสารไทย–อังกฤษ ใช้ Hybrid MiniLM + BM25 + RRF, มี MCP 9 tools, background build jobs และ local HTML console
ต้องการเครื่อง: Mac Apple Silicon, Python 3.11 Active Development
ดูซอร์สโค้ดบน GitHub → · ดาวน์โหลด →
ใช้ทำอะไรได้บ้าง
- สร้างคลังความรู้จาก Markdown, text, PDF, CSV และ JSON
- ค้นเอกสารด้วย MiniLM dense search + Thai-aware BM25 แล้วรวมอันดับด้วย RRF
- ให้ AI agent อื่นเรียก retrieval/read/build/health ผ่าน MCP stdio 9 tools
- build แบบ incremental พร้อม persistent progress, ETA และ cooperative cancellation
- ใช้ local HTML console ที่ 127.0.0.1:8770 สำหรับ search, health, file list และ build
- ให้ caller LLM เสนอ high-level topic labels ได้ โดย backend ยังคง metadata/fingerprint truth แบบ deterministic
บทความในหมวดนี้
เริ่มต้นใช้งาน MCP-RagMax
RAG backend แบบ deterministic/LLM-free สำหรับ agent — Hybrid MiniLM + BM25 + RRF, MCP 9 tools, background build และ local HTML console
MCP-RagMax ทำงานอย่างไร — Hybrid Retrieval, Build Jobs และ Orientation Index
เจาะสถาปัตยกรรม MCP-RagMax ตั้งแต่ source confinement, MiniLM + BM25 + RRF, registry, persistent build jobs และ prepare/commit rag_index.json
Tool: rag_retrieve — Hybrid retrieval contract หลักของ MCP-RagMax
เจาะลึก rag_retrieve: same-intent query variants, Dense + BM25 + RRF, filters, source-first mode และเหตุผลที่ backend ไม่ใช้ LLM rerank
Tools: rag_list + rag_search_files — สำรวจ registered files แบบ deterministic
ดูไฟล์ที่อยู่ใน MCP-RagMax registry และค้นชื่อไฟล์โดยไม่ใช้ LLM พร้อมเข้าใจว่าทำไมสอง tool นี้ไม่ใช่ filesystem browser ทั่วไป
Tool: rag_read_file — อ่านเฉพาะเอกสารที่ register อยู่ใน MCP-RagMax
ทำไม rag_read_file ไม่ใช่ arbitrary file reader, วิธี resolve ชื่อไฟล์, จัดการ ambiguity และรักษาขอบเขต knowledge root
Tool: rag_rebuild_index — ให้ caller LLM ช่วยตั้ง topic โดยไม่เสีย deterministic truth
อธิบาย prepare/commit protocol ของ rag_index.json, expected_fingerprint, topic validation และ conflict protection ใน MCP-RagMax
Tools: build_kb, build_status, cancel_build และ rag_health
จัดการ lifecycle ของ MCP-RagMax knowledge base ด้วย persistent background jobs, cooperative cancellation และ health contract ที่ตรวจมากกว่าแค่ process ยังรัน