Mô hình tư duy của AI EngineerThe AI Engineer's Mental Model

Model là phần dễ nhấtThe model is the easy part

Chín trụ cột của AI engineering, cùng cái giá phải trả cho mỗi lựa chọn. Bắt đầu từ phần bạn có thể bỏ qua.Nine pillars of AI engineering and the price each choice carries. Start with the part you can skip.

Models are amazing.
Systems create value.
People make it useful.

Chọn cái nàoWhat to reach for

Đọc mục này trước phần tra cứu chi tiết. Phần lớn nhu cầu dừng lại ở bảng đầu tiên.Read this before the reference section. Most needs stop at the first table.

Trước hết: khi nào không cần đến trụ nào cảFirst: when you need none of the nine

Tình huốngPhương án rẻ nhấtVì sao đừng xây
Cần soạn hoặc tóm tắt vài chục lần một thángDùng thẳng ChatGPT / Claude / GeminiChi phí kỹ thuật bằng 0, chất lượng cao hơn thứ bạn xây trong 2 tuần
Cần AI trong công cụ đang dùngBật AI có sẵn của Notion, Slack, Google WorkspaceSSO, phân quyền, log đã có — ba thứ tốn công nhất
Dữ liệu có cấu trúc, câu hỏi cố địnhSQL, bảng tính, regex, ruleRẻ hơn 100 lần, đúng 100%, giải thích được
Cần đúng tuyệt đối: tiền, pháp lý, y tếCode tất định cộng người duyệtLLM đảm bảo tính hợp lý, không đảm bảo tính đúng
Dưới 50 request mỗi ngày và có người rảnhLàm tayChi phí xây, vận hành và eval lớn hơn chi phí nhân sự
Chưa có ai phàn nàn về việc nàyKhông làm gìKhông có bài toán thì không có thước đo thành công
SituationCheapest optionWhy not build
Drafting or summarising a few dozen times a monthUse ChatGPT / Claude / Gemini directlyZero engineering cost, better than anything built in two weeks
You want AI inside a tool you already useTurn on the built-in AI in Notion, Slack, WorkspaceSSO, permissions and logs already exist — the hardest parts
Structured data, fixed questionsSQL, a spreadsheet, regex, rules100× cheaper, exactly correct, explainable
Absolute correctness: money, legal, medicalDeterministic code plus a human reviewerAn LLM guarantees plausibility, never correctness
Under 50 requests a day and someone has capacityDo it by handBuild, run and eval cost more than the headcount
Nobody has complained yetDo nothingNo problem means no definition of success

Cần ít nhất hai dấu hiệu sau mới nên xây: khối lượng lặp lại lớn và tăng đều; đầu vào phi cấu trúc không viết được rule; phải nhúng vào luồng có sẵn với phân quyền hoặc ROI đo được.You need at least two of these before building: high and growing repetition; unstructured input rules can't cover; it must live inside an existing flow with permissions or measurable ROI.

Rồi mới đến cây quyết địnhThen the decision tree

Có bài toán người dùng thật chưa?
├─ chưa ─► Dừng. Đi tìm bài toán trước.        → 7
└─ rồi
   ├─ Prompt trần + model tốt nhất đủ chưa?
   │  └─ đủ ─► Ship. Đừng xây thêm gì.     → baseline
   └─ chưa, và nó sai vì:
      ├─ thiếu DỮ KIỆN của bạn ─► RAG          → 3, 5
      ├─ sai ĐỊNH DẠNG / giọng ─► ràng buộc
      │   output, few-shot, rồi fine-tune      → 3, 2
      ├─ lúc đúng lúc sai, không đo ─► eval    → 6
      ├─ cần NHIỀU BƯỚC ─► workflow cố định
      │   trước, agent sau                     → 4
      ├─ chậm hoặc đắt ─► đo trace trước       → 4, 1
      └─ chạm PII / pháp lý ─► dừng, xử lý     → 8
Do you have a real user problem?
├─ no  ─► Stop. Go find one first.             → 7
└─ yes
   ├─ Does a plain prompt on the best model do it?
   │  └─ yes ─► Ship it. Build nothing.   → baseline
   └─ no, and it fails because:
      ├─ it lacks YOUR FACTS ─► RAG            → 3, 5
      ├─ wrong FORMAT / tone ─► output
      │   control, few-shot, then fine-tune    → 3, 2
      ├─ right sometimes, unmeasured ─► eval   → 6
      ├─ needs MANY STEPS ─► fixed workflow
      │   first, agent later                   → 4
      ├─ too slow or costly ─► trace first     → 4, 1
      └─ touches PII / regulation ─► fix now   → 8

Chín trụ cộtThe nine pillars

Màu cho biết nhóm chức năng, không phải trang trí. Quy ước ở cuối trang.Colour marks the family, it isn't decoration. The key is in the footer.

1

Nền tảngFoundations

Toán & xác suất · Lập trình · Data engineering · ML cơ bảnMath & statistics · Programming · Data engineering · ML basics

NềnBase

Bốn kỹ năng không dính trực tiếp đến LLM nhưng quyết định trần năng lực và khả năng tự chẩn đoán của bạn.Four skills with no direct link to LLMs that nonetheless set your ceiling and your ability to diagnose your own systems.

Toán & xác suất ─┐
Lập trình        ├─► trần năng lực
Data engineering ├─► + tự debug được
ML cơ bản        ┘
Math & probability ─┐
Programming         ├─► your ceiling
Data engineering    ├─► + self-debugging
ML basics           ┘

Dùng choUse it for

  • Tính chi phí một tính năng trước khi viết code
  • Giải thích vì sao p95 gấp 4 lần p50
  • Thiết kế job nạp 200k tài liệu không sập rate limit
  • Costing a feature before writing code
  • Explaining why p95 is 4× p50
  • Ingesting 200k documents without blowing the rate limit

ĐượcYou gain

  • Tự chẩn đoán thay vì đổi model cầu may
  • Không lệ thuộc framework — framework chết mỗi 8–12 tháng
  • Ước lượng chi phí trước khi build, sai số dưới 30%
  • Diagnose instead of swapping models and hoping
  • No framework lock-in — frameworks die every 8–12 months
  • Estimate cost before building, usually within 30%

MấtYou lose

  • Học chậm, không tạo ra demo nào để khoe
  • Dễ sa vào hố học toán vô hạn rồi không ship
  • Nền mạnh không cứu được sản phẩm sai bài toán
  • Slow to learn and produces no demo
  • Easy to fall into the learn-maths-forever hole
  • Strong foundations won't save the wrong product

Đánh đổi.The trade-off. Chọn đầu tư nền tảng là đổi tốc độ ra sản phẩm trong 3 tháng đầu lấy trần năng lực và khả năng tự debug trong 3 năm sau.Investing in foundations trades speed to ship in the first three months for your ceiling and debugging ability over the next three years.

Dấu hiệu nhận biết:Tell-tale sign: Bạn không giải thích được vì sao cùng một prompt cho hai kết quả khác nhau.You can't explain why the same prompt produced two different answers.

2

Mô hình ngôn ngữ lớnLarge language models

Kiến trúc · Pretraining · Fine-tuning · Đánh giá modelArchitecture · Pretraining · Fine-tuning · Evaluation

NềnBase

Hiểu cỗ máy bạn đang gọi: nó học thế nào, dự đoán ra sao, sửa bằng cách nào, đánh giá bằng gì.Understanding the machine you're calling: how it learns, how it predicts, how you change it, how you judge it.

text ─► token ─► embedding ─► attention xN
                              │
       token kế ◄── sampling ◄┘
text ─► tokens ─► embeddings ─► attention xN
                                 │
      next token ◄── sampling ◄──┘

Dùng choUse it for

  • Chọn cỡ model: nhỏ cho trích xuất, lớn cho suy luận nhiều bước
  • Quyết định giữa prompt / RAG / fine-tune thay vì thử ngẫu nhiên
  • Ước lượng hoá đơn của một chuỗi 10 bước × 3k token
  • Sizing the model: small for extraction, large for multi-step reasoning
  • Choosing between prompting, RAG and fine-tuning instead of guessing
  • Costing a 10-step chain at 3k tokens per step

ĐượcYou gain

  • Chọn đúng model thường cắt 50–90% chi phí, chất lượng không đổi
  • Bỏ sớm những ý tưởng kiến trúc không thể chạy được
  • LoRA chỉnh hành vi với vài trăm đô thay vì vài chục nghìn
  • The right model often cuts 50–90% of cost at unchanged quality
  • Kill architecturally impossible ideas early
  • LoRA shapes behaviour for hundreds, not tens of thousands

MấtYou lose

  • Benchmark công khai bị nhiễm dữ liệu, không dự đoán được kết quả của bạn
  • Fine-tune tạo nợ: model nền lên phiên bản là phải làm lại
  • Model đóng là hộp đen, nhà cung cấp đổi lúc nào bạn không biết
  • Public benchmarks are contaminated and predict little about your task
  • Fine-tuning creates debt: every base upgrade means redoing it
  • Closed models are black boxes; providers change them silently

Đánh đổi.The trade-off. Chọn fine-tune là đổi tính linh hoạt và chi phí vận hành lâu dài lấy sự ổn định hành vi và prompt ngắn hơn.Fine-tuning trades flexibility and long-run operational cost for behavioural stability and shorter prompts.

Dấu hiệu nhận biết:Tell-tale sign: Bạn định fine-tune để dạy model kiến thức mới. Fine-tune dạy hành vi; RAG cấp kiến thức.You're about to fine-tune to teach new knowledge. Fine-tuning teaches behaviour; RAG supplies knowledge.

3

Prompt & ngữ cảnhPrompting & context

Prompt engineering · Quản lý ngữ cảnh · RAG · Ràng buộc outputPrompt engineering · Context management · RAG · Output control

XâyBuild

Quyết định cái gì vào cửa sổ ngữ cảnh, theo thứ tự nào, và output bị ràng buộc ra sao. Đòn bẩy rẻ nhất trong cả chín trụ.Deciding what enters the context window, in what order, and how the output is constrained. The cheapest lever of all nine.

┌──────── context window ────────┐
│system│few-shot│tài liệu│  user │
└────────────────────────────────┘
   ▲ nhớ kỹ   ▲ dễ quên   ▲ nhớ kỹ
┌──────── context window ────────┐
│system│few-shot│retrieved│ user │
└────────────────────────────────┘
  ▲ salient  ▲ forgotten  ▲ salient

Dùng choUse it for

  • Trợ lý trả lời theo tài liệu nội bộ, có trích nguồn
  • Trích xuất hoá đơn/CV về đúng JSON schema
  • Nén hội thoại 200 lượt xuống còn 2k token
  • An assistant answering from internal documents, with citations
  • Extracting invoices or CVs into a strict JSON schema
  • Compressing a 200-turn conversation into 2k tokens

ĐượcYou gain

  • Đổi trong vài phút, không train, không deploy lại model
  • Structured output biến LLM thành hàm dùng được trong code tất định
  • Sửa tài liệu là câu trả lời đổi ngay
  • Changes take minutes: no training, no redeploy
  • Structured output turns the LLM into a callable function
  • Edit the document and the answer changes immediately

MấtYou lose

  • Prompt rất giòn: đổi model là chất lượng có thể tụt ngay
  • Lost in the middle: phần giữa prompt dài bị bỏ qua
  • Prompt rải rác trong code là nợ kỹ thuật không ai thấy
  • Prompts are brittle: change model and quality can drop at once
  • Lost in the middle: the centre of a long prompt gets ignored
  • Prompts scattered through code are invisible debt

Đánh đổi.The trade-off. Nhồi thêm ngữ cảnh là đổi chi phí, độ trễ và độ nhiễu lấy độ chính xác trên những câu hỏi cần dữ kiện cụ thể.Stuffing more context trades cost, latency and noise for accuracy on questions that need specific facts.

Dấu hiệu nhận biết:Tell-tale sign: Model quên thứ bạn nói giữa cuộc hội thoại — đó là quản lý ngữ cảnh, không phải model kém.The model forgets what you said mid-conversation — that's context management, not a weak model.

4

Hệ thống & công cụSystems & tools

Điều phối · Tools & API · Observability · Triển khaiOrchestration · Tools & APIs · Observability · Deployment

XâyBuild

Phần biến một lần gọi model thành dịch vụ chạy 24/7: điều phối bước, gọi công cụ, nhìn thấy chuyện gì đang xảy ra.What turns a single model call into a 24/7 service: sequencing steps, calling tools, and seeing what actually happens.

user ─► điều phối ─┬─► LLM
                   ├─► tools / API
                   └─► guardrail ─► trả lời
     trace: bước · token · tiền · p95
user ─► orchestrator ─┬─► LLM
                      ├─► tools / APIs
                      └─► guardrail ─► reply
     trace: step · tokens · cost · p95

Dùng choUse it for

  • Quy trình duyệt: trích xuất → kiểm tra → định tuyến → soạn phản hồi
  • Batch 50k tài liệu qua đêm với backoff và checkpoint
  • Fallback sang model rẻ hơn khi nhà cung cấp chính lỗi
  • Approval pipelines: extract, validate, route, draft the reply
  • Overnight batches over 50k documents with backoff and checkpoints
  • Falling back to a cheaper model when the provider fails

ĐượcYou gain

  • Trace kéo thời gian tìm lỗi từ hàng giờ xuống vài phút
  • Cache và batch thường cắt 30–70% hoá đơn
  • Timeout và fallback biến sự cố nhà cung cấp thành phiền toái nhỏ
  • Traces cut debugging from hours to minutes
  • Caching and batching typically cut 30–70% of the bill
  • Timeouts and fallbacks turn outages into minor annoyances

MấtYou lose

  • Agent tự quyết rất khó tái hiện lỗi: cùng input, hai đường đi
  • 10 bước × 95% ≈ 60% thành công — mỗi bước nhân xác suất hỏng
  • Tool có side effect mà retry sai là hỏng dữ liệu thật
  • Agent failures resist reproduction: same input, two paths
  • 10 steps × 95% ≈ 60% success — every step multiplies failure
  • Side-effecting tools corrupt real data when retried wrongly

Đánh đổi.The trade-off. Chọn agent tự quyết là đổi tính dự đoán được và khả năng debug lấy độ phủ những tình huống bạn không kịp liệt kê trước.Choosing an autonomous agent trades predictability and debuggability for coverage of cases you couldn't enumerate.

Dấu hiệu nhận biết:Tell-tale sign: Bạn không nói được trong 30 giây rằng request vừa rồi đi qua những bước nào, tốn bao nhiêu token.You can't say within 30 seconds which steps a request took and how many tokens it burned.

5

Dữ liệu & tri thứcData & knowledge

Chất lượng dữ liệu · Kho tri thức · Vector DB · Cập nhật & đồng bộData quality · Knowledge bases · Vector DBs · Updating & sync

XâyBuild

Nguồn tri thức hệ thống dựa vào, cùng cả vòng đời: làm sạch, cắt, index, truy xuất, cập nhật.The knowledge your system stands on, and its whole lifecycle: clean, chunk, index, retrieve, update.

nguồn ─► chunk ─► embed ─► index
                             │
hỏi ─► embed ─► top-k ───────┴─► rerank
  ▲                              │
  └──── re-index khi đổi ◄───────┘
sources ─► chunk ─► embed ─► index
                               │
query ─► embed ─► top-k ───────┴─► rerank
   ▲                               │
   └──── re-index on change ◄──────┘

Dùng choUse it for

  • Tra cứu chính sách, quy trình, tài liệu kỹ thuật nội bộ
  • Hỗ trợ khách hàng dựa trên ticket đã giải quyết
  • Tìm sản phẩm theo mô tả tự nhiên thay vì từ khoá
  • Looking up internal policies, procedures and technical docs
  • Customer support grounded in resolved tickets
  • Product search by natural description instead of keywords

ĐượcYou gain

  • Sửa một tài liệu là câu trả lời đổi ngay, không train lại gì
  • Trích nguồn được nên người dùng kiểm chứng được
  • Khử trùng lặp thường hiệu quả hơn đổi embedding model đắt tiền
  • Edit one document and the answer changes, with no retraining
  • Citations make answers verifiable by the user
  • Deduplication usually beats a pricier embedding model

MấtYou lose

  • Chunking ngây thơ phá vỡ bảng và các đoạn tham chiếu chéo
  • Tài liệu cũ và mới cùng nằm trong index tạo mâu thuẫn không tự phát hiện
  • Đổi embedding model là re-index toàn bộ, tốn tiền thật
  • Naive chunking destroys tables and cross-referenced passages
  • Old and new documents coexisting create undetectable contradictions
  • Changing embedding model means a full, costly re-index

Đánh đổi.The trade-off. Chọn vector DB là đổi chi phí hạ tầng và tính giải thích được của kết quả lấy khả năng tìm theo ý nghĩa trên dữ liệu phi cấu trúc.Adopting a vector database trades infrastructure cost and result explainability for semantic search over unstructured data.

Dấu hiệu nhận biết:Tell-tale sign: RAG trả lời sai nhưng rất tự tin — 9/10 lần là lỗi truy xuất hoặc dữ liệu bẩn.RAG answers wrongly but confidently — nine times in ten that's retrieval or dirty data.

6

Đánh giá & độ tin cậyEvaluation & reliability

Bộ eval · Guardrails · Robustness · TestingEval frameworks · Guardrails · Robustness · Testing

Tin cậyTrust

Cỗ máy trả lời câu hỏi phiên bản mới có tốt hơn không, bằng số thay vì bằng cảm giác.The machine that answers whether the new version is better with a number instead of a feeling.

golden set ─► eval ─► canary ─► prod
    ▲                            │
    └── mỗi lỗi thật thành 1 case ┘
golden set ─► eval ─► canary ─► prod
    ▲                             │
    └── each real failure = 1 case┘

Dùng choUse it for

  • Quyết định deploy prompt mới trong 10 phút thay vì 2 ngày tranh cãi
  • So sánh 3 model trên chính bài toán của bạn
  • Bắt regression khi nhà cung cấp âm thầm cập nhật model
  • Deciding to ship a prompt in ten minutes instead of two days of debate
  • Comparing three models on your own task
  • Catching regressions when a provider quietly updates a model

ĐượcYou gain

  • Cho phép đổi hệ thống hằng ngày mà không sợ
  • Biến tranh luận cảm tính thành một con số mọi người cùng nhìn
  • Guardrail kéo rủi ro pháp lý xuống mức bảo hiểm được
  • Lets you change the system daily without fear
  • Turns taste arguments into one shared number
  • Guardrails reduce legal exposure to an insurable level

MấtYou lose

  • LLM-as-judge thiên vị: chuộng câu dài và output cùng nhà model
  • Rất dễ đo cái dễ đo thay vì cái quan trọng
  • Eval xanh toàn bộ mà người dùng vẫn ghét sản phẩm là chuyện có thật
  • LLM judges are biased toward long answers and their own family
  • Easy to measure what's measurable instead of what matters
  • Every eval can be green while users still hate the product

Đánh đổi.The trade-off. Xây eval là đổi 20–30% thời gian phát triển ban đầu lấy quyền thay đổi hệ thống về sau mà không phải sợ.Building evals trades 20–30% of early development time for the right to change the system later without fear.

Dấu hiệu nhận biết:Tell-tale sign: Bạn deploy prompt mới vì thấy có vẻ tốt hơn. Bạn đang không biết mình vừa làm hỏng gì.You shipped a prompt because it seemed better. You don't know what you just broke.

7

Sản phẩm & trải nghiệmAI products & UX

Trải nghiệm · Tư duy sản phẩm · Human-in-the-loop · Mô hình doanh thuUser experience · Product thinking · Human-in-the-loop · Monetization

Tin cậyTrust

Phần quyết định người ta có tin và có dùng hay không. Cùng model, hai UX cho ra hai sản phẩm khác hẳn.What decides whether people trust it and use it. The same model with two UX designs gives two different products.

model ─► UX: nguồn · độ tin · undo ─► người dùng
              ▲                        │
              └────── feedback ◄───────┘
model ─► UX: sources · trust · undo ─► user
              ▲                          │
              └────── feedback ◄─────────┘

Dùng choUse it for

  • Nút xem nguồn cạnh mọi khẳng định để người dùng tự kiểm chứng
  • Cho sửa output rồi lưu bản sửa — vừa tăng tin cậy vừa tạo dữ liệu vàng
  • Người duyệt 5% ca rủi ro cao, tự động hoá 95% còn lại
  • A view-source control beside every claim so users can verify
  • Letting users edit outputs and saving the edits as golden data
  • Human review on 5% high-risk cases, automation on the rest

ĐượcYou gain

  • Trích nguồn tăng niềm tin nhiều hơn vài phần trăm accuracy
  • Feedback trong sản phẩm là nguồn eval case rẻ và sát thực tế nhất
  • Định giá theo giá trị bảo vệ biên lợi nhuận khi giá token biến động
  • Citations raise trust more than a few points of accuracy
  • In-product feedback is the cheapest realistic source of eval cases
  • Value-based pricing protects margin when token prices move

MấtYou lose

  • Người duyệt bị automation bias, duyệt bừa sau vài trăm ca đúng
  • Chat là giao diện mặc định lười; nhiều việc chỉ cần nút và form
  • UX tốt che giấu model kém, đến khi lộ ra thì niềm tin mất hẳn
  • Reviewers develop automation bias and start rubber-stamping
  • Chat is the lazy default; many tasks want a button and a form
  • Good UX hides a weak model until trust collapses at once

Đánh đổi.The trade-off. Thêm human-in-the-loop là đổi tốc độ và chi phí nhân sự lấy một trần rủi ro có kiểm soát.Adding human-in-the-loop trades speed and headcount cost for a risk ceiling you actually control.

Dấu hiệu nhận biết:Tell-tale sign: Người dùng không biết khi nào nên tin output — đó là lỗi thiết kế, không phải lỗi model.Users can't tell when to trust the output — that's a design failure, not a model failure.

8

Đạo đức, an toàn & trách nhiệmEthics, safety & responsibility

Công bằng · An toàn · Riêng tư & bảo mật · Tuân thủEthics · Safety · Privacy & security · Compliance

Tin cậyTrust

Tập ràng buộc quyết định bạn có được phép tồn tại trên thị trường. Trụ duy nhất mà một lỗi đơn lẻ xoá sổ cả sản phẩm.The constraints deciding whether you may exist in your market. The one pillar where a single failure ends the product.

input ─► che PII ─► kiểm tra quyền ─► model
                                       │
audit log ◄── kiểm tra output ◄────────┘
input ─► redact PII ─► check access ─► model
                                        │
audit log ◄── check output ◄────────────┘

Dùng choUse it for

  • Che PII trước khi gửi ra API bên thứ ba
  • Phân quyền ở tầng truy xuất: mỗi người chỉ thấy tài liệu của mình
  • Audit log trả lời được ai hỏi gì, model trả gì, lúc nào — sau 6 tháng
  • Redacting PII before anything leaves for a third-party API
  • Permissions at the retrieval layer, per user
  • Audit logs that still answer who asked what, six months later

ĐượcYou gain

  • Điều kiện cần để bán cho doanh nghiệp, ngân hàng, y tế, khu vực công
  • Redaction và RBAC làm sớm rẻ hơn 10 lần so với gắn thêm sau
  • Audit log biến sự cố thành báo cáo có kiểm soát
  • A precondition for selling to enterprise, banking, health, government
  • Redaction and RBAC cost a tenth when done early
  • Audit logs turn an incident into a controlled report

MấtYou lose

  • Guardrail quá chặt tạo ra từ chối sai, người dùng ghét bị từ chối vô lý
  • Compliance làm chậm mọi thay đổi, đổi prompt cũng phải rà lại
  • Prompt injection là bài toán chưa ai giải xong
  • Over-tight guardrails cause false refusals, which users hate
  • Compliance slows every change; even prompt edits need review
  • Prompt injection remains an unsolved problem

Đánh đổi.The trade-off. Chọn tuân thủ nghiêm từ đầu là đổi tốc độ ship và một phần chất lượng đầu ra lấy quyền tồn tại trên thị trường có quy định.Strict compliance from day one trades shipping speed and some output quality for the right to operate in a regulated market.

Dấu hiệu nhận biết:Tell-tale sign: Bạn không trả lời ngay được dữ liệu prompt của khách đi đâu và giữ bao lâu.You can't immediately say where customer prompt data goes and how long it's kept.

9

Học liên tụcContinuous learning

Cập nhật · Thử nghiệm · Nhìn lại & cải thiệnStay updated · Experiment · Reflect & improve

Vòng lặpLoop

Trụ duy nhất không phải kỹ năng mà là một vòng lặp, vì nền kỹ thuật của lĩnh vực này đổi vài tháng một lần.The only pillar that isn't a skill but a loop, because the technical ground shifts every few months.

đọc ─► thử nhỏ ─► đo bằng eval ─► giữ / bỏ
 ▲                                    │
 └────────── postmortem ◄─────────────┘
read ─► try small ─► measure ─► keep / drop
 ▲                                  │
 └────────── postmortem ◄───────────┘

Dùng choUse it for

  • Đánh giá model mới trong 1 giờ nhờ golden set có sẵn
  • Thử kỹ thuật mới trên một tính năng nhỏ trước khi bàn migration
  • Postmortem kết thúc bằng một dòng thêm vào checklist
  • Evaluating a new model in an hour thanks to an existing golden set
  • Trying a technique on one small feature before discussing migration
  • Postmortems that end with one line added to the checklist

ĐượcYou gain

  • Golden set cố định biến model mới từ dự án 2 tuần thành quyết định 1 giờ
  • Postmortem có kỷ luật cắt hẳn nhóm lỗi lặp lại
  • Bắt sớm thay đổi nền tảng mở ra thiết kế mới
  • A stable golden set turns a new model into a one-hour decision
  • Disciplined postmortems remove whole classes of bugs
  • Catching platform shifts early unlocks new designs

MấtYou lose

  • Chạy theo mọi thứ mới làm hệ thống không bao giờ ổn định
  • Phần lớn đột phá trên mạng không tái lập được trên dữ liệu của bạn
  • Thời gian học là thứ đầu tiên bị cắt khi có deadline
  • Chasing everything new means the system never stabilises
  • Most online breakthroughs don't reproduce on your data
  • Learning time is the first thing cut under deadline

Đánh đổi.The trade-off. Chạy theo mọi thứ mới là đổi độ sâu và sự ổn định của hệ thống lấy khả năng bắt sớm những thay đổi nền tảng của lĩnh vực.Chasing every new thing trades depth and stability for the ability to catch platform-level shifts early.

Dấu hiệu nhận biết:Tell-tale sign: Bạn đổi công cụ vì thấy nó trên mạng chứ không vì một con số.You switched tools because you saw it online, not because of a number.

Bảng đánh đổiThe trade-off table

Đọc cột cuối trước. Nó cho bạn thứ tự bắt buộc: 3 → 6 → 5 → 4 → 8 → 7. Trụ 1, 2 và 9 chạy song song suốt sự nghiệp.Read the last column first. It gives the forced order: 3 → 6 → 5 → 4 → 8 → 7. Pillars 1, 2 and 9 run in parallel for your whole career.

TrụNhómThời gian tới mức đủ dùngChạm hằng ngàyBỏ qua thì saoHoãn được không
1 Nền tảngNền6–24 thángThấpTrần thấp, phụ thuộc may rủiCó, nhưng có lãi kép
2 Mô hình LLMNền2–8 tuầnTrung bìnhChọn sai model, đốt tiền vô íchMột phần
3 Prompt & ngữ cảnhXây1–4 tuầnRất caoChất lượng kém dù model tốtKhông
4 Hệ thốngXây1–3 thángCaoDemo chạy, production sậpKhông, khi đã có người dùng
5 Dữ liệuXây1–3 thángCaoTrả lời sai một cách tự tinKhông, nếu có RAG
6 Đánh giáTin cậy2–6 tuầnCaoKhông biết mình đang tốt lên hay xấu điKhông
7 Sản phẩm & UXTin cậyLiên tụcTrung bìnhĐúng kỹ thuật, sai bài toánKhông
8 An toànTin cậy2–4 tuần cơ bảnThấp đến khi có sự cốRủi ro tồn tại của sản phẩmKhông, nếu chạm dữ liệu người dùng
9 Học liên tụcVòng lặpVô hạnHằng tuầnLỗi thời trong 12–18 thángCó, đến khi quá muộn
PillarFamilyTime to good enoughDaily contactCost of skippingCan you defer it
1 FoundationsBase6–24 monthsLowLow ceiling, dependent on luckYes, but it compounds
2 LLMsBase2–8 weeksMediumWrong model, wasted spendPartly
3 Prompting & contextBuild1–4 weeksVery highPoor quality on a good modelNo
4 Systems & toolsBuild1–3 monthsHighDemo works, production falls overNo, once you have users
5 Data & knowledgeBuild1–3 monthsHighConfidently wrong answersNo, if you use RAG
6 EvaluationTrust2–6 weeksHighYou can't tell better from worseNo
7 Products & UXTrustOngoingMediumTechnically right, wrong problemNo
8 Ethics & safetyTrust2–4 weeks for basicsLow until an incidentExistential product riskNo, if you touch user data
9 Continuous learningLoopNever doneWeeklyObsolete in 12–18 monthsYes, until it's too late

Sai lầm phổ biếnAnti-patterns

Tám lỗi này chiếm phần lớn thời gian sửa chữa của các đội mới làm.These eight account for most of the rework in teams new to this.

Sai lầmVì sao saiSửa thế nào
Fine-tune để dạy kiến thức mớiFine-tune chỉnh hành vi, không nạp dữ kiện; model vẫn bịaRAG cho dữ kiện; fine-tune chỉ cho giọng và định dạng
Bắt đầu bằng agentKhông tái hiện được lỗi, chi phí gấp nhiều lầnWorkflow cố định trước, agent khi nhánh vượt sức liệt kê
Đánh giá bằng cách thử vài câuVài câu không phân biệt được tín hiệu với nhiễu30–50 case thật, chạy tự động, so trước và sau
Nhồi cả tài liệu vì cửa sổ đủ lớnĐắt, chậm, và lost in the middle làm mất chính đoạn quan trọngTruy xuất top-k rồi rerank; đo recall trước khi tăng k
Chỉ dùng vector searchTrượt mã sản phẩm, tên riêng, số hiệu văn bảnHybrid BM25 cộng vector, rồi rerank
Trỏ model vào alias latestNhà cung cấp cập nhật là chất lượng đổi âm thầmGhim phiên bản; nâng cấp có chủ đích qua golden set
Đo accuracy, bỏ qua chi phí và p95Sản phẩm chết vì đắt và chậm, không vì kém 2%Coi cost và p95 là metric chất lượng ngang hàng
Tin dữ liệu truy xuất như tin chỉ dẫnPrompt injection qua tài liệu là đường tấn công thậtTách vùng dữ liệu khỏi vùng chỉ dẫn, kiểm tra output
MistakeWhy it's wrongThe fix
Fine-tuning to teach new knowledgeIt shapes behaviour, doesn't load facts; it still inventsRAG for facts; fine-tune only for tone and format
Starting with an agentFailures aren't reproducible and cost multipliesFixed workflow first; agents when branches exceed enumeration
Evaluating by trying a few promptsA handful of cases can't separate signal from noise30–50 real cases, automated, before and after
Dumping whole documents because the window is bigExpensive, slow, and it drops the key passageRetrieve top-k then rerank; measure recall before raising k
Vector search onlyMisses product codes, proper nouns, document numbersHybrid BM25 plus vector, then rerank
Pointing at a latest aliasProvider updates change quality silentlyPin versions; upgrade deliberately through the golden set
Tracking accuracy, ignoring cost and p95Products die from being slow and costly, not from 2%Treat cost and p95 as first-class quality metrics
Trusting retrieved text like instructionsInjection through documents is a real attack pathSeparate data from instructions and check outputs

Ba câu cần nhớThree things to remember

Model là phần dễ nhất. Giá trị nằm ở dữ liệu, hệ thống và đánh giá quanh nó.The model is the easy part. Value lives in the data, the system and the evaluation around it.

Không đo thì không biết. Eval không phải chi phí, nó là quyền được thay đổi hệ thống.Unmeasured means unknown. Evals aren't a cost; they're your permission to change the system.

Phương án tốt nhất thường là không xây gì cả. Hãy chứng minh baseline không đủ trước.The best option is usually to build nothing. Prove the baseline is insufficient first.