---
title: "Articles"
type: "index"
url: "https://aifordevs.org/articles"
markdown: "https://aifordevs.org/articles.md"
publisher: "AI for Devs"
license: "https://aifordevs.org/reuse"
attribution: "Credit AI for Devs and link to https://aifordevs.org/articles"
---

# Articles

Every deep dive and guide on AI for Devs, newest first.

## Deep dives

How LLM systems work underneath: memory, decoding, serving, and the trade-offs that decide what you ship.

- [Best LLM for coding: November 2026 benchmarks, compared](https://aifordevs.org/articles/best-llm-for-coding.md): The best LLM for coding as of November 2026, by situation: agents, value, large repos, local hardware. Dated scores and who ran each benchmark. (2026-11-08)
- [LLM as a judge: biases, validation, and when to distrust it](https://aifordevs.org/articles/llm-as-a-judge.md): LLM as a judge means grading model output with a model. See what Zheng et al. measured, where bias enters, and how to validate a judge against human labels. (2026-11-08)
- [Mixture of experts: how MoE works and what it costs](https://aifordevs.org/articles/mixture-of-experts.md): Mixture of experts LLMs load every expert but run only a few per token. Compare total and active parameters, and see what memory, batching, and routing cost. (2026-11-08)
- [RAG vs fine tuning: which failures each one can fix](https://aifordevs.org/articles/rag-vs-fine-tuning.md): RAG vs fine tuning compared by failure mode: what each changes, who still sells fine tuning, dated costs worked in code, and when to combine them. (2026-11-08)
- [What is a vector database? HNSW, IVF, and when to skip one](https://aifordevs.org/articles/what-is-a-vector-database.md): What is a vector database, how HNSW and IVF search work, recall measured on generated vectors, and when pgvector or no database is the right choice. (2026-11-08)
- [What is an AI agent? The loop in code, and where it fails](https://aifordevs.org/articles/what-is-an-ai-agent.md): What is an AI agent? A tested agent loop in TypeScript, run offline against a scripted model, with traces of runaway loops, tool errors, and token growth. (2026-11-08)
- [KV cache explained: what it stores and what it costs](https://aifordevs.org/articles/kv-cache-explained.md): A KV cache holds attention keys and values during LLM decode. Size one from config.json, see what concurrency costs, and how prompt caching reuses it. (2026-11-08)
- [Speculative decoding: how drafts speed up LLM inference](https://aifordevs.org/articles/speculative-decoding.md): Speculative decoding has a cheap draft propose tokens the target model verifies in one pass. See the math, the costs, and what vLLM and SGLang support. (2026-11-08)
- [vLLM vs SGLang, plus Ollama and llama.cpp compared](https://aifordevs.org/articles/vllm-sglang-llama-cpp.md): vLLM vs SGLang compared on prefix caching, hardware, and constrained decoding, plus Ollama and llama.cpp. Every default checked November 8, 2026. (2026-11-08)

## Guides

Step-by-step builds with code you can copy, run, and change.

- [Claude API pricing: caching, batch, and real bills](https://aifordevs.org/articles/claude-api-pricing.md): Claude API pricing for every current model as of November 8, 2026, with cache break-even math, batch stacking, tool fees, and a tested cost calculator. (2026-11-08)
- [Gemini API pricing: free tier, caching, and real bills](https://aifordevs.org/articles/gemini-api-pricing.md): Gemini API pricing for every current model as of November 8, 2026: free versus paid, cache storage math, batch, grounding, thinking, and a tested calculator. (2026-11-08)
- [LLM evaluation: build an eval suite and gate deploys in CI](https://aifordevs.org/articles/llm-evaluation.md): LLM evaluation, step by step: define failure modes, build a golden dataset, choose metrics, run an offline suite, compare to a baseline, and gate CI. (2026-11-08)
- [LoRA fine tuning: QLoRA, r, alpha, and a tested PEFT script](https://aifordevs.org/articles/lora-fine-tuning.md): LoRA fine tuning from the paper to serving: r, alpha, QLoRA, dataset format, and a PEFT script run on CPU with real output, adapter size, and evals. (2026-11-08)
- [Context engineering: budget and order the context window](https://aifordevs.org/articles/context-engineering.md): Context engineering is choosing what a model reads on each call. Size each section, order it for prompt caching, trim inputs, and test every layout change. (2026-11-08)
- [What is an MCP server? Build and test one in TypeScript](https://aifordevs.org/articles/build-an-mcp-server.md): What is an MCP server? Build a tested TypeScript one with a confirmed write tool, debug it with MCP Inspector, and apply the spec's security requirements. (2026-11-08)

## Topics

- [Coding agents](https://aifordevs.org/topics/coding-agents.md): Terminal and editor agents that read your repository, run commands, and open pull requests. How they plan, what they can touch, and how to give them the context they need.
- [Agents and frameworks](https://aifordevs.org/topics/agents.md): Loops that let a model call tools, keep state, and work toward a goal. Framework comparisons, orchestration patterns, and failure modes you will hit in production.
- [MCP and agent protocols](https://aifordevs.org/topics/mcp.md): The protocols that connect models to tools and to each other. What an MCP server exposes, how clients discover it, and how to secure it.
- [Inference and serving](https://aifordevs.org/topics/inference.md): What happens between a request and the last token. Engines, batching, the KV cache, quantization, and decoding tricks that change latency and cost.
- [RAG and retrieval](https://aifordevs.org/topics/rag.md): Giving a model the right documents at the right time. Chunking, embeddings, hybrid search, and how to tell whether retrieval is helping.
- [Model releases](https://aifordevs.org/topics/models.md): New models from frontier labs and open-weight releases, read for what changes for developers: context length, pricing, tool use, and license.
- [APIs and pricing](https://aifordevs.org/topics/apis.md): The surface you actually code against. Price per million tokens, rate limits, structured outputs, tool calling, and the SDKs that wrap them.
- [Evals and observability](https://aifordevs.org/topics/evals.md): Measuring whether a model or agent is good enough for your task, and seeing what it did when it was not.
- [Fine-tuning and training](https://aifordevs.org/topics/fine-tuning.md): When prompting is not enough. Parameter-efficient fine-tuning, preference training, and the data work that decides the result.
- [Prompting and context](https://aifordevs.org/topics/context.md): What goes into the context window and in what order. System prompts, examples, retrieved data, tool results, and memory.
