DeepSeek V4 Flash trong opencode: 18 ngày, 431 session, $22
18 ngày, 431 session, $22.41 với DeepSeek V4 Flash qua opencode. Số liệu thật: cost theo variant, cache hit ratio, và khi nào nên dùng thay Haiku 4.5.
324 posts
18 ngày, 431 session, $22.41 với DeepSeek V4 Flash qua opencode. Số liệu thật: cost theo variant, cache hit ratio, và khi nào nên dùng thay Haiku 4.5.
18 ngày dữ liệu thật từ opencode và hệ aas multi-agent: variant high/max/default, cache ratio 19:1, ba worker profile khác nhau, và khi nào DeepSeek V4 Pro thực sự đáng chọn hơn Claude.
Từ v2.1.169 trở đi, Anthropic đổi tên FleetView thành Agent View, đi kèm là /rename, /color, agentic search trong /resume picker, và một loạt thứ nhỏ khác khiến workflow multi-session đọc được hơn. Bài này ghi lại những thứ đó theo thứ tự tôi nhận ra tác động của chúng.
Bốn model đang dùng hằng ngày, năm effort levels, adaptive thinking, và cách tôi thực sự chọn model + effort khi ngồi vào một task cụ thể.
Snapshot 06/2026 về Plus, Max, Ultra, PAYG và Audio Subscription của MiniMax. Tôi chọn gói theo cách dùng thật: coding agent, video, voice và rủi ro quota.
Tôi review Xiaomi MiMo v2.5 qua góc nhìn thực dụng: context 1M, omnimodal, giá rẻ và phần benchmark cần đọc tỉnh táo.
So sánh DeepSeek V4 Flash với Claude Haiku 4.5 theo giá, cache, context, output, reasoning, tool use, privacy, compliance, ecosystem và use case thực tế. Số liệu cập nhật tháng 06/2026.
Ba tuần sau khi viết bài FleetView đầu, một loạt update đã đổi cách tôi dùng công cụ này hoàn toàn. Pinned sessions, dynamic workflows, shell session trong UI, done/total tracking cho batch agent. Bài này ghi lại những thay đổi đó, theo thứ tự tôi nhận ra tác động của chúng.
MCP remote server dùng OAuth 2.1, nhưng điểm khó không nằm ở nút login. Điểm khó là protected resource metadata, Client ID Metadata Document, resource indicator, scope theo tool, confused deputy và audit khi agent gọi nhiều server cùng lúc.
Đi từ màn hình config của Cloudflare AI Search để giải mã từng keyword của một search engine hiện đại: chunking, hybrid search, RRF, reranking, query rewriting, similarity cache. Và cách một backend thật triển khai các cơ chế xếp hạng đó.
A Claude Code skill that renders infrastructure diagrams as Python code (mingrammer diagrams + Graphviz) with official AWS icons and OSS tech logos. Ships an idempotent environment setup, an import-verified node catalog, a class-name search script, and a render wrapper that absorbs the CWD-relative output gotcha. Plus the four design decisions that keep the model from drawing things it should not draw.
Tiếp bài so giá text LLM: lần này là multimodal. Ảnh lệch nhau 10 lần, video mỗi nhà bán một đơn vị, TTS tính theo ký tự và đếm cả dấu cách. Số liệu 06/2026, MiniMax vs ByteDance.
Một ngày ngồi tính giá API của bốn nhà LLM (số liệu 06/2026), và những cái bẫy khiến bảng giá niêm yết không phải con số bạn thực trả: promo, tiered context, cache, input/output, reseller.
Bài 64 của series Vibe Coding có kiểm soát. Khi test lúc pass lúc fail, đừng để agent che flakiness bằng retry hoặc timeout dài hơn mà không tìm root cause.
Bài 63 của series Vibe Coding có kiểm soát. Agent chạy nền có thể tự nghiên cứu repo, sửa code và mở PR, nhưng definition of done vẫn phải do người giao việc đặt trước.
Bài 65 của series Vibe Coding có kiểm soát. AI có thể hỗ trợ viết code, nhưng người gửi PR vẫn phải đọc, hiểu, chịu trách nhiệm và không đẩy review debt sang maintainer.
Bài 1 của series Vibe Coding có kiểm soát. Vibe coding là gì, khác no-code, autocomplete, pair programming và coding agent ra sao, và vì sao người dùng vẫn phải sở hữu product judgment, context, testing, security, rollback.
Bài 26 của series Vibe Coding có kiểm soát. Cách hiểu Claude Desktop, Desktop Extensions và remote connectors cho non-tech vibe coding: khi nào đọc file local, khi nào kết nối SaaS, vì sao phải giới hạn folder scope và debug ở đâu.
Bài 25 của series Vibe Coding có kiểm soát. Cách dùng Claude Projects để giữ context ổn định cho non-tech vibe coding: project instructions, project knowledge, decision log, RAG mode, new project vs new chat và handoff pack cho dev.
Bài 23 của series Vibe Coding có kiểm soát. Cách dùng Claude Artifacts để biến ý tưởng thành app demo an toàn cho người không code: bắt đầu từ workflow, test bằng mắt, sửa theo hành vi và biết giới hạn trước khi giao cho dev.
Bài 3 của series Vibe Coding có kiểm soát. Cách chia vibe-coded app thành các lát nhỏ visible, clickable, testable, reversible để tránh full-app prompt tạo review debt.
Bài 27 của series Vibe Coding có kiểm soát. Safety-first guide cho non-tech user khi cho Claude Desktop đọc project folder qua filesystem MCP hoặc Desktop Extension: folder lab, path scope, read-only trước, backup/Git trước khi write và debug logs.
Bài 24 của series Vibe Coding có kiểm soát. Template app brief cho Claude Artifacts: user type, goal, inputs, outputs, states, constraints, sample data, mobile, accessibility và cách follow-up mà không làm Claude rewrite cả app.
Bài 2 của series Vibe Coding có kiểm soát. Cách viết prompt đầu tiên như một app brief: audience, job-to-be-done, core flows, constraints, visual direction, defer list, do-not-change và ví dụ bad vs improved prompt.
Artifacts rất hợp để chứng minh workflow và UI. Claude Code chỉ nên bước vào khi prototype phải chạm repo thật, API thật, test thật, deployment thật.
Bạn không cần Playwright hay Jest để bắt nhiều lỗi quan trọng. Dùng app như người thật, thử input xấu, mobile, loading, error, data thật/giả, privacy, rồi gửi screenshot feedback.
Một workflow an toàn cho người không code khi dùng Claude Code: bắt đầu ở project root, yêu cầu overview, dùng plan mode, review diff, chạy test/build có sẵn, và không commit/push nếu chưa nói rõ.
Một đường đi cụ thể cho non-tech: dựng artifact, gom screenshot và requirement, tổ chức handoff folder trong Claude Desktop, rồi dùng Claude Code map behavior vào repo thật.
MCP giúp Claude Code đọc tool và data source bên ngoài, nhưng non-tech chỉ nên bật khi có scope rõ, secret đúng chỗ, và approval boundary cho hành động có side effect.
Vibe Coding có kiểm soát, bài 19. Chọn tool theo job: OpenClaw cho multi-channel gateway, Hermes cho CLI/gateway/skills, Codex/Cursor cho repo-aware workflow, Replit/Lovable/Bolt cho prototype.
Vibe Coding có kiểm soát, bài 20. Local model là lựa chọn privacy/control, không tự động tốt hơn. Cách smoke test Ollama/llama.cpp, tool-call, timeout và agent loop trước khi cho write access.
Vibe Coding có kiểm soát, bài 18. Dùng Nous Portal với Hermes Agent: setup portal, OAuth, SSH port-forward, portal status, Tool Gateway và ranh giới token store.
Vibe Coding có kiểm soát, bài 22. Một lab plan thực tế để build mini app bằng Hermes hoặc OpenClaw rồi audit như developer: setup fields, transcript summary, diff, UI, data, auth, tests và verdict.
Vibe Coding có kiểm soát, bài 16. Workflow dùng OpenClaw qua Telegram: disposable workspace, app brief nhỏ, checkpoint trước thay đổi rủi ro, gửi screenshot/error context và biết lúc nào phải dừng.
Vibe Coding có kiểm soát, bài 15. Setup OpenClaw theo hướng an toàn: local hay VPS, workspace đầu tiên, provider key, Telegram channel, permission boundary và smoke test bằng toy repo.
Vibe Coding có kiểm soát, bài 17. Cách tiếp cận Hermes Agent cho người mới: chạy CLI trước, chọn provider/model, hiểu approvals/tools, rồi mới bật gateway và skills.
Vibe Coding có kiểm soát, bài 21. Checklist hardening trước khi cho OpenClaw, Hermes, Codex hoặc local agent sửa file: throwaway repo, secrets boundary, approval gates, logs và cleanup.
Bài 5 của series Vibe Coding có kiểm soát. Cách chọn tool theo workflow thay vì ranking: prompt-to-app prototype, repo-aware coding, issue-to-PR agent, review gate, sandbox, rollback và ownership.
Vì sao agent chạy lâu không tự động tốt hơn: cost, retry loop, context lớn, dấu hiệu kẹt, stop condition, budget cap và cách chia task nhỏ.
Walkthrough thực tế giả lập cách build booking app nhỏ bằng vibe coding có kiểm soát: brief, slices, validation, admin view, CSV export, test và handoff.
Bài 6 của series Vibe Coding có kiểm soát. Cách phân biệt mock và real API, kiểm auth/roles/permissions/data ownership, xử lý secrets/env/rate limit/error state, và prompt an toàn để thay mock bằng endpoint thật.
Khi nào một prototype vibe-coded nên thành repo thật: structure, dead code, tests, setup docs, deploy docs, owner và phần nên rewrite thủ công.
20 anti-pattern khiến vibe coding thành nợ kỹ thuật: prompt quá lớn, tin plan mù, quên mobile, mock data, secret, auth/database change, không rollback và không owner.
Cách review code do vibe coding tạo ra: đọc diff, dependency, secrets, migration, permission, network call và biết lúc nào cần dev review.
Cách giữ điểm quay lại khi vibe coding: checkpoint, Git known-good state, branch trước thay đổi rủi ro, rollback hay fix forward và prompt revert rõ ràng.
Bài 7 của series Vibe Coding có kiểm soát. Checklist review UI cho vibe-coded app: main flow, mobile, keyboard, empty/loading/error, requested vs actual, unrelated changes và feedback bằng screenshot.
Checklist security cho vibe coding: sandbox, approval policy, network access, secrets, destructive actions, logs, prompt data và kiểm tra tối thiểu trước khi public.
Bài 4 của series Vibe Coding có kiểm soát. Cách chuẩn bị context pack gồm screenshot, sketch, sample data, API docs, brand notes, repo rules, edge case và handoff để AI không tự invent requirement.
Bài 35 của series Vibe Coding có kiểm soát. Cách non-tech kiểm soát database khi AI build app: branch, migration, seed data, preview credential, rollback và những câu phải hỏi trước khi đổi schema.
Bài 36 của series Vibe Coding có kiểm soát. Checklist vận hành sau deploy: analytics, runtime logs, Sentry-style error tracking, release tag, alert, user report và rollback decision.
Bài 33 của series Vibe Coding có kiểm soát. Cách non-tech dùng Playwright codegen, trace viewer, screenshot và test case nhỏ để audit app AI build trước khi giao dev.
Bài 34 của series Vibe Coding có kiểm soát. Cách dùng preview deployment, environment variables, branch build, rollback và domain boundary để app AI-built không chạm production quá sớm.
Bài 38 của series Vibe Coding có kiểm soát. Một demo vibe-coded càng mượt càng dễ che mất mock data, fake auth, broken flow, missing state và quyết định chưa được kiểm chứng.
Bài 37 của series Vibe Coding có kiểm soát. Vì sao một app vibe-coded chạy được trong demo vẫn có thể chưa có dữ liệu thật, auth thật, rollback, ownership và trách nhiệm vận hành.
Bài 41 của series Vibe Coding có kiểm soát. Cách AI tạo cảm giác chắc chắn giả trong vibe coding: plan đẹp, test rỗng, summary quá tự tin, fallback che lỗi và claim production-ready.
Bài 39 của series Vibe Coding có kiểm soát. Một bài nói thẳng về ranh giới giữa prompt được app và hiểu engineering: scope, trade-off, debugging, ownership và review.
Bài 40 của series Vibe Coding có kiểm soát. Các vùng non-tech thường bỏ qua khi AI build app: auth, billing, database, secrets, permissions, deploy và dependency.
Bài 44 của series Vibe Coding có kiểm soát. Login screen không phải auth. Bài này chỉ ra vì sao authorization, ownership check, backend enforcement và database policy mới là ranh giới thật.
Bài 42 của series Vibe Coding có kiểm soát. Từ incident Replit/SaaStr tới bài học cho non-tech: summary không phải evidence, fake data che bug, và test pass phải có command output.
Bài 43 của series Vibe Coding có kiểm soát. Shadow AI app là rủi ro mới: internal tool build quá nhanh, public nhầm, upload dữ liệu nhạy cảm, và không ai trong security biết để kiểm soát.
Bài 47 của series Vibe Coding có kiểm soát. Dùng các benchmark AI-generated code security như tín hiệu để thiết kế review gate: SAST, dependency scan, auth test, secret scan và production bar.
Bài 45 của series Vibe Coding có kiểm soát. Vibe-coded app thường hỏng ở các lỗi web security rất cũ: broken access control, client-side trust, missing rate limit, fallback secret và OAuth/WebSocket auth.
Bài 46 của series Vibe Coding có kiểm soát. Một prompt bảo AI làm app secure không thay thế deterministic controls: sandbox, permission, secret scan, database isolation, review gate và deploy policy.
Bài 49 của series Vibe Coding có kiểm soát. AI coding có thể tạo cảm giác tiến rất nhanh, nhưng review, chờ agent, sửa sai và hiểu lại code có thể ăn hết phần lợi đó.
Bài 50 của series Vibe Coding có kiểm soát. AI giúp nhiều người dùng thư viện open source nhanh hơn, nhưng bug report mơ hồ, dependency abuse và thiếu feedback có thể đẩy chi phí sang maintainers.
Bài 48 của series Vibe Coding có kiểm soát. Public key trong frontend chưa chắc là leak. Với Supabase-style app, lỗi thật thường là database table không bật Row Level Security và policy sai.
Bài 52 của series Vibe Coding có kiểm soát. Khoảng cách thật không phải awareness, mà là kỹ năng verify: click test, second-user test, log test, diff test và claim classification.
Bài 53 của series Vibe Coding có kiểm soát. Build artifacts như source maps, debug files, local configs và generated bundles cũng cần review trước deploy.
Bài 51 của series Vibe Coding có kiểm soát. Code AI-generated có thể chạy đúng cú pháp nhưng sai nghiệp vụ, sai công thức, thiếu biến và tạo cảm giác an toàn giả.
Bài 56 của series Vibe Coding có kiểm soát. Coding agent có thể đọc file, chạy command, gọi network và deploy. Rủi ro thật nằm ở blast radius, không phải chỉ ở model quality.
Bài 54 của series Vibe Coding có kiểm soát. Slopsquatting biến hallucinated dependency thành supply-chain risk: package nghe hợp lý nhưng không tồn tại cho tới khi kẻ xấu đăng ký nó.
Bài 55 của series Vibe Coding có kiểm soát. Prompt injection không chỉ nằm trong chatbot. Coding agents đọc README, issue, schema, docs, MCP tools và có thể biến text độc thành action thật.
Bài 59 của series Vibe Coding có kiểm soát. AI có thể tạo bug report nghe chuyên nghiệp nhưng sai hàm, sai version, sai changelog, hoặc không reproduce được.
Bài 58 của series Vibe Coding có kiểm soát. Vibe-coded code vẫn cần provenance, license review, SBOM, human responsibility và policy rõ ràng trước khi đưa vào sản phẩm.
Bài 57 của series Vibe Coding có kiểm soát. AI review bot chạy trong GitHub Actions có thể đọc comment độc, bị prompt injection, rồi leak secret nếu workflow cấp quyền quá rộng.
Bài 61 của series Vibe Coding có kiểm soát. AI có thể tạo feature nhanh, nhưng maintenance debt vẫn nằm lại trong repo và con người vẫn phải trả.
Bài 60 của series Vibe Coding có kiểm soát. MCP server nối agent với tool, file, API và process thật. Cài bừa nghĩa là mở thêm đường chạy lệnh.
Bài 62 của series Vibe Coding có kiểm soát. AI coding làm security dễ bị đẩy từ lúc thiết kế sang lúc review, nghĩa là lỗi đã nằm trong diff rồi mới được nhớ tới.
Field guide thiết kế deploy pipeline khi dùng AI coding hằng ngày: preview URL, deploy window, smoke test, rollback point, ownership và log bằng chứng.
Cách xử lý rollback và incident trong workflow AI coding: nhận tín hiệu, freeze scope, chọn rollback, ghi timeline, dùng AI để đọc log nhưng không để AI tự phá production.
Một case study thực dụng về cách dùng AI coding để ship feature từ ticket tới deploy: scope, đọc code, contract, implementation, review, preview, smoke test và handoff.
Checklist anti-pattern khi dùng AI coding để ship code hằng ngày: scope creep, mock data, endpoint bịa, diff quá rộng, test rỗng, deploy mù và incident không timeline.
Bài 2 của series AI Coding thực chiến. Cách viết task brief/spec cho AI coding: problem, scope, constraints, acceptance criteria, validation, non-goals và handoff đủ rõ để agent không tự đoán.
Field guide để chia task AI coding cho nhiều agent: cắt scope theo file ownership, giữ rollback point, tránh đè diff của nhau, và biết lúc nào không nên song song hóa.
Cách review diff do AI viết: đọc file list trước, kiểm contract, tìm behavior drift, bắt mock data, debug log, over-engineering, và chỉ tin test khi test đúng lớp rủi ro.
Cách xử lý khi AI coding đi sai hướng: dừng mở rộng diff, khoanh vùng file, đọc log thật, tạo rollback point, sửa prompt, và quyết định revert hay patch tiếp.
Git workflow khi dùng AI coding hằng ngày: chia branch, giữ diff nhỏ, commit có ý nghĩa, review PR như review đồng đội thật.
Cách quản lý context, token cost, thời gian chạy tool, và scope khi dùng AI coding nhiều giờ trong repo thật.
Bài 3 của series AI Coding thực chiến. Cách chuẩn bị context pack gồm docs, memory, tracker, repo map và evidence để AI coding worker bắt đầu đúng chỗ, giữ tiến độ và không lặp lại lỗi cũ.
Series field guide về cách dùng AI coding để ship code hằng ngày: setup repo, viết task brief, chuẩn bị context, review diff, test, CI, deploy và vận hành sau merge.
Bài 1 của series AI Coding thực chiến. Cách chuẩn bị repo, rule, file ownership, test command và guardrail để agent có thể sửa code mà không vượt scope hoặc làm bẩn working tree.
Dùng MCP và tool integration trong AI coding mà không biến agent thành script phá production: quyền hạn, dry-run, allowlist, audit log, và điểm dừng.
Cách chọn test cho code AI viết: bắt contract trước, regression case sau, tránh mock sai lớp, dùng build/lint như guardrail, và không biến test thành nghi lễ.
Cách dùng tracker JSON để chia việc cho nhiều agent, tránh trùng scope, resume đúng chỗ, và biến progress thành dữ liệu kiểm chứng được.
Bài mở đầu series AI cho người không code, A-Z. Viết cho người dùng bình thường: gia đình, đồng nghiệp văn phòng, phụ huynh, sinh viên, và bất kỳ ai muốn hiểu AI mà không cần học lập trình.
Từ v2.1.150, Claude Code gate slash /workflows sau env CLAUDE_CODE_WORKFLOWS=1. Bật xong, có 10 bundled flow (implement, bugfix, bughunt, dashboard, docs, plan-hunter, review-branch...) chạy multi-agent end-to-end và tự mở PR. Bài này deep-dive binary để xem cơ chế gate, liệt kê từng flow, kèm cú pháp gọi và gotcha hay dính.
Bài I. Bốn dạng email AI giúp được, cách prime tone bằng email cũ, viết caption và mô tả sản phẩm, lỗi sai tên ngày, khi nào không nên nhờ AI.
Bài J. Cách dùng ChatGPT, Claude, NotebookLM để tóm tắt PDF 80 trang, annual report, sách giáo trình. Prompt 3 lớp, chia chunk, OCR PDF scan, khi nào không nên upload.
Bài K. Record meeting, transcript, prompt 4 phần (TL;DR, decisions, action items, open questions). Templates cho daily standup, 1-on-1, board update, client demo. Khi nào KHÔNG dùng AI (NDA, M&A, sa thải).
Bài L. Cách dùng AI để viết công thức, làm pivot, dọn dữ liệu trong Excel và Google Sheet. Hai workflow: AI viết công thức bạn gõ vào, hoặc AI làm hộ end-to-end. Bao gồm cả cảnh báo về privacy và limit file size.
Bài M. So sánh 5 tool sinh slide (Gamma, Presentations.AI, Beautiful.AI, Google Slides + Gemini, Microsoft Copilot), quy trình 3 bước outline + sinh + edit, mẹo tránh deck nhìn như AI sinh, khi nào KHÔNG nên dùng AI.
Bài N. Vì sao AI dịch vẫn miss, quy trình MTPE 3 bước, so sánh Google Translate vs DeepL vs ChatGPT/Claude, khi nào nên dùng và khi nào tuyệt đối không.
Bài O. Khi bạn có 4 tiếng để ra một quyết định lớn (đầu tư, mua xe, đổi job, chọn trường cho con). Cách dùng Deep Research của ChatGPT, Perplexity, Gemini, Claude để gói research nhiều ngày thành một buổi sáng, kèm khung prompt, khung output, và checklist verify.
Bài P. Học guitar, photography, nấu Thái, video editing từ zero với AI làm tutor 1-1. Workflow 30/60/90 ngày, feedback audio và ảnh, chỗ AI thua người thật.
Bài Q. Dùng AI lên kế hoạch chuyến tự túc, từ itinerary nháp tới gợi ý food local, dịch tại chỗ, đổi tiền, hỏi luật. AI giỏi gì, dở gì, và một lần tôi đi xa 5 cây số chỉ để ăn quán đã đóng cửa.
Bài R. AI làm được gì cho sức khoẻ (meal plan, nhật ký triệu chứng, decode lab values) và làm KHÔNG được gì (chẩn đoán, kê đơn, trị liệu tâm thần). Ranh giới cứng, mẹo prompt, lúc nào phải đi bác sĩ thật.
Bài T. Cách dùng AI làm tutor tiếng Anh 24/7: speaking partner, grammar fix, IELTS writing feedback, business email. Mẹo prime AI sửa nghiêm, quy trình 30 phút mỗi sáng, lúc nào AI sai.
Bài S. Export sao kê ngân hàng, nhờ AI phân loại chi tiêu, ước tính lương net, hiểu stock vs ETF vs trái phiếu. Ranh giới cứng: AI không đưa khuyến nghị mã cụ thể, không thay luật sư hay kế toán.
Bài U. Dùng AI cho con học sao cho có ích mà không phụ thuộc. Giải bài, luyện tiếng Anh, đọc cùng con. Ranh giới đỏ, cảnh báo sycophancy, parental controls, ngưỡng tuổi.
Bài V. AI lắng nghe lúc 1h sáng có thật sự giúp, hay nó chỉ nịnh. Workflow CBT-light, ranh giới với therapy thật, cảnh báo sycophancy, và khi nào bắt buộc phải gặp chuyên gia.
Bài W. Wifi công cộng + AI app rủi ro gì, opt-out training ở ChatGPT/Claude/Gemini, danh sách dữ liệu cứng không bao giờ paste, mẹo redact mini, nguyên tắc 'ai khác nghe được câu này không lo'.
Bài X. Vụ Hong Kong 25 triệu USD do video call deepfake. Cách nhận biết deepfake bằng mắt thường, dấu hiệu ảnh AI, voice clone, và quy trình bắt buộc khi nhận tin nhắn lạ yêu cầu chuyển tiền.
Bài Y. Stop sign cho cả series. Bảy nhóm tình huống AI không nên đụng vào: pháp lý ràng buộc, y tế, tài chính cá nhân, học hành cao cấp, hire/fire, quan hệ riêng, khẩn cấp. Nguyên tắc quyết định khi nào AI là bonus, khi nào là tự lừa.
Bài Z, bài cuối series A-Z. Một năm qua tôi bị hỏi 30 lần câu này. Framework chia nghề thành 3 lớp, lịch sử automation từ Excel tới Photoshop, lời khuyên cho 4 nhóm tuổi, khi nào nên panic thật, và nỗi sợ tôi giấu trong tủ riêng.
Phân tích flag CLAUDE_CODE_SUBPROCESS_ENV_SCRUB trong Claude Code (introduced v2.1.83): cơ chế strip credentials Anthropic + cloud providers khỏi subprocess env, subprocess sandboxing PID namespace trên Linux, side-effect ép permission mode về default, và khi nào nên bật hay tắt.
Bài A series 'AI cho người không code'. AI là gì theo cách hiểu đúng cho người không tech: không phải robot có cảm xúc, không phải Google nâng cấp. Câu chuyện dễ hiểu cho dân văn phòng, phụ huynh, sinh viên.
Bài B. Cách LLM 'dự đoán chữ tiếp theo' giải thích bằng ngôn ngữ thường ngày, không jargon.
Bài C. So sánh 3 chatbot AI phổ biến cho người dùng cuối: ChatGPT, Claude, Gemini. Giá, tính năng, điểm mạnh, khi nào dùng cái nào.
Bài D. Prompt là gì, cách viết prompt để AI hiểu đúng ý. 5 nguyên tắc cơ bản kèm ví dụ cho dân văn phòng.
Bài 1 series Background Agents. Async coding agent là gì, khác sync agent ở đâu, vì sao 2025-2026 cuộc đua nóng. Building blocks: sandbox, PR-based, long-running, branch isolation.
Bài 2. Claude Code background session: /bg command, EnterWorktree, FleetView multi-session UI, worktree isolation. Hands-on từ user thật.
Bài 2 series Local LLM 2026. So sánh inference speed Apple Silicon (M3 Max), CUDA (RTX 4090, Quadro K620), CPU-only (Xeon E5). Methodology benchmark + dữ liệu thật từ homelab.
Bài 3. So sánh 4 runner phổ biến 2026: Ollama (dev), LM Studio (GUI), vLLM (production throughput), llama.cpp (foundation). Khi nào dùng cái nào.
State of open-weight LLM 2026: model nào đáng tự host, kiến trúc, license, kích thước, ngưỡng phần cứng. Snapshot rõ ràng cho dev đang lên kế hoạch self-host.
Hands-on bài 2 series MCP từ zero. Build MCP server hello-world bằng TS SDK + Python SDK, expose 1 tool 1 resource 1 prompt, transport stdio, test với Claude Desktop. Đầy đủ code, gotchas, debug.
Bài 3 series MCP từ zero. So sánh 3 transport của MCP: stdio (local), SSE (deprecated), Streamable HTTP (chuẩn mới 2025). Khi nào dùng cái nào, migration path, code example.
Bài 4 series MCP từ zero. Authorization Server, Resource Server, DCR, token boundaries. Cấm token passthrough, scope, security checklist từ spec 2025-06-18.
Bài 5. Cách thiết kế Resource cho MCP server: URI scheme, pagination với cursor, large payload, MIME types, streaming.
Bài 6. Best practices thiết kế Tool MCP: naming, Zod/JSON Schema, error code, idempotency, side effects, dry-run.
Bài 7. Prompt resources reusable, parameter binding, sampling (server hỏi client gọi LLM), use cases thực tế.
Bài E. Vì sao AI 'phịa' khi không biết, dấu hiệu phát hiện, 5 mẹo giảm rủi ro tin sai. Ví dụ thực tế: AI bịa luật, bịa số liệu, bịa link, bịa người.
Bài F. Context window là gì, tại sao AI 'quên' giữa cuộc nói chuyện dài. Cách quản lý hội thoại để AI nhớ đúng phần quan trọng.
Bài G. Memory và Projects: AI có thực sự 'nhớ' bạn không, khác context window thế nào. Cách dùng Memory ChatGPT, Claude Projects, Gemini Saved Info.
Bài H. Token là gì giải thích đơn giản, vì sao tiếng Việt tốn token gấp đôi tiếng Anh, gói free/Pro/Pro Max khác nhau ở đâu, ai nên trả tiền, ai dùng free đủ.
Bài 3 series Background Agents. Cursor 1.0+ Background Agent: setup, sandboxed VM, PR-based workflow, billing, khi nào dùng. Hands-on 2026.
Bài 4. Devin 2.0 (Cognition), OpenDevin/All-Hands, Replit Agent 3: kiến trúc, billing, kết quả thực tế 2026. Ai dùng cái nào.
Bài 5 (final). So sánh thực tế BG agent vs sync agent: cost, latency, observability, failure modes, debug. Decision framework + use cases hybrid.
Bài 4 series Local LLM 2026. Wire MCP server vào local LLM stack: Ollama + open-webui, Cursor + Ollama backend, gptme + local. Hands-on từ homelab.
Bài 5. Khi local LLM dùng làm agent: agent loop hang, tool-call schema mismatch, OOM giữa generation, context overflow. Lessons từ homelab thực tế.
Bài 11. MCP Inspector dev tool (anthropic), integration test với client mocking, security checklist trước khi publish, contract test cho schema.
Bài 12. MCP server của bạn chạy được với client nào ngoài Claude Desktop? Cursor, Windsurf, gptme, OpenAI Codex, Continue. Setup mỗi client + khác biệt.
Bài 8. Deploy MCP server lên production: Cloudflare Workers (cf-mcp-server), Railway, self-host Docker, secret management, HTTPS, observability.
A Claude Code skill that syncs ~/.claude/ across machines using a branch-per-machine git layout. Pull-only, key-level merge for settings.json, prefer-newer for skills and rules, never auto-deletes. Plus the two design decisions that came out of real merge accidents.
A Claude Code skill that audits .gitignore for AI coding tool patterns and env file policy. Detects the project's framework (Vite, Next.js, Nuxt, Astro, SvelteKit, Remix) vs plain Node.js to apply the correct env convention, and patches AI tool entries that only ignore personal files while keeping team-shared configs committed.
A Claude Code skill that sets up .envrc in the current repo with GH_TOKEN resolved dynamically via gh auth, manages .gitignore, and runs direnv allow. Picks the correct gh account for multi-account setups, never writes a plaintext token to disk.
Tôi vừa publish series 30 bài LLM từ zero trong gần 1 tháng (2026-04-22 đến 2026-05-17) bằng cách viết tay bài 1 làm reference, sau đó spawn Claude Code agents song song viết phần còn lại. Bài này kể lại workflow thực, cost rough estimate, cái hay, cái dở, một moment quirky của agent, và ai phù hợp dùng pattern này.
Engineering log của việc thêm Style 2 diagram (palette coral/amber/teal kiểu Anthropic) vào blog Astro vốn dùng terminal mono. CSS vars trong global.css, inline SVG theme-adaptive, decision matrix Mermaid/PNG/extend Style 1/hand-roll, và 4 pitfall gặp khi ship 4 diagram đầu tiên.
Bài 1 series AI Agents từ zero. Định nghĩa agent từ góc nhìn dev, 4 thành phần cốt lõi (LLM, tools, memory, control loop), so sánh với chatbot, RPA, traditional code, kèm pseudocode tối giản và pitfall đầu tiên thường gặp.
Roadmap 25 bài về AI agents cho senior dev đã hiểu LLM: control loop, tool use, planning, memory, multi-agent, eval, production. Code from scratch trước, framework sau. Pitfall storytelling thay vì tutorial sạch.
Bài 3 series AI Agents. Vòng lặp cốt lõi của agent: structure, stop conditions, max_iterations, token budget, early termination khi detect loop.
Bài 10 series AI Agents. CoT prompting vs explicit reasoning steps trong structured output. Khi nào prompt 'think step by step' đủ, khi nào cần schema. Era reasoning model (o1, R1, Claude thinking).
Bài 5 series AI Agents. Hands-on: code agent đầy đủ ~100 dòng Python với Anthropic SDK Claude Sonnet 4.6. Tools file system + shell. Walk-through từng phần code, demo task thực tế.
Bài 4 series AI Agents. Quản lý memory: short-term history, scratchpad notes LLM tự viết, summarization khi vượt context window, long-term store với vector DB.
Bài 7 series AI Agents. Pattern Plan-and-Execute, LLM lên plan đa-bước trước, executor chạy từng bước. Khác ReAct ở chỗ planning là phase riêng.
Bài 8 series AI Agents. Tree of Thoughts (ToT), explore nhiều branch of thought song song, evaluate, pick best. Compute-intensive nhưng giải được task ReAct fail.
Bài 17 series AI Agents. Hai cách multi-agent giao tiếp: shared state (blackboard) vs message passing (queue/RPC). Pros/cons, code patterns, state consistency.
Bài 21 series AI Agents. Eval agent khó hơn eval LLM: nondeterministic, multi-step, có tool. 4 kỹ thuật: trace logging, replay, golden set, regression suite.
Bài 22 series AI Agents. Optimize cost (token, model tier) và latency (streaming, caching, parallelism). Concrete numbers từ Claude Sonnet 4.6 và Haiku 4.5.
Bài 23 series AI Agents. Catalog các fail mode thực tế: hallucination, infinite loop, goal hijacking, sandbagging. Detection signals và mitigation strategies.
Bài 25 series AI Agents (bài cuối). Vận hành agent trong production: metrics, alerts, dashboards, rollout strategy, rollback plan, A/B test framework. Closing the loop.
Bài 24 series AI Agents. 3 attack surface: prompt injection (chiếm via input), tool sandboxing (chiếm via output), secrets (chiếm via tool call). Mitigation tactics và least-privilege design.
Bài 20 series AI Agents. Phân tích 2 real-world implementation: Anthropic Agent SDK và Claude Code subagent system. Architecture, control flow, design lessons từ practice.
Bài 13 series AI Agents. Cho agent dùng browser: Playwright (DOM-based) vs Computer Use (vision + click). Use cases, code, cost compare.
Bài 12 series AI Agents. Cho agent chạy code do LLM viết, an toàn thế nào. Compare subprocess, Docker, e2b cloud sandbox. Security model từng option.
Bài 19 series AI Agents. Compare 3 framework multi-agent phổ biến. LangGraph (state graph), CrewAI (role-based), AutoGen (Microsoft event-driven). Khi nào dùng cái nào, khi nào skip framework.
Bài 15 series AI Agents. MCP, protocol Anthropic open-source để chuẩn hoá tool/resource/prompt layer. Architecture, server vs client, real-world use cases.
Bài 16 series AI Agents. Khi nào nhiều agent tốt hơn một. 3 pattern: supervisor (1 boss), handoff (chuyền turn), debate (đối đáp). Trade-off compute vs quality.
Bài 14 series AI Agents. RAG cho agent khác RAG cho QA: retrieval là một tool trong loop, agent quyết định khi nào search và query gì. Multi-hop retrieval.
Bài 6 series AI Agents. Pattern ReAct, LLM nghĩ trước khi hành động, observation kết quả, lặp. Original paper, why it works, code implementation, khi nào skip với modern model.
Bài 9 series AI Agents. Agent tự đánh giá output trước khi return. Critic pattern, verifier pattern, retry với feedback. Reflexion paper baseline.
Bài 18 series AI Agents. Pattern role-based: planner (plan), executor (run), reviewer (verify). Khi nào worth chia role, prompt template từng role, tradeoff cost vs quality.
Bài 11 series AI Agents. Sâu hơn bài 2: nguyên tắc thiết kế tool tốt, schema design pattern, validation layer, idempotency keys, atomic vs partial action.
Bài 2 series AI Agents. Cách định nghĩa tool cho LLM, viết JSON schema rõ ràng, handle error đúng cách, và pattern idempotency cho tool có thể retry an toàn.
Bài 27 bonus AI Agents series. Deep-dive Hermes Agent từ Nous Research (Feb 2026, 140K+ stars). Self-evolving skills, FTS5 persistent memory, multi-channel (Telegram/Discord/Slack/CLI), self-host trên VPS rẻ. Lessons design self-improving agent.
Bài 26 bonus AI Agents series. Deep-dive OpenClaw, framework agent open-source nổi nhất 2026 (Peter Steinberger, 347K stars). Kiến trúc, agent-loop, multi-model proxy, lessons từ vụ Anthropic third-party ban tháng 4.
Tôi đã build pipeline memory cho Claude Code từ vài tháng trước bằng autoMemoryDirectory, folder markdown chia theo project, frontmatter YAML, plus skill nf-dream để consolidate. Tuần này AgentMemory MCP trending GitHub với SQLite, vector embedding, 51 MCP tool, hybrid BM25 cộng vector cộng knowledge graph. Bài này là góc nhìn của người đã đi đường plain markdown soi tool DB-backed: cái nào đáng đổi, cái nào không, và khi nào tôi sẽ thử.
Một agent đang chạy task refactor, nó `grep` ra 12 file, đọc nguyên 800 dòng mỗi file để tìm 1 function, hết context, mất task. Semble (Show HN hôm nay) đề xuất một cách khác: index codebase một lần, query bằng hash + embedding nhỏ, trả về snippet đã chunk theo tree-sitter. Bài này kể lại lý do mình plug Semble vào Claude Code qua MCP, so sánh thẳng với grep trong context của agent (không phải human), và những giới hạn mình note ra sau vài ngày dùng. Không phải tutorial, gần với workflow share hơn.
A Claude Code skill that installs a project-scoped rule overriding the global 'ask before every commit and push' safety check, but only for this one repo. The current branch at install time becomes the protected head; one or more of three modes (worktree-pr, worktree-local-merge, direct-on-head) declares how work lands on it. Plus the four design decisions that took an incident each to get right.
A Claude Code skill that configures shared memory per project via the env var CLAUDE_COWORK_MEMORY_PATH_OVERRIDE in .claude/settings.local.json (not autoMemoryDirectory, which the binary silently ignores at project scope), picks the target folder via an interactive picker, optionally migrates existing per-project memory into a shared folder with smart merge, and refuses to point at a path that contains the project itself. Plus the four design decisions that took an incident each to get right.
Roadmap 25 bài về Claude Code dành cho dev đã quen gõ /commands nhưng muốn hiểu kiến trúc bên dưới. Mental model trước, customization sau: rules, skills, agents, hooks, memory, MCP, worktree, team mode. Mỗi bài đứng độc lập, đọc tuần tự sẽ tích lũy đúng thứ tự.
Phần lớn dev nghĩ Claude Code là cái terminal có thể code. Thực tế nó có 4 entry point khác nhau, chia sẻ chung một core (model, tool loop, permissions) nhưng hành xử rất khác về state và context. Bài mở hộp đen: anatomy của một session, 5 lớp prompt được dựng mỗi turn, và lý do biết các lớp này quan trọng cho mọi customize sau này.
Memory mặc định của Claude Code là per-workdir và không sync. Nếu bạn có nhiều client hoặc nhiều project, không tách memory là recipe cho context leak. Bài này giải thích cách trỏ memory folder cho từng project, tại sao field autoMemoryDirectory ở scope local bị binary lờ đi, và route env CLAUDE_COWORK_MEMORY_PATH_OVERRIDE thực sự work.
Bạn có MacBook ở nhà, server homelab, và có thể thêm một laptop nữa. Mỗi máy một bộ CC config. Không sync thì drift. Sync naively thì merge conflict mỗi lần pull. Bài này trình bày pattern branch-per-machine: một git branch cho mỗi máy, workflow để cherry-pick config từ máy khác, và skill tự động hóa quá trình đó.
Claude Code không có database hay embedding store bên trong. Memory là một folder chứa file .md, và MEMORY.md là index được nạp vào prompt mỗi session. Bài này giải thích cấu trúc folder, 4 type memory, cách model đọc index, và khi nào nên hoặc không nên save.
Bài 6 đi sâu vào L2 của prompt stack: ba mức CLAUDE.md từ global đến project, và cách rule modular với frontmatter paths dùng progressive context để chỉ load instruction cần thiết theo file đang touch.
Mỗi lần bạn nhấn Enter, Claude Code không chỉ gửi câu hỏi của bạn lên model. Binary lắp ráp 5 lớp riêng biệt thành một prompt hoàn chỉnh trước khi gọi API. Bài này mổ xẻ từng lớp đó, kèm dữ liệu thực từ session log và số token cache để thấy rõ chi phí của mỗi turn.
Context window 1M token nghe to, nhưng một session làm việc thực vẫn chạm giới hạn sau vài giờ. Bài này đi sâu vào compaction: binary detect khi nào trigger, nó làm gì với history cũ, và tại sao session dài đôi khi quên chi tiết làm 30 phút trước. Kèm theo: prompt cache 1h TTL hoạt động thế nào và tại sao nó quan trọng hơn bạn nghĩ.
Hook khác skill ở chỗ nó không phải gợi ý cho model mà là code chạy ngoài vòng lặp model, không thể bị bỏ qua. Bài này đi từ khái niệm đến script thực tế: chọn lifecycle event, parse stdin, dùng exit code đúng, handle idempotency và timeout, rồi wire vào settings.json. Bài cuối của series.
Hook là shell script wired vào lifecycle event của Claude Code qua settings.json. Khác hoàn toàn với skill hay subagent: hook chạy ngoài model loop, không cần model invoke, không tiêu token. Bài này giải phẫu cơ chế hook, exit code semantics, stdin JSON payload, và hai ví dụ thực tế từ worktree đến notification.
Laptop ở nhà, bạn đang trên tàu, nhưng cần CC chạy một task deploy hoặc fix typo gấp. Bài này mô tả pattern dùng Telegram bot làm bridge điều khiển Claude Code từ điện thoại: architecture, các thách thức kỹ thuật, và những chỗ dễ làm sai về security.
MCP (Model Context Protocol) là cơ chế để Claude Code kết nối ra external system: database, GitHub, Slack, browser. Bài này giải thích cách MCP hoạt động, khác hooks ở chỗ nào, và khi nào bạn nên tự build thay vì dùng server có sẵn.
Memory của Claude Code là file-based, mỗi máy giữ một bản độc lập. Dev có nhiều máy thì memory không tự đồng bộ. Bài này trình bày pattern dùng git submodule để biến memory folder thành repo riêng, sync được giữa MacBook, server, và mọi máy khác mà không cần tool bổ sung.
Chạy nhiều agent song song không đồng nghĩa với làm việc nhanh hơn nếu hai agent cùng đụng vào một file. Bài này phân tích ba cấp isolation, anti-pattern hay gặp nhất, và các coordination pattern giúp N agent chạy cùng lúc mà không có race condition.
Plan mode là cơ chế CC buộc model viết kế hoạch trước và chờ user approve trước khi thực thi. Bài giải thích workflow, file state, khi nào cần dùng, và sự khác biệt giữa plan, todo, và memory.
Bốn mode permission của Claude Code, cách cấu hình allowlist và deny list trong settings.json, và lý do tôi đã mất một bucket production để học bài này. Bài này cũng nói về PreToolUse hook và cách truyền mode khi spawn agent.
Plugin không phải skill lớn hơn. Đó là một cơ chế đóng gói khác: nhiều thành phần liên quan được bundle vào một đơn vị cài đặt. Bài này phân biệt plugin với skill, giải thích marketplace, và chỉ ra khi nào nên tự build thay vì dùng có sẵn.
Ba file settings của Claude Code, thứ tự precedence, và các field thực sự điều khiển hành vi: permissions allow/deny, hooks lifecycle, env vars theo nhóm chức năng. Biết cái nào cần commit, cái nào phải gitignore.
Skill trong Claude Code không phải là macro đơn giản. Một skill tốt có trigger rõ ràng, scope hẹp, xử lý failure, và lifecycle rõ ràng như bất kỳ module code nào. Bài này đi từng bước build 1 skill từ ý tưởng đến file SKILL.md cuối cùng, kèm các anti-pattern thường gặp.
Skill trong Claude Code không phải là tính năng built-in mà là một convention thư mục. Bài này mổ xẻ anatomy của một skill từ frontmatter, body, đến cách model quyết định khi nào trigger, và khi nào bạn cần tắt auto-trigger để tránh skill chạy lúc không mong muốn.
Subagent trong Claude Code không phải là session chia sẻ với main session. Nó là một session riêng biệt, có persona riêng, có tool subset riêng, và chạy độc lập. Bài này mổ xẻ cấu trúc một agent definition file: frontmatter, body system prompt, examples block, và cách spawn từ main session.
Bài này đi vào team mode của Claude Code: cách tạo agent có tên, có thể resume xuyên turn qua SendMessage, khác gì so với one-shot Agent call, và khi nào dùng team thay vì spawn agent thông thường.
Main session khởi tạo subagent theo 4 pattern khác nhau, mỗi pattern phù hợp với một nhóm tình huống cụ thể. Hiểu 4 pattern này giúp bạn ra quyết định đúng thay vì spawn agent theo quán tính.
Bài 1 giới thiệu tool loop trong 5 bước. Bài này đi sâu vào cơ chế bên dưới: khi nào model gửi nhiều tool call trong một turn, binary executor xử lý thế nào, lỗi được handle ra sao, và điều gì khiến vòng lặp dừng lại. Kèm ví dụ cụ thể 1 turn với 3 tool call chạy song song.
Scenario thực tế nhất của worktree agent: main session đang tail log, edit .env.production, scp script lên server. Một file cần hotfix. Nếu bạn checkout sang branch mới, mất hết scratch state. Worktree agent là pattern đúng, và bài này cho thấy chính xác cách làm.
Khi spawn agent mà để nó edit chung working tree với main session, bạn đang chấp nhận race condition và stale view. Bài này phân tích isolation: worktree, cách CC tạo git worktree riêng, tại sao base branch phải là HEAD thay vì origin/main, và hook WorktreeCreate làm gì bên dưới.
Bóc tách kiến trúc daemon của Claude Code 2.x: roster.json, spare worker pool, và cơ chế orphan adoption. Tại sao session foreground gõ `claude` trong terminal có thể không bao giờ tự xuất hiện trong `claude agents`, và `/bg` là cách deterministic duy nhất để buộc nó hiện ra.
FleetView dispatch session mới với cwd lấy từ chính process đang chạy `claude agents`. Bài này chỉ ra cách đúng (và một anti-pattern phổ biến) để session mới được spawn đúng thư mục.
Từ CC 2.1.143, có setting worktree.bgIsolation cho phép background session (session chạy nền, không phải subagent) edit working copy trực tiếp thay vì bị force vào worktree riêng. Bài giải thích tại sao background session cần một cơ chế isolation khác, khi nào nên tắt isolation, và khác gì so với isolation: worktree khi spawn subagent.
Trước FleetView, một dev dùng Claude Code nhiều project sẽ có 6 tmux pane, 2 Code tab trong Claude desktop, và một SSH session trên phone để thỉnh thoảng attach vào homelab xem agent batch đã xong chưa. Bài này kể lại workflow đó, sáu pain point cụ thể, và cách FleetView (TUI `claude agents`) gỡ được phần lớn trong số chúng. Không phải tất cả.
Hướng dẫn dựng alert rule trong Kibana 8.x: ES query rule, threshold rule, burn rate cho SLO. Cover trigger condition, schedule, evaluation logic, pitfall của time window và pattern để giảm noise.
Khoá truy cập theo từng document và che field nhạy cảm bằng DLS và FLS. Hướng dẫn tạo API key có role descriptor scope tới tenant, mask PII, cộng quyền multi-role và pitfall query templating.
Bật audit log Elasticsearch và Kibana, chọn event quan trọng, ship sang index riêng, giữ trail 1 năm và bảng câu hỏi auditor SOC2 hay hỏi với truy vấn KQL kèm sẵn.
The global rule that decides when to delegate code edits to a sub-agent, when to put that agent in a worktree, and how to integrate the result without breaking the main session's working tree. Built from two real incidents.
A tiny rule that bans barrel index.ts files and enforces direct component naming. Cheap to write, expensive to skip. The rule pays back every time the model is tempted to generate index.ts re-exports.
A rule that forbids the model from generating mock data, modifying global API endpoints, or inventing new utilities when an existing helper already covers the case. The rule that makes Claude Code feel like a teammate instead of a stranger.
A global rule for commit message format, branch naming, GitHub CLI account switching, and the merge patterns that protect a debug session from being reset by a stray checkout. The biggest rule file in my setup.
A rule that tells Claude Code how to walk a user through a procedure. One step at a time when the procedure is non-trivial. Anchor points for confirmation. Stop guessing when the user says I don't see that.
The convention for the .local/ folder. Where credentials and personal project context live. Why every move out of a tracked path needs a breadcrumb so the next session can find what moved.
A short global rule that forbids Claude Code from running git commit or git push unless I type the explicit word. It cost me one bad push to write down. Now it lives in every session.
A rule that documents the three places zsh and bash diverge enough to break the model's shell snippets. Variable word-splitting, no-match globs, array indexing. Small differences, large failures, fixable with one rule.
Hướng dẫn cấu hình connector trong Kibana 8.x cho Slack, Email (SMTP/Exchange), Webhook và PagerDuty. Cover security pattern, template variable, secret management và pitfall khi action không gửi notification.
Workflow biến Kibana dashboard thành code: export NDJSON, commit Git, validate trong CI và import tự động qua API. Hết cảnh dashboard biến mất khi cluster rebuild hoặc người tạo nghỉ việc.
Hướng dẫn dedup và throttle alert trong Kibana 8.x: notifyWhen, throttle interval, group alerts, dedup_key cho PagerDuty và patterns để giảm noise mà không miss critical alert.
Runbook xử lý sự cố disk full và shard imbalance trên Elasticsearch: gỡ flood-stage read-only, free disk an toàn, force reroute shard, scale node và prevent tái diễn. Pattern thực chiến không mất data.
Bài 17 series LLM từ zero. Khi model lớn quá 1 GPU, phải chia. Có 4 cách chia: replicate (DP/DDP), shard weights (FSDP/ZeRO), shard layers (pipeline parallel), shard matmul (tensor parallel). Bài này giải thích từng cái và khi nào nên dùng cái nào.
Bài 20 series LLM từ zero. Sau SFT là alignment. RLHF dùng reinforcement learning, DPO bỏ RL bằng một loss đơn giản hơn. Bài này giải thích Bradley-Terry model, KL penalty, reward hacking, và lý do DPO đang dần thay thế PPO trong production.
Debug query Elasticsearch chậm theo bài bản: bật slow log, đọc profile API, hiểu shard distribution và segment merge. Pattern fix thường gặp cho query phức tạp và aggregation lớn.
Một model claim 92% MMLU, model khác 89%. Có nghĩa là model A tốt hơn không? Câu trả lời ngắn: chưa chắc. Bài cuối series mở câu hỏi sống còn của AI engineering: làm sao đánh giá LLM đúng cách, benchmark nào đáng tin, và xây custom benchmark cho use case của bạn.
Bài 21 series LLM từ zero, capstone Part 5. Tutorial step-by-step fine-tune Llama-3-8B với dataset tiếng Việt trên GPU cloud rental ~$20. Tổng hợp LoRA, QLoRA, SFT đã học từ bài 18-19. Sau bài này bạn có một model fine-tuned VN thực của riêng mình.
Thiết kế ILM policy cho log index: rollover theo size, shrink xuống 1 shard, force-merge, freeze và delete. Kèm bảng node tier, rollover alias và pitfall data stream với rollover thủ công.
Hướng dẫn dùng Kibana REST API cho automation thực chiến: tạo hàng loạt user và role, cập nhật nhiều dashboard cùng lúc, wrap API thành CLI nội bộ. Pattern retry, pagination và error handling production-grade.
Quy trình debug khi Kibana không lên: kiểm tra browser console, network, Kibana server logs, kết nối Elasticsearch, cluster health và disk. Mỗi layer có symptom và fix riêng.
Đặt Kibana sau Nginx hoặc Cloudflare đúng cách: server.publicBaseUrl, XSRF header, websocket upgrade, kích thước header và pitfall khi Cloudflare strip header kbn-xsrf.
Inference LLM chậm không phải vì model lớn mà vì mỗi token mới phải tính lại attention với toàn bộ token trước đó. KV cache giải quyết bằng cách lưu kết quả trung gian. PagedAttention giải quyết vấn đề KV cache lãng phí memory. Hai kỹ thuật, ba lần tăng tốc.
Một LLM trả lời câu hỏi là một thứ. Một LLM tự lên kế hoạch, gọi tool, đọc kết quả, sửa kế hoạch, lặp lại cho đến khi xong nhiệm vụ, là thứ khác hoàn toàn. Bài viết mở mental model agent, ReAct pattern, tool use, kèm code Python loop tối giản.
So sánh thực chiến ba log shipper phổ biến nhất cho ELK stack: Filebeat của Elastic, Fluentd của CNCF và Vector của Datadog. Resource footprint, ngôn ngữ pipeline, performance, debugging và lựa chọn theo use case.
Llama-3 train context 8k. Llama-3.1 hỗ trợ 128k. Gemini quảng cáo 2M. Model không retrain từ đầu, chỉ điều chỉnh cách encode position. Bài viết mở RoPE, RoPE scaling, YaRN, ALiBi, và cách phân biệt context dài thật vs quảng cáo.
Bài 18 series LLM từ zero. Fine-tune full Llama-3-8B tốn 60GB VRAM. LoRA cắt xuống 1.5%, vẫn giữ 95% performance. QLoRA cắt thêm bằng 4-bit quantization, fit 7B model trong 8GB VRAM. Bài này giải thích low-rank decomposition, code triển khai với peft, và khi nào nên dùng cái nào.
Hướng dẫn dùng Kibana Maps để render dữ liệu địa lý từ IoT, telemetry và log có toạ độ. Cover geo_point mapping, layer types, heatmap, cluster, choropleth và pitfall hay gặp khi data từ device đẩy lên Elasticsearch.
Bài 16 series LLM từ zero. Train 7B model trên GPU 24GB là khác biệt giữa OOM step đầu và chạy được. Mixed precision cắt memory một nửa, gradient checkpointing cắt thêm 30-40%. Bài này giải thích tại sao FP16 không đủ, BF16 thay thế nó, và checkpointing trade compute cho memory.
Mixtral-8x7B có 47 tỷ params nhưng mỗi token chỉ kích hoạt 13 tỷ. DeepSeek-V3 671B nhưng chỉ active 37B mỗi forward pass. MoE là kiến trúc cho phép scale model lên kích thước khổng lồ mà compute không bùng nổ. Bài viết mở MoE từ ý tưởng đến triển khai.
Bài cuối series Kibana từ A đến Z. Tuning sâu Elasticsearch ở production: JVM heap sizing, GC tuning, field caps cache, segment merge throttling, refresh interval và circuit breaker.
Llama-3-70B nặng 140GB ở FP16. Sau khi quantize INT4 còn 35GB, chạy được trên một con GPU 48GB hoặc CPU 64GB RAM. Bài viết mở hộp quantization: tại sao nén được, nén kiểu gì, mất gì khi nén, và khi nào nên chọn GGUF vs AWQ vs GPTQ.
Bạn muốn LLM trả lời theo tài liệu công ty mà không fine-tune. Câu trả lời ai cũng nghe: RAG. Nhưng RAG không phải một feature, nó là một pipeline 5 bước, và mỗi bước có hàng tá lỗi có thể xảy ra. Bài viết mở pipeline RAG từ chunking đến prompt construction, kèm code Chroma chạy được.
OpenAI o1 ra 9/2024 đánh bại GPT-4o trong toán và code dù model nhỏ hơn. DeepSeek R1 cuối 2024 open source kèm paper, phơi bày công thức. Reasoning model không phải prompt engineering, mà là cách train mới: thưởng cho việc suy nghĩ trước khi trả lời.
Bài 15 series LLM từ zero. Scaling laws là kinh tế học của LLM. Bao nhiêu parameter, bao nhiêu data, bao nhiêu compute là tối ưu? Kaplan 2020, Chinchilla 2022, và những hệ quả của chúng đến Llama-3 hôm nay. Hiểu được scaling laws là biết tính cost trước khi pretrain.
Cùng một model Llama-3-8B Q4 chạy trên vLLM cho throughput 2000 tokens/s, trên Ollama cho 40 tokens/s. Khác biệt 50 lần không phải vì engine tệ mà vì mục đích khác nhau. Bài viết phân biệt 4 serving framework theo trục concurrency, hardware, ops complexity.
Bài 19 series LLM từ zero. SFT là bước biến một pretrained model thành một instruction-following assistant. Bài này dissect data format, chat template, loss masking, và cách build SFT pipeline thực tế bằng trl library. Code chạy được trên Colab free.
Hướng dẫn dựng SLO với Kibana 8.x: định nghĩa SLI từ log, cấu hình Service Level Objective, tính error budget, và setup alert progression theo Google SRE Workbook (burn rate multi-window).
Cấu hình S3 snapshot repository, Snapshot Lifecycle Management (SLM), restore index, test DR và bảng RPO/RTO so sánh các chiến lược backup cluster Elasticsearch.
Dùng Kibana Spaces để chia dev, staging, prod và team con trên cùng một cluster. Hướng dẫn tạo space, copy saved object, default route, disabled features và pitfall với index pattern dùng chung.
Hướng dẫn dùng Terraform provider Elastic Stack để declarative manage saved objects, alert rules và connectors của Kibana. State management, dependency graph, migration từ NDJSON workflow.
Setup TLS cho Elasticsearch transport, HTTPS giữa Kibana-ES, mTLS cho Beats và rotate cert không downtime. Kèm elasticsearch-certutil, keystore và pitfall verification_mode.
Mở Part 4 của series LLM từ zero. Training loop là phần code mọi research engineer phải viết hàng ngày, nhưng ít dev thực sự hiểu từng dòng. Bài này dissect 5 thành phần: forward pass, loss, backward, optimizer step, lr schedule. Code PyTorch chạy được, không phải pseudo.
Hai chiến lược upgrade ELK production: minor version rolling restart in-place và major version cluster-swap dual-write. Kèm checklist tiền upgrade, deprecation API, downgrade plan và pitfall ILM/template incompatibility.
Hiểu mô hình RBAC trong Kibana 8.x: cluster privileges, index privileges, Kibana feature privileges và cách map user qua native realm hoặc SSO để chia quyền theo team.
Tổng hợp các lỗi thường gặp khi dựng dashboard Kibana: cardinality đếm trùng, terms aggregation cắt mất nhóm nhỏ, time bucket lệch múi giờ, sum trên doc_values vs source và cách tránh báo cáo sai số liệu.
Self-hosted AI agent (OpenClaw, gptme, AutoGPT, LangChain agents) thực chất là ChatOps đã có từ 2000s với LLM thay parser. Pattern giống Slack bot, Zapier, n8n bạn dùng hằng ngày, nhưng blast radius khác hẳn: full shell access, prompt injection thành privilege escalation, supply chain qua skill cộng đồng. Bài này strip hype kỹ thuật, đo resource thật sự cần, và 7 câu hỏi trước khi cài lên máy có dữ liệu cá nhân.
An ongoing series where I publish, white-labeled, the Claude Code customizations I rely on day-to-day. Skills, hooks, rules, subagents, and slash commands. Each post explains one artifact, the problem it solves, and the patterns inside it that you can copy or adapt.
A Claude Code skill that wraps team and agent spawning into five named modes, runs a four-line pre-flight check, and bakes the cooperative shutdown protocol into the workflow. Plus the four design decisions that took an incident each to get right.
Bạn gõ câu hỏi vào ChatGPT, 3 giây sau nhận được câu trả lời. Ở giữa có gì? Bài viết mở hộp đen: tokenize, embed, attention, sample. Không dùng một công thức toán nào, chỉ mental model cho dev đã quen code nhưng lần đầu đọc kỹ về LLM.
Đạo hàm nghe sợ nhưng cốt lõi chỉ là đo độ dốc. Gradient là đạo hàm của hàm nhiều biến. Chain rule là cách chuyền gradient ngược qua nhiều layer. Backprop = chain rule áp dụng có hệ thống. Mục tiêu là intuition cho dev, không giải bài tập toán.
Roadmap 30 bài học LLM từ foundation math đến production deployment cho senior dev muốn pivot AI: mental model, tokenization, attention, training, fine-tuning, inference, advanced topics. Hybrid approach: 70% hands-on code + 30% blog.
Bài 1 nói mọi thứ bên trong LLM đều là vector và matrix. Vector là gì? Matrix là gì? Tại sao dot product là backbone của attention và RAG? Mình phá băng math foundation cho dev: chỉ 4 khái niệm, không công thức phức tạp.
Ghép linear algebra + calculus + probability thành neural network đầu tiên. Từ perceptron 1957 đến MLP đa layer, code 60 dòng NumPy train XOR không cần PyTorch. Đọc xong, bạn hiểu building block gốc của mọi LLM hiện đại.
LLM output là xác suất, không phải lựa chọn cứng. Softmax biến logits thành phân phối. Cross-entropy là loss function chuẩn. Perplexity là metric đánh giá model. Bài này giải thích tại sao mấy khái niệm này là trái tim của training và evaluation, với code NumPy minh hoạ.
Bài 6 giới thiệu BPE. Bài này code từ zero, 150 dòng Python thuần không dependency. Train tokenizer trên Shakespeare, encode/decode, visualize merges. Đọc xong, BPE bớt abstract hơn nhiều.
Paper 'Attention is All You Need' (2017) là điểm bùng nổ của Transformer. Nhưng Q/K/V từ đâu ra, nghĩa gì, tại sao 3 cái thay vì 1? Bài này giải thích bằng ẩn dụ thư viện, không công thức - xây intuition trước khi đến code ở bài 10.
Token ID biến thành vector - đó là embedding. Nhưng vector đó từ đâu? word2vec (2013) dạy model hiểu semantic. Contextual embedding (BERT/GPT) khác word2vec thế nào? Tại sao cần thêm positional encoding, và RoPE làm điều đó cách nào?
Bài 10 code single-head attention. GPT/Llama có 32-128 heads. Tại sao chia? Mỗi head làm gì khác nhau? Cost tính thêm bao nhiêu? Bài này: intuition + code multi-head bằng NumPy, visualize head specialization (syntax, coreference, long-range).
Capstone Part 3. Karpathy nanoGPT là implementation GPT-2 trọn vẹn trong ~300 dòng PyTorch. Mình đọc code, train GPT nhỏ trên Shakespeare trong 15 phút CPU, rồi generate text. Đọc xong bạn code được GPT-2 nhỏ không cần HuggingFace.
Bài 9 đã xây intuition QKV. Bài này code từ zero một self-attention layer hoàn chỉnh bằng NumPy thuần - 80 dòng, xử lý batch, causal mask, scaling. Verify output matches PyTorch implementation. Đọc xong, attention không còn là hộp đen.
Multi-head attention là một nửa Transformer. Nửa còn lại: MLP (feed-forward), layer normalization, residual connection. Bài này ghép 4 thành phần thành 1 block hoàn chỉnh, stack 12 block thành GPT-2, giải thích thứ tự (pre-norm vs post-norm) và tại sao residual quan trọng.
Bài 1 nói input text biến thành tokens. Nhưng cách biến là gì? BPE, WordPiece, SentencePiece có gì khác nhau? Tại sao tokenizer quyết định nhiều hơn bạn nghĩ - từ cost API đến khả năng model xử lý tiếng Việt. Deep dive cho dev.
Series research và so sánh các AI coding plan (subscription + API pay-per-token) của Anthropic, Alibaba, GLM, Moonshot, OpenAI. Giúp lập trình viên chọn đúng provider cho ngân sách và workflow thực tế.
So sánh chi tiết subscription plan và API pay-per-token pricing của Anthropic, Alibaba, GLM, Moonshot, OpenAI tại thời điểm tháng 4/2026. Kèm decision framework và cảnh báo billing pitfall.
Benchmark trên 5626 prompt thực tế từ 555 sessions Claude Code. Claim 'tiếng Việt tốn hơn x2 token' chỉ đúng 2.9% use case. Phần lớn thời gian mix-lang Việt-Anh còn tiết kiệm hơn pure English, và data cho thấy lý do.
Benchmark across 5626 real prompts from 555 Claude Code sessions shows the '>2x token' claim for Vietnamese only applies to 2.9% of actual usage. Mixed Vietnamese-English prompts are more token-efficient than pure English on longer messages, and the data shows why.
Dùng Canvas của Kibana để dựng infographic pixel-precise có brand công ty: khác Dashboard thế nào, expression language pipeline, data source ESSQL, dynamic image/color theo value, và export PDF multi-page giao CEO/CFO. Dành cho developer backend và platform team.
Nâng Discover từ mức cơ bản lên power-user: tạo Runtime field không cần reindex, filter nested object và regex, bật highlighting để scan log nhanh, phân biệt Saved Query với Saved Search, inspect request để debug query và tối ưu performance.
Phân biệt KQL và ES|QL trong Kibana 8.x: triết lý khác nhau, cú pháp đối chiếu, pitfall phổ biến, và quy tắc tay chọn ngôn ngữ nào cho filter, aggregation, alert và dashboard. Dành cho developer backend và DevOps.
Dựng visualization trong Kibana 8.x bằng Lens: drag-drop chart cơ bản, Formula mode với function và time shift, annotation layer cho deploy marker, reference line cho SLO, pitfall về cardinality và time interval. Dành cho developer backend muốn tự làm dashboard production-grade.
Hướng dẫn toàn diện sử dụng Kibana cho lập trình viên backend: filter error log bằng KQL, tránh pitfall với ES|QL, tạo Saved Search và Dashboard qua GUI, tương tác Kibana qua REST API và quản lý API key an toàn.
Roadmap series 28 bài học Kibana từ cơ bản đến production: cover Discover, KQL/ES|QL, Lens, Dashboard, Alerts, RBAC, ILM, automation và troubleshooting cho developer backend.
Implement a practical Internal Developer Platform with Backstage on Kubernetes, software templates, service catalog, and golden paths for engineering teams.
Implement advanced ArgoCD patterns for scalable GitOps: App of Apps, environment promotion, sync waves, and safe progressive delivery workflows.
A deep dive into etcd, the distributed key-value store that powers Kubernetes. Learn about consistency, high availability, and backup strategies.
The second post in our Kubernetes A-to-Z series covering essential best practices for security, reliability, and resource management.
The sixteenth post in our Kubernetes A-to-Z series covering authentication mechanisms, Role-Based Access Control, security contexts, and cluster security best practices.
The fourth post in our Kubernetes A-to-Z series covering Deployments, rolling updates, rollbacks, and application lifecycle management strategies.
The second post in our Kubernetes A-to-Z series covering container fundamentals, Docker basics, and essential concepts needed before learning Kubernetes.
The seventeenth post in our Kubernetes A-to-Z series covering multi-cluster architectures, federation patterns, service mesh, disaster recovery, and cross-cluster communication.
GitOps principles and practical ArgoCD and FluxCD examples for Kubernetes deployment workflows.
Build an Internal Developer Platform (IDP) on Kubernetes with Backstage, self-service capabilities, golden paths, and platform engineering practices.
The tenth post in our Kubernetes A-to-Z series covering Ingress controllers, routing rules, TLS termination, and advanced traffic management patterns.
The first post in our Kubernetes A-to-Z series covering Kubernetes fundamentals, architecture, components, and basic cluster setup.
Learn how to run one-off tasks and scheduled batch jobs in Kubernetes using Jobs and CronJobs resources.
Design Kafka topic and partition strategy for IoT workloads with practical guidance on throughput, ordering, consumer scaling, and operational limits.
Design a practical backup and disaster recovery strategy for Kubernetes with etcd snapshots, Velero, restore drills, and RTO/RPO planning.
The eleventh post in our Kubernetes A-to-Z series covering Helm charts, repositories, templating, values, and application lifecycle management.
Design a practical multi-tenant Kubernetes model with namespace boundaries, RBAC, network isolation, quotas, and operational guardrails.
A practical guide to reducing Kubernetes infrastructure spend with right-sizing, autoscaling, scheduling strategy, and workload-level optimization.
A practical security hardening checklist for production Kubernetes clusters, covering identity, network, workloads, supply chain, and runtime controls.
A practical map of the Kubernetes A-to-Z series, from core concepts to production operations, security, GitOps, and cluster lifecycle work.
A practical comparison of Kubernetes and Docker Swarm container orchestration platforms, including command references, architecture differences, and examples.
The ninth post in our Kubernetes A-to-Z series covering ConfigMaps, Secrets, configuration management patterns, and environment-specific deployments.
The thirteenth post in our Kubernetes A-to-Z series covering logging architectures, Prometheus metrics, distributed tracing, and observability best practices.
The twelfth post in our Kubernetes A-to-Z series covering Operators, Custom Resource Definitions (CRDs), controller patterns, and extending Kubernetes.
The seventh post in our Kubernetes A-to-Z series covering Namespaces, multi-tenancy, resource quotas, and cluster organization strategies.
The third post in our Kubernetes A-to-Z series covering pods, their lifecycle, networking, storage, and multi-container patterns.
Build a practical Kubernetes observability stack using metrics, logs, and traces with Prometheus, OpenTelemetry, Loki, and actionable SLO-driven alerting.
Understand why PostgreSQL indexes can grow quickly in production and how to control index bloat with better schema design, maintenance, and query patterns.
Testing strategies, chaos engineering, CI/CD integration, and quality assurance practices for Kubernetes workloads.
The sixth post in our Kubernetes A-to-Z series covering ReplicaSets, scaling strategies, pod disruption budgets, and high availability patterns.
Run stateful workloads safely on Kubernetes with operator-based patterns for PostgreSQL and Kafka, including storage, scaling, backup, and failure recovery.
A comprehensive comparison of service mesh platforms including architecture, features, performance benchmarks, and practical implementation guides for Istio, Linkerd, and Consul Connect.
The fifth post in our Kubernetes A-to-Z series covering Services, networking patterns, service discovery, and load balancing in Kubernetes.
The fourteenth post in our Kubernetes A-to-Z series covering debugging techniques, common issues, diagnostic commands, and systematic troubleshooting approaches.
Master the art of Kubernetes upgrades. Learn about version skew policies, node draining, and strategies for zero-downtime cluster maintenance.
The eighth post in our Kubernetes A-to-Z series covering Volumes, PersistentVolumes, PersistentVolumeClaims, storage classes, and stateful application patterns.
Love it or hate it, YAML is the language of Kubernetes. Learn syntax tips, common pitfalls, and tools to validate your manifests.
The final post in our Kubernetes A-to-Z series covering advanced deployment strategies, GitOps, progressive delivery, canary deployments, and production-ready patterns.
The twenty-fifth post in our Kubernetes A-to-Z series covering workload types: Pods, ReplicaSets, Deployments, StatefulSets, DaemonSets, Jobs, and CronJobs, with decision guidance and YAML examples.
How Kubernetes extends itself. Custom Resource Definitions, admission webhooks, the API aggregation layer, and kubectl plugins, with real-world examples from cert-manager, Istio, and Argo CD.