Vietnamese + English · Beginner → Advanced

AI Engineering
Mastery

Giáo trình thực chiến cho Coder · Tech Lead · PM · Software Architect.
Học từ nền tảng AI/ML đến LLM, RAG, Agents, AI System Architecture, MLOps/LLMOps, Security, Governance và AI Product Management — với tư duy đủ sâu để thiết kế và xây dựng hệ thống thật.

12
Modules
4
Vai trò / Roles
1
Capstone xuyên suốt
3
Cấp độ / Levels
ROADMAP

Lộ trình học / Learning path

Từ “AI user” → AI builder → AI architect → AI product leader.

01
Foundations
Math · Python
02
ML / DL
Models · Training
03
LLM
Transformers
04
RAG / Agents
Applications
05
Architecture / Ops
Production
06
PM / Cert
Delivery
Memory trick: Model → Context → Tools → Evaluation → Production. Một AI product tốt không chỉ có model; nó cần dữ liệu/context, khả năng hành động, đo chất lượng và vận hành.
BEGINNER

01 · AI Foundations & Mathematics

Nền móng để đọc paper, hiểu model và nói chuyện kỹ thuật chính xác.

AI · Artificial Intelligence

Hệ thống thực hiện nhiệm vụ vốn cần năng lực nhận thức của con người: reasoning, perception, planning, language.

ML · Machine Learning

Thay vì viết mọi rule, ta học pattern từ dữ liệu để dự đoán hoặc ra quyết định.

Deep Learning

ML dùng neural networks nhiều tầng để học representation từ dữ liệu.

Vector · Matrix · Tensor

Vector là điểm trong không gian đặc trưng; matrix là phép biến đổi; tensor tổng quát hóa dữ liệu nhiều chiều.

Loss & Gradient

Loss đo “sai bao nhiêu”. Gradient cho biết nên thay đổi tham số theo hướng nào để giảm loss.

Generalization

Model tốt không chỉ nhớ training set mà còn dự đoán tốt dữ liệu chưa từng thấy.

Analogy: Training giống như học sinh luyện đề. Training data là bài đã học, validation là bài luyện mới, test là bài thi cuối. Học thuộc đề không đồng nghĩa hiểu kiến thức.
Khái niệmTrainingInferenceVí dụ
ModelHọc tham sốDùng tham sốClassifier, LLM
PromptKhông nhất thiết thay model weightsCung cấp context/instructionSystem + user prompt
Fine-tuningCập nhật weightsDùng weights mớiDomain style/task
RAGKhông cần đổi weightsRetrieve context rồi generateQA tài liệu nội bộ
INTERMEDIATE

02–03 · Machine Learning & Deep Learning

Từ thuật toán cổ điển đến neural networks và Transformer.

Machine Learning Engineering

Regression · Classification · Clustering · Trees · Boosting · Anomaly Detection.

Metrics: Accuracy, Precision, Recall, F1, ROC-AUC, MAE, RMSE.

Misconception: Accuracy cao chưa chắc model tốt. Với fraud detection, bỏ sót fraud có thể đắt hơn nhiều so với false positive.

Deep Learning

Neural networks · Backpropagation · Optimizers · CNN · RNN · Attention · Transformer.

Engineering knobs: batch size, learning rate, epochs, regularization, checkpointing.

Rule of thumb: trước khi tăng model size, kiểm tra data quality, leakage, metric và baseline.

Interactive: Loss landscape intuition

Di chuyển learning rate để xem tốc độ “học” minh họa. Đây là mô phỏng khái niệm, không phải training engine.

Loss curve / đường loss (minh họa)High LR → dễ overshoot · Low LR → chậm
ADVANCED

04 · LLM & Generative AI Internals

Hiểu vì sao Transformer, tokens, attention và inference tạo ra năng lực ngôn ngữ.

Transformer mechanism

Tokensinput IDs Self-AttentionQ · K · Vcontextual representation FFN + Layersrepeat blocks→ logits → next token
Analogy: Attention giống một cuộc họp: mỗi token hỏi “ai trong phòng liên quan đến tôi?” rồi tổng hợp thông tin quan trọng.

Core concepts

  • Tokenization: text → token IDs.
  • Embedding: token → vector representation.
  • Attention: weighted interaction giữa các tokens.
  • Logits: điểm số trước sampling.
  • Temperature/top-p: điều chỉnh cách chọn token.
  • Context window: lượng context model có thể xử lý trong một lượt.
Không đồng nhất: context window ≠ model memory. Context là thông tin đưa vào request; weights là kiến thức đã học trong model.

Scale comparison — model/API decision

OptionƯu điểmTrade-offUse case
Small/local modelPrivacy, latency, predictable controlCapability có thể thấp hơnOCR, classification, local assistant
Hosted frontier modelStrong reasoning/coding, ít vận hànhCost, data boundary, vendor dependencyComplex reasoning, agent
Fine-tuned modelBehavior/domain specializationData + training + maintenanceStable specialized task
ADVANCED

05 · RAG / Retrieval-Augmented Generation

Đưa kiến thức bên ngoài model vào đúng thời điểm thay vì cố nhồi mọi thứ vào prompt.

DocumentsPDF · MD · DB Chunk + Embedvectors + metadata Vector Searchretrieve + rerank LLManswer + citation offline ingestion / indexing Not to scale · Không theo tỷ lệ.
Retrieval quality

Recall@k, precision, reranking, metadata filtering.

Generation quality

Faithfulness, relevance, citation correctness.

Failure modes

Bad chunking, stale docs, retrieval miss, prompt injection.

RAG sizing calculator

Estimated chunks: 40,000

Đây là ước tính planning; kích thước token/chunk thực tế phụ thuộc tài liệu và tokenizer.

ADVANCED

06 · AI Agents & Workflow Automation

Agent không chỉ “chat”; agent có state, tools, policy, feedback và khả năng thực hiện workflow.

Workflow

Luồng xác định trước. Tốt khi business rule rõ và cần predictability.

Agent

Model chọn bước/tool dựa trên mục tiêu và context. Mạnh hơn nhưng khó kiểm soát hơn.

Human-in-the-loop

Hành động rủi ro cần approval. Ví dụ merge code, gửi email, xóa dữ liệu, giao dịch.

Memory trick: Brain = Model · Notebook = Context/Memory · Hands = Tools · Boss = Human approval · QA = Evaluation.

Agent safety gate

1
Plan
2
Check permissions
3
Execute low-risk tools
4
Human approve high-risk
ARCHITECT

07 · AI System Architecture

Thiết kế hệ thống không phụ thuộc một model duy nhất.

ClientWeb / Mobile AI Gatewayauth · routingrate limit · policyobservability LLM APIprovider A/B RAG / ToolsDB · APIs Telemetrylogs · traces · eval Not to scale · Thiết kế minh họa.
Quality

Accuracy/relevance/faithfulness trước latency.

Reliability

Timeout, retry, fallback, idempotency, circuit breaker.

Economics

Token cost, cache hit rate, model routing, throughput.

Decision matrix

DecisionQuestionEvidence cần có
Cloud vs localPrivacy, latency, capability?Benchmark + threat model
RAG vs fine-tuneKnowledge changing hay behavior stable?Eval set + maintenance cost
Single vs multi-agentComplexity có thật sự cần?Workflow baseline
PRODUCTION

08 · Evaluation, MLOps & LLMOps

Nếu không đo được quality, bạn không biết release mới tốt hơn hay tệ hơn.

Offline evaluation

Golden dataset, regression suite, expected outputs, human labels.

Online observability

Latency, error rate, token usage, tool failures, user feedback.

Release discipline

Version prompt/model/data, canary, rollback, approval gates.

Cost estimator

Estimated API token cost: $95.00/month

Giá chỉ là giả định để học cách tính. Provider pricing thay đổi; không dùng con số này làm báo giá.

ARCHITECT

09 · AI Security, Safety & Governance

AI có thêm attack surface: prompt, context, model, tools và data.

Threats

  • Prompt injection / indirect injection
  • Data leakage & PII exposure
  • Tool abuse / excessive agency
  • Supply-chain & malicious documents
  • Model output used without validation

Controls

  • Least privilege + scoped credentials
  • Input/output validation
  • Sandbox dangerous tools
  • Audit trail & approval gates
  • Red-team + regression evaluation
Architect rule: Đừng để LLM trực tiếp có quyền lực tương đương application service account. Model nên đề xuất hành động; policy layer quyết định hành động nào được phép.
PRODUCT

10–11 · AI Product Management & AI-Assisted Engineering

PM và Tech Lead phải biến AI capability thành outcome đo được.

AI PRD checklist

  1. User problem & non-goals
  2. Why AI? Baseline không-AI
  3. Data availability & rights
  4. Quality threshold / acceptance criteria
  5. Latency / cost budget
  6. Risk & human oversight
  7. Rollout + feedback loop

AI-assisted SDLC

Requirement → Context → Plan → Code → Test → Review → Deploy → Observe.

AI coding agent cần repository instructions, architecture context, test constraints và approval boundaries.

Ticket ↓ AI reads PRD + ADR + codebase rules ↓ Implementation plan ↓ Human approval ↓ Code + tests ↓ Review + security checks ↓ PR

AI Product success formula

Value = Quality × Adoption × Frequency − Cost − Risk

Đây là mental model để thảo luận trade-off, không phải công thức tài chính.

CERTIFICATION

12 · Certification & Professional Readiness

Chứng chỉ là checkpoint; năng lực thực chiến mới là mục tiêu cuối.

AWS AI Practitioner

Foundation: AI/ML, GenAI, responsible AI và cloud concepts.

Official →

Google Cloud ML Engineer

ML engineering, productionization, pipelines và monitoring.

Official →

Google Gen AI Leader

GenAI strategy, business use cases và responsible adoption.

Official →

DeepLearning.AI ML

Machine Learning foundations + hands-on programming.

Program →

Academic degree

Bằng cử nhân/thạc sĩ/tiến sĩ phải đến từ chương trình của cơ sở đào tạo có thẩm quyền. HTML này là curriculum, không phải bằng cấp.

Fast-changing facts

Tên kỳ thi, exam objectives, pricing và cloud services thay đổi. Luôn kiểm tra trang chính thức trước khi đăng ký.

Recommended order: Foundations → ML/DL → LLM/RAG → Architecture → MLOps/Security → chọn certification theo role. Không cần thi mọi chứng chỉ.
CAPSTONE

Capstone — AI Engineering Assistant

Một project xuyên suốt để biến kiến thức thành portfolio.

Phase 1

LLM API + structured output + logging.

Phase 2

RAG + citations + evaluation dataset.

Phase 3

Agent + tools + approval gates.

Phase 4

Security + red-team + regression.

Phase 5

Production architecture + monitoring + cost.

Phase 6

PRD + Architecture + ADR + demo + defense.

Graduation evidence: source code · architecture diagram · ADRs · tests · evaluation report · threat model · cost estimate · demo · technical defense.
VOCABULARY

Core AI Vocabulary

15 thuật ngữ phải dùng được trong technical discussion.

EnglishTiếng ViệtExample sentence
InferenceSuy luận / chạy modelThe model is fast during inference.
EmbeddingVector biểu diễnWe store document embeddings for retrieval.
AttentionCơ chế chú ýAttention connects tokens contextually.
Fine-tuningTinh chỉnh modelFine-tuning changes model behavior for a task.
RAGTruy xuất tăng cường sinhRAG grounds answers in external documents.
ChunkingChia tài liệu thành đoạnBad chunking can hurt retrieval quality.
RerankingXếp hạng lạiReranking improves the relevance of retrieved chunks.
HallucinationThông tin bịa / không được hỗ trợWe need evaluation to detect hallucinations.
AgentTác tử AIThe agent can call approved tools.
Tool callingGọi công cụTool calling lets the model interact with APIs.
EvaluationĐánh giáEvaluation should run before every model release.
LatencyĐộ trễLatency is a product requirement.
TokenĐơn vị token hóaToken usage affects API cost.
GuardrailRào chắn an toànGuardrails restrict high-risk actions.
ObservabilityKhả năng quan sát hệ thốngObservability helps debug agent failures.
MINI GAME

AI Mastery Quiz

10 câu · 10 điểm/câu · streak bonus. Best score được lưu localStorage.