นี่คือ centerpiece ของบทความ และเป็น architecture ที่ผู้อ่านระดับ architect สามารถนำไปเป็น starting point ของการออกแบบระบบจริงได้
Reference architecture ของ Enterprise AI Memory: source → ingestion → normalization → vector retrieval → knowledge graph → governance → agent interface → human review → presentation
Stack Overview
หมายเหตุสำหรับ architect: Governance แสดงเป็น layer เพื่อให้อ่านง่าย แต่ในทางปฏิบัติมันทำหน้าที่เป็น cross-cutting control plane ที่มีผลตั้งแต่ขั้น ingestion, indexing, graph construction, retrieval จนถึง agent access — ไม่ใช่แค่ gate หลัง retrieval เท่านั้น
┌─────────────────────────────────────────────────────────────────┐
│ ENTERPRISE SOURCES │
│ เอกสาร / Code / Ticket / Chat / Diagram / Video │
│ Policy / Contract / Runbook / Incident Report / Vendor Doc │
└────────────────────────────┬────────────────────────────────────┘
↓
┌─────────────────────────────────────────────────────────────────┐
│ INGESTION LAYER │
│ Parser / OCR / Transcript / AST / API Connector │
└────────────────────────────┬────────────────────────────────────┘
↓
┌─────────────────────────────────────────────────────────────────┐
│ NORMALIZATION LAYER │
│ Schema Mapping / Metadata Tagging / Entity Extraction │
│ Deduplication / Format Normalization │
└────────────────────────────┬────────────────────────────────────┘
↓
┌─────────────────┴────────────────────┐
↓ ↓
┌──────────────────────┐ ┌────────────────────────────┐
│ VECTOR RETRIEVAL │◄───────────►│ KNOWLEDGE GRAPH LAYER │
│ Semantic search │ │ Entity / Relationship │
│ Similarity recall │ │ Dependency / Provenance │
│ Local/private index │ │ Multi-hop reasoning │
└──────────┬───────────┘ └───────────┬────────────────┘
└─────────────────┬────────────────────┘
↓
┌─────────────────────────────────────────────────────────────────┐
│ GOVERNANCE LAYER │
│ Permission / Owner / Confidence / Freshness / Audit Trail │
│ Extracted vs. Inferred Flag / Source Citation / Access Control │
└────────────────────────────┬────────────────────────────────────┘
↓
┌─────────────────────────────────────────────────────────────────┐
│ AGENT INTERFACE LAYER │
│ API / MCP / Tool Contract / Query Policy / Rate Limit │
│ Use-case-specific guardrail / Agent identity control │
└────────────────────────────┬────────────────────────────────────┘
↓
┌─────────────────────────────────────────────────────────────────┐
│ HUMAN REVIEW LAYER │
│ Validation / Approval Gate / Exception Handling │
│ Escalation / Override / Audit │
└────────────────────────────┬────────────────────────────────────┘
↓
┌─────────────────────────────────────────────────────────────────┐
│ PRESENTATION LAYER │
│ Dashboard / Search UI / Report / Architecture Map │
│ Agent response with citation / Reasoning trace │
└─────────────────────────────────────────────────────────────────┘
Layer-by-Layer
Source Layer — จุดเริ่มต้นคือการยอมรับว่า enterprise knowledge ไม่ได้อยู่ในเอกสาร Word เพียงอย่างเดียว มันอยู่ใน code, ticket, chat log, diagram, video meeting, contract, และอีกหลายรูปแบบ source layer ต้องครอบคลุมทั้งหมดนี้
Ingestion Layer — แปลงข้อมูลดิบให้อยู่ในรูปที่ประมวลผลได้ OCR สำหรับเอกสาร scan, AST (Abstract Syntax Tree) สำหรับ code, transcript สำหรับ audio/video, API connector สำหรับ live data จาก Jira, Confluence, GitHub, ServiceNow
Normalization Layer — ใส่ schema, metadata, และ entity extraction ก่อนที่ข้อมูลจะเข้าสู่ layer ถัดไป นี่คือขั้นตอนที่ทำให้ข้อมูลจากหลาย source สามารถ reason ร่วมกันได้ ถ้าข้ามขั้นนี้ graph และ retrieval layer จะทำงานบนฐานข้อมูลที่ไม่สอดคล้องกัน
Vector Retrieval Layer — ยังคงเป็น layer สำคัญ รับผิดชอบ semantic recall และ similarity search ขนาดใหญ่ การ query ส่วนใหญ่ยังเริ่มที่ layer นี้ก่อนที่จะส่งต่อไปยัง graph สำหรับ relationship enrichment รูปแบบ retrieval ที่ private/local-first กำลังได้รับความสนใจมากขึ้นในองค์กรที่มีข้อจำกัดด้าน data residency
Knowledge Graph Layer — เก็บ entity, relationship, dependency, และ provenance ทำให้ AI สามารถ traverse ความสัมพันธ์ได้หลาย hop และ reason ว่าการเปลี่ยนแปลงจุดหนึ่งมีผลกระทบกับจุดใดบ้าง
Governance Layer — กำหนดว่า context ใดเชื่อถือได้ ใช้ได้ และใครควรเห็น ทุก entity และ relationship ผ่าน governance check ก่อนที่จะถูกส่งไปยัง agent interface นี่คือ layer ที่แยก enterprise-grade system ออกจาก prototype
Agent Interface Layer — เปิดให้ AI Agent ใช้ memory อย่างมี policy ไม่ว่าจะเป็น API, MCP (Model Context Protocol), tool contract, หรือ query policy แต่ละ use case ควรมี guardrail ของตัวเอง agent ที่ทำ incident analysis ควรได้รับ context ต่างจาก agent ที่ทำ vendor comparison
Human Review Layer — ควบคุม decision ที่มีความเสี่ยงสูงหรือผลกระทบมาก ไม่ใช่ทุก action ของ agent ต้องผ่าน human review แต่ต้องมี checkpoint สำหรับ action ที่ตัดสินใจยากหรือมี consequence ที่ย้อนกลับยาก
Presentation Layer — ทำให้มนุษย์เห็น memory, graph, และ reasoning trace ไม่ว่าจะเป็น dashboard สำหรับ architect, search UI สำหรับ engineer, หรือ report สำหรับ executive สำคัญคือ AI response ควรแสดง citation และ reasoning path ให้ผู้ใช้ตรวจสอบได้
Summary Table
Layer หน้าที่หลัก ผิดพลาดที่พบบ่อย
Source รวม data จากทุก format นำเข้าแค่เอกสาร ข้ามข้อมูล live
Ingestion แปลงข้อมูลดิบ ไม่ handle PDF scan หรือ legacy format
Normalization Schema + metadata + entity ข้ามขั้นนี้ทำให้ graph ไม่ consistent
Vector Retrieval Semantic recall ใช้ standalone โดยไม่มี relationship enrichment
Knowledge Graph Relationship + reasoning Over-engineer ตั้งแต่วันแรก
Governance Trust + permission + audit ใส่ภายหลัง แทนที่จะออกแบบตั้งแต่แรก
Agent Interface Policy-aware access ให้ agent เข้าถึง memory โดยตรงโดยไม่มี guardrail
Human Review Decision checkpoint ข้ามไปเพราะต้องการ full automation
Presentation Transparency + audit trail ไม่แสดง citation หรือ reasoning path
Enterprise AI Memory ไม่ใช่ database ตัวเดียว แต่เป็น stack ที่รวม retrieval, graph, governance และ agent interface เข้าด้วยกัน