AI Solution Architect: from System Analyst to AI Architect
บทที่ 12/12

Capstone Project

Capstone: AI Assistant for a Bank Call Center

End-to-end design case แปลง business problem เป็น requirements และ quality attributes, design architecture แบบ RAG + agent + API gateway + core APIs, วาง security, compliance และ LLMOps, วางแผน rollout แล้วส่ง solution blueprint, ADR 3 ฉบับ และ risk register ตาม rubric

⏱ ประมาณ 50 นาที

บทนี้รวมทุกอย่างในคอร์สเข้าด้วยกันเป็นงานเดียว คุณจะทำหน้าที่ AI Solution Architect ของธนาคารสมมติแห่งหนึ่ง ได้รับโจทย์จาก executives และต้องส่ง deliverables แบบเดียวกับที่ใช้ในการทำงานจริง

The brief

ธนาคารมี call center พนักงาน 300 คน รับสายวันละประมาณ 9,000 สาย คำถามส่วนใหญ่เป็นเรื่องบัตรเครดิต ค่าธรรมเนียม และสถานะคำขอ พนักงานใหม่ใช้เวลาค้นคู่มือระหว่างสายนาน ลูกค้ารอนาน executives ต้องการ “AI assistant” ที่ช่วยพนักงานตอบได้เร็วและถูกต้องขึ้น และในระยะถัดไปอยากเปิดให้ลูกค้าถามเองผ่าน mobile app และ LINE OA

Assumptions เพิ่มเติม

  • คู่มือและ policies ราว 400 ฉบับ update ทุกเดือน บางฉบับเห็นได้เฉพาะ supervisors
  • Core banking เป็น legacy system มี API อ่านสถานะบัตรและสถานะคำขอ แต่รองรับ load ได้จำกัด
  • CRM มี API สำหรับ create ticket
  • ธนาคารใช้ Azure เป็น primary cloud มี landing zone อยู่แล้ว
  • Customer data ต้อง process ตาม data residency policy ของธนาคาร

Step 1: Requirements & quality attributes

แยก business goals ให้ measurable ก่อน (บทที่ 2 (Architecture Fundamentals & Decisions))

Business goalMetric
ลดเวลาต่อสายaverage handling time (AHT) ลดลง 10% ในกลุ่ม pilot
ตอบถูกต้องสม่ำเสมอgroundedness ≥ 90% บน eval set, complaints เรื่องข้อมูลผิดไม่เพิ่มขึ้น
Onboarding พนักงานใหม่เร็วขึ้นtime-to-proficiency ลดลง

แล้วเขียน quality attribute scenarios อย่างน้อยด้าน performance, availability, security และ compliance เช่น “เมื่อ LLM ไม่ตอบภายใน 8 วินาที ระบบต้องแสดง links ของ documents ที่ search เจอให้พนักงานแทน”

Capacity estimate สมมติ peak hour มีพนักงาน 300 คนถาม assistant เฉลี่ยคนละ 0.5 คำถามต่อนาที = 150 requests ต่อนาที แต่ละ request มี input 3,000 tokens และ output 400 tokens → ราว 510,000 tokens per minute (TPM) ตัวเลขนี้ใช้ขอ TPM quota ของ deployment และ design load balancing ที่ AI gateway ทั้งนี้ rate limiter มักประเมินแต่ละ request จาก input รวมกับ max output tokens ที่ตั้งไว้ ไม่ใช่ output จริง จึงควรขอ quota เผื่อไว้ (ถ้าตั้ง max 600 tokens จะเป็น 150 × 3,600 = 540,000 TPM)

Step 2: Architecture

Capstone architecture: channels (bank app, LINE OA, agent desktop) ผ่าน API Management ที่ทำ authentication และ quota ไปยัง agent orchestrator ที่มี guardrails และ content safety ซึ่งเรียก LLM บน Azure OpenAI, RAG สำหรับ policies และ FAQ, Core API แบบ read-only และ CRM เพื่อ create ticket ถ้าเกินความสามารถจะ escalate เป็น human handoff ไปยัง call-center agent โดยทุก layer ใช้ Entra ID, private network, audit log, eval และ monitoring
Starting design คุณต้องอธิบาย rationale ของทุกกล่อง และปรับ design ได้ถ้ามีเหตุผลที่ดีกว่า

Design decisions ที่ต้องตัดสินใจและอธิบาย

  • RAG (บทที่ 4 (RAG Architecture)) chunking ของคู่มือ, hybrid search, security trimming สำหรับคู่มือของ supervisors และ monthly re-index
  • Agent (บทที่ 5 (AI Agents & Orchestration)) tools ที่อนุญาต, แยก read กับ write, จุดที่ต้องมี human approval และเหตุผลว่าทำไม phase แรกเลือก single agent หรือ workflow
  • Integration (บทที่ 6 (APIs, Microservices & Legacy Integration)) APIM หน้าทุก channel, anti-corruption layer หน้า core, cache และ rate limit เพื่อปกป้อง core, idempotency key สำหรับการ create ticket
  • Platform (บทที่ 7 (Cloud-native on Azure)) compute ที่เลือก, private endpoints, managed identity และ fallback เมื่อ LLM ล่มหรือเกิน quota

Step 3: Security & compliance

ใช้ threat model และ OWASP Top 10 for LLM (บทที่ 10 (Security, Governance & Compliance)) กับ design ของคุณ อย่างน้อยต้องตอบ

  • Customer identity ที่ใช้เรียก core API มาจากที่ใด และป้องกันการดู data ของคนอื่นอย่างไร
  • PII ใดเข้า prompt บ้าง ลดได้อีกไหม และ logs เก็บอะไร retention นานเท่าไร
  • Data ถูก process ที่ region ใด ตรงกับ data residency policy หรือไม่
  • เมื่อเปิดให้ลูกค้าใช้เอง (phase 2) risks ใดเพิ่มขึ้น และต้องเพิ่ม controls อะไร

Step 4: LLMOps & measurement

(บทที่ 9 (MLOps & LLMOps)) กำหนด

  • Initial eval set, sources ของคำถาม และวิธีเพิ่ม production failures เข้า eval set
  • Release gate ของ prompt และ configuration
  • Dashboard ที่ติดตาม: quality, latency, tokens และ cost, handoff rate และ user feedback
  • Migration plan เมื่อ model version ปัจจุบันจะถูก retire

Step 5: Rollout

(บทที่ 11 (PoC, Technology Evaluation & Stakeholders))

PhaseScopeExit criteria
PoC (6 สัปดาห์)RAG บนคู่มือ, testers 20 คน, ยังไม่ integrate coreผ่าน quality และ cost criteria
Pilot (2–3 เดือน)พนักงาน 50 คน, integrate core แบบ read-only, create ticket ได้AHT ลดลงตาม target, ไม่มี data incident
Scale out ทั้ง call centerพนักงานทั้งหมด ทยอยเพิ่มแบบ canarymetrics คงที่เมื่อ load เพิ่ม
Phase 2ลูกค้าใช้เองผ่าน mobile app และ LINE OAผ่าน risk assessment และ approval จาก committees ที่เกี่ยวข้อง

Deliverables

  1. Solution blueprint (6–10 หน้า): executive summary 1 หน้า, requirements และ quality attribute scenarios, C4 Context และ Container, data flow ที่ระบุ PII, Azure service mapping, capacity และ cost estimate, rollout plan
  2. ADR 3 ฉบับ เลือกเรื่องที่สำคัญจริง เช่น
    • ADR-001 เริ่มจาก employee assistant ก่อน customer-facing assistant
    • ADR-002 hybrid search และ security trimming บน Azure AI Search
    • ADR-003 workflow + single agent แทน multi-agent ใน phase แรก
  3. Risk register อย่างน้อย 8 items ครอบคลุม technical, security, regulatory และ operational risks
ID   Risk                                     Likelihood  Impact  Mitigation                                   Owner
R-01 คำตอบอ้าง policy ที่ยกเลิกแล้ว              Medium      High    filter effective_date, monthly re-index      KM team
R-02 Indirect prompt injection ใน documents     Low         High    scan documents ก่อน index, Prompt Shields      Security
R-03 Core API รับ load ไม่ไหว                    Medium      High    cache, rate limit ที่ APIM, circuit breaker     Platform
...

Rubric

CriterionWeightExcellentAdequateNeeds work
Business alignment15%ทุกส่วนของ design trace กลับไปยัง measurable metricsมี metrics แต่บางส่วนของ design ไม่ trace กลับไม่มี measurable metrics
Architecture soundness25%RAG, agent, integration และ platform ถูกต้อง เหมาะกับโจทย์ ไม่ over-engineerใช้ได้แต่มี weaknesses ที่ไม่ได้อธิบายขาด components สำคัญหรือใช้ pattern ผิด
Security & compliance20%controls enforce ด้วยระบบนอก model ครอบคลุม threats หลัก ตอบคำถาม auditor ได้ครอบคลุมบางส่วน พึ่ง prompt ในบางจุดไม่ได้พิจารณาอย่างเป็นระบบ
ADR quality15%options จริง rationale ชัด บอก trade-offs ตรงไปตรงมามี rationale แต่ไม่ได้เทียบ optionsเป็นแค่คำบรรยาย decision
LLMOps & rollout15%มี eval, release gate, monitoring และ exit criteria ทุก phaseมีบางส่วนไม่มีแผนวัดผลหลัง release
Communication10%executives เข้าใจจากหน้าแรก dev team นำไปสร้างต่อได้อ่านเข้าใจ แต่ไม่ได้แยก audienceสับสน หรือ technical เกินไปสำหรับ executives

แบบทดสอบ

Phase แรกของ project นี้ควรเริ่มอย่างไร

Peak hour มี 150 requests ต่อนาที แต่ละ request มี input 3,000 tokens และ output 400 tokens ต้องการ quota รวมกี่ tokens per minute (TPM)

Core banking รับ load ได้จำกัด ควรปกป้องอย่างไร
ADR ที่ได้ Excellent ตาม rubric ต้องมีอะไร