<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"><channel><title>nghia-pham.dev</title><description>Practical notes by Nghia Pham on Kubernetes, platform engineering, frontend, backend, databases, and AI coding for teams building real software.</description><link>https://blog.nghia-pham.com/</link><item><title>Backstage on Kubernetes: Practical Platform Engineering Guide</title><link>https://blog.nghia-pham.com/blog/backstage-kubernetes-platform-engineering-practical-guide/</link><guid isPermaLink="true">https://blog.nghia-pham.com/blog/backstage-kubernetes-platform-engineering-practical-guide/</guid><description>Implement a practical Internal Developer Platform with Backstage on Kubernetes, software templates, service catalog, and golden paths for engineering teams.</description></item><item><title>ArgoCD Advanced Patterns: App of Apps and Promotion Flows</title><link>https://blog.nghia-pham.com/blog/argocd-advanced-patterns-app-of-apps-promotion/</link><guid isPermaLink="true">https://blog.nghia-pham.com/blog/argocd-advanced-patterns-app-of-apps-promotion/</guid><description>Implement advanced ArgoCD patterns for scalable GitOps: App of Apps, environment promotion, sync waves, and safe progressive delivery workflows.</description></item><item><title>[24/24] E is for Etcd: Understanding the Brain of Kubernetes</title><link>https://blog.nghia-pham.com/blog/e-is-for-etcd-kubernetes-brain/</link><guid isPermaLink="true">https://blog.nghia-pham.com/blog/e-is-for-etcd-kubernetes-brain/</guid><description>A deep dive into etcd, the distributed key-value store that powers Kubernetes. Learn about consistency, high availability, and backup strategies.</description></item><item><title>[23/24] B is for Best Practices: Building Secure and Reliable Apps</title><link>https://blog.nghia-pham.com/blog/b-is-for-best-practices-security-reliability/</link><guid isPermaLink="true">https://blog.nghia-pham.com/blog/b-is-for-best-practices-security-reliability/</guid><description>The second post in our Kubernetes A-to-Z series covering essential best practices for security, reliability, and resource management.</description></item><item><title>[19/24] A is for Authentication and RBAC: Securing Your Cluster</title><link>https://blog.nghia-pham.com/blog/a-is-for-authentication-rbac-securing-cluster/</link><guid isPermaLink="true">https://blog.nghia-pham.com/blog/a-is-for-authentication-rbac-securing-cluster/</guid><description>The sixteenth post in our Kubernetes A-to-Z series covering authentication mechanisms, Role-Based Access Control, security contexts, and cluster security best practices.</description></item><item><title>[4/24] D is for Deployments: Managing Application Lifecycle</title><link>https://blog.nghia-pham.com/blog/d-is-for-deployments-application-lifecycle/</link><guid isPermaLink="true">https://blog.nghia-pham.com/blog/d-is-for-deployments-application-lifecycle/</guid><description>The fourth post in our Kubernetes A-to-Z series covering Deployments, rolling updates, rollbacks, and application lifecycle management strategies.</description></item><item><title>[2/24] C is for Containers: Docker Fundamentals Before Kubernetes</title><link>https://blog.nghia-pham.com/blog/c-is-for-containers-docker-fundamentals/</link><guid isPermaLink="true">https://blog.nghia-pham.com/blog/c-is-for-containers-docker-fundamentals/</guid><description>The second post in our Kubernetes A-to-Z series covering container fundamentals, Docker basics, and essential concepts needed before learning Kubernetes.</description></item><item><title>[20/24] F is for Federation: Multi-Cluster Management</title><link>https://blog.nghia-pham.com/blog/f-is-for-federation-multi-cluster-management/</link><guid isPermaLink="true">https://blog.nghia-pham.com/blog/f-is-for-federation-multi-cluster-management/</guid><description>The seventeenth post in our Kubernetes A-to-Z series covering multi-cluster architectures, federation patterns, service mesh, disaster recovery, and cross-cluster communication.</description></item><item><title>[22/24] G is for GitOps: Modern Deployment Workflows</title><link>https://blog.nghia-pham.com/blog/g-is-for-gitops-modern-deployment-argocd-fluxcd/</link><guid isPermaLink="true">https://blog.nghia-pham.com/blog/g-is-for-gitops-modern-deployment-argocd-fluxcd/</guid><description>A comprehensive guide to GitOps principles and practices, comparing ArgoCD and FluxCD with practical examples, deployment strategies, and production best practices.</description></item><item><title>Building Internal Developer Platforms on Kubernetes: A Comprehensive Guide</title><link>https://blog.nghia-pham.com/blog/building-internal-developer-platforms-kubernetes/</link><guid isPermaLink="true">https://blog.nghia-pham.com/blog/building-internal-developer-platforms-kubernetes/</guid><description>Learn how to build an Internal Developer Platform (IDP) on Kubernetes with Backstage, self-service capabilities, golden paths, and platform engineering best practices.</description></item><item><title>[11/24] I is for Ingress: Managing External Access</title><link>https://blog.nghia-pham.com/blog/i-is-for-ingress-managing-external-access/</link><guid isPermaLink="true">https://blog.nghia-pham.com/blog/i-is-for-ingress-managing-external-access/</guid><description>The tenth post in our Kubernetes A-to-Z series covering Ingress controllers, routing rules, TLS termination, and advanced traffic management patterns.</description></item><item><title>[1/24] K is for Kubernetes: Understanding the Basics and Architecture</title><link>https://blog.nghia-pham.com/blog/k-is-for-kubernetes-basics-and-architecture/</link><guid isPermaLink="true">https://blog.nghia-pham.com/blog/k-is-for-kubernetes-basics-and-architecture/</guid><description>The first post in our Kubernetes A-to-Z series covering Kubernetes fundamentals, architecture, components, and basic cluster setup.</description></item><item><title>[7/24] J is for Jobs and CronJobs: Batch Processing in Kubernetes</title><link>https://blog.nghia-pham.com/blog/j-is-for-jobs-cronjobs-batch-processing/</link><guid isPermaLink="true">https://blog.nghia-pham.com/blog/j-is-for-jobs-cronjobs-batch-processing/</guid><description>Learn how to run one-off tasks and scheduled batch jobs in Kubernetes using Jobs and CronJobs resources.</description></item><item><title>Kafka Partition Design for IoT: Throughput and Ordering</title><link>https://blog.nghia-pham.com/blog/kafka-partitions-deep-dive-iot-architecture/</link><guid isPermaLink="true">https://blog.nghia-pham.com/blog/kafka-partitions-deep-dive-iot-architecture/</guid><description>Design Kafka topic and partition strategy for IoT workloads with practical guidance on throughput, ordering, consumer scaling, and operational limits.</description></item><item><title>Kubernetes Backup and Disaster Recovery: Velero and etcd</title><link>https://blog.nghia-pham.com/blog/kubernetes-backup-disaster-recovery-velero-etcd/</link><guid isPermaLink="true">https://blog.nghia-pham.com/blog/kubernetes-backup-disaster-recovery-velero-etcd/</guid><description>Design a practical backup and disaster recovery strategy for Kubernetes with etcd snapshots, Velero, restore drills, and RTO/RPO planning.</description></item><item><title>[12/24] H is for Helm: Package Management for Kubernetes</title><link>https://blog.nghia-pham.com/blog/h-is-for-helm-package-management-kubernetes/</link><guid isPermaLink="true">https://blog.nghia-pham.com/blog/h-is-for-helm-package-management-kubernetes/</guid><description>The eleventh post in our Kubernetes A-to-Z series covering Helm charts, repositories, templating, values, and application lifecycle management.</description></item><item><title>Kubernetes Multi-Tenancy: Namespace, RBAC, and Quota Design</title><link>https://blog.nghia-pham.com/blog/kubernetes-multi-tenancy-namespace-rbac-quota/</link><guid isPermaLink="true">https://blog.nghia-pham.com/blog/kubernetes-multi-tenancy-namespace-rbac-quota/</guid><description>Design a practical multi-tenant Kubernetes model with namespace boundaries, RBAC, network isolation, quotas, and operational guardrails.</description></item><item><title>Kubernetes Cost Optimization in Production</title><link>https://blog.nghia-pham.com/blog/kubernetes-cost-optimization-production/</link><guid isPermaLink="true">https://blog.nghia-pham.com/blog/kubernetes-cost-optimization-production/</guid><description>A practical guide to reducing Kubernetes infrastructure spend with right-sizing, autoscaling, scheduling strategy, and workload-level optimization.</description></item><item><title>Kubernetes Security Hardening Checklist for Production</title><link>https://blog.nghia-pham.com/blog/kubernetes-security-hardening-checklist-production/</link><guid isPermaLink="true">https://blog.nghia-pham.com/blog/kubernetes-security-hardening-checklist-production/</guid><description>A practical security hardening checklist for production Kubernetes clusters, covering identity, network, workloads, supply chain, and runtime controls.</description></item><item><title>Kubernetes A-to-Z Series: Complete Learning Path</title><link>https://blog.nghia-pham.com/blog/kubernetes-series-plan/</link><guid isPermaLink="true">https://blog.nghia-pham.com/blog/kubernetes-series-plan/</guid><description>A comprehensive 24-part blog series covering Kubernetes from beginner to advanced level, with practical examples and real-world scenarios.</description></item><item><title>Kubernetes vs Docker Swarm: Complete Comparison Guide with Command Cheatsheets</title><link>https://blog.nghia-pham.com/blog/kubernetes-vs-docker-swarm-complete-guide/</link><guid isPermaLink="true">https://blog.nghia-pham.com/blog/kubernetes-vs-docker-swarm-complete-guide/</guid><description>A comprehensive comparison of Kubernetes and Docker Swarm container orchestration platforms, including detailed command cheatsheets, architecture differences, and practical examples.</description></item><item><title>[10/24] M is for ConfigMaps and Secrets: Managing Configuration</title><link>https://blog.nghia-pham.com/blog/m-is-for-configmaps-secrets-managing-configuration/</link><guid isPermaLink="true">https://blog.nghia-pham.com/blog/m-is-for-configmaps-secrets-managing-configuration/</guid><description>The ninth post in our Kubernetes A-to-Z series covering ConfigMaps, Secrets, configuration management patterns, and environment-specific deployments.</description></item><item><title>[15/24] L is for Logging and Monitoring: Observability in Kubernetes</title><link>https://blog.nghia-pham.com/blog/l-is-for-logging-monitoring-observability/</link><guid isPermaLink="true">https://blog.nghia-pham.com/blog/l-is-for-logging-monitoring-observability/</guid><description>The thirteenth post in our Kubernetes A-to-Z series covering logging architectures, Prometheus metrics, distributed tracing, and observability best practices.</description></item><item><title>[13/24] O is for Operators: Extending Kubernetes Functionality</title><link>https://blog.nghia-pham.com/blog/o-is-for-operators-extending-kubernetes/</link><guid isPermaLink="true">https://blog.nghia-pham.com/blog/o-is-for-operators-extending-kubernetes/</guid><description>The twelfth post in our Kubernetes A-to-Z series covering Operators, Custom Resource Definitions (CRDs), controller patterns, and extending Kubernetes.</description></item><item><title>[8/24] N is for Namespaces: Organizing Your Cluster</title><link>https://blog.nghia-pham.com/blog/n-is-for-namespaces-organizing-cluster/</link><guid isPermaLink="true">https://blog.nghia-pham.com/blog/n-is-for-namespaces-organizing-cluster/</guid><description>The seventh post in our Kubernetes A-to-Z series covering Namespaces, multi-tenancy, resource quotas, and cluster organization strategies.</description></item><item><title>[3/24] P is for Pods: The Basic Building Blocks of Kubernetes</title><link>https://blog.nghia-pham.com/blog/p-is-for-pods-basic-building-blocks/</link><guid isPermaLink="true">https://blog.nghia-pham.com/blog/p-is-for-pods-basic-building-blocks/</guid><description>The third post in our Kubernetes A-to-Z series covering pods, their lifecycle, networking, storage, and multi-container patterns.</description></item><item><title>Kubernetes Observability Stack: Prometheus, OpenTelemetry, and Loki</title><link>https://blog.nghia-pham.com/blog/observability-stack-kubernetes-prometheus-otel-loki/</link><guid isPermaLink="true">https://blog.nghia-pham.com/blog/observability-stack-kubernetes-prometheus-otel-loki/</guid><description>Build a practical Kubernetes observability stack using metrics, logs, and traces with Prometheus, OpenTelemetry, Loki, and actionable SLO-driven alerting.</description></item><item><title>PostgreSQL Index Size Deep Dive: Why Indexes Grow Fast</title><link>https://blog.nghia-pham.com/blog/postgresql-index-deep-dive-why-indexes-are-larger-than-you-think/</link><guid isPermaLink="true">https://blog.nghia-pham.com/blog/postgresql-index-deep-dive-why-indexes-are-larger-than-you-think/</guid><description>Understand why PostgreSQL indexes can grow quickly in production and how to control index bloat with better schema design, maintenance, and query patterns.</description></item><item><title>[17/24] Q is for Quality Assurance: Testing in Kubernetes</title><link>https://blog.nghia-pham.com/blog/q-is-for-quality-assurance-testing-kubernetes/</link><guid isPermaLink="true">https://blog.nghia-pham.com/blog/q-is-for-quality-assurance-testing-kubernetes/</guid><description>The fifteenth post in our Kubernetes A-to-Z series covering testing strategies, chaos engineering, CI/CD integration, and quality assurance best practices.</description></item><item><title>[6/24] R is for ReplicaSets: Ensuring High Availability</title><link>https://blog.nghia-pham.com/blog/r-is-for-replicasets-high-availability/</link><guid isPermaLink="true">https://blog.nghia-pham.com/blog/r-is-for-replicasets-high-availability/</guid><description>The sixth post in our Kubernetes A-to-Z series covering ReplicaSets, scaling strategies, pod disruption budgets, and high availability patterns.</description></item><item><title>Stateful Workloads on Kubernetes: PostgreSQL and Kafka Operators</title><link>https://blog.nghia-pham.com/blog/stateful-workloads-kubernetes-postgresql-kafka-operators/</link><guid isPermaLink="true">https://blog.nghia-pham.com/blog/stateful-workloads-kubernetes-postgresql-kafka-operators/</guid><description>Run stateful workloads safely on Kubernetes with operator-based patterns for PostgreSQL and Kafka, including storage, scaling, backup, and failure recovery.</description></item><item><title>Service Mesh Deep Dive: Istio vs Linkerd vs Consul Connect</title><link>https://blog.nghia-pham.com/blog/service-mesh-comparison-istio-linkerd-consul/</link><guid isPermaLink="true">https://blog.nghia-pham.com/blog/service-mesh-comparison-istio-linkerd-consul/</guid><description>A comprehensive comparison of service mesh platforms including architecture, features, performance benchmarks, and practical implementation guides for Istio, Linkerd, and Consul Connect.</description></item><item><title>[5/24] S is for Services: Networking and Service Discovery</title><link>https://blog.nghia-pham.com/blog/s-is-for-services-networking-service-discovery/</link><guid isPermaLink="true">https://blog.nghia-pham.com/blog/s-is-for-services-networking-service-discovery/</guid><description>The fifth post in our Kubernetes A-to-Z series covering Services, networking patterns, service discovery, and load balancing in Kubernetes.</description></item><item><title>[16/24] T is for Troubleshooting: Common Issues and Solutions</title><link>https://blog.nghia-pham.com/blog/t-is-for-troubleshooting-common-issues-solutions/</link><guid isPermaLink="true">https://blog.nghia-pham.com/blog/t-is-for-troubleshooting-common-issues-solutions/</guid><description>The fourteenth post in our Kubernetes A-to-Z series covering debugging techniques, common issues, diagnostic commands, and systematic troubleshooting approaches.</description></item><item><title>[18/24] U is for Upgrades: Managing Cluster Lifecycle</title><link>https://blog.nghia-pham.com/blog/u-is-for-upgrades-cluster-lifecycle/</link><guid isPermaLink="true">https://blog.nghia-pham.com/blog/u-is-for-upgrades-cluster-lifecycle/</guid><description>Master the art of Kubernetes upgrades. Learn about version skew policies, node draining, and strategies for zero-downtime cluster maintenance.</description></item><item><title>[9/24] V is for Volumes: Persistent Storage in Kubernetes</title><link>https://blog.nghia-pham.com/blog/v-is-for-volumes-persistent-storage-kubernetes/</link><guid isPermaLink="true">https://blog.nghia-pham.com/blog/v-is-for-volumes-persistent-storage-kubernetes/</guid><description>The eighth post in our Kubernetes A-to-Z series covering Volumes, PersistentVolumes, PersistentVolumeClaims, storage classes, and stateful application patterns.</description></item><item><title>[14/24] Y is for YAML: Mastering the Language of Kubernetes</title><link>https://blog.nghia-pham.com/blog/y-is-for-yaml-kubernetes-language/</link><guid isPermaLink="true">https://blog.nghia-pham.com/blog/y-is-for-yaml-kubernetes-language/</guid><description>Love it or hate it, YAML is the language of Kubernetes. Learn syntax tips, common pitfalls, and tools to validate your manifests.</description></item><item><title>[21/24] Z is for Zero-Downtime Deployments: Advanced Deployment Strategies</title><link>https://blog.nghia-pham.com/blog/z-is-for-zero-downtime-deployments-advanced-strategies/</link><guid isPermaLink="true">https://blog.nghia-pham.com/blog/z-is-for-zero-downtime-deployments-advanced-strategies/</guid><description>The final post in our Kubernetes A-to-Z series covering advanced deployment strategies, GitOps, progressive delivery, canary deployments, and production-ready patterns.</description></item><item><title>Kibana cho Developer: Filter log, Saved Search, Dashboard và REST API</title><link>https://blog.nghia-pham.com/blog/kibana-cho-developer-filter-log-saved-search-dashboard-rest-api/</link><guid isPermaLink="true">https://blog.nghia-pham.com/blog/kibana-cho-developer-filter-log-saved-search-dashboard-rest-api/</guid><description>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.</description><pubDate>Wed, 15 Apr 2026 00:00:00 GMT</pubDate></item><item><title>Kibana từ A đến Z: Series Plan</title><link>https://blog.nghia-pham.com/blog/kibana-series-plan/</link><guid isPermaLink="true">https://blog.nghia-pham.com/blog/kibana-series-plan/</guid><description>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.</description><pubDate>Wed, 15 Apr 2026 00:00:00 GMT</pubDate></item><item><title>Canvas: dựng report branded cho stakeholder</title><link>https://blog.nghia-pham.com/blog/canvas-dung-report-co-branded-cho-stakeholder/</link><guid isPermaLink="true">https://blog.nghia-pham.com/blog/canvas-dung-report-co-branded-cho-stakeholder/</guid><description>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.</description><pubDate>Thu, 16 Apr 2026 00:00:00 GMT</pubDate></item><item><title>Discover nâng cao: Runtime fields, filter phức tạp, highlighting</title><link>https://blog.nghia-pham.com/blog/discover-nang-cao-runtime-fields-filter-phuc-tap-highlighting/</link><guid isPermaLink="true">https://blog.nghia-pham.com/blog/discover-nang-cao-runtime-fields-filter-phuc-tap-highlighting/</guid><description>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.</description><pubDate>Thu, 16 Apr 2026 00:00:00 GMT</pubDate></item><item><title>KQL và ES|QL: So sánh hai ngôn ngữ query của Kibana</title><link>https://blog.nghia-pham.com/blog/kql-va-esql-so-sanh-hai-ngon-ngu-query-kibana/</link><guid isPermaLink="true">https://blog.nghia-pham.com/blog/kql-va-esql-so-sanh-hai-ngon-ngu-query-kibana/</guid><description>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.</description><pubDate>Thu, 16 Apr 2026 00:00:00 GMT</pubDate></item><item><title>Lens: từ drag-drop tới công thức phức tạp</title><link>https://blog.nghia-pham.com/blog/lens-tu-drag-drop-toi-cong-thuc-phuc-tap/</link><guid isPermaLink="true">https://blog.nghia-pham.com/blog/lens-tu-drag-drop-toi-cong-thuc-phuc-tap/</guid><description>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.</description><pubDate>Thu, 16 Apr 2026 00:00:00 GMT</pubDate></item><item><title>AI Coding Providers Series: Chọn đúng plan cho workload của bạn</title><link>https://blog.nghia-pham.com/blog/ai-coding-providers-series-plan/</link><guid isPermaLink="true">https://blog.nghia-pham.com/blog/ai-coding-providers-series-plan/</guid><description>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ế.</description><pubDate>Tue, 21 Apr 2026 00:00:00 GMT</pubDate></item><item><title>Mua AI Coding Plan nào? Research 5 providers lớn (2026-04)</title><link>https://blog.nghia-pham.com/blog/ai-coding-plan-research-2026-04/</link><guid isPermaLink="true">https://blog.nghia-pham.com/blog/ai-coding-plan-research-2026-04/</guid><description>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.</description><pubDate>Tue, 21 Apr 2026 00:00:00 GMT</pubDate></item><item><title>Tiếng Việt tốn hơn x2 token? Data nói khác</title><link>https://blog.nghia-pham.com/blog/tieng-viet-ton-x2-token-data-noi-khac/</link><guid isPermaLink="true">https://blog.nghia-pham.com/blog/tieng-viet-ton-x2-token-data-noi-khac/</guid><description>Benchmark trên 5626 prompt thực tế từ 555 sessions Claude Code. Claim &apos;tiếng Việt tốn hơn x2 token&apos; 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.</description><pubDate>Tue, 21 Apr 2026 00:00:00 GMT</pubDate></item><item><title>Does Vietnamese really cost 2x+ tokens in LLM prompts? Data from 5626 real messages</title><link>https://blog.nghia-pham.com/blog/vietnamese-llm-token-benchmark/</link><guid isPermaLink="true">https://blog.nghia-pham.com/blog/vietnamese-llm-token-benchmark/</guid><description>Benchmark across 5626 real prompts from 555 Claude Code sessions shows the &apos;&gt;2x token&apos; 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.</description><pubDate>Tue, 21 Apr 2026 00:00:00 GMT</pubDate></item><item><title>LLM hoạt động thế nào: mental model cho dev</title><link>https://blog.nghia-pham.com/blog/llm-hoat-dong-the-nao-mental-model-cho-dev/</link><guid isPermaLink="true">https://blog.nghia-pham.com/blog/llm-hoat-dong-the-nao-mental-model-cho-dev/</guid><description>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.</description><pubDate>Wed, 22 Apr 2026 00:00:00 GMT</pubDate></item><item><title>Calculus cho LLM: gradient, chain rule, backprop intuition</title><link>https://blog.nghia-pham.com/blog/calculus-cho-llm-gradient-chain-rule-backprop/</link><guid isPermaLink="true">https://blog.nghia-pham.com/blog/calculus-cho-llm-gradient-chain-rule-backprop/</guid><description>Đạ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. Bài này xây intuition cho dev, không giải bài tập toán.</description><pubDate>Wed, 22 Apr 2026 00:00:00 GMT</pubDate></item><item><title>LLM từ zero: Series Plan</title><link>https://blog.nghia-pham.com/blog/llm-tu-zero-series-plan/</link><guid isPermaLink="true">https://blog.nghia-pham.com/blog/llm-tu-zero-series-plan/</guid><description>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.</description><pubDate>Wed, 22 Apr 2026 00:00:00 GMT</pubDate></item><item><title>Linear algebra cho LLM: vector, matrix, dot product</title><link>https://blog.nghia-pham.com/blog/linear-algebra-cho-llm-vector-matrix-dot-product/</link><guid isPermaLink="true">https://blog.nghia-pham.com/blog/linear-algebra-cho-llm-vector-matrix-dot-product/</guid><description>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? Bài này phá băng math foundation cho dev: chỉ 4 khái niệm, không công thức phức tạp.</description><pubDate>Wed, 22 Apr 2026 00:00:00 GMT</pubDate></item><item><title>Neural network tối giản: perceptron, MLP từ zero</title><link>https://blog.nghia-pham.com/blog/neural-network-toi-gian-perceptron-mlp-tu-zero/</link><guid isPermaLink="true">https://blog.nghia-pham.com/blog/neural-network-toi-gian-perceptron-mlp-tu-zero/</guid><description>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. Sau bài này, bạn hiểu building block gốc của mọi LLM hiện đại.</description><pubDate>Wed, 22 Apr 2026 00:00:00 GMT</pubDate></item><item><title>Probability cho LLM: softmax, cross-entropy, perplexity</title><link>https://blog.nghia-pham.com/blog/probability-cho-llm-softmax-cross-entropy-perplexity/</link><guid isPermaLink="true">https://blog.nghia-pham.com/blog/probability-cho-llm-softmax-cross-entropy-perplexity/</guid><description>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ạ.</description><pubDate>Wed, 22 Apr 2026 00:00:00 GMT</pubDate></item><item><title>Build BPE tokenizer từ đầu (theo Karpathy minbpe)</title><link>https://blog.nghia-pham.com/blog/build-bpe-tokenizer-tu-dau-minbpe/</link><guid isPermaLink="true">https://blog.nghia-pham.com/blog/build-bpe-tokenizer-tu-dau-minbpe/</guid><description>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. Sau bài này hiểu 100% BPE thay vì chỉ đọc paper thấy abstract.</description><pubDate>Wed, 22 Apr 2026 00:00:00 GMT</pubDate></item><item><title>Attention mechanism: Query, Key, Value intuition</title><link>https://blog.nghia-pham.com/blog/attention-mechanism-query-key-value-intuition/</link><guid isPermaLink="true">https://blog.nghia-pham.com/blog/attention-mechanism-query-key-value-intuition/</guid><description>Paper &apos;Attention is All You Need&apos; (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 analogy thư viện, không công thức - xây intuition trước khi đến code ở bài 10.</description><pubDate>Wed, 22 Apr 2026 00:00:00 GMT</pubDate></item><item><title>Embeddings: word2vec, contextual, và positional encoding (RoPE)</title><link>https://blog.nghia-pham.com/blog/embeddings-word2vec-contextual-positional-rope/</link><guid isPermaLink="true">https://blog.nghia-pham.com/blog/embeddings-word2vec-contextual-positional-rope/</guid><description>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?</description><pubDate>Wed, 22 Apr 2026 00:00:00 GMT</pubDate></item><item><title>Multi-head attention: tại sao chia nhiều head</title><link>https://blog.nghia-pham.com/blog/multi-head-attention-tai-sao-chia-nhieu-head/</link><guid isPermaLink="true">https://blog.nghia-pham.com/blog/multi-head-attention-tai-sao-chia-nhieu-head/</guid><description>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).</description><pubDate>Wed, 22 Apr 2026 00:00:00 GMT</pubDate></item><item><title>nanoGPT: 300 dòng PyTorch tái tạo GPT từ đầu</title><link>https://blog.nghia-pham.com/blog/nanogpt-300-dong-pytorch-tai-tao-gpt/</link><guid isPermaLink="true">https://blog.nghia-pham.com/blog/nanogpt-300-dong-pytorch-tai-tao-gpt/</guid><description>Capstone Part 3. Karpathy nanoGPT là implementation GPT-2 trọn vẹn trong ~300 dòng PyTorch. Bài này walk-through code, train GPT nhỏ trên Shakespeare trong 15 phút CPU, generate text. Sau bài này bạn code được GPT-2 nhỏ không cần HuggingFace.</description><pubDate>Wed, 22 Apr 2026 00:00:00 GMT</pubDate></item><item><title>Self-attention: code từ đầu bằng NumPy</title><link>https://blog.nghia-pham.com/blog/self-attention-code-tu-dau-numpy/</link><guid isPermaLink="true">https://blog.nghia-pham.com/blog/self-attention-code-tu-dau-numpy/</guid><description>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. Sau bài này, attention không còn là hộp đen.</description><pubDate>Wed, 22 Apr 2026 00:00:00 GMT</pubDate></item><item><title>Transformer block: attention + MLP + layer norm + residual</title><link>https://blog.nghia-pham.com/blog/transformer-block-attention-mlp-layer-norm-residual/</link><guid isPermaLink="true">https://blog.nghia-pham.com/blog/transformer-block-attention-mlp-layer-norm-residual/</guid><description>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.</description><pubDate>Wed, 22 Apr 2026 00:00:00 GMT</pubDate></item><item><title>Tokenization: BPE, WordPiece, SentencePiece</title><link>https://blog.nghia-pham.com/blog/tokenization-bpe-wordpiece-sentencepiece/</link><guid isPermaLink="true">https://blog.nghia-pham.com/blog/tokenization-bpe-wordpiece-sentencepiece/</guid><description>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.</description><pubDate>Wed, 22 Apr 2026 00:00:00 GMT</pubDate></item><item><title>Claude Code Toolkit: Sharing the Customizations I Actually Use</title><link>https://blog.nghia-pham.com/blog/claude-skills-toolkit-intro/</link><guid isPermaLink="true">https://blog.nghia-pham.com/blog/claude-skills-toolkit-intro/</guid><description>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.</description><pubDate>Mon, 27 Apr 2026 00:00:00 GMT</pubDate></item><item><title>nf-agents: Spawning Claude Code Teams Without Footguns</title><link>https://blog.nghia-pham.com/blog/nf-agents/</link><guid isPermaLink="true">https://blog.nghia-pham.com/blog/nf-agents/</guid><description>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.</description><pubDate>Mon, 27 Apr 2026 00:00:00 GMT</pubDate></item><item><title>AI agent local: pattern cũ, blast radius mới</title><link>https://blog.nghia-pham.com/blog/ai-agent-local-pattern-cu-blast-radius-moi/</link><guid isPermaLink="true">https://blog.nghia-pham.com/blog/ai-agent-local-pattern-cu-blast-radius-moi/</guid><description>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.</description><pubDate>Mon, 11 May 2026 00:00:00 GMT</pubDate></item><item><title>Claude Code từ zero: Series Plan</title><link>https://blog.nghia-pham.com/blog/claude-code-tu-zero-series-plan/</link><guid isPermaLink="true">https://blog.nghia-pham.com/blog/claude-code-tu-zero-series-plan/</guid><description>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ự.</description><pubDate>Sun, 17 May 2026 00:00:00 GMT</pubDate></item><item><title>Claude Code là gì: CLI, IDE, Web, SDK và anatomy của 1 session</title><link>https://blog.nghia-pham.com/blog/claude-code-la-gi-anatomy-session/</link><guid isPermaLink="true">https://blog.nghia-pham.com/blog/claude-code-la-gi-anatomy-session/</guid><description>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.</description><pubDate>Sun, 17 May 2026 00:00:00 GMT</pubDate></item><item><title>autoMemoryDirectory: chia memory theo project hoặc client</title><link>https://blog.nghia-pham.com/blog/claude-code-auto-memory-directory/</link><guid isPermaLink="true">https://blog.nghia-pham.com/blog/claude-code-auto-memory-directory/</guid><description>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 autoMemoryDirectory, cách cấu hình trong settings.local.json, và ba use case thực tế để giữ context đúng nơi đúng lúc.</description><pubDate>Sun, 17 May 2026 00:00:00 GMT</pubDate></item><item><title>Branch-per-machine: sync ~/.claude/ giữa các máy</title><link>https://blog.nghia-pham.com/blog/claude-code-branch-per-machine/</link><guid isPermaLink="true">https://blog.nghia-pham.com/blog/claude-code-branch-per-machine/</guid><description>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 đó.</description><pubDate>Sun, 17 May 2026 00:00:00 GMT</pubDate></item><item><title>Auto-memory: file-based, MEMORY.md index, các loại memory</title><link>https://blog.nghia-pham.com/blog/claude-code-auto-memory/</link><guid isPermaLink="true">https://blog.nghia-pham.com/blog/claude-code-auto-memory/</guid><description>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.</description><pubDate>Sun, 17 May 2026 00:00:00 GMT</pubDate></item><item><title>CLAUDE.md và rules: kiến trúc instructions hierarchical, path-scoping</title><link>https://blog.nghia-pham.com/blog/claude-code-claude-md-rules/</link><guid isPermaLink="true">https://blog.nghia-pham.com/blog/claude-code-claude-md-rules/</guid><description>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.</description><pubDate>Sun, 17 May 2026 00:00:00 GMT</pubDate></item><item><title>Context window: prompt được dựng thế nào mỗi turn</title><link>https://blog.nghia-pham.com/blog/claude-code-context-window-prompt-build/</link><guid isPermaLink="true">https://blog.nghia-pham.com/blog/claude-code-context-window-prompt-build/</guid><description>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.</description><pubDate>Sun, 17 May 2026 00:00:00 GMT</pubDate></item><item><title>Compaction và prompt cache: cách CC quản lý conversation dài</title><link>https://blog.nghia-pham.com/blog/claude-code-compaction-prompt-cache/</link><guid isPermaLink="true">https://blog.nghia-pham.com/blog/claude-code-compaction-prompt-cache/</guid><description>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ĩ.</description><pubDate>Sun, 17 May 2026 00:00:00 GMT</pubDate></item><item><title>Anatomy của 1 hook production-grade: shell script và exit codes</title><link>https://blog.nghia-pham.com/blog/claude-code-hook-production-grade/</link><guid isPermaLink="true">https://blog.nghia-pham.com/blog/claude-code-hook-production-grade/</guid><description>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.</description><pubDate>Sun, 17 May 2026 00:00:00 GMT</pubDate></item><item><title>Hooks: lifecycle events, exit codes, và các kiểu hook thực tế</title><link>https://blog.nghia-pham.com/blog/claude-code-hooks/</link><guid isPermaLink="true">https://blog.nghia-pham.com/blog/claude-code-hooks/</guid><description>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.</description><pubDate>Sun, 17 May 2026 00:00:00 GMT</pubDate></item><item><title>Mobile coding qua Telegram bridge</title><link>https://blog.nghia-pham.com/blog/claude-code-mobile-via-telegram/</link><guid isPermaLink="true">https://blog.nghia-pham.com/blog/claude-code-mobile-via-telegram/</guid><description>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.</description><pubDate>Sun, 17 May 2026 00:00:00 GMT</pubDate></item><item><title>MCP servers: context bên ngoài, khi nào tự build, khi nào dùng có sẵn</title><link>https://blog.nghia-pham.com/blog/claude-code-mcp-servers/</link><guid isPermaLink="true">https://blog.nghia-pham.com/blog/claude-code-mcp-servers/</guid><description>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.</description><pubDate>Sun, 17 May 2026 00:00:00 GMT</pubDate></item><item><title>Memory submodule pattern: share memory cross-machine an toàn</title><link>https://blog.nghia-pham.com/blog/claude-code-memory-submodule/</link><guid isPermaLink="true">https://blog.nghia-pham.com/blog/claude-code-memory-submodule/</guid><description>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.</description><pubDate>Sun, 17 May 2026 00:00:00 GMT</pubDate></item><item><title>Cross-agent communication: tránh race, slice theo file scope</title><link>https://blog.nghia-pham.com/blog/claude-code-multi-agent-coordination/</link><guid isPermaLink="true">https://blog.nghia-pham.com/blog/claude-code-multi-agent-coordination/</guid><description>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.</description><pubDate>Sun, 17 May 2026 00:00:00 GMT</pubDate></item><item><title>Plan mode: state file, exit prompt, plan vs todo vs memory</title><link>https://blog.nghia-pham.com/blog/claude-code-plan-mode/</link><guid isPermaLink="true">https://blog.nghia-pham.com/blog/claude-code-plan-mode/</guid><description>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.</description><pubDate>Sun, 17 May 2026 00:00:00 GMT</pubDate></item><item><title>Permission model: ask, auto, acceptEdits, bypassPermissions và deny list</title><link>https://blog.nghia-pham.com/blog/claude-code-permission-model/</link><guid isPermaLink="true">https://blog.nghia-pham.com/blog/claude-code-permission-model/</guid><description>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 cover PreToolUse hook và cách truyền mode khi spawn agent.</description><pubDate>Sun, 17 May 2026 00:00:00 GMT</pubDate></item><item><title>Plugins: khác skill thế nào, marketplace, khi nào dùng</title><link>https://blog.nghia-pham.com/blog/claude-code-plugins/</link><guid isPermaLink="true">https://blog.nghia-pham.com/blog/claude-code-plugins/</guid><description>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.</description><pubDate>Sun, 17 May 2026 00:00:00 GMT</pubDate></item><item><title>Settings.json load-bearing: env, permissions, hooks, plugins</title><link>https://blog.nghia-pham.com/blog/claude-code-settings-json/</link><guid isPermaLink="true">https://blog.nghia-pham.com/blog/claude-code-settings-json/</guid><description>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.</description><pubDate>Sun, 17 May 2026 00:00:00 GMT</pubDate></item><item><title>Anatomy của 1 skill production-grade: từ ý tưởng đến SKILL.md</title><link>https://blog.nghia-pham.com/blog/claude-code-skill-production-grade/</link><guid isPermaLink="true">https://blog.nghia-pham.com/blog/claude-code-skill-production-grade/</guid><description>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.</description><pubDate>Sun, 17 May 2026 00:00:00 GMT</pubDate></item><item><title>Skills: SKILL.md frontmatter, slash command, và disable-model-invocation</title><link>https://blog.nghia-pham.com/blog/claude-code-skills/</link><guid isPermaLink="true">https://blog.nghia-pham.com/blog/claude-code-skills/</guid><description>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.</description><pubDate>Sun, 17 May 2026 00:00:00 GMT</pubDate></item><item><title>Subagents: anatomy, tools whitelist, system prompt, và examples block</title><link>https://blog.nghia-pham.com/blog/claude-code-subagents/</link><guid isPermaLink="true">https://blog.nghia-pham.com/blog/claude-code-subagents/</guid><description>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.</description><pubDate>Sun, 17 May 2026 00:00:00 GMT</pubDate></item><item><title>TeamCreate và SendMessage: persistent addressable agents</title><link>https://blog.nghia-pham.com/blog/claude-code-team-mode/</link><guid isPermaLink="true">https://blog.nghia-pham.com/blog/claude-code-team-mode/</guid><description>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.</description><pubDate>Sun, 17 May 2026 00:00:00 GMT</pubDate></item><item><title>Spawning patterns: foreground, background, sequential, teammate</title><link>https://blog.nghia-pham.com/blog/claude-code-spawning-patterns/</link><guid isPermaLink="true">https://blog.nghia-pham.com/blog/claude-code-spawning-patterns/</guid><description>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.</description><pubDate>Sun, 17 May 2026 00:00:00 GMT</pubDate></item><item><title>Tool use loop: vòng giữa model và tool, retry, parallel calls</title><link>https://blog.nghia-pham.com/blog/claude-code-tool-use-loop/</link><guid isPermaLink="true">https://blog.nghia-pham.com/blog/claude-code-tool-use-loop/</guid><description>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.</description><pubDate>Sun, 17 May 2026 00:00:00 GMT</pubDate></item><item><title>Worktree hotfix trong khi main session đang debug production</title><link>https://blog.nghia-pham.com/blog/claude-code-worktree-hotfix-prod-debug/</link><guid isPermaLink="true">https://blog.nghia-pham.com/blog/claude-code-worktree-hotfix-prod-debug/</guid><description>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.</description><pubDate>Sun, 17 May 2026 00:00:00 GMT</pubDate></item><item><title>Worktree isolation: vì sao tách working tree và base branch hook</title><link>https://blog.nghia-pham.com/blog/claude-code-worktree-isolation/</link><guid isPermaLink="true">https://blog.nghia-pham.com/blog/claude-code-worktree-isolation/</guid><description>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.</description><pubDate>Sun, 17 May 2026 00:00:00 GMT</pubDate></item><item><title>Một vài session không phải là không xuất hiện, mà là xuất hiện trễ</title><link>https://blog.nghia-pham.com/blog/claude-code-agents-daemon-architecture/</link><guid isPermaLink="true">https://blog.nghia-pham.com/blog/claude-code-agents-daemon-architecture/</guid><description>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.</description><pubDate>Sun, 17 May 2026 00:00:00 GMT</pubDate></item><item><title>Cách start session trong folder cụ thể từ `claude agents`</title><link>https://blog.nghia-pham.com/blog/claude-agents-dispatch-cwd/</link><guid isPermaLink="true">https://blog.nghia-pham.com/blog/claude-agents-dispatch-cwd/</guid><description>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.</description><pubDate>Sun, 17 May 2026 00:00:00 GMT</pubDate></item><item><title>Background session và worktree: setting worktree.bgIsolation từ 2.1.143</title><link>https://blog.nghia-pham.com/blog/claude-code-worktree-bg-isolation/</link><guid isPermaLink="true">https://blog.nghia-pham.com/blog/claude-code-worktree-bg-isolation/</guid><description>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.</description><pubDate>Sun, 17 May 2026 00:00:00 GMT</pubDate></item><item><title>FleetView: một màn hình thay cho 6 tmux pane và 3 tab desktop</title><link>https://blog.nghia-pham.com/blog/claude-code-fleetview-multi-session-ui/</link><guid isPermaLink="true">https://blog.nghia-pham.com/blog/claude-code-fleetview-multi-session-ui/</guid><description>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ả.</description><pubDate>Sun, 17 May 2026 00:00:00 GMT</pubDate></item><item><title>fullstack-engineer: subagent persona for backward-compatible code changes</title><link>https://blog.nghia-pham.com/blog/agent-fullstack-engineer-backward-compat-subagent/</link><guid isPermaLink="true">https://blog.nghia-pham.com/blog/agent-fullstack-engineer-backward-compat-subagent/</guid><description>A Claude Code subagent that treats every edit as potentially breaking. It reads before it writes, prefers additive changes over rewrites, and surfaces backward-compat risks before touching a file. Persona file plus a walkthrough of where the default agent falls short.</description><pubDate>Sun, 17 May 2026 00:00:00 GMT</pubDate></item><item><title>ui-ux-designer: subagent persona for design feedback and visual polish</title><link>https://blog.nghia-pham.com/blog/agent-ui-ux-designer-design-feedback-subagent/</link><guid isPermaLink="true">https://blog.nghia-pham.com/blog/agent-ui-ux-designer-design-feedback-subagent/</guid><description>A Claude Code subagent that thinks design-first but implements code-first. It audits the current UI, lists concrete issues with values (contrast ratios, spacing, type scales), proposes grouped changes, then writes the code. Persona file plus a walkthrough where the default agent stops at functional and this one keeps going to polished.</description><pubDate>Sun, 17 May 2026 00:00:00 GMT</pubDate></item><item><title>svg-diagram-specialist: subagent persona for inline SVG diagrams</title><link>https://blog.nghia-pham.com/blog/agent-svg-diagram-specialist-inline-svg-subagent/</link><guid isPermaLink="true">https://blog.nghia-pham.com/blog/agent-svg-diagram-specialist-inline-svg-subagent/</guid><description>A Claude Code subagent that draws one inline SVG diagram per response with strict layout math, accessibility, dark-mode CSS variables, and a shape vocabulary for infra concepts. Persona file plus a walkthrough of what the default agent gets wrong when you ask it for a diagram.</description><pubDate>Sun, 17 May 2026 00:00:00 GMT</pubDate></item><item><title>Alert rules trong Kibana: ES query, threshold và burn rate</title><link>https://blog.nghia-pham.com/blog/alert-rules-es-query-threshold-burn-rate-kibana/</link><guid isPermaLink="true">https://blog.nghia-pham.com/blog/alert-rules-es-query-threshold-burn-rate-kibana/</guid><description>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.</description><pubDate>Sun, 17 May 2026 00:00:00 GMT</pubDate></item><item><title>API keys nâng cao: Document-Level Security và Field-Level Security</title><link>https://blog.nghia-pham.com/blog/api-keys-document-field-level-security-kibana/</link><guid isPermaLink="true">https://blog.nghia-pham.com/blog/api-keys-document-field-level-security-kibana/</guid><description>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.</description><pubDate>Sun, 17 May 2026 00:00:00 GMT</pubDate></item><item><title>Audit logging và compliance: ghi nhận ai làm gì cho SOC2</title><link>https://blog.nghia-pham.com/blog/audit-logging-compliance-soc2-kibana/</link><guid isPermaLink="true">https://blog.nghia-pham.com/blog/audit-logging-compliance-soc2-kibana/</guid><description>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.</description><pubDate>Sun, 17 May 2026 00:00:00 GMT</pubDate></item><item><title>claude-authoring: A Skill for Writing Claude Code Rules, Skills, and Plans</title><link>https://blog.nghia-pham.com/blog/claude-authoring-skill-author-rules-skills-agents/</link><guid isPermaLink="true">https://blog.nghia-pham.com/blog/claude-authoring-skill-author-rules-skills-agents/</guid><description>A Claude Code skill that authors rules, skills, and plans correctly the first time. Routes by task type to a reference standard, enforces imperative form, kebab-case naming, no second person, and uses the right format (plain markdown for rules, YAML frontmatter for skills, status tracking for plans).</description><pubDate>Sun, 17 May 2026 00:00:00 GMT</pubDate></item><item><title>claude-changelog: Diff the Latest Claude Code Release Against Your Setup</title><link>https://blog.nghia-pham.com/blog/claude-changelog-track-claude-code-releases/</link><guid isPermaLink="true">https://blog.nghia-pham.com/blog/claude-changelog-track-claude-code-releases/</guid><description>A Claude Code skill that fetches the latest Claude Code changelog, scans ~/.claude/, and suggests adjustments your setup may need after a version upgrade. Read only by design, never auto-applies changes.</description><pubDate>Sun, 17 May 2026 00:00:00 GMT</pubDate></item><item><title>Sharing my Claude Code rules: agent safety and worktree isolation</title><link>https://blog.nghia-pham.com/blog/claude-code-rules-agent-safety-worktree-isolation/</link><guid isPermaLink="true">https://blog.nghia-pham.com/blog/claude-code-rules-agent-safety-worktree-isolation/</guid><description>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&apos;s working tree. Built from two real incidents.</description><pubDate>Sun, 17 May 2026 00:00:00 GMT</pubDate></item><item><title>Sharing my Claude Code rules: code style, no barrel files</title><link>https://blog.nghia-pham.com/blog/claude-code-rules-code-style-no-barrel-files/</link><guid isPermaLink="true">https://blog.nghia-pham.com/blog/claude-code-rules-code-style-no-barrel-files/</guid><description>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.</description><pubDate>Sun, 17 May 2026 00:00:00 GMT</pubDate></item><item><title>Sharing my Claude Code rules: development, no mocks and no new endpoints</title><link>https://blog.nghia-pham.com/blog/claude-code-rules-development-no-mocks-no-new-endpoints/</link><guid isPermaLink="true">https://blog.nghia-pham.com/blog/claude-code-rules-development-no-mocks-no-new-endpoints/</guid><description>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.</description><pubDate>Sun, 17 May 2026 00:00:00 GMT</pubDate></item><item><title>Sharing my Claude Code rules: git commit format and multi-account workflow</title><link>https://blog.nghia-pham.com/blog/claude-code-rules-git-commit-format-multi-account/</link><guid isPermaLink="true">https://blog.nghia-pham.com/blog/claude-code-rules-git-commit-format-multi-account/</guid><description>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.</description><pubDate>Sun, 17 May 2026 00:00:00 GMT</pubDate></item><item><title>Sharing my Claude Code rules: guide-user progressive disclosure</title><link>https://blog.nghia-pham.com/blog/claude-code-rules-guide-user-progressive-disclosure/</link><guid isPermaLink="true">https://blog.nghia-pham.com/blog/claude-code-rules-guide-user-progressive-disclosure/</guid><description>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&apos;t see that.</description><pubDate>Sun, 17 May 2026 00:00:00 GMT</pubDate></item><item><title>Sharing my Claude Code rules: local folder, credentials, and breadcrumbs</title><link>https://blog.nghia-pham.com/blog/claude-code-rules-local-folder-credentials-breadcrumbs/</link><guid isPermaLink="true">https://blog.nghia-pham.com/blog/claude-code-rules-local-folder-credentials-breadcrumbs/</guid><description>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.</description><pubDate>Sun, 17 May 2026 00:00:00 GMT</pubDate></item><item><title>Sharing my Claude Code rules: safety, no auto-commit</title><link>https://blog.nghia-pham.com/blog/claude-code-rules-safety-no-auto-commit/</link><guid isPermaLink="true">https://blog.nghia-pham.com/blog/claude-code-rules-safety-no-auto-commit/</guid><description>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.</description><pubDate>Sun, 17 May 2026 00:00:00 GMT</pubDate></item><item><title>Sharing my Claude Code rules: shell compatibility, zsh arrays and globs</title><link>https://blog.nghia-pham.com/blog/claude-code-rules-shell-zsh-arrays-globs/</link><guid isPermaLink="true">https://blog.nghia-pham.com/blog/claude-code-rules-shell-zsh-arrays-globs/</guid><description>A rule that documents the three places zsh and bash diverge enough to break the model&apos;s shell snippets. Variable word-splitting, no-match globs, array indexing. Small differences, large failures, fixable with one rule.</description><pubDate>Sun, 17 May 2026 00:00:00 GMT</pubDate></item><item><title>Kibana Connectors: Slack, Email, Webhook và PagerDuty setup và best practices</title><link>https://blog.nghia-pham.com/blog/connectors-slack-email-webhook-pagerduty-kibana/</link><guid isPermaLink="true">https://blog.nghia-pham.com/blog/connectors-slack-email-webhook-pagerduty-kibana/</guid><description>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.</description><pubDate>Sun, 17 May 2026 00:00:00 GMT</pubDate></item><item><title>Dashboard-as-code workflow: NDJSON, Git và CI/CD cho Kibana</title><link>https://blog.nghia-pham.com/blog/dashboard-as-code-ndjson-git-cicd-kibana/</link><guid isPermaLink="true">https://blog.nghia-pham.com/blog/dashboard-as-code-ndjson-git-cicd-kibana/</guid><description>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.</description><pubDate>Sun, 17 May 2026 00:00:00 GMT</pubDate></item><item><title>Deduplication và throttling trong Kibana: tránh alert fatigue</title><link>https://blog.nghia-pham.com/blog/dedup-throttling-alert-fatigue-kibana/</link><guid isPermaLink="true">https://blog.nghia-pham.com/blog/dedup-throttling-alert-fatigue-kibana/</guid><description>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.</description><pubDate>Sun, 17 May 2026 00:00:00 GMT</pubDate></item><item><title>Disk full và shard imbalance: quy trình recovery Elasticsearch không mất data</title><link>https://blog.nghia-pham.com/blog/disk-full-shard-imbalance-recovery-elasticsearch/</link><guid isPermaLink="true">https://blog.nghia-pham.com/blog/disk-full-shard-imbalance-recovery-elasticsearch/</guid><description>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.</description><pubDate>Sun, 17 May 2026 00:00:00 GMT</pubDate></item><item><title>Distributed training: DP, DDP, FSDP, pipeline parallel</title><link>https://blog.nghia-pham.com/blog/distributed-training-dp-ddp-fsdp-pipeline-parallel/</link><guid isPermaLink="true">https://blog.nghia-pham.com/blog/distributed-training-dp-ddp-fsdp-pipeline-parallel/</guid><description>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.</description><pubDate>Sun, 17 May 2026 00:00:00 GMT</pubDate></item><item><title>DPO và RLHF: alignment với preference data</title><link>https://blog.nghia-pham.com/blog/dpo-rlhf-alignment-preference-data-llm/</link><guid isPermaLink="true">https://blog.nghia-pham.com/blog/dpo-rlhf-alignment-preference-data-llm/</guid><description>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.</description><pubDate>Sun, 17 May 2026 00:00:00 GMT</pubDate></item><item><title>Elasticsearch query chậm: profiler, slow log và shard distribution</title><link>https://blog.nghia-pham.com/blog/elasticsearch-query-slow-profiler-slow-log-shard/</link><guid isPermaLink="true">https://blog.nghia-pham.com/blog/elasticsearch-query-slow-profiler-slow-log-shard/</guid><description>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.</description><pubDate>Sun, 17 May 2026 00:00:00 GMT</pubDate></item><item><title>Evaluation: MMLU, GSM8K, HumanEval, custom benchmark</title><link>https://blog.nghia-pham.com/blog/evaluation-mmlu-gsm8k-humaneval-custom-benchmark/</link><guid isPermaLink="true">https://blog.nghia-pham.com/blog/evaluation-mmlu-gsm8k-humaneval-custom-benchmark/</guid><description>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.</description><pubDate>Sun, 17 May 2026 00:00:00 GMT</pubDate></item><item><title>Hands-on fine-tune Llama-3 với dataset tiếng Việt LoRA $20 GPU</title><link>https://blog.nghia-pham.com/blog/hands-on-fine-tune-llama-3-tieng-viet-lora/</link><guid isPermaLink="true">https://blog.nghia-pham.com/blog/hands-on-fine-tune-llama-3-tieng-viet-lora/</guid><description>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.</description><pubDate>Sun, 17 May 2026 00:00:00 GMT</pubDate></item><item><title>Index Lifecycle Management (ILM): hot/warm/cold/delete và shrinking</title><link>https://blog.nghia-pham.com/blog/ilm-hot-warm-cold-delete-shrinking-kibana/</link><guid isPermaLink="true">https://blog.nghia-pham.com/blog/ilm-hot-warm-cold-delete-shrinking-kibana/</guid><description>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.</description><pubDate>Sun, 17 May 2026 00:00:00 GMT</pubDate></item><item><title>Kibana API tự động hoá: bulk user creation và mass dashboard update</title><link>https://blog.nghia-pham.com/blog/kibana-api-automation-bulk-user-dashboard/</link><guid isPermaLink="true">https://blog.nghia-pham.com/blog/kibana-api-automation-bulk-user-dashboard/</guid><description>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.</description><pubDate>Sun, 17 May 2026 00:00:00 GMT</pubDate></item><item><title>Kibana không load được: checklist debug từ browser tới Elasticsearch</title><link>https://blog.nghia-pham.com/blog/kibana-not-loading-debug-checklist-browser-elasticsearch/</link><guid isPermaLink="true">https://blog.nghia-pham.com/blog/kibana-not-loading-debug-checklist-browser-elasticsearch/</guid><description>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.</description><pubDate>Sun, 17 May 2026 00:00:00 GMT</pubDate></item><item><title>Kibana behind reverse proxy: Nginx, Cloudflare với XSRF</title><link>https://blog.nghia-pham.com/blog/kibana-reverse-proxy-nginx-cloudflare-xsrf/</link><guid isPermaLink="true">https://blog.nghia-pham.com/blog/kibana-reverse-proxy-nginx-cloudflare-xsrf/</guid><description>Đặ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.</description><pubDate>Sun, 17 May 2026 00:00:00 GMT</pubDate></item><item><title>KV cache và PagedAttention: tăng throughput inference</title><link>https://blog.nghia-pham.com/blog/kv-cache-pagedattention-throughput-llm-inference/</link><guid isPermaLink="true">https://blog.nghia-pham.com/blog/kv-cache-pagedattention-throughput-llm-inference/</guid><description>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.</description><pubDate>Sun, 17 May 2026 00:00:00 GMT</pubDate></item><item><title>LLM Agents: ReAct, tool use, planning, multi-step reasoning</title><link>https://blog.nghia-pham.com/blog/llm-agents-react-tool-use-planning-multi-step/</link><guid isPermaLink="true">https://blog.nghia-pham.com/blog/llm-agents-react-tool-use-planning-multi-step/</guid><description>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.</description><pubDate>Sun, 17 May 2026 00:00:00 GMT</pubDate></item><item><title>Log shippers đối chiếu: Filebeat, Fluentd, Vector cho ELK stack</title><link>https://blog.nghia-pham.com/blog/log-shippers-filebeat-fluentd-vector-comparison/</link><guid isPermaLink="true">https://blog.nghia-pham.com/blog/log-shippers-filebeat-fluentd-vector-comparison/</guid><description>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.</description><pubDate>Sun, 17 May 2026 00:00:00 GMT</pubDate></item><item><title>Long context: RoPE scaling, YaRN, ALiBi extrapolation</title><link>https://blog.nghia-pham.com/blog/long-context-rope-scaling-yarn-alibi-llm/</link><guid isPermaLink="true">https://blog.nghia-pham.com/blog/long-context-rope-scaling-yarn-alibi-llm/</guid><description>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.</description><pubDate>Sun, 17 May 2026 00:00:00 GMT</pubDate></item><item><title>LoRA và QLoRA: parameter-efficient fine-tuning</title><link>https://blog.nghia-pham.com/blog/lora-qlora-parameter-efficient-fine-tuning/</link><guid isPermaLink="true">https://blog.nghia-pham.com/blog/lora-qlora-parameter-efficient-fine-tuning/</guid><description>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.</description><pubDate>Sun, 17 May 2026 00:00:00 GMT</pubDate></item><item><title>Maps: geo visualization cho IoT và telemetry trong Kibana</title><link>https://blog.nghia-pham.com/blog/maps-geo-visualization-iot-telemetry-kibana/</link><guid isPermaLink="true">https://blog.nghia-pham.com/blog/maps-geo-visualization-iot-telemetry-kibana/</guid><description>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.</description><pubDate>Sun, 17 May 2026 00:00:00 GMT</pubDate></item><item><title>Mixed precision FP16 BF16 và gradient checkpointing</title><link>https://blog.nghia-pham.com/blog/mixed-precision-fp16-bf16-gradient-checkpointing/</link><guid isPermaLink="true">https://blog.nghia-pham.com/blog/mixed-precision-fp16-bf16-gradient-checkpointing/</guid><description>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.</description><pubDate>Sun, 17 May 2026 00:00:00 GMT</pubDate></item><item><title>Mixture of Experts (MoE): Mixtral, DeepSeek architecture</title><link>https://blog.nghia-pham.com/blog/mixture-of-experts-moe-mixtral-deepseek/</link><guid isPermaLink="true">https://blog.nghia-pham.com/blog/mixture-of-experts-moe-mixtral-deepseek/</guid><description>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. Đây là MoE: 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.</description><pubDate>Sun, 17 May 2026 00:00:00 GMT</pubDate></item><item><title>nf-blog: Publish a White-Labeled Post to a Personal Blog From a Claude Code Session</title><link>https://blog.nghia-pham.com/blog/nf-blog-writing-new-blog-post-claude-code/</link><guid isPermaLink="true">https://blog.nghia-pham.com/blog/nf-blog-writing-new-blog-post-claude-code/</guid><description>A Claude Code skill that turns a tutorial written in the current session into a blog post on a personal blog, with mandatory white-label audit, Vietnamese-aware slug generation, series support, and an Astro build verification before deploy.</description><pubDate>Sun, 17 May 2026 00:00:00 GMT</pubDate></item><item><title>nf-claude-restructure: Migrate Legacy CLAUDE.md Into Modular .claude/rules/</title><link>https://blog.nghia-pham.com/blog/nf-claude-restructure-migrate-claudemd-to-modular/</link><guid isPermaLink="true">https://blog.nghia-pham.com/blog/nf-claude-restructure-migrate-claudemd-to-modular/</guid><description>A Claude Code skill that fetches the latest Claude Code documentation, analyzes existing CLAUDE.md and CLAUDE.local.md files, and splits content into global ~/.claude/rules/ vs project ./.claude/rules/ based on auto-detected scope. Asks for output mode, never overwrites existing files.</description><pubDate>Sun, 17 May 2026 00:00:00 GMT</pubDate></item><item><title>Performance tuning Elasticsearch: JVM heap, field caps cache và merge throttling</title><link>https://blog.nghia-pham.com/blog/performance-tuning-jvm-heap-field-caps-merge-throttling/</link><guid isPermaLink="true">https://blog.nghia-pham.com/blog/performance-tuning-jvm-heap-field-caps-merge-throttling/</guid><description>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.</description><pubDate>Sun, 17 May 2026 00:00:00 GMT</pubDate></item><item><title>Quantization: INT8, INT4, GGUF, AWQ và BitNet 1.58-bit</title><link>https://blog.nghia-pham.com/blog/quantization-int8-int4-gguf-awq-bitnet-llm/</link><guid isPermaLink="true">https://blog.nghia-pham.com/blog/quantization-int8-int4-gguf-awq-bitnet-llm/</guid><description>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.</description><pubDate>Sun, 17 May 2026 00:00:00 GMT</pubDate></item><item><title>RAG: retrieval-augmented generation từ vector DB tới prompt</title><link>https://blog.nghia-pham.com/blog/rag-retrieval-augmented-generation-vector-db-prompt/</link><guid isPermaLink="true">https://blog.nghia-pham.com/blog/rag-retrieval-augmented-generation-vector-db-prompt/</guid><description>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.</description><pubDate>Sun, 17 May 2026 00:00:00 GMT</pubDate></item><item><title>Reasoning models: o1, R1, chain-of-thought training</title><link>https://blog.nghia-pham.com/blog/reasoning-models-o1-r1-chain-of-thought-training/</link><guid isPermaLink="true">https://blog.nghia-pham.com/blog/reasoning-models-o1-r1-chain-of-thought-training/</guid><description>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.</description><pubDate>Sun, 17 May 2026 00:00:00 GMT</pubDate></item><item><title>Scaling laws: Chinchilla, compute-optimal, data efficient</title><link>https://blog.nghia-pham.com/blog/scaling-laws-chinchilla-compute-optimal-llm/</link><guid isPermaLink="true">https://blog.nghia-pham.com/blog/scaling-laws-chinchilla-compute-optimal-llm/</guid><description>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.</description><pubDate>Sun, 17 May 2026 00:00:00 GMT</pubDate></item><item><title>Serving frameworks: vLLM, llama.cpp, Ollama, bitnet.cpp đối chiếu</title><link>https://blog.nghia-pham.com/blog/serving-vllm-llamacpp-ollama-bitnetcpp-comparison/</link><guid isPermaLink="true">https://blog.nghia-pham.com/blog/serving-vllm-llamacpp-ollama-bitnetcpp-comparison/</guid><description>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.</description><pubDate>Sun, 17 May 2026 00:00:00 GMT</pubDate></item><item><title>SFT: supervised fine-tuning với instruction dataset</title><link>https://blog.nghia-pham.com/blog/sft-supervised-fine-tuning-instruction-dataset/</link><guid isPermaLink="true">https://blog.nghia-pham.com/blog/sft-supervised-fine-tuning-instruction-dataset/</guid><description>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.</description><pubDate>Sun, 17 May 2026 00:00:00 GMT</pubDate></item><item><title>SLO tracking trong Kibana: SLI, error budget và alert progression</title><link>https://blog.nghia-pham.com/blog/slo-tracking-sli-error-budget-kibana/</link><guid isPermaLink="true">https://blog.nghia-pham.com/blog/slo-tracking-sli-error-budget-kibana/</guid><description>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).</description><pubDate>Sun, 17 May 2026 00:00:00 GMT</pubDate></item><item><title>Snapshot &amp; Restore: backup ES lên S3, disaster recovery</title><link>https://blog.nghia-pham.com/blog/snapshot-restore-s3-disaster-recovery-elasticsearch/</link><guid isPermaLink="true">https://blog.nghia-pham.com/blog/snapshot-restore-s3-disaster-recovery-elasticsearch/</guid><description>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.</description><pubDate>Sun, 17 May 2026 00:00:00 GMT</pubDate></item><item><title>Spaces: tách dev/staging/prod và team con cùng cluster Kibana</title><link>https://blog.nghia-pham.com/blog/spaces-multi-environment-team-kibana/</link><guid isPermaLink="true">https://blog.nghia-pham.com/blog/spaces-multi-environment-team-kibana/</guid><description>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.</description><pubDate>Sun, 17 May 2026 00:00:00 GMT</pubDate></item><item><title>Terraform và Kibana: quản lý saved objects, rules, connectors như infrastructure</title><link>https://blog.nghia-pham.com/blog/terraform-kibana-saved-objects-rules-connectors/</link><guid isPermaLink="true">https://blog.nghia-pham.com/blog/terraform-kibana-saved-objects-rules-connectors/</guid><description>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.</description><pubDate>Sun, 17 May 2026 00:00:00 GMT</pubDate></item><item><title>TLS/SSL end-to-end: cert giữa Kibana-ES-Beats và public endpoint</title><link>https://blog.nghia-pham.com/blog/tls-ssl-end-to-end-kibana-elasticsearch-beats/</link><guid isPermaLink="true">https://blog.nghia-pham.com/blog/tls-ssl-end-to-end-kibana-elasticsearch-beats/</guid><description>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.</description><pubDate>Sun, 17 May 2026 00:00:00 GMT</pubDate></item><item><title>Training loop: forward, backward, optimizer, lr schedule</title><link>https://blog.nghia-pham.com/blog/training-loop-forward-backward-optimizer-lr-schedule/</link><guid isPermaLink="true">https://blog.nghia-pham.com/blog/training-loop-forward-backward-optimizer-lr-schedule/</guid><description>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.</description><pubDate>Sun, 17 May 2026 00:00:00 GMT</pubDate></item><item><title>Upgrade ELK: minor version in-place và major cluster-swap</title><link>https://blog.nghia-pham.com/blog/upgrade-elk-minor-major-cluster-swap/</link><guid isPermaLink="true">https://blog.nghia-pham.com/blog/upgrade-elk-minor-major-cluster-swap/</guid><description>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.</description><pubDate>Sun, 17 May 2026 00:00:00 GMT</pubDate></item><item><title>Users, Roles, RBAC: mô hình phân quyền Kibana 8.x</title><link>https://blog.nghia-pham.com/blog/users-roles-rbac-kibana-8x/</link><guid isPermaLink="true">https://blog.nghia-pham.com/blog/users-roles-rbac-kibana-8x/</guid><description>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.</description><pubDate>Sun, 17 May 2026 00:00:00 GMT</pubDate></item><item><title>Visualization pitfalls: lỗi hay gặp với aggregation và time bucket trong Kibana</title><link>https://blog.nghia-pham.com/blog/visualization-pitfalls-aggregation-time-bucket-kibana/</link><guid isPermaLink="true">https://blog.nghia-pham.com/blog/visualization-pitfalls-aggregation-time-bucket-kibana/</guid><description>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.</description><pubDate>Sun, 17 May 2026 00:00:00 GMT</pubDate></item><item><title>[25/26] W is for Workloads: Managing Application Types in Kubernetes</title><link>https://blog.nghia-pham.com/blog/w-is-for-workloads-managing-application-types/</link><guid isPermaLink="true">https://blog.nghia-pham.com/blog/w-is-for-workloads-managing-application-types/</guid><description>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.</description></item><item><title>[26/26] X is for eXtensibility: CRDs, Webhooks, and the API Aggregation Layer</title><link>https://blog.nghia-pham.com/blog/x-is-for-extensibility-crds-operators-webhooks/</link><guid isPermaLink="true">https://blog.nghia-pham.com/blog/x-is-for-extensibility-crds-operators-webhooks/</guid><description>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.</description></item><item><title>30 bài LLM bằng agents trong 1 tháng: cái được, cái dở, ~0.5M token</title><link>https://blog.nghia-pham.com/blog/30-bai-llm-bang-agents-1-thang-bai-hoc/</link><guid isPermaLink="true">https://blog.nghia-pham.com/blog/30-bai-llm-bang-agents-1-thang-bai-hoc/</guid><description>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.</description><pubDate>Mon, 18 May 2026 00:00:00 GMT</pubDate></item><item><title>Wire Anthropic-style SVG diagrams vào Astro blog: CSS vars, palette, 4 pitfalls</title><link>https://blog.nghia-pham.com/blog/svg-diagrams-anthropic-style-astro-css-vars/</link><guid isPermaLink="true">https://blog.nghia-pham.com/blog/svg-diagrams-anthropic-style-astro-css-vars/</guid><description>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.</description><pubDate>Mon, 18 May 2026 00:00:00 GMT</pubDate></item><item><title>Agent là gì: LLM cộng tools cộng memory cộng loop</title><link>https://blog.nghia-pham.com/blog/ai-agent-la-gi/</link><guid isPermaLink="true">https://blog.nghia-pham.com/blog/ai-agent-la-gi/</guid><description>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.</description><pubDate>Mon, 18 May 2026 00:00:00 GMT</pubDate></item><item><title>AI Agents từ zero: Series Plan</title><link>https://blog.nghia-pham.com/blog/ai-agents-series-plan/</link><guid isPermaLink="true">https://blog.nghia-pham.com/blog/ai-agents-series-plan/</guid><description>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.</description><pubDate>Mon, 18 May 2026 00:00:00 GMT</pubDate></item><item><title>Control loop: ReAct, agentic loop, điều kiện dừng</title><link>https://blog.nghia-pham.com/blog/control-loop-agent/</link><guid isPermaLink="true">https://blog.nghia-pham.com/blog/control-loop-agent/</guid><description>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.</description><pubDate>Mon, 18 May 2026 00:00:00 GMT</pubDate></item><item><title>Chain-of-Thought so với structured reasoning</title><link>https://blog.nghia-pham.com/blog/cot-vs-structured-reasoning/</link><guid isPermaLink="true">https://blog.nghia-pham.com/blog/cot-vs-structured-reasoning/</guid><description>Bài 10 series AI Agents. CoT prompting vs explicit reasoning steps trong structured output. Khi nào prompt &apos;think step by step&apos; đủ, khi nào cần schema. Era reasoning model (o1, R1, Claude thinking).</description><pubDate>Mon, 18 May 2026 00:00:00 GMT</pubDate></item><item><title>Build agent từ đầu: 100 dòng Python với Anthropic SDK</title><link>https://blog.nghia-pham.com/blog/first-agent-from-scratch/</link><guid isPermaLink="true">https://blog.nghia-pham.com/blog/first-agent-from-scratch/</guid><description>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ế.</description><pubDate>Mon, 18 May 2026 00:00:00 GMT</pubDate></item><item><title>Memory cho agent: context window, scratchpad, summarization</title><link>https://blog.nghia-pham.com/blog/memory-cho-agent/</link><guid isPermaLink="true">https://blog.nghia-pham.com/blog/memory-cho-agent/</guid><description>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.</description><pubDate>Mon, 18 May 2026 00:00:00 GMT</pubDate></item><item><title>Plan-and-Execute: tách planning khỏi execution</title><link>https://blog.nghia-pham.com/blog/plan-and-execute/</link><guid isPermaLink="true">https://blog.nghia-pham.com/blog/plan-and-execute/</guid><description>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.</description><pubDate>Mon, 18 May 2026 00:00:00 GMT</pubDate></item><item><title>Tree of Thoughts và tree search cho agent</title><link>https://blog.nghia-pham.com/blog/tree-of-thoughts-agent/</link><guid isPermaLink="true">https://blog.nghia-pham.com/blog/tree-of-thoughts-agent/</guid><description>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.</description><pubDate>Mon, 18 May 2026 00:00:00 GMT</pubDate></item><item><title>Agent communication: shared state so với message passing</title><link>https://blog.nghia-pham.com/blog/agent-communication/</link><guid isPermaLink="true">https://blog.nghia-pham.com/blog/agent-communication/</guid><description>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.</description><pubDate>Mon, 18 May 2026 00:00:00 GMT</pubDate></item><item><title>Eval cho agent: trace, replay, golden set, regression</title><link>https://blog.nghia-pham.com/blog/agent-eval-trace-replay/</link><guid isPermaLink="true">https://blog.nghia-pham.com/blog/agent-eval-trace-replay/</guid><description>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.</description><pubDate>Mon, 18 May 2026 00:00:00 GMT</pubDate></item><item><title>Cost và latency: token budget, streaming, prompt caching</title><link>https://blog.nghia-pham.com/blog/agent-cost-latency/</link><guid isPermaLink="true">https://blog.nghia-pham.com/blog/agent-cost-latency/</guid><description>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.</description><pubDate>Mon, 18 May 2026 00:00:00 GMT</pubDate></item><item><title>Failure modes: hallucination, infinite loop, hijacking</title><link>https://blog.nghia-pham.com/blog/agent-failure-modes/</link><guid isPermaLink="true">https://blog.nghia-pham.com/blog/agent-failure-modes/</guid><description>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.</description><pubDate>Mon, 18 May 2026 00:00:00 GMT</pubDate></item><item><title>On-call cho agent: monitoring, alerts, rollback, A/B test</title><link>https://blog.nghia-pham.com/blog/agent-on-call-monitoring/</link><guid isPermaLink="true">https://blog.nghia-pham.com/blog/agent-on-call-monitoring/</guid><description>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.</description><pubDate>Mon, 18 May 2026 00:00:00 GMT</pubDate></item><item><title>Security: prompt injection, tool sandboxing, secrets</title><link>https://blog.nghia-pham.com/blog/agent-security-prompt-injection/</link><guid isPermaLink="true">https://blog.nghia-pham.com/blog/agent-security-prompt-injection/</guid><description>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.</description><pubDate>Mon, 18 May 2026 00:00:00 GMT</pubDate></item><item><title>Case study: Anthropic SDK agents và Claude Code agents</title><link>https://blog.nghia-pham.com/blog/anthropic-sdk-claude-code-agents/</link><guid isPermaLink="true">https://blog.nghia-pham.com/blog/anthropic-sdk-claude-code-agents/</guid><description>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.</description><pubDate>Mon, 18 May 2026 00:00:00 GMT</pubDate></item><item><title>Browser automation cho agent: Playwright và computer use</title><link>https://blog.nghia-pham.com/blog/browser-automation-agent/</link><guid isPermaLink="true">https://blog.nghia-pham.com/blog/browser-automation-agent/</guid><description>Bài 13 series AI Agents. Cho agent dùng browser: Playwright (DOM-based) vs Computer Use (vision + click). Use cases, code, cost compare.</description><pubDate>Mon, 18 May 2026 00:00:00 GMT</pubDate></item><item><title>Code execution sandbox: subprocess, Docker, e2b</title><link>https://blog.nghia-pham.com/blog/code-execution-sandbox/</link><guid isPermaLink="true">https://blog.nghia-pham.com/blog/code-execution-sandbox/</guid><description>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.</description><pubDate>Mon, 18 May 2026 00:00:00 GMT</pubDate></item><item><title>LangGraph, CrewAI, AutoGen: framework so sánh</title><link>https://blog.nghia-pham.com/blog/langgraph-crewai-autogen-compare/</link><guid isPermaLink="true">https://blog.nghia-pham.com/blog/langgraph-crewai-autogen-compare/</guid><description>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.</description><pubDate>Mon, 18 May 2026 00:00:00 GMT</pubDate></item><item><title>MCP (Model Context Protocol): chuẩn hoá tool layer</title><link>https://blog.nghia-pham.com/blog/mcp-model-context-protocol/</link><guid isPermaLink="true">https://blog.nghia-pham.com/blog/mcp-model-context-protocol/</guid><description>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.</description><pubDate>Mon, 18 May 2026 00:00:00 GMT</pubDate></item><item><title>Multi-agent patterns: supervisor, handoff, debate</title><link>https://blog.nghia-pham.com/blog/multi-agent-patterns/</link><guid isPermaLink="true">https://blog.nghia-pham.com/blog/multi-agent-patterns/</guid><description>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.</description><pubDate>Mon, 18 May 2026 00:00:00 GMT</pubDate></item><item><title>RAG cho agents: retrieval trong vòng lặp, không phải QA</title><link>https://blog.nghia-pham.com/blog/rag-cho-agents/</link><guid isPermaLink="true">https://blog.nghia-pham.com/blog/rag-cho-agents/</guid><description>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.</description><pubDate>Mon, 18 May 2026 00:00:00 GMT</pubDate></item><item><title>ReAct: thought, action, observation cycle</title><link>https://blog.nghia-pham.com/blog/react-thought-action-observation/</link><guid isPermaLink="true">https://blog.nghia-pham.com/blog/react-thought-action-observation/</guid><description>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.</description><pubDate>Mon, 18 May 2026 00:00:00 GMT</pubDate></item><item><title>Self-reflection: critic, verifier, retry pattern</title><link>https://blog.nghia-pham.com/blog/self-reflection-agent/</link><guid isPermaLink="true">https://blog.nghia-pham.com/blog/self-reflection-agent/</guid><description>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.</description><pubDate>Mon, 18 May 2026 00:00:00 GMT</pubDate></item><item><title>Specialized agent roles: planner, executor, reviewer</title><link>https://blog.nghia-pham.com/blog/specialized-agent-roles/</link><guid isPermaLink="true">https://blog.nghia-pham.com/blog/specialized-agent-roles/</guid><description>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.</description><pubDate>Mon, 18 May 2026 00:00:00 GMT</pubDate></item><item><title>Tool design: schema, validation, idempotency</title><link>https://blog.nghia-pham.com/blog/tool-design-schema-validation/</link><guid isPermaLink="true">https://blog.nghia-pham.com/blog/tool-design-schema-validation/</guid><description>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.</description><pubDate>Mon, 18 May 2026 00:00:00 GMT</pubDate></item><item><title>Tool use cơ bản: function calling, JSON schema, error handling</title><link>https://blog.nghia-pham.com/blog/tool-use-co-ban/</link><guid isPermaLink="true">https://blog.nghia-pham.com/blog/tool-use-co-ban/</guid><description>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.</description><pubDate>Mon, 18 May 2026 00:00:00 GMT</pubDate></item><item><title>Hermes Agent: AI tự học, persistent memory, chạy trên $5 VPS</title><link>https://blog.nghia-pham.com/blog/hermes-agent-nous-research/</link><guid isPermaLink="true">https://blog.nghia-pham.com/blog/hermes-agent-nous-research/</guid><description>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.</description><pubDate>Mon, 18 May 2026 00:00:00 GMT</pubDate></item><item><title>OpenClaw: open-source agent framework đang dẫn đầu 2026</title><link>https://blog.nghia-pham.com/blog/openclaw-agent-framework/</link><guid isPermaLink="true">https://blog.nghia-pham.com/blog/openclaw-agent-framework/</guid><description>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.</description><pubDate>Mon, 18 May 2026 00:00:00 GMT</pubDate></item><item><title>AgentMemory MCP và hệ memory plain markdown tôi đã tự build</title><link>https://blog.nghia-pham.com/blog/agentmemory-mcp-vs-claude-code-memory-pipeline/</link><guid isPermaLink="true">https://blog.nghia-pham.com/blog/agentmemory-mcp-vs-claude-code-memory-pipeline/</guid><description>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ử.</description><pubDate>Mon, 18 May 2026 00:00:00 GMT</pubDate></item><item><title>Semble: code search cho agent, tiết kiệm token so với grep</title><link>https://blog.nghia-pham.com/blog/semble-code-search-mcp-vs-grep/</link><guid isPermaLink="true">https://blog.nghia-pham.com/blog/semble-code-search-mcp-vs-grep/</guid><description>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.</description><pubDate>Mon, 18 May 2026 00:00:00 GMT</pubDate></item><item><title>nf-dream: Consolidating Claude Memory Without Losing Your Past Self</title><link>https://blog.nghia-pham.com/blog/nf-dream/</link><guid isPermaLink="true">https://blog.nghia-pham.com/blog/nf-dream/</guid><description>A Claude Code skill that classifies every file in your autoMemoryDirectory as Now, Next, Done, Future, Reference, or Stale, then reorganizes the index, writes a one-page handoff, archives aged session-end states, and dedupes overlapping topics. Project-scoped, snapshot-first, never deletes. Plus the four design decisions that took an incident each to get right.</description><pubDate>Mon, 18 May 2026 00:00:00 GMT</pubDate></item><item><title>nf-git-workflow: Opting Out of Ask-Before-Every-Commit, Safely</title><link>https://blog.nghia-pham.com/blog/nf-git-workflow/</link><guid isPermaLink="true">https://blog.nghia-pham.com/blog/nf-git-workflow/</guid><description>A Claude Code skill that installs a project-scoped rule overriding the global &apos;ask before every commit and push&apos; 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.</description><pubDate>Mon, 18 May 2026 00:00:00 GMT</pubDate></item><item><title>nf-memory: Pointing autoMemoryDirectory Without Footguns</title><link>https://blog.nghia-pham.com/blog/nf-memory/</link><guid isPermaLink="true">https://blog.nghia-pham.com/blog/nf-memory/</guid><description>A Claude Code skill that configures autoMemoryDirectory in .claude/settings.local.json, 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.</description><pubDate>Mon, 18 May 2026 00:00:00 GMT</pubDate></item><item><title>nf-cc-sync: Pull-Only Sync of ~/.claude/ Between Machines</title><link>https://blog.nghia-pham.com/blog/nf-cc-sync/</link><guid isPermaLink="true">https://blog.nghia-pham.com/blog/nf-cc-sync/</guid><description>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.</description><pubDate>Tue, 19 May 2026 00:00:00 GMT</pubDate></item><item><title>nf-ignore: A .gitignore Auditor for AI Tools and Env Files</title><link>https://blog.nghia-pham.com/blog/nf-ignore/</link><guid isPermaLink="true">https://blog.nghia-pham.com/blog/nf-ignore/</guid><description>A Claude Code skill that audits .gitignore for AI coding tool patterns and env file policy. Detects the project&apos;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.</description><pubDate>Tue, 19 May 2026 00:00:00 GMT</pubDate></item><item><title>nf-direnv: A Per-Repo .envrc With a Dynamic GitHub Token</title><link>https://blog.nghia-pham.com/blog/nf-direnv/</link><guid isPermaLink="true">https://blog.nghia-pham.com/blog/nf-direnv/</guid><description>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.</description><pubDate>Tue, 19 May 2026 00:00:00 GMT</pubDate></item></channel></rss>