“Mình tự build đi, dùng open-source free mà”
Câu này tôi nghe ít nhất 3 lần mỗi tháng từ các CTO tại Việt Nam. Và gần như lần nào, 6 tháng sau, câu chuyện đều giống nhau:
“Free” hóa ra tốn 3 Senior Engineers × 6 tháng = $180,000 tiền nhân sự. Model chạy chậm hơn API. Infra cost cao hơn dự kiến. Team bảo trì kiệt sức. Cuối cùng business vẫn chưa có solution production-ready.
Nhưng ngược lại, tôi cũng thấy những công ty bỏ $300K mua enterprise AI SaaS, rồi phát hiện 70% features không dùng, vendor lock-in nghiêm trọng, và khi cần customize thì phải trả thêm gấp đôi.
Cả hai approach đều có thể đúng — vấn đề là đúng cho AI NÀO.
Bài này sẽ cho bạn framework để không mắc sai lầm đó.
3 Approach: Build vs Buy vs Hybrid
Approach 1: Build (Tự xây)
Nghĩa là: Dùng open-source models (Llama, Mistral, etc.), tự deploy infrastructure, tự xây application layer.
Phù hợp khi: - Data cực kỳ nhạy cảm, không thể gửi ra ngoài (quốc phòng, ngân hàng core) - Use case rất đặc thù, không có SaaS nào fit (domain-specific AI cho ngành rất niche) - Team có đủ ML Engineers (ít nhất 3-5 người senior) - Bạn xem AI là core competency, không phải supporting tool
Chi phí thực tế (Year 1):
Ưu điểm: - Full control over data, model, và roadmap - Không vendor lock-in - Có thể optimize cho specific use case - IP ownership (model là của bạn)
Nhược điểm: - Time-to-value chậm (6-12 tháng minimum) - Cần recruit và retain ML talent (rất khó tại VN) - Maintenance burden lớn — model updates, infra scaling, security patches - Opportunity cost: engineers làm AI platform thay vì product features
Approach 2: Buy (Mua SaaS)
Nghĩa là: Dùng AI SaaS solution (Microsoft Copilot, Salesforce Einstein, ServiceNow AI, etc.) hoặc AI APIs (OpenAI, Anthropic, Google).
Phù hợp khi: - Use case phổ biến (customer service, content generation, code assistant) - Cần go-live nhanh (< 3 tháng) - Team không có ML expertise - AI là supporting tool, không phải core product
Chi phí thực tế (Year 1):

Ưu điểm: - Fast time-to-value (tuần, không phải tháng) - Vendor lo maintenance, updates, scaling - Không cần ML team - Predictable costs (subscription model)
Nhược điểm: - Vendor lock-in (data format, integration, workflow) - Limited customization (phải fit vào cách vendor thiết kế) - Data privacy concerns (data gửi cho vendor) - Price increases — vendor tăng giá, bạn không có lựa chọn - Feature dependency — vendor discontinue feature bạn đang dùng
Approach 3: Hybrid (Khuyến nghị cho đa số)
Nghĩa là: Dùng AI APIs/SaaS cho standard use cases, tự build thin layer cho customization và orchestration, giữ option self-host cho critical components.
Phù hợp khi: - Đa số doanh nghiệp VN quy mô trung bình trở lên - Mix giữa standard và custom use cases - Muốn fast start nhưng maintain flexibility - Data sensitivity varies theo use case
Chi phí thực tế (Year 1):

Decision Matrix: Chọn approach nào cho use case nào?
Practical rule cho doanh nghiệp VN:
• Startup / SME (< 100 người): Buy. Không có resource để build. Dùng API + SaaS, focus vào product.
• Mid-size (100-500 người): Hybrid. Buy cho standard, build thin layer cho differentiation.
• Enterprise (500+ người): Hybrid moving toward Build cho core use cases. Buy cho non-core.
Total Cost of Ownership: So sánh thực tế
Hãy so sánh 3 approaches cho cùng một use case: AI-powered customer support (xử lý 5,000 tickets/tháng)
Option A: Self-hosted Open Source
LLM: Llama 3.1 70B, self-hosted on GPU cluster
Stack: vLLM + LangChain + custom RAG + PostgreSQL
Year 1 Costs:
- GPU instances (4x A100): $96,000/năm
- ML Engineer (2 FTE): $120,000
- Platform Engineer (1 FTE): $60,000
- Development time: 6 tháng trước khi production
- Ongoing maintenance: $5,000/tháng
Total Year 1: ~$336,000
Total Year 2: ~$216,000
Total 3-Year: ~$768,000
Time to production: 6 tháng
Customization: Unlimited
Data control: Full
Option B: Enterprise SaaS (vd: Zendesk AI, Intercom)
Stack: Vendor platform, pre-built AI features
Year 1 Costs:
- License: $60,000/năm (50 agents)
- Setup & integration: $30,000
- Training: $5,000
- API overages: $12,000/năm
Total Year 1: ~$107,000
Total Year 2: ~$72,000
Total 3-Year: ~$251,000
Time to production: 4-8 tuần
Customization: Limited (within vendor framework)
Data control: Vendor-dependent
Option C: Hybrid (AI API + Custom Thin Layer)
Stack: Claude/GPT API + custom orchestration layer +
company knowledge base
Year 1 Costs:
- AI API costs: $24,000/năm
- Platform Engineer (1 FTE): $60,000
- Custom development: $30,000
- Infrastructure: $12,000/năm
- Basic ticketing SaaS: $12,000/năm
Total Year 1: ~$138,000
Total Year 2: ~$108,000
Total 3-Year: ~$354,000
Time to production: 2-3 tháng
Customization: High (own the orchestration)
Data control: High (API calls, not vendor storage)
So sánh tổng quan
“Thin AI Layer” — Architecture pattern giữ flexibility
Đây là architecture pattern mà tôi recommend cho đa số doanh nghiệp VN chọn Hybrid approach:
Concept
Thay vì build full AI stack hoặc depend hoàn toàn vào 1 vendor, bạn xây một “thin layer” ở giữa:
Thin AI Layer làm gì
1. Routing Logic: Quyết định request nào gửi cho provider nào
– Sensitive data → Self-hosted model
– Complex reasoning → Claude/GPT-4
– Simple tasks → Cheaper/faster model
2. Prompt Management: Centralized prompt templates
– Version control cho prompts
– A/B testing different prompts
– Không phải hardcode prompts trong application code
3. Caching Layer: Tránh gọi AI API cho repeated queries
– Semantic caching (similar questions → cached answer)
– Giảm 30-50% API costs
4. Context Management: Quản lý conversation history, knowledge base
– RAG (Retrieval Augmented Generation) pipeline
– Company knowledge base integration
– User context và preferences
5. Monitoring & Logging: Track mọi AI interaction
– Latency, cost, quality metrics
– Anomaly detection
– Compliance audit trail
6. Fallback Logic: Khi primary provider down
– Auto-switch giữa providers
– Graceful degradation (AI down → route to human)
– Rate limit handling
Tại sao “Thin”
Layer này KHÔNG nên phức tạp. Target: - 1-2 engineers xây trong 4-6 tuần - < 5,000 lines of code - Standard tech stack (Python/Node.js, Redis, PostgreSQL) - Không cần ML expertise — chỉ cần good software engineering
Lợi ích chiến lược
• Không vendor lock-in: Swap OpenAI ↔ Claude ↔ self-hosted trong hours, không phải months
• Cost optimization: Route tasks đến cheapest viable provider
• Data control: Bạn quyết định data nào đi đâu
• Compliance ready: Centralized logging cho audit
• Future-proof: AI landscape thay đổi nhanh — thin layer cho bạn agility
Vendor Lock-in: Risks và Exit Strategy
5 dấu hiệu bạn đang bị lock-in
1. Data format proprietary: Export data từ vendor ra format khác mất > 1 tuần
2. Workflow embedded: Business process design around vendor features, không phải business needs
3. Training investment: Team chỉ biết dùng tool đó, không transferable skill
4. Integration depth: 10+ integrations đều qua vendor ecosystem
5. Contract trap: Multi-year contract với early termination penalty
Exit Strategy cho mỗi approach
Nếu đang dùng SaaS AI: - Maintain data export routine (monthly) - Document tất cả AI workflows bằng vendor-agnostic format - Ensure API layer giữa app và vendor (không direct integration) - Negotiate contract: annual renewal, no auto-renew, data portability clause
Nếu đang dùng AI APIs: - Thin AI Layer (xem trên) — abstract provider behind interface - Test backup provider quarterly (1 sprint dành cho “provider switch drill”) - Monitor provider pricing changes — có alert khi price tăng > 20%
Nếu đang self-host: - Document deployment scripts (reproducible) - Avoid custom model formats — stick to ONNX, Hugging Face standard - Keep option mở: self-host + API hybrid
Lời khuyên cuối: Đừng quyết định based on technology hype
Tôi thấy một pattern nguy hiểm: CTO đọc blog post về self-hosted AI, excited, và commit 6 tháng engineering effort. Hoặc CTO thấy demo SaaS, impressed, và ký hợp đồng 3 năm.
Cả hai đều sai vì quyết định dựa trên technology, không dựa trên business need.
Quy trình đúng:
1. Bắt đầu từ business problem: “Chúng ta cần giảm ticket resolution time 50%”
2. Define requirements: Data sensitivity, scale, customization needs, timeline
3. Map requirements vào decision matrix: Build? Buy? Hybrid?
4. Pilot nhỏ trước (< $20K, < 4 tuần): Validate approach before committing
5. Scale có kiểm soát: Thin AI Layer, monitoring, exit strategy sẵn
Quyết định Build vs Buy không phải technical decision — đó là business strategy decision mà CIO phải own.
Bài tiếp theo: “Từ 1 pilot đến 10 teams — Scaling AI across the enterprise mà không vỡ trận”







