<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
  <channel>
    <title>Refactor — Notes from the AI engineering frontier</title>
    <link>https://refactor4ai.com/blog</link>
    <atom:link href="https://refactor4ai.com/blog/rss.xml" rel="self" type="application/rss+xml"/>
    <description>Practical writing on AI fluency for senior engineers, platform leads, and product managers.</description>
    <language>en-gb</language>
    <lastBuildDate>Thu, 14 May 2026 19:01:28 GMT</lastBuildDate>
    <item>
      <title>Token budgeting: a senior engineer&apos;s mental model</title>
      <link>https://refactor4ai.com/blog/token-budgeting-mental-model</link>
      <guid isPermaLink="true">https://refactor4ai.com/blog/token-budgeting-mental-model</guid>
      <pubDate>Thu, 14 May 2026 00:00:00 GMT</pubDate>
      <description>A working mental model for budgeting LLM tokens — how to estimate per-request cost in your head, where the 10× overruns hide, and the four-number per-feature budget that prevents the end-of-month bill surprise. Concrete numbers for Claude 4.7, GPT-5.5, and Gemini 3.1 as of May 2026.</description>
      <author>Refactor4AI team</author>
    </item>
    <item>
      <title>Postmortem #1: how an embedding model swap silently broke our retrieval for nine days</title>
      <link>https://refactor4ai.com/blog/postmortem-001-embedding-swap-broke-rag</link>
      <guid isPermaLink="true">https://refactor4ai.com/blog/postmortem-001-embedding-swap-broke-rag</guid>
      <pubDate>Thu, 14 May 2026 00:00:00 GMT</pubDate>
      <description>Production Postmortem — EdTech, ~150 engineers. A routine embedding model upgrade landed in production with the index never re-embedded. Hybrid search rankings collapsed, the assistant began confidently citing the wrong source documents, retry-storms ran up a ~$48K LLM bill, and nobody noticed for nine days because no offline eval was wired to the retrieval layer. Timeline, root cause, fixes, and five lessons for anyone running RAG in production.</description>
      <author>Refactor4AI team</author>
    </item>
    <item>
      <title>The Living Spec: markdown PRDs that ship</title>
      <link>https://refactor4ai.com/blog/living-spec-markdown-prds</link>
      <guid isPermaLink="true">https://refactor4ai.com/blog/living-spec-markdown-prds</guid>
      <pubDate>Thu, 14 May 2026 00:00:00 GMT</pubDate>
      <description>Ditch the 20-page Google Doc PRD. The Living Spec pattern — a single markdown file checked into the repo next to the code, edited continuously by both PM and AI agents — is how AI-native teams keep documentation aligned with what&apos;s actually being built. A senior-PM playbook for the format, the rituals, and the trade-offs.</description>
      <author>Refactor4AI team</author>
    </item>
    <item>
      <title>The &apos;lethal trifecta&apos; of agent security</title>
      <link>https://refactor4ai.com/blog/lethal-trifecta-agent-security</link>
      <guid isPermaLink="true">https://refactor4ai.com/blog/lethal-trifecta-agent-security</guid>
      <pubDate>Thu, 14 May 2026 00:00:00 GMT</pubDate>
      <description>Simon Willison&apos;s lethal trifecta — private data, untrusted content, and an exfiltration vector — is the single most important security model in 2026. A senior engineer&apos;s guide to why prompt-injection defences fail, why structural mitigations are the only ones that work, and which leg of the trifecta is cheapest to cut in your architecture.</description>
      <author>Refactor4AI team</author>
    </item>
    <item>
      <title>FinOps for AI: cutting bills 40% in a quarter</title>
      <link>https://refactor4ai.com/blog/finops-for-ai-cutting-bills</link>
      <guid isPermaLink="true">https://refactor4ai.com/blog/finops-for-ai-cutting-bills</guid>
      <pubDate>Thu, 14 May 2026 00:00:00 GMT</pubDate>
      <description>The eight-lever playbook we use to take AI bills down 40% in a quarter without degrading quality — prompt caching, batch APIs, routing, smaller models, capacity commitments, output capping, retrieval pruning, and the dashboard wiring that makes the savings stick. Concrete numbers on Claude, GPT-5, and Gemini for mid-2026.</description>
      <author>Refactor4AI team</author>
    </item>
    <item>
      <title>Bedrock vs Azure OpenAI vs Vertex AI: a 2026 decision tree</title>
      <link>https://refactor4ai.com/blog/bedrock-vs-azure-openai-vs-vertex-ai-2026</link>
      <guid isPermaLink="true">https://refactor4ai.com/blog/bedrock-vs-azure-openai-vs-vertex-ai-2026</guid>
      <pubDate>Thu, 14 May 2026 00:00:00 GMT</pubDate>
      <description>An opinionated, decision-tree comparison of AWS Bedrock, Microsoft Azure AI Foundry, and Google Vertex AI as of May 2026 — which models live where, real list prices, throughput economics, the data-egress gotchas nobody puts in the slide deck, and the four questions that should actually pick your cloud.</description>
      <author>Refactor4AI team</author>
    </item>
    <item>
      <title>Why your agents fail in production (and the 5 fixes that actually work)</title>
      <link>https://refactor4ai.com/blog/why-agents-fail-in-production</link>
      <guid isPermaLink="true">https://refactor4ai.com/blog/why-agents-fail-in-production</guid>
      <pubDate>Wed, 13 May 2026 00:00:00 GMT</pubDate>
      <description>Most enterprise AI agents in 2026 never reach production — Deloitte&apos;s 2026 Tech Trends report puts production deployment at 11% even with 38% of organisations actively piloting. Five concrete failure modes show up in every post-mortem we run. Tool error handling, context drift, dumb RAG, brittle connectors, and no evals. Here&apos;s what each looks like and how to fix it.</description>
      <author>Refactor4AI team</author>
    </item>
    <item>
      <title>Staffing AI features without a dedicated AI team</title>
      <link>https://refactor4ai.com/blog/staffing-ai-no-dedicated-team</link>
      <guid isPermaLink="true">https://refactor4ai.com/blog/staffing-ai-no-dedicated-team</guid>
      <pubDate>Wed, 13 May 2026 00:00:00 GMT</pubDate>
      <description>You have been asked to ship AI features and you do not have ML engineers. A pragmatic 2026 staffing playbook for Staff+ engineers and EMs — what roles you actually need (and which ones you do not), how to upskill existing engineers in 90 days, and when to reach for fractional help instead of hiring.</description>
      <author>Refactor4AI team</author>
    </item>
    <item>
      <title>Reranking: the single highest-ROI improvement you can make to a RAG pipeline</title>
      <link>https://refactor4ai.com/blog/reranking-highest-roi-rag</link>
      <guid isPermaLink="true">https://refactor4ai.com/blog/reranking-highest-roi-rag</guid>
      <pubDate>Wed, 13 May 2026 00:00:00 GMT</pubDate>
      <description>If your RAG system retrieves 50 chunks and stuffs the top-5 into the prompt, you&apos;re shipping mediocre answers. A cross-encoder reranker on top of hybrid retrieval lifts retrieval accuracy 15–40% for 80–150ms of added latency. Here&apos;s the case for it, the production options in 2026, and the rerank-or-die patterns.</description>
      <author>Refactor4AI team</author>
    </item>
    <item>
      <title>RAG vs fine-tuning in 2026: a decision framework that actually ships</title>
      <link>https://refactor4ai.com/blog/rag-vs-fine-tuning-2026</link>
      <guid isPermaLink="true">https://refactor4ai.com/blog/rag-vs-fine-tuning-2026</guid>
      <pubDate>Wed, 13 May 2026 00:00:00 GMT</pubDate>
      <description>The RAG-vs-fine-tuning debate is mostly noise in 2026. The real question is where to place knowledge, where to encode behaviour, and how to evaluate both. Here&apos;s the decision framework, the order of operations, and the LoRA-on-top-of-retrieval pattern most teams should default to.</description>
      <author>Refactor4AI team</author>
    </item>
    <item>
      <title>Writing PRDs for AI products: from deterministic to probabilistic</title>
      <link>https://refactor4ai.com/blog/prds-for-ai-products-probabilistic</link>
      <guid isPermaLink="true">https://refactor4ai.com/blog/prds-for-ai-products-probabilistic</guid>
      <pubDate>Wed, 13 May 2026 00:00:00 GMT</pubDate>
      <description>Classic PRD templates assume a system that returns the same answer twice. AI products do not. A working PM template for 2026 — acceptance criteria as distributions, eval datasets as spec, failure modes as first-class requirements, and the living document model that survives a model upgrade.</description>
      <author>Refactor4AI team</author>
    </item>
    <item>
      <title>LLM observability: the 2026 stack you actually need</title>
      <link>https://refactor4ai.com/blog/llm-observability-stack-2026</link>
      <guid isPermaLink="true">https://refactor4ai.com/blog/llm-observability-stack-2026</guid>
      <pubDate>Wed, 13 May 2026 00:00:00 GMT</pubDate>
      <description>Stop flying blind on production AI. A practical 2026 reference stack for tracing, evals, cost analytics, and prompt management — built around Langfuse, Helicone, and the OpenTelemetry GenAI conventions — with the integration tradeoffs we actually run into in production.</description>
      <author>Refactor4AI team</author>
    </item>
    <item>
      <title>Hybrid search 101: BM25 + vector + RRF, and why pure semantic search is leaving recall on the floor</title>
      <link>https://refactor4ai.com/blog/hybrid-search-bm25-vector-rrf</link>
      <guid isPermaLink="true">https://refactor4ai.com/blog/hybrid-search-bm25-vector-rrf</guid>
      <pubDate>Wed, 13 May 2026 00:00:00 GMT</pubDate>
      <description>Vector-only retrieval is the wrong default in 2026. Pure semantic search tops out around 65–78% recall@10 on real-world RAG corpora. Hybrid retrieval — BM25 plus vector plus Reciprocal Rank Fusion — pushes that to 91%, and every major vector DB ships it natively. Here&apos;s exactly how it works and how to wire it up.</description>
      <author>Refactor4AI team</author>
    </item>
    <item>
      <title>Computer-use agents 101: Claude, Operator, ACE</title>
      <link>https://refactor4ai.com/blog/computer-use-agents-101</link>
      <guid isPermaLink="true">https://refactor4ai.com/blog/computer-use-agents-101</guid>
      <pubDate>Wed, 13 May 2026 00:00:00 GMT</pubDate>
      <description>A senior-engineer primer on computer-use agents in May 2026 — Claude Computer Use vs OpenAI Operator (CUA) vs General Agents&apos;s ACE. How each one drives a GUI, where they fail, the realistic accuracy you should plan for, and which is the right pick for which job.</description>
      <author>Refactor4AI team</author>
    </item>
    <item>
      <title>Building an AI gateway: rate limits, retries, fallback</title>
      <link>https://refactor4ai.com/blog/ai-gateway-rate-limits-fallback</link>
      <guid isPermaLink="true">https://refactor4ai.com/blog/ai-gateway-rate-limits-fallback</guid>
      <pubDate>Wed, 13 May 2026 00:00:00 GMT</pubDate>
      <description>Direct vendor calls are a single point of failure. A senior-engineer blueprint for the AI gateway pattern in 2026 — virtual keys, per-tenant rate limits, graceful retry with backoff, cross-vendor fallback, prompt caching, and the buy-vs-build choice between LiteLLM, Portkey, Kong AI, and rolling your own.</description>
      <author>Refactor4AI team</author>
    </item>
    <item>
      <title>Agent loops in 2026: ReAct vs Plan-and-Execute vs Reflection</title>
      <link>https://refactor4ai.com/blog/agent-loops-react-vs-plan-execute</link>
      <guid isPermaLink="true">https://refactor4ai.com/blog/agent-loops-react-vs-plan-execute</guid>
      <pubDate>Wed, 13 May 2026 00:00:00 GMT</pubDate>
      <description>Most production agents in 2026 aren&apos;t pure ReAct or pure Plan-and-Execute — they&apos;re a hybrid that picks each pattern for the part of the task it&apos;s good at. Here&apos;s what the three loops actually do, the cost-latency-quality tradeoff, and the architecture pattern that wins for long-running workflows.</description>
      <author>Refactor4AI team</author>
    </item>
    <item>
      <title>What is MCP? A practical guide to the Model Context Protocol in 2026</title>
      <link>https://refactor4ai.com/blog/what-is-mcp-model-context-protocol</link>
      <guid isPermaLink="true">https://refactor4ai.com/blog/what-is-mcp-model-context-protocol</guid>
      <pubDate>Tue, 12 May 2026 00:00:00 GMT</pubDate>
      <description>MCP is the standard way LLMs talk to tools, databases and APIs in 2026. This is the plain-English explainer — what MCP is, why it won, and how to build your first MCP server in TypeScript or Python.</description>
      <author>Refactor4AI team</author>
    </item>
    <item>
      <title>Prompt caching: how to cut your LLM bill by 90% in 2026</title>
      <link>https://refactor4ai.com/blog/prompt-caching-90-percent-savings</link>
      <guid isPermaLink="true">https://refactor4ai.com/blog/prompt-caching-90-percent-savings</guid>
      <pubDate>Tue, 12 May 2026 00:00:00 GMT</pubDate>
      <description>Prompt caching is the single biggest lever for reducing LLM costs in production. Here&apos;s how it works on Anthropic, OpenAI and Google, exactly what to cache, and the patterns that turn a $30k/day feature into a $3k/day one.</description>
      <author>Refactor4AI team</author>
    </item>
    <item>
      <title>The 2026 AI System Design Interview: a complete preparation guide</title>
      <link>https://refactor4ai.com/blog/ai-system-design-interview-2026</link>
      <guid isPermaLink="true">https://refactor4ai.com/blog/ai-system-design-interview-2026</guid>
      <pubDate>Tue, 12 May 2026 00:00:00 GMT</pubDate>
      <description>AI system design is the new system design interview. Here&apos;s the format, the categories of questions FAANG and AI labs are actually asking, the framework to structure an answer, and the trade-offs you&apos;ll be expected to articulate.</description>
      <author>Refactor4AI team</author>
    </item>
    <item>
      <title>AI fluency for product managers: what to actually learn in 2026</title>
      <link>https://refactor4ai.com/blog/ai-fluency-for-product-managers</link>
      <guid isPermaLink="true">https://refactor4ai.com/blog/ai-fluency-for-product-managers</guid>
      <pubDate>Tue, 12 May 2026 00:00:00 GMT</pubDate>
      <description>AI fluency for PMs isn&apos;t &apos;know what an LLM is.&apos; It&apos;s writing specs engineers can build, owning the eval plan, classifying risk under the EU AI Act, and pricing AI features. Here&apos;s the practical curriculum.</description>
      <author>Refactor4AI team</author>
    </item>
    <item>
      <title>The 2026 AI Capability Map: Claude Opus 4.7 vs GPT-5.5 vs Gemini 3.1 Pro</title>
      <link>https://refactor4ai.com/blog/ai-capability-map-2026</link>
      <guid isPermaLink="true">https://refactor4ai.com/blog/ai-capability-map-2026</guid>
      <pubDate>Tue, 12 May 2026 00:00:00 GMT</pubDate>
      <description>A practical, role-agnostic capability map for the May 2026 flagship models — costs per million tokens, effective context windows, reasoning premiums, multimodal coverage, cloud availability, and which to actually pick for which job.</description>
      <author>Refactor4AI team</author>
    </item>
  </channel>
</rss>
