Blog

Recording technical learnings and daily insights.

System DesignDistributed SystemsDatabaseAlgorithmsAPI DesignInteractive

Designing Instagram's Grid Reordering: User-Defined Order in a System Built on Chronology

Instagram began rolling out grid reordering to everyone in June 2026. Using it as a case study, this article designs user-defined ordering for a large service that has always been chronological: the data model, sort-key algorithms, concurrent updates, pagination, caching, and backward compatibility, with code I ran to check the key numbers.

Agent Host ProtocolAI AgentProtocolVS CodeJSON-RPCDistributed SystemsArchitecture

Reading the Agent Host Protocol — A State-Synchronization Protocol for Sharing One Agent Session Across Many Screens

The Agent Host Protocol (AHP) v1.0.0 behind VS Code's Agent Host shares one agent session across many screens by treating it as replicated state that the host orders: clients apply their own operations immediately and treat the host's echo as confirmation. This article, written for client and host implementers, draws on the spec, the canonical reducers, the SDKs, and VS Code's implementation to cover channels and actions, reconnection via serverSeq, write-ahead optimistic updates, why reducers do not enforce invariants, which operations are safe to resend, client-provided tools, authentication and security, and how AHP differs from ACP, MCP, and AG-UI.

AILLMAI InfrastructureEconomicsSemiconductorsOpenAIAnthropicMicrosoft

Where Is the AI Industry Heading? — The Causal Chain from Capital to Free Cash Flow, 2023 vs 2026

Using Anthropic's S-1, the September-quarter 10-Qs of Microsoft, Amazon and Alphabet, and the WSJ report that OpenAI's latest round raised less than half its target, this article traces the causal chain from capital to free cash flow and compares 2023 with 2026. A frontier AI lab's next giant round now depends on proof of unit economics rather than on expectations about capability, and the most predictable axes to scale next are reinforcement learning and inference-time compute on verifiable tasks, together with effective compute per dollar and per watt. The binding constraints have moved from GPUs to power, data centres and memory; the article also covers low precision, process nodes, HBM, advanced packaging and model architecture with their next moves and limits through 2030, and how Microsoft's chain differs from OpenAI's.

LLMLLM-as-JudgeEvaluationMLOpsHuman-in-the-LoopRecommender SystemsEnterprise AIPaper Reading

Operating an LLM Judge Over Its Lifetime — Netflix's Lifecycle for Recommendation-Explanation Judges and an Enterprise Implementation Framework

A technical reading of Netflix's "The Lifecycle of LLM-as-a-Judge for Large-Scale Recommendation Explanations": the four phases of birth, training, deployment and monitoring, RART (rubric tuning that aligns the judge's reasons as well as its labels), one judge serving as both gate and critic, and drift detection measured against human disagreement. Our analysis shows that retries amplify the judge's misses when those misses are independent across attempts, and that the paper's drift rule, applied literally, is biased in the raters' favor; the article then turns the lifecycle into a framework for enterprises: charter, key decisions, maturity model, roadmap and checklists.

OntologyMicrosoft FabricFabric IQKnowledge GraphDDDData IntegrationSemantic Layer

What Is an Ontology, Really? — Testing the “View Where You Cannot Write the JOIN” Hypothesis, from Academic Definitions to Microsoft Fabric IQ

Is an ontology a set of business descriptions attached to table definitions, or a semantic mapping between different data sources? Drawing on definitions from philosophy and knowledge engineering, GAV/LAV and OBDA from data integration theory, and DDD’s bounded contexts and context maps, this essay finds that descriptions and mappings both hang off shared concepts, and that an ontology’s mapping half is a GAV-style view over the sources. The Microsoft Fabric IQ ontology works this way without holding data, and leaves record matching, normalisation, rule execution, agreement and formal reasoning to other tools and the organisation.

AlgorithmsStable MatchingMarket DesignGame TheoryInteractive

The Gale–Shapley Algorithm — Why Deferring Acceptance Produces Stable Matchings, Shown by Running It

Deferred acceptance, the Gale–Shapley algorithm behind residency matches and school choice, always stops at a stable matching, and the one it returns is the best stable matching for the proposing side. Proofs and interactive demos show why, and cover the lattice of stable matchings, strategic misreporting, random markets and the many-to-one extension.

BlazorAG-UI.NETMicrosoft.Extensions.AIAgentic UIArchitectureAPI Design

What Should an Agentic UI Runtime Abstract? — Reading the Boundaries Drawn by Blazor's AI Components and the AG-UI .NET SDK

When AI agents and humans operate on the same application state, what should a UI runtime abstract? Read as an answer to that question, Blazor's new AI components and the AG-UI .NET SDK give names and boundaries to who commits what, and when: UIAgent, ContentBlock, IInteractiveBlock, and AgentState introduce identity and lifecycle, suspension points, where side effects run, how state is committed, and an update log with replay, while rendering is left to the app. Merging concurrent edits and replaying human decisions are not abstracted yet, and the split between interfaces and classes can be explained by how each boundary is meant to grow.

GoConcurrencyBackpressureArchitecture

Where Go Concurrency Helps in Practice — When to Choose Channels, and Production Patterns

In production Go servers, concurrency is mainly about overlapping wait time and controlling lifecycle, and channels mainly carry timing and ownership. For developers who know goroutine and channel syntax but not when to use them at work: the four motivations for concurrency, channels versus mutexes, and production patterns — fan-out, bounded concurrency, backpressure, graceful shutdown, ownership serialization, batching, and pub/sub — with code verified on Go 1.27.

DatabasePostgreSQLQuery OptimizationParserExecution EngineStorage

How SQL Reaches Bytes on Disk — Building a Query Engine From Scratch

Tracing a single SELECT statement all the way down — lexing, parsing, binding, logical planning, cardinality estimation, cost-based optimization, physical planning, Volcano execution, access methods, the buffer pool, slotted pages, and finally pread(2) — by writing the code that does it. Along the way: why sorting degrades gracefully past work_mem while hashing falls off a cliff, and why a parallel plan wants its Gather as high in the tree as possible.

AILLMAI AgentEvaluationAI InfrastructureEconomicsMicrosoft

The Frontier Moves from Models to Systems: The Cost-to-Outcome Curve and Microsoft's Vertical Integration

Read against Nadella's two essays, the FY26 results, and the restructured OpenAI agreement, Microsoft AI's 'Optimizing the frontier performance curve' makes the whole system, not a single model, the unit of the frontier; the system's advantage comes from varied task difficulty and cheap verification. The essay works through the economics of outcome per dollar (cascade break-even, model independence, owning the learning loop, A100s and depreciation) and what the argument does for Microsoft's vertical integration strategy.

AIAgentAgent SkillsLLMOptimizationResearch

Automatic Optimization of Agent Skills — Applying Research on Generation, Distillation, Routing, and Compression in Practice

The strongest evidence in research on generating and improving Agent Skills from execution history comes from execution-verified candidate search. This review covers text-space optimization, trajectory distillation, reinforcement learning, routing, composition, compression, and safety, and turns the evidence into an evaluation design and operating principles for production use.

AIAgentAgent HarnessCodexClaude CodeGitHub CopilotOpen Source

Agent Harness Landscape 2026 — Comparing Copilot, Codex, Claude Code, Cursor, and OSS on 12 Axes

Which responsibilities GitHub Copilot, OpenAI Codex, Anthropic Claude Code, Cursor, Cline, Aider, OpenHands, and SWE-agent/mini-SWE-agent take on and which they leave to users, compared across execution locus, orchestration, extensibility, permissions, context strategy, long-running work, multi-agent design, Git/PR integration, observability, enterprise governance, OSS transparency, and evaluation readiness.

LLMChatbotEvaluationLLM-as-JudgeNLPQuality Assurance

How to Measure Output Variance in LLM Chatbots: A Seven-Layer Taxonomy and Evaluation Design

Output variance (differences that appear even when the model, parameters, prompts, and other generation conditions are fixed) can be classified into seven layers: contract, surface, lexical, structural, information-selection, semantic, and pragmatic. No single similarity score decides whether a response is acceptable; this article combines exact match, edit distance, ROUGE-L, embedding similarity, NLI, and LLM-as-judge into an evaluation design that judges responses against ground truth.

AIAgentMicrosoft Agent FrameworkAgent HarnessC#.NETTools

The Same Idea with Microsoft Agent Framework — Building a Document Review Agent by Just Adding Tools with the Agent Harness

The document review agent from the GitHub Copilot SDK article leaves orchestration to the runtime and just adds tools; we rebuild it in C# with Microsoft Agent Framework's Agent Harness (HarnessAgent). HarnessAgent sets up an autonomous agent with planning, todos, context compaction, and tool approval in one line. The design difference with the most effect is that capability is narrowed at configuration time rather than by approving operations at runtime.

Conversation UXLLM AgentEvaluationVoice AIDialogue SystemsLLM-as-JudgeHCI

How to Evaluate Conversation UX: A MECE Framework for Agent–Human Dialogue Across Structure, Correctness, and Goodness

A systematic framework for evaluating the conversation UX of LLM-backed agents. We classify the evaluation rules MECE across three separable quality axes — structure, correctness, and goodness — plus a safety constraint axis, and separate what can be measured deterministically from what cannot. Drawing on research on human turn-taking, we show that in voice, unlike text, response timing dominates the experience.

AIAgentGitHub CopilotSDKTypeScriptTools

Letting Go of Orchestration — Building a Document Review Agent by Just Adding Tools with the GitHub Copilot SDK

Instead of writing the agent's planning and tool-calling loop (its orchestration) yourself, hand it to the GitHub Copilot SDK. We build a document review agent by passing in the operations a review needs as tools, and add permission control, an SSE server, and a UI. In exchange, the runtime decides the procedure: the steps aren't guaranteed, testing and cost prediction get harder, and you have to design the defenses against untrusted documents yourself.

AI AgentLLMClaude CodeArchitecturePaper ReadingMCPContext Engineering

The Design Space of a Production AI Agent — Harness-Centric Design in Claude Code's 512K Lines

A walkthrough of arXiv:2604.14228, 'Dive into Claude Code'. Claude Code wraps a simple while loop in a deterministic harness that makes up an estimated 98.4% of its code. The harness layers permission checks, compacts context in stages, tiers extensions by context cost, isolates subagents, and persists sessions append-only. For teams building AI agent products, the lesson is that most of the design space lies outside the model.

AG-UIAIProtocolMicrosoft Agent FrameworkPython

AG-UI Protocol Explained — Implementing the Standard Protocol Between Agents and Users with Microsoft Agent Framework

AG-UI (Agent-User Interaction Protocol) standardizes communication between agents and user-facing apps as a stream of typed events, so a frontend that implements it can work with any AG-UI backend. This article covers its architecture, events, middleware, and state synchronization, with implementation examples in Microsoft Agent Framework.