<?xml version="1.0" encoding="UTF-8"?><rss version="2.0" xmlns:content="http://purl.org/rss/1.0/modules/content/"><channel><title>Anass Ez-zouaine | Backend, AI &amp; Shopify Engineer | AI</title><description>AI posts from Anass Ez-zouaine | Backend, AI &amp; Shopify Engineer.</description><link>https://ansezz.com/</link><item><title>Meta Muse for Solo Founders: The Guard Outside the Agent Matters More Than the Agent</title><link>https://ansezz.com/blog/meta-muse-personal-ai-agent-solo-founders/</link><guid isPermaLink="true">https://ansezz.com/blog/meta-muse-personal-ai-agent-solo-founders/</guid><description>Meta&apos;s personal agent takes action on its own cloud computer and keeps working after you close the app. Sentinel sits outside the model. Price as of 28 October 2026.</description><pubDate>Wed, 28 Oct 2026 00:00:00 GMT</pubDate><content:encoded>&lt;p&gt;Meta built a separate agent whose only job is to say no to the first agent.&lt;/p&gt;
&lt;p&gt;Muse&apos;s most important feature for a solo founder is not the model. It is the Sentinel and approval layer that sits outside the model, and that is the bar every personal agent should now be judged on.&lt;/p&gt;
&lt;p&gt;That is my claim. Everything after it comes from Meta&apos;s pages, read on 28 October 2026. Prices can change.&lt;/p&gt;
&lt;p&gt;The earlier posts in this series are &lt;a href=&quot;https://ansezz.com/blog/claude-duet-personal-ai-agent&quot;&gt;Claude Duet&lt;/a&gt;, &lt;a href=&quot;https://ansezz.com/blog/grok-bot-solo-founders&quot;&gt;Grok Bot&lt;/a&gt;, and &lt;a href=&quot;https://ansezz.com/blog/openai-dots-solo-founders&quot;&gt;OpenAI Dots&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;{/* prettier-ignore */}&lt;/p&gt;

- Muse is Meta&apos;s personal AI agent. It takes action, not only answers. You talk to it in the Muse app, on muse.ai, or in WhatsApp. Meta calls the model, Muse Spark, its most capable model to date.
- The work runs on Muse Secure VM and can continue after you close the app. A separate Sentinel agent is the only one that can allow connector actions and traffic leaving the machine. Muse cannot override it.
- As of 28 October 2026, Muse is free with a usage limit. Power is $20 a month (500 million Muse tokens a week). Maximum is $100 a month (3 billion Muse tokens a week). It is in limited testing in the US, Canada, Japan, and Singapore. You need to be 18 or the age of majority.

&lt;h2&gt;What it is&lt;/h2&gt;
&lt;p&gt;On 8 September 2026, Meta announced Muse. The &lt;a href=&quot;https://about.fb.com/news/2026/09/introducing-muse-personal-ai-agent/&quot;&gt;launch post&lt;/a&gt; shows an update on 30 September 2026. Muse is a personal AI agent that takes action. It does not only answer questions.&lt;/p&gt;
&lt;p&gt;Meta says Muse is powered by Muse Spark, and calls that its most capable model to date.&lt;/p&gt;
&lt;p&gt;You talk to it in the Muse app, on &lt;a href=&quot;http://muse.ai&quot;&gt;muse.ai&lt;/a&gt;, or directly in WhatsApp.&lt;/p&gt;
&lt;p&gt;Muse remembers what matters to you. It can make a suggestion when you did not ask.&lt;/p&gt;
&lt;p&gt;Meta&apos;s &lt;a href=&quot;https://research.meta.ai/blog/security-and-safety-for-ai-agents-our-approach-with-muse&quot;&gt;safety post&lt;/a&gt; says Muse launches swarms of subagents, builds its own tools, and edits itself.&lt;/p&gt;

  &lt;div&gt;You ask a question and get an answer.&lt;/div&gt;
  &lt;div&gt;
    Muse takes the action, and it can keep working after you close the app.
  &lt;/div&gt;


  Muse&apos;s most important feature for a solo founder is not the model. It is the
  Sentinel and approval layer that sits outside the model, and that is the bar
  every personal agent should now be judged on.


  Before you connect an account, write two lines. One action Muse may start.
  One action it must bring back to you. Meta&apos;s examples of the second line are
  sending an email and making a purchase.

&lt;h2&gt;How work runs&lt;/h2&gt;
&lt;p&gt;Muse runs on Muse Secure VM, a dedicated cloud virtual machine with its own browser. The VM holds both the agent and your data. That is in the &lt;a href=&quot;https://about.fb.com/news/2026/09/introducing-muse-personal-ai-agent/&quot;&gt;launch post&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;Each VM is an isolated Linux machine with a browser, storage, CPU, and memory. The &lt;a href=&quot;https://research.meta.ai/blog/security-and-safety-for-ai-agents-our-approach-with-muse&quot;&gt;safety post&lt;/a&gt; says that machine is for real work: compiling code, custom skills, and concurrent sub-agents and scheduled jobs (crons).&lt;/p&gt;
&lt;p&gt;The launch post says Muse can open a browser, fill out forms, and negotiate on your behalf.&lt;/p&gt;
&lt;p&gt;For a longer task, it keeps working after you close the app. It comes back when something changes, or when it needs your approval.&lt;/p&gt;
&lt;p&gt;You give it a goal. It helps you build a plan. Then it advances the work on its own.&lt;/p&gt;
&lt;p&gt;The safety post says connectors link Muse to Meta or third-party apps. Muse can also write its own custom connectors when a service has an API or a CLI.&lt;/p&gt;
&lt;p&gt;The launch post says payments can go through Link by Stripe, using a one-time-use card. Meta describes Shop Pay and 1Password support as coming soon.&lt;/p&gt;
&lt;p&gt;The safety post says you can inspect Muse&apos;s browser work and take over at any time. The launch post describes a full audit trail of what Muse has done and what it plans to do.&lt;/p&gt;
&lt;figure&gt;

  Give Muse one goal, then close the app. When you come back, read the audit
  trail before you approve the next step.

&lt;h2&gt;Approvals and safety&lt;/h2&gt;
&lt;p&gt;The &lt;a href=&quot;https://research.meta.ai/blog/security-and-safety-for-ai-agents-our-approach-with-muse&quot;&gt;safety post&lt;/a&gt; says a separate Sentinel agent is the sole permission authority for connector actions and for all network egress. Network egress means traffic leaving the machine. Muse proposes an action. Only Sentinel can grant it. The agent cannot override Sentinel.&lt;/p&gt;
&lt;p&gt;The &lt;a href=&quot;https://about.fb.com/news/2026/09/introducing-muse-personal-ai-agent/&quot;&gt;launch post&lt;/a&gt; says nothing Muse does reaches the internet unless Sentinel approves it.&lt;/p&gt;
&lt;p&gt;When Sentinel needs you, the approval dialog is shown in the client UI, not inside the Muse conversation. Your answer goes back to Sentinel. The safety post says that.&lt;/p&gt;
&lt;p&gt;The &lt;a href=&quot;https://www.meta.com/help/superintelligence/1047255454427887/&quot;&gt;privacy, safety and security help page&lt;/a&gt; says Muse asks you to confirm important actions, such as sending an email or making a purchase. Meta says many of those checks are enforced outside the AI model.&lt;/p&gt;
&lt;p&gt;The safety post and that help page say credentials sit in a Secure Credentials Store, called authd. The model never sees real passwords or tokens. Surrogate tokens are swapped for the real credentials only at the network boundary, and only after Sentinel authorizes that step. The launch post says Muse cannot see passwords you type into the browser yourself.&lt;/p&gt;
&lt;p&gt;The safety post lists these prompt-injection defenses: model training, a harness that labels untrusted input, separate classifiers, a person in the loop before anything leaves the machine, and deterministic boundaries under the agent. The email connector filters one-time tokens, password reset links, and login magic links.&lt;/p&gt;
&lt;p&gt;The safety post says every purchase through the wallet needs human approval, with the exact details. One-time cards are tied to a merchant, an amount, and a time limit.&lt;/p&gt;
&lt;p&gt;Muse does not share conversations or VM data with Meta&apos;s ad systems. Training on interactions is on by default. You can opt out under Settings. That is in the help page and the safety post.&lt;/p&gt;
&lt;p&gt;The safety post says Muse can and will still make mistakes, and that you should review its activity. The bug bounty pays up to $300,000, and up to $130,000 for a prompt injection that affects one user.&lt;/p&gt;
&lt;p&gt;The safety post says a Muse Confidential VM, meant to cryptographically prevent Meta access, is planned for later this year. It is not live.&lt;/p&gt;
&lt;figure&gt;

  Read the approval in the app, outside the Muse chat. That answer goes to
  Sentinel, not into the thread.

&lt;h2&gt;Access and price&lt;/h2&gt;
&lt;p&gt;As of 28 October 2026, from the &lt;a href=&quot;https://about.fb.com/news/2026/09/introducing-muse-personal-ai-agent/&quot;&gt;launch post&lt;/a&gt;, the &lt;a href=&quot;https://about.fb.com/ja/news/2026/10/muse-personal-ai-agent-launches-in-japan/&quot;&gt;Japan post&lt;/a&gt;, the &lt;a href=&quot;https://about.fb.com/news/2026/10/muse-is-now-available-in-singapore-the-worlds-first-personal-ai-agent-built-for-everyone/&quot;&gt;Singapore post&lt;/a&gt;, and &lt;a href=&quot;https://www.meta.com/help/subscriptions/1021145227643680/&quot;&gt;About Muse subscriptions&lt;/a&gt;:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;The United States and Canada, from the September launch.&lt;/li&gt;
&lt;li&gt;Japan, from 23 October 2026.&lt;/li&gt;
&lt;li&gt;Singapore, from 27 October 2026.&lt;/li&gt;
&lt;li&gt;It is still in limited testing, and it is not available in every location.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;You can use Muse on iOS, on Android, and at &lt;a href=&quot;http://muse.ai&quot;&gt;muse.ai&lt;/a&gt;. Meta says AI glasses are coming soon.&lt;/p&gt;
&lt;p&gt;There is a free tier. It has a usage limit that refreshes. Power is $20 a month and includes 500 million Muse tokens a week. Maximum is $100 a month and includes 3 billion Muse tokens a week.&lt;/p&gt;
&lt;p&gt;You need a Meta account. You need to be 18 or the age of majority. You need to be in a supported country. The subscription renews automatically each month.&lt;/p&gt;
&lt;p&gt;The Singapore post lists early local connectors, including Shopee, Grab, Singapore Airlines, Agoda, ShopBack, Klook, &lt;a href=&quot;http://Trip.com&quot;&gt;Trip.com&lt;/a&gt;, and Lazada, plus Gmail, Google Calendar, and Instagram. These pages do not give a full connector list beyond examples like those.&lt;/p&gt;

  Check the country on your Meta account before you pay. Limited testing means
  the plan can still be unavailable where you are. The subscription renews
  each month.

&lt;h2&gt;Limits&lt;/h2&gt;
&lt;p&gt;A few boundaries are easy to miss:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Muse is not available in every location. Benefits may vary by region and by account.&lt;/li&gt;
&lt;li&gt;A weekly token allowance caps usage on every plan. These pages do not say what one Muse token maps to in a real task.&lt;/li&gt;
&lt;li&gt;These pages do not list taxes, an annual price, or a price outside the plans above.&lt;/li&gt;
&lt;li&gt;Shop Pay, 1Password, and AI glasses are not live. Meta describes them as coming soon. A Confidential VM that would cryptographically prevent Meta access is planned for later this year. It is not live.&lt;/li&gt;
&lt;li&gt;Meta says Muse is not immune to attack. Prompt injection is still an open problem. Muse can still make mistakes. Review the activity.&lt;/li&gt;
&lt;li&gt;These pages do not say that WhatsApp has the same features, or the same countries, as the Muse app and &lt;a href=&quot;http://muse.ai&quot;&gt;muse.ai&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;These pages do not describe a business plan or a team plan.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;{/* prettier-ignore */}
&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Muse takes action on Muse Secure VM. It can keep working after you close the app. You can talk to it in the Muse app, on &lt;a href=&quot;http://muse.ai&quot;&gt;muse.ai&lt;/a&gt;, or in WhatsApp.&lt;/li&gt;
&lt;li&gt;Sentinel sits outside the model. Only Sentinel can allow connector actions and traffic leaving the machine. Muse cannot override that. Sending an email or making a purchase is the kind of step Meta says it asks you to confirm.&lt;/li&gt;
&lt;li&gt;As of 28 October 2026, Muse is free with a usage limit. Power is $20 a month (500 million Muse tokens a week). Maximum is $100 a month (3 billion Muse tokens a week). Limited testing in the US, Canada, Japan, and Singapore. You need to be 18 or the age of majority.&lt;/li&gt;
&lt;li&gt;It can still make mistakes. These pages do not say what one Muse token maps to in a real task. Prices can change.
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Which action would you let Muse start on its own, and which one should wait until Sentinel brings it back to you?&lt;/p&gt;
&lt;h2&gt;Sources&lt;/h2&gt;
&lt;p&gt;Facts in this post come from these Meta pages, read on 28 October 2026. The launch post is dated 8 September 2026 and shows an update on 30 September 2026. The Japan post is dated 23 October 2026. The Singapore post is dated 27 October 2026.&lt;/p&gt;
&lt;p&gt;Two of those pages put &quot;world&apos;s first&quot; in the title. That is Meta&apos;s marketing line. This post does not use it as a fact.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&quot;https://about.fb.com/news/2026/09/introducing-muse-personal-ai-agent/&quot;&gt;Introducing Muse&lt;/a&gt;, 8 September 2026, page update 30 September 2026&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://research.meta.ai/blog/security-and-safety-for-ai-agents-our-approach-with-muse&quot;&gt;How We Built Safety Into Muse&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://www.meta.com/help/superintelligence/1047255454427887/&quot;&gt;How Muse handles your privacy, safety and security&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://www.meta.com/help/subscriptions/1021145227643680/&quot;&gt;About Muse subscriptions&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://about.fb.com/news/2026/10/muse-is-now-available-in-singapore-the-worlds-first-personal-ai-agent-built-for-everyone/&quot;&gt;Muse is now available in Singapore&lt;/a&gt;, 27 October 2026&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://about.fb.com/ja/news/2026/10/muse-personal-ai-agent-launches-in-japan/&quot;&gt;Muse launches in Japan&lt;/a&gt;, 23 October 2026&lt;/li&gt;
&lt;/ul&gt;
&lt;/figure&gt;&lt;/figure&gt;</content:encoded><category>ai</category><category>ai</category><category>agentic-ai</category><category>security</category></item><item><title>OpenAI Dots for Solo Founders: An Always-On Agent in Slack and Teams, on Your Rules</title><link>https://ansezz.com/blog/openai-dots-solo-founders/</link><guid isPermaLink="true">https://ansezz.com/blog/openai-dots-solo-founders/</guid><description>One always-on ChatGPT agent keeps working on its own cloud computer after you close the laptop. Custom Rules, Slack and Teams, and the Pro price as of 28 October 2026.</description><pubDate>Wed, 28 Oct 2026 00:00:00 GMT</pubDate><content:encoded>&lt;p&gt;Close your laptop. Your dot keeps working on its own cloud computer.&lt;/p&gt;
&lt;p&gt;OpenAI&apos;s dot is an always-on ChatGPT agent with its own cloud computer that you can message in ChatGPT, Slack, or Teams, and you decide with Custom Rules which actions it takes alone, which need your approval, and which it hands back to you.&lt;/p&gt;
&lt;p&gt;That is my claim. Everything after it comes from OpenAI and ChatGPT pages, read on 28 October 2026. Prices are subject to change.&lt;/p&gt;
&lt;p&gt;{/* prettier-ignore */}&lt;/p&gt;

- Dots are always-on ChatGPT agents, powered by GPT-6 Astra. Each dot has its own cloud computer and browser, and it can keep working when your computer is off.
- You message the same dot in ChatGPT, Slack, or Teams. Custom Rules choose when it acts alone, when it acts because you said so, when it asks first, and when it hands the step back to you.
- As of 28 October 2026, Pro at $100, $200, or $500 a month includes your first dot. Free, Go, and Plus do not. Business Premium includes the first dot at no extra cost. Pro is for people over 18, outside the EEA, the UK, and Switzerland.

&lt;h2&gt;What it is&lt;/h2&gt;
&lt;p&gt;On 29 September 2026, OpenAI announced Dots. The &lt;a href=&quot;https://openai.com/index/introducing-dots/&quot;&gt;launch post&lt;/a&gt; and the &lt;a href=&quot;https://chatgpt.com/features/dots/&quot;&gt;product page&lt;/a&gt; call them &quot;remarkably capable, always-on agents built to handle everything&quot;, powered by GPT-6 Astra.&lt;/p&gt;
&lt;p&gt;You start with one primary dot. You name it, and you make it your own. One dot per person today. OpenAI describes teams of dots as a later vision. Specialist dots, with their own identity, credentials, and organization responsibilities, are a preview in focused enterprise pilots. Microsoft Agent 365 integration is in progress.&lt;/p&gt;
&lt;p&gt;Each dot has its own cloud computer and browser. It can keep working when your computer is off. The &lt;a href=&quot;https://learn.chatgpt.com/docs/dots&quot;&gt;Dots docs&lt;/a&gt; split the products like this: Chat for answers, ChatGPT Work for tasks you delegate, Codex for software, and your dot for an ongoing responsibility that it follows up between conversations. Your dot can delegate work to Work or Codex.&lt;/p&gt;
&lt;p&gt;It starts with context from your ChatGPT memory. It also keeps its own notes about your preferences, decisions, and ongoing work. The &lt;a href=&quot;https://help.openai.com/en/articles/20001530-getting-started-with-your-dot&quot;&gt;getting started guide&lt;/a&gt; and the &lt;a href=&quot;https://learn.chatgpt.com/codex/dots/tasks-and-memory&quot;&gt;tasks and memory docs&lt;/a&gt; both describe those notes.&lt;/p&gt;
&lt;p&gt;The default handle is @yourname-dot. Naming the dot changes the handle. The docs&apos; example is @tibo-alfred. You can pick a character or a pet as the avatar.&lt;/p&gt;

  &lt;div&gt;You ask a question and get an answer.&lt;/div&gt;
  &lt;div&gt;
    The dot follows an ongoing job between conversations, and it can delegate
    work to Work or Codex.
  &lt;/div&gt;


  OpenAI&apos;s dot is an always-on ChatGPT agent with its own cloud computer that
  you can message in ChatGPT, Slack, or Teams, and you decide with Custom Rules
  which actions it takes alone, which need your approval, and which it hands
  back to you.


  Name the dot, then write the one ongoing job it should follow between chats.

&lt;h2&gt;How work runs&lt;/h2&gt;
&lt;p&gt;Your dot keeps working between conversations. It can decide when to pause and when to wake up. It can run background agents in parallel while you keep talking. That is in the &lt;a href=&quot;https://learn.chatgpt.com/codex/dots/tasks-and-memory&quot;&gt;tasks and memory docs&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;A repeating job needs a saved schedule. The schedule records what to do, when it runs (the time zone and an end date), what to notify you about, and where to deliver the result. Ask the dot to confirm the schedule.&lt;/p&gt;
&lt;p&gt;Event monitoring works only where a connected service supports it. The docs&apos; example is a new bug report in a Slack channel. Connecting Slack on its own does not create monitoring.&lt;/p&gt;
&lt;p&gt;For proactive research, the dot reads connected apps in the background with read-only tools. Those tools cannot send messages, change app content, or control your browser or computer. The &lt;a href=&quot;https://openai.com/index/introducing-dots/&quot;&gt;launch post&lt;/a&gt; and the &lt;a href=&quot;https://learn.chatgpt.com/codex/dots/controls&quot;&gt;controls docs&lt;/a&gt; both say so.&lt;/p&gt;
&lt;p&gt;You can message your dot in ChatGPT, and you can place a call to it, on the web, in the desktop app, and in the mobile app. Mobile web is not supported. At launch, your dot cannot call you. The &lt;a href=&quot;https://learn.chatgpt.com/codex/dots/channels&quot;&gt;channels docs&lt;/a&gt; and the &lt;a href=&quot;https://help.openai.com/en/articles/20001530-getting-started-with-your-dot&quot;&gt;getting started guide&lt;/a&gt; cover that.&lt;/p&gt;
&lt;p&gt;You can message the same dot in Slack and in Microsoft Teams. In Slack, you DM it, or you mention it in a channel thread. By default it responds only to you. You can tell it to engage with other people. On an Enterprise workspace, Slack and Teams need a separate admin permission, where that access is available.&lt;/p&gt;
&lt;p&gt;It is the same dot in ChatGPT, Slack, and Teams. Switching channels does not reset memory. Messages are not mirrored between channels. Before it shares private information with other people, it checks permission. In a workspace, only the dot&apos;s owner can direct it. Another person&apos;s DM or mention does not start work. That rule is in &lt;a href=&quot;https://help.openai.com/en/articles/20001554-manage-dots-in-chatgpt-workspaces&quot;&gt;Manage dots in ChatGPT workspaces&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;You set up messaging channels from the desktop app. Texting is listed as coming soon. Help describes a limited US-only Pro beta through a third-party provider.&lt;/p&gt;
&lt;figure&gt;
&lt;p&gt;The cloud computer keeps its state and its own browser sessions. You can inspect it, choose Take over, and later choose Return control. The &lt;a href=&quot;https://learn.chatgpt.com/codex/dots/computers-and-apps&quot;&gt;computers and apps docs&lt;/a&gt; describe that.&lt;/p&gt;
&lt;p&gt;A local computer is optional, and it is off by default. You connect one personal computer at a time, through the desktop app. That computer has to stay online, with ChatGPT open.&lt;/p&gt;
&lt;p&gt;Plugins cover &quot;over 4,000 apps&quot;, including Gmail, Google Drive, and GitHub. The app permissions you already set in ChatGPT still apply. Read access to email, for example, does not include send.&lt;/p&gt;
&lt;p&gt;For code, the dot can create Codex cloud tasks in an environment you set up first. On a computer you have connected, it can start local Work or Codex tasks.&lt;/p&gt;
&lt;p&gt;When a website asks you to sign in, the form is private and sits outside the conversation. You can choose Save to Passwords. Using a saved login again needs your confirmation.&lt;/p&gt;

  For a repeating job, write what it does, when it runs, with the time zone and
  an end date, what it should tell you, and where the result should land. Then
  ask the dot to confirm.

&lt;h2&gt;Approvals and safety&lt;/h2&gt;
&lt;p&gt;Custom Rules are optional. A new dot starts with built-in rules. The rules control when it acts. Put style and preferences in the conversation.&lt;/p&gt;
&lt;p&gt;The &lt;a href=&quot;https://learn.chatgpt.com/codex/dots/controls&quot;&gt;controls docs&lt;/a&gt; list four choices. The &lt;a href=&quot;https://help.openai.com/en/articles/20001530-getting-started-with-your-dot&quot;&gt;getting started guide&lt;/a&gt; uses a second name for one of them:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Take action without asking.&lt;/li&gt;
&lt;li&gt;Take action when you say so. Help calls this &quot;Take action if pre-approved&quot;.&lt;/li&gt;
&lt;li&gt;Ask before taking action.&lt;/li&gt;
&lt;li&gt;Hand off to you.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;A rule does not grant access to an app or a computer. It does not override a built-in safety requirement, and it does not remove a confirmation the product still requires. Custom Rules are your action rules for that dot. They are not a workspace policy. On Enterprise, custom rules stay off until an admin enables them.&lt;/p&gt;
&lt;p&gt;Auto-review checks an action that could affect your accounts, or that could share information. It checks the action against your instructions, your Custom Rules, and the safety requirements. It can proceed, ask for approval, or hand the step to you. Auto-review is a check. OpenAI says a dot can still make mistakes, including when it follows your rules. Review work that has consequences.&lt;/p&gt;
&lt;p&gt;Asking your dot to draft replies does not give it permission to send them.&lt;/p&gt;
&lt;p&gt;Some steps always stay with you. Changing a password is the example in the &lt;a href=&quot;https://openai.com/index/introducing-dots/&quot;&gt;launch post&lt;/a&gt;. Monitoring can pause or stop a dot&apos;s work if a safety concern is detected.&lt;/p&gt;
&lt;p&gt;Pause stops the main task only. Delegated tasks stop separately. Schedules stop separately. Stopping a dot, or deleting it, does not undo a finished action, and it does not recall a message that was already sent.&lt;/p&gt;
&lt;p&gt;On Business, Enterprise, and Edu plans, content is not used for training by default. On a personal plan, you can control that. OpenAI does not train directly on proactive research, or on the dot&apos;s notes.&lt;/p&gt;
&lt;p&gt;On Enterprise, three controls are off by default: Use dots (Beta), local computer access, and custom rules. Slack and Teams are a separate permission. The &lt;a href=&quot;https://help.openai.com/en/articles/20001554-manage-dots-in-chatgpt-workspaces&quot;&gt;workspace article&lt;/a&gt; lists those admin switches. Enterprise model controls do not apply to dots.&lt;/p&gt;
&lt;figure&gt;

  Write the four rules in your own words. Give send its own line. Asking for a
  draft does not allow the send.

&lt;h2&gt;Access and price&lt;/h2&gt;
&lt;p&gt;As of 28 October 2026, from the &lt;a href=&quot;https://learn.chatgpt.com/docs/dots&quot;&gt;Dots docs&lt;/a&gt; and the &lt;a href=&quot;https://help.openai.com/en/articles/20001530-getting-started-with-your-dot&quot;&gt;getting started guide&lt;/a&gt;:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Pro 100, Pro 200, and Pro 500 include a dot. These plans are for people over 18, outside the EEA, the UK, and Switzerland.&lt;/li&gt;
&lt;li&gt;Business Premium is listed for supported regions, subject to workspace eligibility. Your first dot is included on that plan at no extra cost. These pages do not list a Business Premium seat price.&lt;/li&gt;
&lt;li&gt;Enterprise, including Edu and Healthcare, is a beta. It is off by default until an admin turns it on.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;The &lt;a href=&quot;https://chatgpt.com/pricing&quot;&gt;ChatGPT pricing page&lt;/a&gt; marks Dots as No on Free, Go, and Plus, and Yes on Pro. The Pro row calls it &quot;Dot, your always-on agent&quot;.&lt;/p&gt;
&lt;p&gt;The &lt;a href=&quot;https://learn.chatgpt.com/codex/pricing&quot;&gt;Codex pricing page&lt;/a&gt; lists Pro at $100, $200, or $500 USD a month. The &lt;a href=&quot;https://help.openai.com/en/articles/20001530-getting-started-with-your-dot&quot;&gt;getting started guide&lt;/a&gt; says your first dot is included in your Pro or Business Premium plan at no extra cost, plus an allowance for deeper work with extended limits for the first month after launch. It does not say how large that allowance is. The &lt;a href=&quot;https://openai.com/index/introducing-dots/&quot;&gt;launch post&lt;/a&gt; says you will be able to add more dots and scale speed or monthly work. It does not give a price for that.&lt;/p&gt;
&lt;p&gt;Conversations with your dot do not count toward ChatGPT usage limits. A task the dot starts in Work or Codex counts in the usual way for that product.&lt;/p&gt;
&lt;p&gt;Access rolls out gradually. Help says it may take several days.&lt;/p&gt;

  On Pro, confirm that you are over 18 and outside the EEA, the UK, and
  Switzerland. Free, Go, and Plus do not include a dot. On Enterprise, an admin
  has to turn the beta on.

&lt;h2&gt;Limits&lt;/h2&gt;
&lt;p&gt;A few boundaries are easy to miss:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;A dot can still make mistakes, including when it follows your rules. Review work that has consequences.&lt;/li&gt;
&lt;li&gt;At launch, the dot has no email address of its own. You can connect your personal email.&lt;/li&gt;
&lt;li&gt;Some websites block the cloud browser. That browser does not inherit your logins.&lt;/li&gt;
&lt;li&gt;Disconnecting an app does not delete information the dot already obtained. To remove the dot&apos;s own memories, Reset or Delete the dot.&lt;/li&gt;
&lt;li&gt;Each task has its own conversation. That conversation does not get every conversation you have had.&lt;/li&gt;
&lt;li&gt;Enterprise model controls do not apply to dots. Phone messaging (iMessage, RCS, and WhatsApp) is not available for Enterprise at launch.&lt;/li&gt;
&lt;li&gt;You get one dot today. More dots, and more speed or monthly work, are described as later, with no price on these pages.&lt;/li&gt;
&lt;li&gt;Mobile web is not supported. At launch, the dot cannot call you. Texting is coming soon, and Help describes a limited US-only Pro beta through a third-party provider.&lt;/li&gt;
&lt;li&gt;Connecting Slack does not, by itself, create event monitoring.&lt;/li&gt;
&lt;li&gt;Pause stops the main task only. A stop or a delete does not undo a finished action, and it does not recall a sent message.&lt;/li&gt;
&lt;li&gt;A local computer has to stay online, with ChatGPT open. It stays off until you connect it.&lt;/li&gt;
&lt;li&gt;A rule does not grant app access. A draft reply is not permission to send.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;{/* prettier-ignore */}
&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;A dot is one always-on ChatGPT agent with its own cloud computer. It keeps working after you close the laptop. The same dot is in ChatGPT, Slack, and Teams.&lt;/li&gt;
&lt;li&gt;Custom Rules are the control: act, act when you say so, ask first, or hand the step back. A draft is not a send. Auto-review does not make the dot safe. It can still make mistakes, including when it follows your rules.&lt;/li&gt;
&lt;li&gt;As of 28 October 2026, Pro at $100, $200, or $500 a month includes the first dot. Free, Go, and Plus do not. Business Premium includes the first dot at no extra cost. Pro is for people over 18, outside the EEA, the UK, and Switzerland.&lt;/li&gt;
&lt;li&gt;Chats with your dot do not count toward ChatGPT limits. Work and Codex tasks do. One dot per person today. Prices can change.
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Which weekly job would you hand to one dot that keeps working after you close the laptop, and still stops when your rule says to ask first?&lt;/p&gt;
&lt;h2&gt;Sources&lt;/h2&gt;
&lt;p&gt;Facts in this post come from these OpenAI and ChatGPT pages, read on 28 October 2026. The launch post is dated 29 September 2026. When these pages were read, Getting started showed an update from 1 hour earlier, and Manage dots in ChatGPT workspaces showed an update from 7 days earlier.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&quot;https://openai.com/index/introducing-dots/&quot;&gt;Introducing Dots&lt;/a&gt;, 29 September 2026&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://chatgpt.com/features/dots/&quot;&gt;ChatGPT Dots&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://help.openai.com/en/articles/20001530-getting-started-with-your-dot&quot;&gt;Getting started with your dot&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://help.openai.com/en/articles/20001554-manage-dots-in-chatgpt-workspaces&quot;&gt;Manage dots in ChatGPT workspaces&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://learn.chatgpt.com/docs/dots&quot;&gt;Dots docs&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://learn.chatgpt.com/codex/dots/channels&quot;&gt;Channels&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://learn.chatgpt.com/codex/dots/tasks-and-memory&quot;&gt;Tasks and memory&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://learn.chatgpt.com/codex/dots/computers-and-apps&quot;&gt;Computers and apps&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://learn.chatgpt.com/codex/dots/controls&quot;&gt;Controls&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://learn.chatgpt.com/codex/pricing&quot;&gt;Codex pricing&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://chatgpt.com/pricing&quot;&gt;ChatGPT pricing&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/figure&gt;&lt;/figure&gt;</content:encoded><category>ai</category><category>ai</category><category>agentic-ai</category><category>ai-engineering</category><category>security</category></item><item><title>Grok Bot for Solo Founders: Named AI Teammates on One Shared Computer</title><link>https://ansezz.com/blog/grok-bot-solo-founders/</link><guid isPermaLink="true">https://ansezz.com/blog/grok-bot-solo-founders/</guid><description>Named AI teammates share one cloud computer and keep working after you close the laptop. Parallel work, approvals, and The X Subscription price as of 27 October 2026.</description><pubDate>Tue, 27 Oct 2026 00:00:00 GMT</pubDate><content:encoded>&lt;p&gt;Close your laptop. Your Bots keep working.&lt;/p&gt;
&lt;p&gt;Grok Bot gives a solo founder a small team of named AI teammates that share one cloud computer and work in parallel, while you keep the final say on anything that matters.&lt;/p&gt;
&lt;p&gt;That is my claim. Everything after it comes from Cursor and xAI pages, read on 27 October 2026. Prices are subject to change.&lt;/p&gt;

- Grok Bot gives you persistent Bots: AI teammates with names, jobs, and context that compounds over time. The work runs on a cloud computer with a browser, a filesystem, and a terminal.
- All of your Bots use that same computer. They share files, browser sessions, and app logins. They can run in parallel and pass ownership of a task. Work keeps going when your laptop is closed.
- As of 27 October 2026, Premium ($30), Super ($100), and Ultra ($200) on The X Subscription include Grok Bot. Plus ($8) and Free do not. Taxes are extra.

&lt;h2&gt;What it is&lt;/h2&gt;
&lt;p&gt;Grok Bot gives you persistent Bots. The &lt;a href=&quot;https://docs.x.ai/grok-bot/overview&quot;&gt;overview&lt;/a&gt; and the &lt;a href=&quot;https://cursor.com/docs/grok-bot&quot;&gt;Cursor docs&lt;/a&gt; call them AI teammates with names, jobs, and context that compounds over time.&lt;/p&gt;
&lt;p&gt;Each Bot works on a persistent cloud computer with a browser, a filesystem, and a terminal, so tasks finish in your real tools instead of as chat drafts.&lt;/p&gt;
&lt;p&gt;You work with a Bot by messaging it. You can type, dictate, or use voice chat (&lt;a href=&quot;https://docs.x.ai/grok-bot/overview&quot;&gt;overview&lt;/a&gt;).&lt;/p&gt;
&lt;p&gt;Setup is a message, not a workflow builder. A Bot can learn a workflow from one demonstration, save it as a skill, and run that skill again on a schedule. A named Bot keeps memory, files, browser sessions, and preferences across sessions (&lt;a href=&quot;https://cursor.com/docs/grok-bot&quot;&gt;Cursor docs&lt;/a&gt;).&lt;/p&gt;
&lt;p&gt;Grok Bot gives a solo founder a small team of named AI teammates that share one cloud computer and work in parallel, while you keep the final say on anything that matters.&lt;/p&gt;

Write one sentence per Bot: its name, its job, and the step it must bring back to you.

&lt;h2&gt;How work runs&lt;/h2&gt;
&lt;p&gt;All of your Bots use the same cloud computer, sharing its files, browser sessions, and app logins.&lt;/p&gt;
&lt;p&gt;The computer belongs to your account, not to one Bot. Treat anything on it as available to every Bot. Isolation between users is strict.&lt;/p&gt;
&lt;p&gt;Bots can run in parallel, message each other, share context in group chats, and pass ownership of a task, so you are not the router between tools.&lt;/p&gt;
&lt;p&gt;Each Bot gets its own screen on that shared computer. One Bot runs one computer-use task at a time.&lt;/p&gt;
&lt;p&gt;Conversations and learned context stay separate per Bot. Shared files, browser sessions, and handoffs move context between them.&lt;/p&gt;
&lt;p&gt;Work keeps running when your laptop or phone is closed.&lt;/p&gt;

  &lt;div&gt;You pass work between tools yourself.&lt;/div&gt;
  &lt;div&gt;Bots message each other, share context, and pass ownership of a task.&lt;/div&gt;

&lt;figure&gt;

Pick one weekly handoff you still do yourself. Name the Bot that owns it, and the Bot that should receive the result.

&lt;h2&gt;Approvals and safety&lt;/h2&gt;
&lt;p&gt;When an action needs approval, you see the proposed operation and its inputs. The &lt;a href=&quot;https://cursor.com/docs/grok-bot/security&quot;&gt;security docs&lt;/a&gt; give you three choices: Allow once, Always allow (that saves a rule), or Deny. After you deny, the Bot does not retry until you send another message.&lt;/p&gt;
&lt;p&gt;Auto Review is an independent review model. It checks risky actions: shell, app calls, computer use, automation writes, and delegation. It can allow the action, require your approval, or deny it.&lt;/p&gt;
&lt;p&gt;Personal rules only make behavior stricter. A rule is Ask first or Allow automatically, and Ask first wins. The docs give this example: ask first before sending any external email.&lt;/p&gt;
&lt;p&gt;Auto Review does not review every side effect. Memory writes and most settings changes sit outside that review.&lt;/p&gt;
&lt;p&gt;Bots act as you. They have no separate identity. Connector tokens stay on Cursor&apos;s backend. Saved passwords and card numbers fill by reference, and the model never receives them.&lt;/p&gt;
&lt;p&gt;A card saved in Vault fills at checkout without a separate approval each time. If you want to approve each payment, do not save the card.&lt;/p&gt;
&lt;p&gt;Local execution on your own machine is per-command approval by default. The choices are Ask every time, Always allow, or Never allow.&lt;/p&gt;
&lt;p&gt;These defenses reduce prompt injection risk. They do not eliminate it.&lt;/p&gt;
&lt;p&gt;The overview says drafts can be approved before they are sent.&lt;/p&gt;
&lt;figure&gt;

If each payment should wait for you, do not save the card in Vault. A saved card can fill at checkout without a new approval.

&lt;h2&gt;Access and price&lt;/h2&gt;
&lt;p&gt;As of 27 October 2026, on &lt;a href=&quot;https://docs.x.ai/x-subscription/pricing&quot;&gt;The X Subscription&lt;/a&gt;:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Premium is $30 a month, or $300 a year. It includes Grok Bot.&lt;/li&gt;
&lt;li&gt;Super is $100 a month, or $1000 a year. It includes Grok Bot.&lt;/li&gt;
&lt;li&gt;Ultra is $200 a month, or $2000 a year. It includes Grok Bot.&lt;/li&gt;
&lt;li&gt;Plus is $8 a month. It does not include Grok Bot. Free does not include it either.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;The same list prices are on &lt;a href=&quot;https://x.ai/pricing&quot;&gt;x.ai/pricing&lt;/a&gt;. Taxes are extra. Prices are subject to change.&lt;/p&gt;
&lt;p&gt;Included usage compared with Plus is 4x on Premium, 15x on Super, and 50x on Ultra. Usage is one shared weekly pool across Grok Bot, Grok apps, and Cursor. Top-ups buy Additional Usage credits. The &lt;a href=&quot;https://cursor.com/help/grok-bot/plans&quot;&gt;plans page&lt;/a&gt; describes that same shared pool.&lt;/p&gt;
&lt;p&gt;Every paid individual Cursor plan and Cursor Teams include Grok Bot. Linking SuperGrok, SuperGrok Plus, SuperGrok Heavy, or X Premium+ grants usage. SuperGrok Lite does not. Plans do not stack. The larger grant wins.&lt;/p&gt;
&lt;p&gt;Existing Cursor, SuperGrok, and X Premium plans continue. Switching is optional.&lt;/p&gt;
&lt;p&gt;The free trial is a usage credit with a 7-day window. It is not a fixed number of days on its own. You can cancel it with no charge to a paid plan.&lt;/p&gt;
&lt;p&gt;The apps run on macOS (Apple silicon and Intel), Windows (x64 and Arm64), Linux (x64 and Arm64), iPhone, and Android. The computers run in Cursor&apos;s cloud.&lt;/p&gt;

Before you start a trial, check the plan you already pay for. Paid Cursor plans include Grok Bot. SuperGrok Lite does not. Plans do not stack.

&lt;h2&gt;Limits&lt;/h2&gt;
&lt;p&gt;A few boundaries are easy to miss:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;A site can block automation, expire a session, or need a human step. The Bot hands that step to you.&lt;/li&gt;
&lt;li&gt;For an important decision, ask the Bot to check the current source instead of memory.&lt;/li&gt;
&lt;li&gt;Computers run in the United States today.&lt;/li&gt;
&lt;li&gt;There is no model picker. The model mix can change.&lt;/li&gt;
&lt;li&gt;Grok Bot is Cursor-hosted only. There is no on-prem option, and you cannot bring your own image.&lt;/li&gt;
&lt;li&gt;Deleting a Bot does not remove computer files or browser sessions.&lt;/li&gt;
&lt;li&gt;Many admin controls are Enterprise only: a network allowlist, enforced Auto Review, and audit logs.&lt;/li&gt;
&lt;li&gt;One Bot runs one computer-use task at a time, even while your Bots run in parallel.&lt;/li&gt;
&lt;li&gt;Auto Review can allow an action without you, and it does not review every side effect. A card in Vault can pay without a fresh approval. Defenses reduce prompt injection risk and do not remove it.&lt;/li&gt;
&lt;/ul&gt;

- Named Bots share one cloud computer, can run in parallel, and keep working after you close the laptop.
- When an action needs approval, you see the operation and the inputs, then Allow once, Always allow, or Deny. Auto Review can still allow, ask, or deny.
- As of 27 October 2026, Premium ($30), Super ($100), and Ultra ($200) include Grok Bot. Plus ($8) and Free do not. Taxes are extra, and prices can change.
- A saved card, an Always allow rule, and a side effect Auto Review skips are where a check drops out. Read those before you let a Bot run.

&lt;p&gt;Which weekly job would you hand to a named Bot that shares the computer and still comes back for a yes?&lt;/p&gt;
&lt;h2&gt;Sources&lt;/h2&gt;
&lt;p&gt;Facts in this post come from these pages, read on 27 October 2026. The Grok Bot overview lists a last update of 22 October 2026.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&quot;https://cursor.com/docs/grok-bot&quot;&gt;Grok Bot on Cursor&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://cursor.com/docs/grok-bot/security&quot;&gt;Grok Bot security&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://cursor.com/help/grok-bot/plans&quot;&gt;Grok Bot plans&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://docs.x.ai/grok-bot/overview&quot;&gt;Grok Bot overview&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://docs.x.ai/x-subscription/pricing&quot;&gt;The X Subscription pricing&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://x.ai/pricing&quot;&gt;xAI pricing&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/figure&gt;&lt;/figure&gt;</content:encoded><category>ai</category><category>ai</category><category>agentic-ai</category><category>ai-engineering</category><category>security</category></item><item><title>Claude Duet: a proactive agent that waits for your ok</title><link>https://ansezz.com/blog/claude-duet-personal-ai-agent/</link><guid isPermaLink="true">https://ansezz.com/blog/claude-duet-personal-ai-agent/</guid><description>Claude Duet briefs you in the morning and waits before send, pay, or delete. What Anthropic has published, and why a solo founder might join the US Pro and Max waitlist.</description><pubDate>Mon, 26 Oct 2026 00:00:00 GMT</pubDate><content:encoded>&lt;p&gt;For a solo founder, Duet is worth the waitlist if you want one proactive agent that briefs you and waits before send, pay, or delete.&lt;/p&gt;
&lt;p&gt;That is my claim. Everything after it comes from Anthropic&apos;s pages, read on 26 October 2026. Features can change during the research preview.&lt;/p&gt;

- Anthropic opened Claude Duet on 21 October 2026. It runs on Claude Opus 5.5, on its own computer in the cloud, and it comes to you with a morning brief.
- It can read, draft, and prepare work on its own. It waits for your ok before it sends a message, makes a payment, signs a document, or deletes anything.
- My claim: worth the waitlist for a solo founder who wants that one agent. As of 26 October 2026, access is US Pro or Max, by invitation, included in the plan.

&lt;h2&gt;What it is&lt;/h2&gt;
&lt;p&gt;On 21 October 2026, Anthropic opened a &lt;a href=&quot;https://claude.com/resources/articles/claude-duet&quot;&gt;research preview of Claude Duet&lt;/a&gt;. It is a standalone app for iOS and Android, and you can open it on the web at &lt;a href=&quot;http://claude.ai&quot;&gt;claude.ai&lt;/a&gt;. For now it lives in its own app, separate from the main Claude app.&lt;/p&gt;
&lt;p&gt;It uses your Claude account. Memory, skills, and connected apps come with you from the first message. You cannot pick a model. Duet runs on Claude Opus 5.5 and decides how much effort a job needs.&lt;/p&gt;
&lt;p&gt;The &lt;a href=&quot;https://claude.com/product/claude-duet&quot;&gt;product page&lt;/a&gt; describes the working relationship in plain terms. In the Claude app, you open a chat and work alongside Claude. Duet comes to you. It tells you what needs your attention, takes tasks you hand it by message, and reaches out when a task is done or needs your approval.&lt;/p&gt;

  &lt;div&gt;You open a chat and work alongside Claude.&lt;/div&gt;
  &lt;div&gt;Duet comes to you with what needs attention, then waits for your ok.&lt;/div&gt;

&lt;p&gt;Anthropic says it built Duet for professionals and small business owners who are tracking more than they can hold at once. The launch article says Duet is built to decide what needs you, what can wait, and when to check with you first. The core is work. Personal errands, such as booking tickets, are weaker.&lt;/p&gt;
&lt;p&gt;It is an early version. Anthropic says it can still misread a thread or misjudge what is urgent.&lt;/p&gt;
&lt;p&gt;For a solo founder, Duet is worth the waitlist if you want one proactive agent that briefs you and waits before send, pay, or delete.&lt;/p&gt;

Join the waitlist from the Claude Duet product page, and use the same email as your Claude account. Access is tied to that address.

&lt;h2&gt;How work runs&lt;/h2&gt;
&lt;p&gt;Duet works on a virtual machine in the cloud, with its own browser, so it keeps working when your laptop or phone is off. You message it by typing or by voice. The main thread stays in one place, so a quick reply and a weeklong project both start in the same place. You can also open separate channels for different topics, and those channels share the same memory.&lt;/p&gt;
&lt;p&gt;A short message is enough. Duet works out which apps to use and which steps to take. You get a notification when the task is done or needs your review. Bigger results come back as files you can review and edit, such as a research brief, a financial model, a slide deck, or a dashboard. Finished work shows up in the Make tab.&lt;/p&gt;
&lt;p&gt;The Tasks tab shows what Duet is working on and highlights tasks that need your input. The main thread stays quieter: Duet posts there when a task is done or needs a decision. It may suggest that a task looks finished. Only you can mark a task complete. Each task has its own page, and you can steer it while it is running.&lt;/p&gt;
&lt;p&gt;Each morning, Duet sends a short brief on the important items across your connected apps. The &lt;a href=&quot;https://support.claude.com/en/articles/17631495-get-started-with-claude-duet&quot;&gt;help center&lt;/a&gt; says that brief looks across email and calendar, and that Duet can start first steps, such as drafting replies for you to review. Through the day it checks connected accounts every few hours. Anthropic says checking nonstop would use up the plan limits much faster. It messages you when something needs you. You can tell it what you want to hear about, and how often.&lt;/p&gt;
&lt;figure&gt;
&lt;p&gt;Your Claude connectors carry over. You start every new connection yourself, and you can disconnect any app. Turning an app off in Claude or in Duet turns it off in both. The help center names connectors such as Gmail, Google Calendar, Google Drive, Slack, QuickBooks, HubSpot, Docusign, and Calendly. Duet can also use more than 6,000 connectors and plugins in the Claude Marketplace. It supports plugins, including a small business plugin, and it can suggest plugins that fit your work.&lt;/p&gt;
&lt;p&gt;The launch article gives these examples of work:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Find Gmail and Slack messages you missed, and help you reply.&lt;/li&gt;
&lt;li&gt;Check QuickBooks or Stripe for unpaid invoices, and draft reminders.&lt;/li&gt;
&lt;li&gt;Prepare and run payroll in Gusto, with hours, bonuses, and reimbursements filled in.&lt;/li&gt;
&lt;li&gt;Draft a job post and, after you edit and approve it, post it to LinkedIn.&lt;/li&gt;
&lt;li&gt;Help prepare agreements and send them for review and signature through Docusign.&lt;/li&gt;
&lt;li&gt;Draft follow-up emails from the contact and deal history in HubSpot.&lt;/li&gt;
&lt;li&gt;Turn a product launch into a social campaign in Canva.&lt;/li&gt;
&lt;li&gt;Set up, design, and manage a Shopify store. A richer visual editor, so you can design the storefront and preview it before anything goes live, is listed as coming soon.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;For a site with no connector, Duet uses its own browser in the cloud. You cannot watch that browser or take it over, and the launch article says Duet cannot show you the browser yet.&lt;/p&gt;
&lt;p&gt;For purchases, Duet can use Link, Stripe&apos;s digital wallet, and Shop Pay from Shopify. You connect Link and Shop Pay inside Duet, not in the connectors directory. The Stripe connector, used for invoices, is separate from Link. Duet is designed to ask before each purchase, and each purchase uses a one-time card that only works for that purchase. With Link, Duet confirms the item with you, you approve the spend in the Link app, and the payment goes out on a one-time virtual card limited to that merchant and amount. Your real card number is not shared with Duet or the merchant. Link and Shop Pay are available only in Duet for now.&lt;/p&gt;
&lt;p&gt;Sign-in with logins you saved in 1Password is coming soon. Anthropic says Duet will ask for a credential, you will approve that request in 1Password, and the credential will go to the browser without passing through the model.&lt;/p&gt;

Write the Monday message you would send: which apps to check, which file you want back, and which decisions must wait for you.

&lt;h2&gt;Approvals and safety&lt;/h2&gt;
&lt;p&gt;Duet reads, drafts, and prepares work on its own. Before it sends a message, makes a payment, signs a document, or deletes anything, it shows you what it is about to do and waits. The &lt;a href=&quot;https://claude.com/resources/articles/claude-duet-safety-privacy-and-security&quot;&gt;safety article&lt;/a&gt; is specific: it shows the action, the destination, and the content, including every recipient.&lt;/p&gt;
&lt;p&gt;If you cannot approve right away, Duet finishes the rest of the task and brings that approval back to you later. When it gives you a number or a summary, it tells you which email, file, or spreadsheet it came from. Routines that run while you are away use the same safeguards.&lt;/p&gt;
&lt;figure&gt;
&lt;p&gt;A separate checker runs beside each action. Anthropic calls it the auto mode classifier, the same safeguard used in Claude Code, extended for Duet. It tests whether the action matches what you asked for. The check runs outside the model doing the work, so a hidden instruction in a page cannot affect the outcome.&lt;/p&gt;
&lt;p&gt;Some actions stay off limits even if you approve them: trading securities, moving money between accounts, and accessing someone else&apos;s account. A few other steps never fall under a &quot;don&apos;t ask me again&quot; rule, however often you have approved them: paying or sending money, deleting an order, or creating an account.&lt;/p&gt;
&lt;p&gt;A second checker reads each message Duet is about to send. Anthropic sorts sensitive information into two tiers:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Never share, even if you ask: sign-in credentials, full card and bank account numbers, and government ID numbers. The launch article names credit card numbers and government identification in this strictest tier.&lt;/li&gt;
&lt;li&gt;Share only when you have explicitly said so: other private information, such as health or personal finances. A request you wrote yourself counts as that consent. Anthropic&apos;s example is a note to your dentist about tooth pain, which generally needs no extra approval beyond your request.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;If a message is blocked, Duet can rewrite it without the sensitive part and show you the rewrite for approval. Anthropic says these checks will sometimes miss, or flag a harmless message. That is one reason the approval step stays in place. Anthropic also says it will keep adjusting how often Duet asks, because too many approval requests teach people to tap through them.&lt;/p&gt;
&lt;p&gt;Duet never sees your passwords, browser cookies, sign-in tokens, or other credentials, and it cannot save them to its memory. They pass only through separate machines the model cannot access. Sign-in tokens for connected apps stay out of the machine where the agent works. A placeholder sits there, and a proxy outside that machine inserts the real value as a request goes out. Approvals and safety checks run on those separate machines too. The product page sums this up as: approvals, logins, and safety checks run in your own cloud computer, so sensitive details stay private.&lt;/p&gt;
&lt;p&gt;When a site asks for a password, you type it into a form inside the app, on your device. The form encrypts it with a single-use key that exists only on the cloud browser machine, for that one use, and sends it unopened to the browser. The browser types it into the site. The model does not see the password. The sign-in form appears inside the app, during a sign-in you asked for. Anthropic says it does not arrive as a link, a text message, an email, or on a website other than &lt;a href=&quot;http://claude.ai&quot;&gt;claude.ai&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;The browser runs in its own virtual machine, separate from the model and from the cloud computers the agent works on. Duet drives it with a fixed set of commands: open this page, click here, type this. What comes back is the page text and downloads, because the agent has to read them to do the job. The site&apos;s code and cookies stay on the browser machine. None of the agent&apos;s commands can read cookies out of the browser. Files Duet uploads through the browser get the same sensitive-information check as its messages.&lt;/p&gt;
&lt;p&gt;The browser identifies itself as an agent. Requests include a distinct User-Agent header, and Anthropic publishes the public IP addresses it browses from, so a site can recognize it. Before launch, Anthropic contacted several large websites and gave them the option to prevent Duet from visiting. Some chose to.&lt;/p&gt;
&lt;p&gt;Email and web pages can contain instructions meant to mislead the agent. Anthropic calls this prompt injection. Duet is built to treat what it reads as information and to act on what you ask. Anthropic says no defense is perfect, which is why send, pay, sign, and delete still wait for you. Defenses draw on Anthropic&apos;s browser-use research, and on the same framework for trustworthy agents that also guides Claude Code and Claude in Chrome.&lt;/p&gt;
&lt;p&gt;Red teams tested whether Duet would leak information, act without approval, or follow malicious prompts. An external firm tested it with access to the source code. On 23 October 2026, Anthropic said a follow-on test of the cloud browser and the sign-in form was still running. Duet is in Anthropic&apos;s public bug bounty.&lt;/p&gt;

Before you connect a money app, write down the four actions you will approve yourself: send, pay, sign, delete.

&lt;h2&gt;Access and price&lt;/h2&gt;
&lt;p&gt;As of 26 October 2026:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Duet is a research preview on a waitlist. You need a Claude Pro or Max plan, a Claude account in the US, and an invitation.&lt;/li&gt;
&lt;li&gt;Invitations go out in waves. Joining the list does not set a date. During this preview, Duet is available in the US only.&lt;/li&gt;
&lt;li&gt;Team and Enterprise plans are not included yet. Anthropic says it plans to bring Duet to those plans later.&lt;/li&gt;
&lt;li&gt;During the preview, Duet is included with Pro and Max at no extra cost. These pages do not list a separate Duet price.&lt;/li&gt;
&lt;li&gt;It shares your plan&apos;s usage limits with the rest of Claude, including the five-hour session and the weekly limit. The help center says Duet uses those limits at the same rate as chats in Claude. Background work also counts, including the morning brief and check-ins, so you can reach the limits sooner than with chat alone. The launch article says Duet uses the shared limits differently from a typical conversation, because background checks count and larger tasks, such as a financial model or a deck, need more model turns and background work.&lt;/li&gt;
&lt;li&gt;When you are admitted, you get one full limit reset, covering both the five-hour session and the weekly limit. That reset is available until 30 November 2026.&lt;/li&gt;
&lt;li&gt;The email on the waitlist has to match your Claude account, and the Apple or Google account on your phone. After you accept the invitation, the app can take a few minutes to become available.&lt;/li&gt;
&lt;li&gt;Features can change during the preview.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;On a phone, Duet is an iOS or Android app. On a computer, you open it at &lt;a href=&quot;http://claude.ai&quot;&gt;claude.ai&lt;/a&gt;.&lt;/p&gt;

Check three things before you join: Pro or Max, a US Claude account, and the same email on the waitlist, on Claude, and on the phone.

&lt;h2&gt;Limits&lt;/h2&gt;
&lt;p&gt;Anthropic lists these limits for the research preview:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;It can misread a thread or misjudge what is urgent, and it can miss something that arrives between checks.&lt;/li&gt;
&lt;li&gt;It checks on a schedule, every few hours, so an urgent message can land in the gap.&lt;/li&gt;
&lt;li&gt;You cannot watch Duet work in its browser or take the browser over. The launch article says Duet cannot show you its browser yet.&lt;/li&gt;
&lt;li&gt;It cannot see all of your projects, or the files on your computer. It can read your work in Claude. It cannot change that work.&lt;/li&gt;
&lt;li&gt;It does not make phone calls, and it does not send text messages to other people. With your approval, it can send email from accounts you have connected.&lt;/li&gt;
&lt;li&gt;Trading securities, moving money between accounts, and accessing someone else&apos;s account stay off limits even with your approval.&lt;/li&gt;
&lt;li&gt;Some connectors, including Slack, work with limits inside Duet. Microsoft 365 is not available yet.&lt;/li&gt;
&lt;li&gt;Personal errands, such as booking tickets, are weaker than the work tasks it was built for. The safety article still lists booking among things Duet can do while you are away. The launch article is the one that calls that area weaker.&lt;/li&gt;
&lt;li&gt;Disconnecting an app stops new access. What Duet already learned from that app stays until you reset its memory from the app settings. Conversation history stays until you delete it or reset memory. Deleting a chat removes it from search. Deleting your account wipes what Duet has stored.&lt;/li&gt;
&lt;li&gt;It can search past Claude Duet chats and Claude chats outside projects, under the same Search and reference chats setting. Turn that setting off under Settings, Your Claude (or Settings, Memory in the older layout) to stop the search.&lt;/li&gt;
&lt;/ul&gt;

- Duet is one proactive agent: a morning brief, background work on a cloud computer, and a stop before send, pay, sign, or delete.
- For a solo founder, it is worth the waitlist if you want that one agent and you are willing to approve the sensitive steps yourself.
- As of 26 October 2026, access is US Pro and Max, by invitation, included in the plan, sharing the plan&apos;s usage limits.
- The approval card is the control. Classifiers and the credential split sit beside it. Anthropic still says no defense is perfect, which is why send, pay, and delete wait for you.

&lt;p&gt;Which Monday job would you hand to an agent that has to wait before send, pay, or delete?&lt;/p&gt;
&lt;h2&gt;Sources&lt;/h2&gt;
&lt;p&gt;Facts in this post come from these Anthropic pages, read on 26 October 2026.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&quot;https://claude.com/resources/articles/claude-duet&quot;&gt;Introducing Claude Duet&lt;/a&gt;, published 21 October 2026&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://claude.com/product/claude-duet&quot;&gt;Claude Duet product page&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://support.claude.com/en/articles/17631495-get-started-with-claude-duet&quot;&gt;Get started with Claude Duet&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://claude.com/resources/articles/claude-duet-safety-privacy-and-security&quot;&gt;Claude Duet safety, privacy, and security&lt;/a&gt;, published 23 October 2026&lt;/li&gt;
&lt;/ul&gt;
&lt;/figure&gt;&lt;/figure&gt;</content:encoded><category>ai</category><category>ai</category><category>agentic-ai</category><category>ai-engineering</category><category>security</category></item><item><title>AI writes the code. Your job is the gates.</title><link>https://ansezz.com/blog/ai-code-quality-gates/</link><guid isPermaLink="true">https://ansezz.com/blog/ai-code-quality-gates/</guid><description>AI made code cheap. The engineer&apos;s job is the gate stack bad code cannot pass: tests, mutation testing, PHPStan, required CI checks, monitoring and rollback.</description><pubDate>Sun, 04 Oct 2026 00:00:00 GMT</pubDate><content:encoded>&lt;p&gt;An AI can write 10,000 lines of code in a minute. I don&apos;t care. I care whether those 10,000 lines survive my constraints.&lt;/p&gt;

- AI made writing code cheap, so the scarce work is deciding what is allowed to merge and ship.
- Stack your gates from cheap to expensive: static analysis, unit and integration tests, mutation testing, required CI checks, then monitoring with a fast rollback.
- Keep human review for design and risk, and turn every comment you repeat into a rule the pipeline enforces.

&lt;p&gt;Code generation stopped being the slow part of my week. An agent can scaffold a Laravel module, its migrations and its tests before my coffee cools.&lt;/p&gt;
&lt;p&gt;That speed is real, and I use it every day. It also changed the question. &quot;Can we write this?&quot; is cheap now. &quot;Should this reach production?&quot; is the expensive one.&lt;/p&gt;
&lt;p&gt;So I stopped judging my work by how much code I write. I judge the system around the code: what it refuses, how fast it refuses it, and how fast it recovers when something slips through.&lt;/p&gt;
&lt;h2&gt;Cheap code moves the job&lt;/h2&gt;
&lt;p&gt;When code was slow to write, the writing itself filtered out bad ideas. You thought twice before typing 400 lines by hand.&lt;/p&gt;
&lt;p&gt;That filter is gone. Volume goes up, and every weak spot in your process gets hit more often.&lt;/p&gt;
&lt;p&gt;I covered the trade-off in &lt;a href=&quot;https://ansezz.com/blog/ai-vs-traditional-development/&quot;&gt;AI vs traditional development&lt;/a&gt; and the loop itself in &lt;a href=&quot;https://ansezz.com/blog/agentic-workflows-vibe-coding/&quot;&gt;agentic workflows&lt;/a&gt;. This post is the next step: the concrete gates I put between generated code and real users.&lt;/p&gt;
&lt;p&gt;Think of them as a row of doors. Each one is cheap to run, catches one kind of failure, and says no without caring who wrote the code. An agent, a teammate, or me at 1am: same doors.&lt;/p&gt;

  &lt;div&gt;Writes most lines by hand. Quality depends on how careful you were that day. Review catches what it can.&lt;/div&gt;
  &lt;div&gt;Designs the checks every change must pass. Quality depends on the gates, and they run the same way on every push.&lt;/div&gt;

&lt;h2&gt;Gate 1: static analysis and types&lt;/h2&gt;
&lt;p&gt;The cheapest gate runs before any test. PHPStan reads your code and finds whole classes of bugs without executing it. Larastan teaches it about Laravel: Eloquent models, facades and container bindings.&lt;/p&gt;
&lt;p&gt;PHPStan has levels from 0 to 10. Level 10 arrived with PHPStan 2.0 and treats every &lt;code&gt;mixed&lt;/code&gt; type strictly, including the implicit ones you get from missing types.&lt;/p&gt;
&lt;p&gt;On an existing app you won&apos;t jump to level 10 on day one, and you don&apos;t need to.&lt;/p&gt;
&lt;p&gt;Generate a baseline first, then add it to &lt;code&gt;includes&lt;/code&gt;. Old errors are recorded and new code has to meet the higher bar.&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;vendor/bin/phpstan analyse --generate-baseline
&lt;/code&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;code&gt;# phpstan.neon
includes:
    - vendor/larastan/larastan/extension.neon
    - phpstan-baseline.neon

parameters:
    paths:
        - app/
    level: 8
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Then ratchet. Every few weeks, clear part of the baseline, and raise the level by one when it gets small. That file is a to-do list that can only get shorter.&lt;/p&gt;
&lt;p&gt;Agents are happy here. Point one at a failing PHPStan run and it will fix types all afternoon without complaint. That&apos;s exactly the work I want to hand over.&lt;/p&gt;

Run PHPStan one level above your current setting with `--generate-baseline`, commit the baseline, and raise the level in CI. From today, new code meets the stricter rule.

&lt;h2&gt;Gate 2: tests that describe behavior&lt;/h2&gt;
&lt;p&gt;Unit tests pin down the rules: pricing, proration, state changes, the logic that costs money when it&apos;s wrong. Integration tests (Laravel calls them feature tests) prove the pieces work together: the route, the policy, the database and the queued job.&lt;/p&gt;
&lt;p&gt;I lean on feature tests for AI-written code. An agent can make every unit test pass and still wire the controller to the wrong policy. A feature test that hits the real route as a real user catches that.&lt;/p&gt;
&lt;p&gt;Pest also gives you architecture tests, which turn &quot;we don&apos;t do that here&quot; into a failing build:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;// tests/ArchTest.php
arch()-&amp;gt;preset()-&amp;gt;laravel();
arch()-&amp;gt;preset()-&amp;gt;security();

arch(&apos;no debug calls ship&apos;)
    -&amp;gt;expect(&apos;App&apos;)
    -&amp;gt;not-&amp;gt;toUse([&apos;dd&apos;, &apos;dump&apos;]);
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;On an older app, start with &lt;code&gt;-&amp;gt;ignoring()&lt;/code&gt; for the folders you haven&apos;t cleaned up yet.&lt;/p&gt;
&lt;p&gt;When I write the spec first, I write it as tests. The agent gets a red suite and a clear finish line. If it can&apos;t turn the suite green honestly, I usually learn something about my spec.&lt;/p&gt;
&lt;h2&gt;Gate 3: mutation testing&lt;/h2&gt;
&lt;p&gt;Coverage tells you a line ran. It doesn&apos;t tell you a test would notice if that line were wrong. That gap is where generated tests like to hide, with assertions like &quot;the result is not null&quot;.&lt;/p&gt;
&lt;p&gt;Mutation testing closes it. The tool changes your code on purpose (flips a &lt;code&gt;&amp;gt;&lt;/code&gt; to &lt;code&gt;&amp;gt;=&lt;/code&gt;, drops a method call, returns an empty array) and reruns your tests. If the tests still pass, that mutant escaped, and you just found a test that checks nothing.&lt;/p&gt;
&lt;figure&gt;
&lt;p&gt;Pick the tool for your stack:&lt;/p&gt;
&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Stack&lt;/th&gt;
&lt;th&gt;Tool&lt;/th&gt;
&lt;th&gt;Fail the build with&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;PHP on Pest&lt;/td&gt;
&lt;td&gt;Pest&apos;s built-in &lt;code&gt;--mutate&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;&lt;code&gt;--min=70&lt;/code&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;PHP on PHPUnit&lt;/td&gt;
&lt;td&gt;Infection&lt;/td&gt;
&lt;td&gt;&lt;code&gt;--min-msi=70&lt;/code&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;JavaScript or TypeScript&lt;/td&gt;
&lt;td&gt;StrykerJS&lt;/td&gt;
&lt;td&gt;&lt;code&gt;thresholds.break&lt;/code&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;p&gt;One detail to know before you wire this up: Infection&apos;s Pest support covered Pest 1 only. From Pest 2 on, Pest runs its own mutation engine, so a Pest suite uses &lt;code&gt;pest --mutate&lt;/code&gt;, and it mutates the classes your tests name with &lt;code&gt;covers()&lt;/code&gt; or &lt;code&gt;mutates()&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;On a PHPUnit suite, Infection is the usual choice. Its &lt;code&gt;--git-diff-lines&lt;/code&gt; flag mutates only the lines a pull request touched, which keeps CI fast on a big codebase.&lt;/p&gt;
&lt;p&gt;For JavaScript, Stryker exits with code 1 when the score drops below &lt;code&gt;break&lt;/code&gt;:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;{
  &quot;thresholds&quot;: { &quot;high&quot;: 80, &quot;low&quot;: 60, &quot;break&quot;: 60 }
}
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;The 70 and 60 in these examples are starting points. Pick the score your suite hits today, gate on it, and raise it as the tests improve. Why this matters so much for agent-written tests is in &lt;a href=&quot;https://ansezz.com/blog/testing-ai-generated-code/&quot;&gt;trust is not a QA strategy&lt;/a&gt;.&lt;/p&gt;
&lt;h2&gt;Gate 4: CI that nobody can skip&lt;/h2&gt;
&lt;p&gt;All of this is a suggestion until the merge button respects it. Here is the workflow I start with on a Laravel app that uses Pest:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;name: quality-gates
on: [pull_request]

jobs:
  static:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v7
      - uses: shivammathur/setup-php@v2
        with:
          php-version: &quot;8.4&quot;
      - run: composer install --no-interaction --prefer-dist
      - run: vendor/bin/phpstan analyse --no-progress

  tests:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v7
      - uses: shivammathur/setup-php@v2
        with:
          php-version: &quot;8.4&quot;
      - run: composer install --no-interaction --prefer-dist
      - run: cp .env.example .env &amp;amp;&amp;amp; php artisan key:generate
      - run: vendor/bin/pest --parallel

  mutation:
    needs: tests
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v7
        with:
          fetch-depth: 0
      - uses: shivammathur/setup-php@v2
        with:
          php-version: &quot;8.4&quot;
          coverage: pcov
      - run: composer install --no-interaction --prefer-dist
      - run: cp .env.example .env &amp;amp;&amp;amp; php artisan key:generate
      - run: vendor/bin/pest --mutate --parallel --min=70
      # PHPUnit suite? The same gate with Infection:
      # vendor/bin/infection --git-diff-lines --git-diff-base=origin/main --min-msi=70 --threads=max
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;The &lt;code&gt;mutation&lt;/code&gt; job only has work to do once your tests name the classes they cover with &lt;code&gt;covers()&lt;/code&gt; (or &lt;code&gt;mutates()&lt;/code&gt;), so add those as you write tests.&lt;/p&gt;
&lt;p&gt;Then open branch protection (or a ruleset) for &lt;code&gt;main&lt;/code&gt; and turn on &quot;Require status checks to pass before merging&quot;. Add all three jobs. Also tick &quot;Require branches to be up to date before merging&quot;, so each pull request is tested against the code it will actually land on.&lt;/p&gt;
&lt;p&gt;Now nobody merges red. No agent, no teammate in a hurry, and no version of me on a deadline. The wider picture of the pipeline is in &lt;a href=&quot;https://ansezz.com/blog/ci-vs-cd/&quot;&gt;CI vs CD&lt;/a&gt;.&lt;/p&gt;

Open your repo settings and check which jobs are required on `main`. A quality job that isn&apos;t on that list is decoration. Add it today.

&lt;h2&gt;Gate 5: production is a gate too&lt;/h2&gt;
&lt;p&gt;Some bugs only show up with real data and real traffic. Your tests won&apos;t catch the query that is fine with 200 rows and slow with two million. So the last gate sits after the deploy.&lt;/p&gt;
&lt;p&gt;I want three things there:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Error tracking.&lt;/strong&gt; Sentry&apos;s Laravel SDK reports unhandled exceptions with their stack trace as they happen. I hear about the bug before the support ticket arrives.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;A smoke check.&lt;/strong&gt; Laravel 11 and later ship a &lt;code&gt;/up&lt;/code&gt; health route that returns 200 when the app boots. Hit it right after deploy and fail the pipeline if it doesn&apos;t answer.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;A rollback you have practiced.&lt;/strong&gt; Keep the previous build ready to switch back to. If rolling back needs a meeting, it&apos;s too slow.&lt;/li&gt;
&lt;/ul&gt;
&lt;pre&gt;&lt;code&gt;curl --fail --silent --max-time 10 https://app.example.com/up || ./rollback.sh
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Monitoring is also how the gates improve. When something escapes to production, I fix it, then I ask which earlier gate should have caught it, and I add the test or the rule there. Every incident should leave the doors tighter. The difference between having logs and actually being told is in &lt;a href=&quot;https://ansezz.com/blog/logging-vs-monitoring/&quot;&gt;logging vs monitoring&lt;/a&gt;.&lt;/p&gt;
&lt;figure&gt;
&lt;h2&gt;Code review, when it matters&lt;/h2&gt;
&lt;p&gt;With the machines doing the mechanical checks, review changes shape. I don&apos;t read every line hunting for missing types anymore. The pipeline already did that, on every file, with the same attention.&lt;/p&gt;
&lt;p&gt;My review time goes to the questions no tool answers. Should this feature exist? Does this new queue or table fit the system? What happens to the money if this webhook arrives twice?&lt;/p&gt;
&lt;p&gt;GitHub can route that attention for you. A &lt;code&gt;CODEOWNERS&lt;/code&gt; file plus &quot;Require review from Code Owners&quot; means risky paths wait for a human, and everything else merges on green:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;# .github/CODEOWNERS
/database/migrations/  @your-org/leads
/app/Policies/         @your-org/leads
/app/Billing/          @your-org/leads
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;My full read list, and how I handle agent-sized diffs, is in &lt;a href=&quot;https://ansezz.com/blog/stop-reading-code-ai-review/&quot;&gt;stop reading every line of AI-generated code&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;Generating code is the easy part now. The craft is in the system that decides what ships.&lt;/p&gt;

Write a `CODEOWNERS` file with the three paths where a mistake costs real money or data, and turn on code owner review for them. Let the rest merge on green checks.

&lt;h2&gt;What moving up the stack looks like on a Tuesday&lt;/h2&gt;
&lt;p&gt;&quot;Moving engineers up the stack&quot; sounds like a conference slide. Here is what it means in my actual week:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Less boilerplate.&lt;/strong&gt; Agents write the CRUD, the DTOs, the form requests and the first draft of the tests. I don&apos;t miss typing them.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;More specs.&lt;/strong&gt; I write acceptance tests and invariants before the agent starts. A refund never exceeds the captured amount. A discount never drops a total below zero.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;More pipeline work.&lt;/strong&gt; I treat the CI config like product code. It gets reviewed, versioned and improved whenever an incident shows a gap.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;More design.&lt;/strong&gt; Schema choices, module boundaries, what goes on a queue. These decisions outlive any single file, and no gate can make them for you.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Fewer heroics.&lt;/strong&gt; When the gates are good, a Friday deploy is boring. Boring is the goal.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;The engineers who do well with AI can say exactly what &quot;correct&quot; means, then make a machine check it on every push.&lt;/p&gt;

Pick one feature from this sprint and write its acceptance tests before any code exists, yours or an agent&apos;s. Then compare that review with your last one.


- Cheap code moves the hard work to deciding what may merge and ship.
- Order your gates from cheap to expensive: static analysis, tests, mutation testing, required CI checks, then monitoring and rollback.
- Use a baseline and a ratchet so standards rise without a big rewrite.
- Spend human review on design and risk, and route it with CODEOWNERS.
- Every bug that escapes should add a rule to an earlier gate.

&lt;p&gt;If you want an outside look at which of these gates your Laravel pipeline is missing, &lt;a href=&quot;https://ansezz.com/services/architecture-audit/&quot;&gt;my architecture audit covers the code, the CI and the deploy path&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;Which gate is missing from your pipeline right now?&lt;/p&gt;
&lt;/figure&gt;&lt;/figure&gt;</content:encoded><category>ai</category><category>code-quality</category><category>ci-cd</category><category>laravel</category><category>ai-engineering</category></item><item><title>Chatbots answered questions. Bots now do the work.</title><link>https://ansezz.com/blog/chatbots-answered-bots-now-do-the-work/</link><guid isPermaLink="true">https://ansezz.com/blog/chatbots-answered-bots-now-do-the-work/</guid><description>The first AI wave gave us chatbots that answer. The new wave gives us bots that do the work while we&apos;re away. What changes, what still needs a person, and who should get ready.</description><pubDate>Sat, 03 Oct 2026 00:00:00 GMT</pubDate><content:encoded>&lt;p&gt;Chatbots made answers cheap. Bots are making the work around the answers cheap.&lt;/p&gt;

- The chatbot wave made getting an answer cheap, but you still did the work around it.
- The new bots wake up on their own, use your tools, and stop at a draft for you.
- Taste, sends in your name, costly decisions and setting the rules still need a person.

&lt;p&gt;A few years ago, AI meant a chat box. You asked a question, you got an answer, and then you did the work yourself.&lt;/p&gt;
&lt;p&gt;It was useful, but you were still the one who opened the apps, wrote the email and pressed send.&lt;/p&gt;
&lt;p&gt;That is changing fast. In the last few months, several big AI companies shipped some kind of bot that works on its own.&lt;/p&gt;
&lt;p&gt;It runs on a schedule, watches your inbox or your repo, uses your apps, and comes back with the work done or a draft ready for you. You don&apos;t have to be in the chat for it to happen.&lt;/p&gt;
&lt;p&gt;I think this is the next big wave, and it will touch a lot more people than the first one did.&lt;/p&gt;
&lt;h2&gt;Wave one: answers&lt;/h2&gt;
&lt;p&gt;The chatbot wave made one thing cheap: getting an answer. Explaining code, summarizing a long document, writing a first draft.&lt;/p&gt;
&lt;p&gt;All of that went from minutes or hours to seconds.&lt;/p&gt;
&lt;p&gt;But the job around the answer stayed the same. You still had to:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;notice that something needed doing&lt;/li&gt;
&lt;li&gt;open the right tool&lt;/li&gt;
&lt;li&gt;copy the answer into it&lt;/li&gt;
&lt;li&gt;follow up later&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;The chatbot waited for you. If you didn&apos;t ask, nothing happened.&lt;/p&gt;
&lt;h2&gt;Wave two: work&lt;/h2&gt;
&lt;p&gt;The new bots flip that. You don&apos;t ask them each time. You give them an area and a set of rules once, and they keep going.&lt;/p&gt;

  &lt;div&gt;
&lt;p&gt;The chatbot waited for you. If you didn&apos;t ask, nothing happened.&lt;/p&gt;
  &lt;/div&gt;
  &lt;div&gt;
&lt;p&gt;You give the bot an area and a set of rules once, and it keeps going.&lt;/p&gt;
  &lt;/div&gt;

&lt;p&gt;In practice that looks like:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;They wake up on their own.&lt;/strong&gt; On a schedule, or when something happens: a new email, a failed build, a new comment.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;They use your tools.&lt;/strong&gt; Inbox, calendar, docs, code, a browser. Not just text in a chat window.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;They finish the job or stop at the right point.&lt;/strong&gt; A draft waiting for you, a pull request ready to review, a short note saying nothing changed.&lt;/li&gt;
&lt;/ul&gt;
&lt;figure&gt;
&lt;p&gt;You can read how two of these products compare in &lt;a href=&quot;https://ansezz.com/blog/grok-bot-vs-openai-dots&quot;&gt;Grok Bot vs OpenAI dots&lt;/a&gt;, and how I set mine up in &lt;a href=&quot;https://ansezz.com/blog/run-your-business-with-ai-assistants&quot;&gt;Run your business with one AI assistant per area&lt;/a&gt;.&lt;/p&gt;

Pick one area and write its rules down once, so a bot could keep going without you asking each time.

&lt;h2&gt;What changed in my week&lt;/h2&gt;
&lt;p&gt;I run most of my week this way now. One bot looks after my website and blog. One handles social posts. One handles my inbox.&lt;/p&gt;
&lt;p&gt;They talk to each other in a shared chat, and I step in when they need a decision.&lt;/p&gt;
&lt;p&gt;The biggest change is not speed.&lt;/p&gt;
&lt;p&gt;Before, I was the one carrying context from one app to the next. Now the bots carry it, and I mostly review and decide.&lt;/p&gt;
&lt;p&gt;A normal day looks like this: I open the chat, read what got done overnight, approve a few drafts, say no to one or two, and give a new idea.&lt;/p&gt;
&lt;p&gt;That&apos;s most of the admin part of my day.&lt;/p&gt;
&lt;h2&gt;What still needs you&lt;/h2&gt;
&lt;p&gt;Bots doing the work does not mean bots running your life. A few things still need a person, and I think they will for a while:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Taste.&lt;/strong&gt; A bot can write ten versions of a post. Picking the one that sounds like you is still your job.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Sending things in your name.&lt;/strong&gt; Anything that goes to a real person should pass through you first. Good bots draft. You press send.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Decisions with real cost.&lt;/strong&gt; Money, contracts, deleting things, saying no to a client.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Setting the rules.&lt;/strong&gt; A bot is only as good as the scope you give it. Vague rules give you vague work.&lt;/li&gt;
&lt;/ul&gt;
&lt;figure&gt;
&lt;p&gt;If anything, the skill that matters most now is being clear: clear about what each bot owns, what it may never touch, and when it should stop and ask.&lt;/p&gt;

For one bot, write three lines: what it owns, what it may never touch, and when it should stop and ask.

&lt;h2&gt;Who should get ready&lt;/h2&gt;
&lt;p&gt;Anyone whose day is mostly moving information between tools. That covers a lot of jobs:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;freelancers and small business owners who do their own admin&lt;/li&gt;
&lt;li&gt;developers who spend half the day on tickets, reviews and updates&lt;/li&gt;
&lt;li&gt;marketers and content people who plan, write and schedule&lt;/li&gt;
&lt;li&gt;assistants, coordinators and operations people&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;This doesn&apos;t mean those jobs go away. It means the job moves. Less doing the steps, more deciding what the steps should be and checking the result.&lt;/p&gt;
&lt;p&gt;People who learn to set up and run a small team of bots will get a lot more done than people who don&apos;t.&lt;/p&gt;

Look at your last week and mark the parts that were mostly moving information between tools. Those are the steps to hand over first.

&lt;h2&gt;How to start small&lt;/h2&gt;
&lt;p&gt;You don&apos;t need a big setup to try this.&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Pick one boring task you do every week.&lt;/li&gt;
&lt;li&gt;Give one bot that task and nothing else.&lt;/li&gt;
&lt;li&gt;Ask it to draft, not send.&lt;/li&gt;
&lt;li&gt;Review its work for two weeks.&lt;/li&gt;
&lt;li&gt;If it holds up, give it the next task.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;That&apos;s it. Start with one area, keep the rules strict, and add more once you trust it.&lt;/p&gt;

Pick one boring task you do every week and give one bot that task and nothing else.


Chatbots made answers cheap. Bots are making the work around the answers cheap.
&lt;p&gt;The people who do well in this wave won&apos;t be the ones who type the best prompts. They&apos;ll be the ones who are best at deciding what should happen, setting clear rules, and saying yes or no quickly.
&lt;/p&gt;&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Which boring weekly task would you hand to a bot first?&lt;/p&gt;
&lt;/figure&gt;&lt;/figure&gt;</content:encoded><category>ai</category><category>ai</category><category>agentic-ai</category><category>career</category></item><item><title>Claude Duet vs Grok Bot vs OpenAI Dots vs Meta Muse: pick by control and access</title><link>https://ansezz.com/blog/grok-bot-vs-openai-dots/</link><guid isPermaLink="true">https://ansezz.com/blog/grok-bot-vs-openai-dots/</guid><description>Four personal agents each keep a cloud computer working after you close the laptop. Pick by who says yes before a send or a payment, and whether your plan and country can get in.</description><pubDate>Thu, 29 Oct 2026 00:00:00 GMT</pubDate><content:encoded>&lt;p&gt;Updated 29 Oct 2026.&lt;/p&gt;
&lt;p&gt;Pick a personal AI agent by how it controls risky actions and whether you can get it today, not by the brand on the app.&lt;/p&gt;
&lt;p&gt;All four agents now have their own cloud computer and keep working after you close the laptop. What separates them is who says yes before a send or a payment, and whether your plan and country can get in.&lt;/p&gt;
&lt;p&gt;That is my claim. Prices and access below are as of 29 Oct 2026. Prices can change.&lt;/p&gt;
&lt;p&gt;The deeper posts are &lt;a href=&quot;https://ansezz.com/blog/claude-duet-personal-ai-agent&quot;&gt;Claude Duet&lt;/a&gt;, &lt;a href=&quot;https://ansezz.com/blog/grok-bot-solo-founders&quot;&gt;Grok Bot&lt;/a&gt;, &lt;a href=&quot;https://ansezz.com/blog/openai-dots-solo-founders&quot;&gt;OpenAI Dots&lt;/a&gt;, and &lt;a href=&quot;https://ansezz.com/blog/meta-muse-personal-ai-agent-solo-founders&quot;&gt;Meta Muse&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;{/* prettier-ignore */}&lt;/p&gt;

- All four give the agent a cloud computer and keep working after you close the laptop. Each one still needs a yes before a risky step, and that yes works differently on each product.
- Claude Duet and OpenAI Dots start as one agent. Grok Bot starts as a team on one shared computer. Meta Muse is a consumer app with a guard outside the model.
- As of 29 Oct 2026, access depends on the plan, the country, and sometimes an invite. Duet is a US waitlist on Pro or Max. Grok Bot is Premium, Super, or Ultra on The X Subscription. A dot comes with ChatGPT Pro or Business Premium. Muse has a free tier in four countries.

&lt;h2&gt;What all four share&lt;/h2&gt;
&lt;p&gt;The same three ideas now show up on all four products.&lt;/p&gt;

  &lt;div&gt;The agent is a chat box on your laptop.&lt;/div&gt;
  &lt;div&gt;The agent has a cloud computer and keeps working after you close the laptop.&lt;/div&gt;

&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;A cloud computer.&lt;/strong&gt; &lt;a href=&quot;https://claude.com/product/claude-duet&quot;&gt;Claude Duet&lt;/a&gt; works on its own computer in the cloud. &lt;a href=&quot;https://docs.x.ai/grok-bot/overview&quot;&gt;Grok Bot&lt;/a&gt; Bots share one persistent cloud computer, with a browser, files, and a terminal. A &lt;a href=&quot;https://help.openai.com/en/articles/20001530-getting-started-with-your-dot&quot;&gt;dot&lt;/a&gt; has its own cloud computer and browser. &lt;a href=&quot;https://about.fb.com/news/2026/09/introducing-muse-personal-ai-agent/&quot;&gt;Muse&lt;/a&gt; runs on Muse Secure VM, an isolated Linux machine with a browser.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Background work.&lt;/strong&gt; Duet keeps working while you are away. Grok Bot work continues when the laptop is closed. A dot keeps making progress between conversations. Muse can continue after you close the app.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;A yes before the risky step.&lt;/strong&gt; Duet waits before a send, a payment, a signature, or a delete. Grok Bot shows an approval card. A dot follows rules you write, and a draft is not a send. Muse asks you to confirm a step such as sending an email or making a purchase, and a separate Sentinel agent is the only one that can allow connector actions and traffic leaving the machine.&lt;/li&gt;
&lt;/ul&gt;

Write down the one action you will not let an agent finish alone. A send, a payment, or a delete is the usual line.

&lt;h2&gt;Shape: one agent, team, or consumer app&lt;/h2&gt;
&lt;p&gt;&lt;strong&gt;Claude Duet is one proactive agent.&lt;/strong&gt; It sends a morning brief, then checks connected accounts every few hours. You message it. It comes back when a task is done or needs you. The &lt;a href=&quot;https://claude.com/product/claude-duet&quot;&gt;product page&lt;/a&gt; and the &lt;a href=&quot;https://support.claude.com/en/articles/17631495-get-started-with-claude-duet&quot;&gt;help center&lt;/a&gt; describe that rhythm.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;OpenAI Dots start as one primary dot.&lt;/strong&gt; You name it. The &lt;a href=&quot;https://openai.com/index/introducing-dots/&quot;&gt;launch post&lt;/a&gt; describes more dots as later, and specialist dots (their own identity, credentials, and organization responsibilities) as a preview in focused enterprise pilots.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Grok Bot is a team.&lt;/strong&gt; You create named Bots. They share one computer, run in parallel, and can pass a task to each other. The &lt;a href=&quot;https://docs.x.ai/grok-bot/overview&quot;&gt;overview&lt;/a&gt; and the &lt;a href=&quot;https://cursor.com/docs/grok-bot&quot;&gt;Cursor docs&lt;/a&gt; describe that.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Meta Muse is a consumer agent.&lt;/strong&gt; It remembers what matters to you and can suggest something when you did not ask. The &lt;a href=&quot;https://about.fb.com/news/2026/09/introducing-muse-personal-ai-agent/&quot;&gt;launch post&lt;/a&gt; says that. The &lt;a href=&quot;https://research.meta.ai/blog/security-and-safety-for-ai-agents-our-approach-with-muse&quot;&gt;safety post&lt;/a&gt; says it can run subagents, smaller agents it starts to help with the work.&lt;/p&gt;

Pick a personal AI agent by how it controls risky actions and whether you can get it today, not by the brand on the app.

&lt;h2&gt;Control and approvals&lt;/h2&gt;
&lt;p&gt;Who says yes is the part that matters when money or a message can leave your account.&lt;/p&gt;
&lt;figure&gt;
&lt;p&gt;&lt;strong&gt;Claude Duet: wait for your ok.&lt;/strong&gt; Before it sends a message, makes a payment, signs a document, or deletes anything, it shows you the action and waits. A separate checker runs outside the model that is doing the work. Some actions stay off limits even if you approve them. The &lt;a href=&quot;https://claude.com/resources/articles/claude-duet-safety-privacy-and-security&quot;&gt;safety article&lt;/a&gt; covers that gate.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Grok Bot: allow once.&lt;/strong&gt; When an action needs approval, you see the operation and the inputs. The choices are Allow once, Always allow, or Deny. Auto Review is an independent review model. It can allow the action, ask you, or deny it. You can also tell a Bot to leave drafts for you to approve. The &lt;a href=&quot;https://cursor.com/docs/grok-bot/security&quot;&gt;security docs&lt;/a&gt; describe the cards and Auto Review. The &lt;a href=&quot;https://docs.x.ai/grok-bot/overview&quot;&gt;overview&lt;/a&gt; uses &quot;leave me drafts to approve&quot; as the pattern for outgoing copy.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;OpenAI Dots: your rules.&lt;/strong&gt; Custom Rules are optional. The four choices are: take action without asking, take action when you say so, ask before taking action, or hand the step back to you. An automatic review sits on top. It checks the action against your instructions, your rules, and the built-in safety requirements. Asking for a draft does not give permission to send. A rule does not grant access to an app or a computer, and it does not remove a confirmation the product still requires. The &lt;a href=&quot;https://learn.chatgpt.com/codex/dots/controls&quot;&gt;controls docs&lt;/a&gt; and the &lt;a href=&quot;https://help.openai.com/en/articles/20001530-getting-started-with-your-dot&quot;&gt;getting started guide&lt;/a&gt; both say so.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Meta Muse: Sentinel.&lt;/strong&gt; The &lt;a href=&quot;https://research.meta.ai/blog/security-and-safety-for-ai-agents-our-approach-with-muse&quot;&gt;safety post&lt;/a&gt; says a separate Sentinel agent is the only permission authority for connector actions and for traffic leaving the machine, and that the model cannot override Sentinel. The &lt;a href=&quot;https://www.meta.com/help/superintelligence/1047255454427887/&quot;&gt;privacy help page&lt;/a&gt; says Muse asks you to confirm important actions, such as sending an email or making a purchase, and that many of those checks run outside the model.&lt;/p&gt;

Take the action you wrote down above. Find the control that stops it: Duet&apos;s wait, a Grok Bot card, a dot rule, or Sentinel.

&lt;h2&gt;Where work runs&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Claude Duet&lt;/strong&gt; uses a cloud virtual machine with its own browser. You cannot watch that browser or take it over yet. The &lt;a href=&quot;https://claude.com/resources/articles/claude-duet&quot;&gt;launch article&lt;/a&gt; says Duet cannot show you the browser yet.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Grok Bot&lt;/strong&gt; uses one persistent cloud computer per account, with a browser, files, and a terminal. Every Bot on that account can see the shared files, browser sessions, and app logins. The &lt;a href=&quot;https://docs.x.ai/grok-bot/overview&quot;&gt;overview&lt;/a&gt; says that. The &lt;a href=&quot;https://cursor.com/docs/grok-bot/security&quot;&gt;security docs&lt;/a&gt; say those computers run in the United States.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;OpenAI Dots&lt;/strong&gt; give the dot its own cloud computer and browser. You can inspect it and choose Take over, then Return control. A local computer is optional and starts turned off. The &lt;a href=&quot;https://learn.chatgpt.com/codex/dots/computers-and-apps&quot;&gt;computers and apps docs&lt;/a&gt; and the &lt;a href=&quot;https://help.openai.com/en/articles/20001530-getting-started-with-your-dot&quot;&gt;getting started guide&lt;/a&gt; describe that.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Meta Muse&lt;/strong&gt; runs on Muse Secure VM, a dedicated computer in the cloud with its own browser. The &lt;a href=&quot;https://about.fb.com/news/2026/09/introducing-muse-personal-ai-agent/&quot;&gt;launch post&lt;/a&gt; names that VM. The &lt;a href=&quot;https://research.meta.ai/blog/security-and-safety-for-ai-agents-our-approach-with-muse&quot;&gt;safety post&lt;/a&gt; says each VM is an isolated Linux machine, and that you can inspect the browser work and take over.&lt;/li&gt;
&lt;/ul&gt;
&lt;h2&gt;Where you talk to them&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Claude Duet:&lt;/strong&gt; an iOS app, an Android app, and &lt;a href=&quot;http://claude.ai&quot;&gt;claude.ai&lt;/a&gt; on the web. The &lt;a href=&quot;https://claude.com/product/claude-duet&quot;&gt;product page&lt;/a&gt; lists those.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Grok Bot:&lt;/strong&gt; a desktop app on macOS, Windows, and Linux, plus iPhone and Android. The &lt;a href=&quot;https://docs.x.ai/grok-bot/overview&quot;&gt;overview&lt;/a&gt; lists those apps.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;OpenAI Dots:&lt;/strong&gt; ChatGPT on the web, in the desktop app, and in the mobile app, plus Slack and Microsoft Teams. Mobile web is not supported. The &lt;a href=&quot;https://learn.chatgpt.com/codex/dots/channels&quot;&gt;channels docs&lt;/a&gt; list texting as coming soon. The &lt;a href=&quot;https://help.openai.com/en/articles/20001530-getting-started-with-your-dot&quot;&gt;getting started guide&lt;/a&gt; describes a limited beta for Pro users in the US, through a third-party provider, and says that beta is not on Business or Enterprise.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Meta Muse:&lt;/strong&gt; the Muse app on iOS and Android, &lt;a href=&quot;http://muse.ai&quot;&gt;muse.ai&lt;/a&gt;, and WhatsApp. The &lt;a href=&quot;https://about.fb.com/news/2026/09/introducing-muse-personal-ai-agent/&quot;&gt;launch post&lt;/a&gt; lists those. The &lt;a href=&quot;https://about.fb.com/news/2026/10/muse-is-now-available-in-singapore-the-worlds-first-personal-ai-agent-built-for-everyone/&quot;&gt;Singapore post&lt;/a&gt; also lists iOS, Android, and &lt;a href=&quot;http://muse.ai&quot;&gt;muse.ai&lt;/a&gt;.&lt;/li&gt;
&lt;/ul&gt;
&lt;h2&gt;Access and price as of 29 Oct 2026&lt;/h2&gt;
&lt;p&gt;Prices can change. Check the vendor page before you pay.&lt;/p&gt;
&lt;figure&gt;
&lt;p&gt;&lt;strong&gt;Claude Duet&lt;/strong&gt; is a research preview in the US only, on a waitlist, by invitation. You need Claude Pro or Max. During the preview it is included with those plans. These pages do not list a separate Duet price. Team and Enterprise plans are not included yet. The &lt;a href=&quot;https://claude.com/product/claude-duet&quot;&gt;product page&lt;/a&gt; states that access.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Grok Bot&lt;/strong&gt; is included on The X Subscription at Premium ($30 a month), Super ($100 a month), and Ultra ($200 a month). Plus and Free do not include it. The free trial is a usage credit with a 7-day window. List prices are on &lt;a href=&quot;https://docs.x.ai/x-subscription/pricing&quot;&gt;The X Subscription pricing&lt;/a&gt; and &lt;a href=&quot;https://x.ai/pricing&quot;&gt;x.ai/pricing&lt;/a&gt;. The &lt;a href=&quot;https://cursor.com/help/grok-bot/plans&quot;&gt;plans page&lt;/a&gt; describes the trial. Paid individual Cursor plans and Cursor Teams also include Grok Bot. That same plans page lists the full matrix.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;OpenAI Dots.&lt;/strong&gt; The first dot is included on Pro and on Business Premium, at no extra cost. Pro is $100, $200, or $500 a month, for people 18 and older, outside the EEA, the UK, and Switzerland. These pages do not list a price for extra dots, and they do not list a separate Business Premium seat price. Enterprise, including Edu and Healthcare, is a beta that an admin turns on. It stays off until then. The &lt;a href=&quot;https://help.openai.com/en/articles/20001530-getting-started-with-your-dot&quot;&gt;getting started guide&lt;/a&gt; states the access rules. &lt;a href=&quot;https://learn.chatgpt.com/codex/pricing&quot;&gt;Codex pricing&lt;/a&gt; lists the three Pro prices.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Meta Muse&lt;/strong&gt; has a free tier with a usage limit that refreshes. Power is $20 a month and includes 500 million Muse tokens a week. Maximum is $100 a month and includes 3 billion Muse tokens a week. These pages do not say what one Muse token maps to in a real task. Muse is in limited testing in the US, Canada, Japan, and Singapore. The &lt;a href=&quot;https://www.meta.com/help/subscriptions/1021145227643680/&quot;&gt;subscription help page&lt;/a&gt; lists the prices. Country pages: the &lt;a href=&quot;https://about.fb.com/news/2026/09/introducing-muse-personal-ai-agent/&quot;&gt;launch post&lt;/a&gt; (US and Canada), the &lt;a href=&quot;https://about.fb.com/ja/news/2026/10/muse-personal-ai-agent-launches-in-japan/&quot;&gt;Japan post&lt;/a&gt;, and the &lt;a href=&quot;https://about.fb.com/news/2026/10/muse-is-now-available-in-singapore-the-worlds-first-personal-ai-agent-built-for-everyone/&quot;&gt;Singapore post&lt;/a&gt; (27 October 2026).&lt;/p&gt;

Before you pay, check three things on the vendor page: your plan, your country, and whether you need an invite.

&lt;h2&gt;Comparison table&lt;/h2&gt;
&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Axis&lt;/th&gt;
&lt;th&gt;Claude Duet&lt;/th&gt;
&lt;th&gt;Grok Bot&lt;/th&gt;
&lt;th&gt;OpenAI Dots&lt;/th&gt;
&lt;th&gt;Meta Muse&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Shape&lt;/td&gt;
&lt;td&gt;One proactive agent. Morning brief. Check-ins every few hours&lt;/td&gt;
&lt;td&gt;Named Bots on one shared computer. They work in parallel and pass tasks&lt;/td&gt;
&lt;td&gt;One primary dot. More dots later. Specialist dots in enterprise pilots&lt;/td&gt;
&lt;td&gt;Consumer agent with memory. It can suggest something you did not ask for. It can run subagents&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Control&lt;/td&gt;
&lt;td&gt;Waits for your ok before send, pay, sign, or delete. A checker runs outside the model. Some actions stay off limits even with your ok&lt;/td&gt;
&lt;td&gt;Allow once, Always allow, or Deny. Independent Auto Review. You can ask it to leave drafts for you to approve&lt;/td&gt;
&lt;td&gt;Custom Rules: act alone, act when you say so, ask first, or hand off. Auto-review on top. A draft is not permission to send&lt;/td&gt;
&lt;td&gt;Sentinel is the only permission authority for connector actions and traffic leaving the machine. The model cannot override it&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Where work runs&lt;/td&gt;
&lt;td&gt;Cloud VM with its own browser. You cannot watch or take over the browser yet&lt;/td&gt;
&lt;td&gt;One cloud computer per account: browser, files, terminal. Runs in the US. Shared by every Bot&lt;/td&gt;
&lt;td&gt;Own cloud computer and browser. You can take over. Optional local computer, off by default&lt;/td&gt;
&lt;td&gt;Muse Secure VM: isolated Linux machine with a browser. You can inspect and take over&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Where you talk&lt;/td&gt;
&lt;td&gt;iOS app, Android app, &lt;a href=&quot;http://claude.ai&quot;&gt;claude.ai&lt;/a&gt; on the web&lt;/td&gt;
&lt;td&gt;Desktop (macOS, Windows, Linux), iPhone, Android&lt;/td&gt;
&lt;td&gt;ChatGPT web, desktop, mobile app, Slack, Teams. Channels: texting coming soon. Getting started: limited US Pro beta&lt;/td&gt;
&lt;td&gt;Muse app (iOS, Android), &lt;a href=&quot;http://muse.ai&quot;&gt;muse.ai&lt;/a&gt;, WhatsApp&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Access and price, 29 Oct 2026&lt;/td&gt;
&lt;td&gt;US only. Research preview. Waitlist by invite. Included with Pro or Max. No separate price&lt;/td&gt;
&lt;td&gt;Premium $30, Super $100, Ultra $200 a month on The X Subscription. Not on Plus or Free. Trial credit with a 7-day window&lt;/td&gt;
&lt;td&gt;Pro $100, $200, or $500 a month, or Business Premium. First dot included. Pro is outside the EEA, the UK, and Switzerland, ages 18 and older&lt;/td&gt;
&lt;td&gt;Free tier, Power $20, Maximum $100 a month. US, Canada, Japan, Singapore. Limited testing&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Limits&lt;/td&gt;
&lt;td&gt;Can miss things between checks. No phone calls. No texts to other people. No Team plans yet&lt;/td&gt;
&lt;td&gt;Shared computer: every Bot can see shared files and logins. Some admin controls are Enterprise only&lt;/td&gt;
&lt;td&gt;Rules do not grant access or remove required confirmations. Stopping does not undo sent work&lt;/td&gt;
&lt;td&gt;Weekly token caps. Training on chats is on at first use (you can turn it off). Confidential VM is not live&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;h2&gt;Limits and who each one fits&lt;/h2&gt;
&lt;p&gt;A few boundaries are easy to miss.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Claude Duet&lt;/strong&gt; checks on a schedule, so it can miss something that arrives between checks. It does not make phone calls, and it does not send text messages to other people. Team and Enterprise plans are not included yet. It fits a person in the US who is already on Claude Pro or Max and wants one agent that briefs them and stops before send, pay, sign, or delete. The &lt;a href=&quot;https://claude.com/resources/articles/claude-duet&quot;&gt;launch article&lt;/a&gt; and the &lt;a href=&quot;https://claude.com/product/claude-duet&quot;&gt;product page&lt;/a&gt; state those limits.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Grok Bot&lt;/strong&gt; puts every Bot on one computer. Treat files, browser sessions, and logins on that computer as visible to every Bot. A network allowlist and enforced Auto Review are Enterprise only. It fits work that splits into clear areas, when you are willing to treat the computer as shared. The &lt;a href=&quot;https://docs.x.ai/grok-bot/overview&quot;&gt;overview&lt;/a&gt; and the &lt;a href=&quot;https://cursor.com/docs/grok-bot/security&quot;&gt;security docs&lt;/a&gt; state that.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;OpenAI Dots.&lt;/strong&gt; A rule does not grant access to an app or a computer, and it does not remove a confirmation the product still requires. Stopping work does not undo a completed action. Deleting the dot does not recall a message already sent. It fits work that already lives in ChatGPT, Slack, or Teams, when you want to write the rules yourself. The &lt;a href=&quot;https://learn.chatgpt.com/codex/dots/controls&quot;&gt;controls docs&lt;/a&gt; state that.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Meta Muse&lt;/strong&gt; caps every plan with a weekly token allowance. These pages do not say what one Muse token maps to in a real task. Training on chats is on when you first use Muse. You can turn it off under Settings, Data controls. A Confidential VM, meant to keep the machine private even from Meta, is described as a future choice. It is not live, and these pages do not give a date. It fits someone in one of the four countries who wants a free starting tier, WhatsApp, and a guard that sits outside the model. The &lt;a href=&quot;https://www.meta.com/help/superintelligence/1047255454427887/&quot;&gt;privacy help page&lt;/a&gt; states the training default and the Confidential VM. The &lt;a href=&quot;https://www.meta.com/help/subscriptions/1021145227643680/&quot;&gt;subscription page&lt;/a&gt; states the weekly caps. The &lt;a href=&quot;https://research.meta.ai/blog/security-and-safety-for-ai-agents-our-approach-with-muse&quot;&gt;safety post&lt;/a&gt; states the Sentinel limit.&lt;/p&gt;
&lt;h2&gt;Which one should you pick?&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Pick Claude Duet&lt;/strong&gt; if you are in the US on Claude Pro or Max and want one agent that briefs you each morning and stops before send, pay, sign, or delete.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Pick Grok Bot&lt;/strong&gt; if your work splits into clear areas and you want named teammates that run in parallel on one computer, with approval cards you can set per action.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Pick OpenAI Dots&lt;/strong&gt; if your work lives in ChatGPT, Slack, or Teams and you want to write your own rules for what the agent does alone.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Pick Meta Muse&lt;/strong&gt; if you are in one of its four countries, want a low entry price and WhatsApp access, and value a guard that sits outside the model.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;{/* prettier-ignore */}
&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;All four keep a cloud computer working after you close the laptop. The split is who says yes, and whether you can get in today.&lt;/li&gt;
&lt;li&gt;Duet waits before send, pay, sign, or delete. Grok Bot uses Allow once, Always allow, or Deny. Dots use rules you write. Muse uses Sentinel, outside the model.&lt;/li&gt;
&lt;li&gt;As of 29 Oct 2026, Duet is a US invite on Pro or Max. Grok Bot on The X Subscription is $30, $100, or $200 a month. Dots on Pro are $100, $200, or $500 a month, outside the EEA, the UK, and Switzerland. Muse has a free tier in four countries.&lt;/li&gt;
&lt;li&gt;Prices can change. Read the vendor page for your plan and your country before you pay.
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Which action must wait for your yes, and which of these four can you open today?&lt;/p&gt;
&lt;h2&gt;Sources&lt;/h2&gt;
&lt;p&gt;Facts in this post come from the vendor pages below. Pricing and access pages were checked on 28 October 2026. The other pages were read on 26 to 28 October 2026 for the four posts linked above. Prices can change.&lt;/p&gt;
&lt;p&gt;The Singapore page and the Japan page put &quot;world&apos;s first&quot; in the title. That is Meta&apos;s marketing line. This post does not use it as a fact.&lt;/p&gt;
&lt;p&gt;Anthropic:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&quot;https://claude.com/resources/articles/claude-duet&quot;&gt;Introducing Claude Duet&lt;/a&gt;, 21 October 2026&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://claude.com/product/claude-duet&quot;&gt;Claude Duet product page&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://support.claude.com/en/articles/17631495-get-started-with-claude-duet&quot;&gt;Get started with Claude Duet&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://claude.com/resources/articles/claude-duet-safety-privacy-and-security&quot;&gt;Claude Duet safety, privacy, and security&lt;/a&gt;, 23 October 2026&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Grok Bot:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&quot;https://cursor.com/docs/grok-bot&quot;&gt;Grok Bot on Cursor&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://cursor.com/docs/grok-bot/security&quot;&gt;Grok Bot security&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://cursor.com/help/grok-bot/plans&quot;&gt;Grok Bot plans&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://docs.x.ai/grok-bot/overview&quot;&gt;Grok Bot overview&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://docs.x.ai/x-subscription/pricing&quot;&gt;The X Subscription pricing&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://x.ai/pricing&quot;&gt;xAI pricing&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;OpenAI:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&quot;https://openai.com/index/introducing-dots/&quot;&gt;Introducing Dots&lt;/a&gt;, 29 September 2026&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://help.openai.com/en/articles/20001530-getting-started-with-your-dot&quot;&gt;Getting started with your dot&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://help.openai.com/en/articles/20001554-manage-dots-in-chatgpt-workspaces&quot;&gt;Manage dots in ChatGPT workspaces&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://learn.chatgpt.com/docs/dots&quot;&gt;Dots docs&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://learn.chatgpt.com/codex/dots/channels&quot;&gt;Channels&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://learn.chatgpt.com/codex/dots/controls&quot;&gt;Controls&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://learn.chatgpt.com/codex/dots/computers-and-apps&quot;&gt;Computers and apps&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://learn.chatgpt.com/codex/pricing&quot;&gt;Codex pricing&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://chatgpt.com/pricing&quot;&gt;ChatGPT pricing&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Meta:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&quot;https://about.fb.com/news/2026/09/introducing-muse-personal-ai-agent/&quot;&gt;Introducing Muse&lt;/a&gt;, 8 September 2026&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://research.meta.ai/blog/security-and-safety-for-ai-agents-our-approach-with-muse&quot;&gt;How We Built Safety Into Muse&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://www.meta.com/help/superintelligence/1047255454427887/&quot;&gt;How Muse handles your privacy, safety and security&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://www.meta.com/help/subscriptions/1021145227643680/&quot;&gt;About Muse subscriptions&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://about.fb.com/news/2026/10/muse-is-now-available-in-singapore-the-worlds-first-personal-ai-agent-built-for-everyone/&quot;&gt;Muse is now available in Singapore&lt;/a&gt;, 27 October 2026&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://about.fb.com/ja/news/2026/10/muse-personal-ai-agent-launches-in-japan/&quot;&gt;Muse launches in Japan&lt;/a&gt;, 23 October 2026&lt;/li&gt;
&lt;/ul&gt;
&lt;/figure&gt;&lt;/figure&gt;</content:encoded><category>ai</category><category>ai</category><category>agentic-ai</category><category>ai-engineering</category><category>security</category></item><item><title>Run your business with one AI assistant per area</title><link>https://ansezz.com/blog/run-your-business-with-ai-assistants/</link><guid isPermaLink="true">https://ansezz.com/blog/run-your-business-with-ai-assistants/</guid><description>A simple setup for running any business with AI assistants: one hub, one bot per area of work, strict scopes, drafts before sends, and routines that stay quiet.</description><pubDate>Sat, 03 Oct 2026 00:00:00 GMT</pubDate><content:encoded>&lt;p&gt;By the time you know what actually needs you today, an hour is gone and your head is already tired. One assistant per area of work fixes most of that.&lt;/p&gt;

- Split your work into areas and give each one its own assistant, plus a hub that routes requests.
- Use permissions, not prompts, to keep information apart.
- Drafts before sends, approval before posting, and quiet unless something needs you.

&lt;h2&gt;The morning problem&lt;/h2&gt;
&lt;p&gt;Most mornings used to start the same way.&lt;/p&gt;

  &lt;div&gt;
&lt;p&gt;Open the inbox. Open the team chat. Open the other team chat. Check the calendar, the repo, the tickets, the notes app.&lt;/p&gt;
  &lt;/div&gt;
  &lt;div&gt;
&lt;p&gt;Each area assistant watches its own inbox, sorts it and drafts replies. You only hear about it when something needs you.&lt;/p&gt;
  &lt;/div&gt;

&lt;p&gt;The problem is not that you have too many tools. The problem is that the context lives in all of them, and you are the only thing connecting them.&lt;/p&gt;
&lt;p&gt;Every switch costs focus, and things slip through the gaps between apps.&lt;/p&gt;
&lt;p&gt;For the last few weeks I have been running my work through Grok Bot with a setup that fixes most of this. Nothing here depends on what kind of business you run. If you have more than one area of work, you can copy it.&lt;/p&gt;
&lt;h2&gt;The core idea: one assistant per area&lt;/h2&gt;
&lt;p&gt;Do not build one giant assistant that knows everything. Split your work into areas, and give each area its own assistant.&lt;/p&gt;
&lt;p&gt;An area is anything with its own inbox, its own people, or its own rules. For most people it looks something like this:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Sales and leads:&lt;/strong&gt; new inquiries, follow-ups, proposals.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Delivery:&lt;/strong&gt; the actual work you ship, plus the tools it lives in.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Content:&lt;/strong&gt; your website, blog and social posts.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Finance and admin:&lt;/strong&gt; invoices, receipts, renewals.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Personal:&lt;/strong&gt; travel, health, family logistics.&lt;/li&gt;
&lt;/ul&gt;
&lt;h3&gt;Add a hub on top&lt;/h3&gt;
&lt;p&gt;On top of these, add one &lt;strong&gt;hub&lt;/strong&gt; assistant. The hub does no area work itself. It takes a request, decides which assistant owns it, and hands it over.&lt;/p&gt;
&lt;p&gt;When you are not sure where something belongs, you tell the hub and move on.&lt;/p&gt;
&lt;figure&gt;
&lt;h3&gt;Why split at all?&lt;/h3&gt;
&lt;p&gt;Because each assistant stays small. It has a short list of tools, a clear job, and a memory that is only about its own area.&lt;/p&gt;
&lt;p&gt;It gets better at that job faster, and it is much harder for it to mix things up.&lt;/p&gt;

Name your areas. Anything with its own inbox, its own people, or its own rules is an area.

&lt;h2&gt;Give each assistant only its own keys&lt;/h2&gt;
&lt;p&gt;This is the most important rule, so it gets its own section.&lt;/p&gt;
&lt;p&gt;Each assistant connects only to the accounts its area needs. The content assistant gets the website repo and the design tool. The finance assistant gets the billing inbox. The delivery assistant gets the project tools.&lt;/p&gt;
&lt;p&gt;None of them get everything. This does two things for you:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;&lt;strong&gt;It limits damage.&lt;/strong&gt; If an assistant makes a mistake, it can only touch its own area.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;It keeps information apart.&lt;/strong&gt; Work from one area cannot leak into another, because the assistant simply has no access to it.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;You are not trusting a prompt to keep secrets. You are using permissions.&lt;/p&gt;
&lt;p&gt;If parts of your work must never mix, this matters even more. Give each one its own accounts and keep them fully separate.&lt;/p&gt;

For each assistant, list the accounts its area needs and connect only those. Start with read access where you can.

&lt;h2&gt;Guardrails that keep you in control&lt;/h2&gt;
&lt;p&gt;AI assistants are fast. That is the point, and also the risk. A few simple rules keep speed from turning into regret.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Write the scopes down.&lt;/strong&gt; Keep one short file that says what each assistant owns, in one line each.&lt;/p&gt;
&lt;p&gt;When an assistant gets a request outside its scope, it hands it to the owner or the hub and says nothing more. No advice outside its lane.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Drafts before sends.&lt;/strong&gt; Anything that goes out under your name, like an email, a message or a reply, starts as a draft you review. You press send. The only exceptions are the ones you set on purpose.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Approval before posting.&lt;/strong&gt; Public content gets your OK before it goes live. Blog posts, social posts, anything with your name on it.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Quiet by default.&lt;/strong&gt; Assistants only ping you when something needs a decision, a deadline is at risk, or something is blocked.&lt;/p&gt;
&lt;p&gt;No &quot;all clear&quot; messages, no empty digests. Silence means things are fine.&lt;/p&gt;
&lt;p&gt;These sound strict, and they are. Strict rules are what let you hand over more work without worrying about it.&lt;/p&gt;

Write the scope file: one line per assistant saying what it owns. Share it with all of them.

&lt;h2&gt;What a normal day looks like&lt;/h2&gt;
&lt;p&gt;Once the setup is running, the day changes shape.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Inbox checks run on their own.&lt;/strong&gt; Each area assistant watches its own inbox on a schedule. It sorts, summarizes, and drafts replies. You only hear about it when something needs you.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Routines handle the repeat work.&lt;/strong&gt; Weekly reports, content schedules, renewal reminders, the Monday &quot;what is open&quot; check.&lt;/p&gt;
&lt;p&gt;You write the routine once, in plain words, and it runs on its schedule. If a routine has nothing to report, it stays quiet.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Repeat tasks become saved skills.&lt;/strong&gt; When you notice you are explaining the same steps a second time, save them as a skill. Next time, any assistant can follow the recipe without you walking it through again.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Assistants talk to each other.&lt;/strong&gt; When the content assistant ships a new blog post, it tells the social assistant, which drafts the posts for your review. You do not carry the message between them.&lt;/p&gt;
&lt;figure&gt;
&lt;p&gt;Your job shifts from doing every step to reviewing and deciding. That is where your time is worth the most anyway.&lt;/p&gt;

The next time you explain the same steps a second time, save them as a skill.

&lt;h2&gt;How to set it up for your own business&lt;/h2&gt;
&lt;p&gt;You do not need to build everything at once. In fact, please do not.&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;&lt;strong&gt;List your areas.&lt;/strong&gt; Write down every inbox, chat and tool you check in a week. Group them into three to six areas.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Create one assistant per area.&lt;/strong&gt; Give each a clear name and a one-line job description.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Connect only what each one needs.&lt;/strong&gt; Start with read access where you can. Add write access once you trust it.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Write the scope file.&lt;/strong&gt; One line per assistant. Share it with all of them.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Set the rules.&lt;/strong&gt; Drafts before sends, approval before posting, quiet unless something needs you.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Add a hub last.&lt;/strong&gt; Once you have two or three area assistants, the hub saves you from deciding who owns what.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Add routines slowly.&lt;/strong&gt; One routine at a time. Watch it run for a week before you add the next.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;The order matters. People who start with ten routines and full access usually end up turning it all off after a bad week. People who start small keep going.&lt;/p&gt;

Add one routine. Watch it run for a week before you add the next.

&lt;h2&gt;Mistakes to avoid&lt;/h2&gt;
&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Mistake&lt;/th&gt;
&lt;th&gt;Why it hurts&lt;/th&gt;
&lt;th&gt;Do this instead&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;One assistant for everything&lt;/td&gt;
&lt;td&gt;It gets confused, and one wrong connection can expose all your work.&lt;/td&gt;
&lt;td&gt;One assistant per area.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Too much access too early&lt;/td&gt;
&lt;td&gt;You hand over send or delete before trust is earned.&lt;/td&gt;
&lt;td&gt;Give read access first.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Noisy assistants&lt;/td&gt;
&lt;td&gt;If every assistant pings you every hour, you have just built a new inbox.&lt;/td&gt;
&lt;td&gt;Set &quot;quiet unless needed&quot; from day one.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;No written scopes&lt;/td&gt;
&lt;td&gt;Assistants drift into each other&apos;s work, and you get duplicate or conflicting actions.&lt;/td&gt;
&lt;td&gt;Write the scope file.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Skipping review&lt;/td&gt;
&lt;td&gt;The draft step feels slow at first.&lt;/td&gt;
&lt;td&gt;Keep it. It is still faster than fixing a message you cannot take back.&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;

- Split your work into areas and give each one its own assistant.
- Use permissions, not prompts, to keep information apart.
- Drafts before sends, approval before posting, quiet by default.
- Add a hub once you have a few assistants.
- Start with one boring task you do every day, and hand that over first.

&lt;p&gt;What is the one task you would hand over tomorrow if you knew it could not touch anything else?&lt;/p&gt;
&lt;/figure&gt;&lt;/figure&gt;</content:encoded><category>ai</category><category>ai</category><category>agentic-ai</category><category>ai-engineering</category><category>security</category></item><item><title>Trust is not a QA strategy: test AI code too</title><link>https://ansezz.com/blog/testing-ai-generated-code/</link><guid isPermaLink="true">https://ansezz.com/blog/testing-ai-generated-code/</guid><description>AI code is 95% syntactically clean and fails security tests 45% of the time. Half of agentic PRs ship no tests. The verification pipeline I run instead.</description><pubDate>Sun, 09 Aug 2026 00:00:00 GMT</pubDate><content:encoded>&lt;p&gt;Trust is not a QA strategy.&lt;/p&gt;

- Clean formatting on AI code says nothing about whether it is secure or correct.
- Half of agentic PRs change tested code without touching tests, and most agent-written tests assert almost nothing.
- Gate on the diff: static analysis, diff coverage and mutation testing, with the spec written first.

&lt;p&gt;It does not matter whether you are reviewing a pull request from a junior developer or accepting an entire feature an autonomous agent produced in ninety seconds. The engineering question is identical: does this code actually work, and how do you know?&lt;/p&gt;
&lt;p&gt;Somewhere in the shift to &lt;a href=&quot;https://ansezz.com/blog/agentic-workflows-vibe-coding/&quot;&gt;agentic workflows&lt;/a&gt;, a lot of teams quietly stopped asking the second half of that question.&lt;/p&gt;
&lt;p&gt;LLMs emit code that compiles, lints clean, and reads better than most of what humans write under deadline. So the code &lt;em&gt;looks&lt;/em&gt; reviewed. Teams merge it, ship it, and find out what it does in production.&lt;/p&gt;
&lt;h2&gt;Syntax is not semantics&lt;/h2&gt;
&lt;p&gt;This is the part that catches experienced engineers off guard, because our instincts were trained on human output.&lt;/p&gt;
&lt;p&gt;Human code that looks sloppy usually &lt;em&gt;is&lt;/em&gt; rough, and we review it accordingly. Human code that looks polished usually got there because someone iterated on it, which means someone thought about it. Polish was a proxy for scrutiny.&lt;/p&gt;
&lt;p&gt;LLMs break that correlation completely. Veracode&apos;s &lt;a href=&quot;https://www.veracode.com/blog/spring-2026-genai-code-security/&quot;&gt;Spring 2026 GenAI Code Security update&lt;/a&gt; measured a syntax correctness rate above 95% across the models it tested, against a security pass rate of 55%.&lt;/p&gt;
&lt;p&gt;The code is almost always well-formed. It is secure roughly half the time.&lt;/p&gt;
&lt;p&gt;Formatting stopped carrying any signal about correctness, and most review habits have not caught up.&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;// Generated in one shot. Clean names, correct types, zero lint warnings.
function calculateDiscount(user: User, cartTotal: number): number {
  if (user.isVip) {
    return cartTotal * 0.2;
  }
  return cartTotal * 0.05;
}
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Nothing here is &lt;em&gt;wrong&lt;/em&gt;, exactly. It is just unfinished in ways that only show up under real traffic.&lt;/p&gt;
&lt;p&gt;There is no guard against a negative &lt;code&gt;cartTotal&lt;/code&gt; from a refund flow, no clamp on the maximum discount, no decision about what happens when &lt;code&gt;user&lt;/code&gt; arrives undefined from a cache miss.&lt;/p&gt;
&lt;p&gt;The type signature says those cases cannot happen. The type signature is a claim about the code, not about production.&lt;/p&gt;
&lt;h2&gt;What the data actually says&lt;/h2&gt;
&lt;p&gt;Veracode&apos;s Spring 2026 report evaluated 80 coding tasks across Java, JavaScript, C#, and Python.&lt;/p&gt;
&lt;p&gt;The aggregate numbers are worth internalizing, because the failures are not evenly spread. They cluster hard around exactly the categories where a missing sanitizer is invisible in review.&lt;/p&gt;
&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;CWE category&lt;/th&gt;
&lt;th&gt;Security pass rate&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Insecure cryptography (CWE-327)&lt;/td&gt;
&lt;td&gt;86%&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;SQL injection (CWE-89)&lt;/td&gt;
&lt;td&gt;82%&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Cross-site scripting (CWE-80)&lt;/td&gt;
&lt;td&gt;15%&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Log injection (CWE-117)&lt;/td&gt;
&lt;td&gt;13%&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;h3&gt;Why encoding fails&lt;/h3&gt;
&lt;p&gt;Parameterized queries and modern crypto defaults are baked into the training data. Models get those right most of the time because the safe pattern &lt;em&gt;is&lt;/em&gt; the common pattern.&lt;/p&gt;
&lt;p&gt;Output encoding is contextual. Whether a string needs HTML-escaping, attribute-escaping, or JS-escaping depends on where it lands in the template, and the model cannot see the template from inside the function it is writing. So it guesses, and it guesses wrong about six times out of seven.&lt;/p&gt;
&lt;p&gt;Language matters too. The same report puts Python at a 62% security pass rate and Java at 29%. If your stack is JVM-heavy, the baseline you are working from is worse than the headline number suggests.&lt;/p&gt;
&lt;p&gt;One genuinely encouraging data point: GPT-5 with extended reasoning hit 70 to 72%, the best pass rate Veracode has observed. That is real improvement. It is still a coin flip you would never accept from a human contributor.&lt;/p&gt;

In your next review of agent-written code, check output encoding before anything else. It is the category that fails most.

&lt;h2&gt;The testing gap in agentic pull requests&lt;/h2&gt;
&lt;p&gt;Chat completions are one thing. Autonomous agents opening PRs are another, and this is where the accounting gets uncomfortable.&lt;/p&gt;
&lt;p&gt;A July 2026 empirical study accepted at ICSME, &lt;a href=&quot;https://arxiv.org/abs/2607.18057&quot;&gt;Test Coverage Analysis of Agentic Pull Requests&lt;/a&gt;, analysed 4,882 agent-generated pull requests from the AIDev dataset: 532 Java, 4,350 Python, across five coding agents. Two findings should reshape how you gate merges.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Agents included test changes in only 49.6% of the PRs that touched code under test.&lt;/strong&gt; Not greenfield repos with no test infrastructure: code that already sat inside a test suite, changed without the suite being touched.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Existing test suites did not pick up the slack.&lt;/strong&gt; They executed 61.5% of the agents&apos; changed executable lines in Java and just 27.0% in Python. In 64.8% of Python PRs, &lt;em&gt;not one changed line&lt;/em&gt; was executed by any existing test. The safety net everyone assumes is there is mostly holes.&lt;/p&gt;
&lt;p&gt;Agents optimize for satisfying the prompt. Ask for a checkout feature and you get a controller, a migration, and a view, because that is what &quot;done&quot; looks like from the prompt&apos;s perspective.&lt;/p&gt;
&lt;p&gt;Boundary conditions, negative assertions, and concurrency cases are not in the prompt, so they are not in the diff.&lt;/p&gt;
&lt;h2&gt;Coverage numbers are lying to you&lt;/h2&gt;
&lt;p&gt;Here is the failure mode I see most often: a team wires up a coverage gate, sees 90%, and concludes the AI-authored code is verified.&lt;/p&gt;
&lt;p&gt;Line coverage measures execution, not verification. It tells you a line ran during the test suite. It says nothing about whether anything checked the result.&lt;/p&gt;
&lt;p&gt;A separate 2026 study, &lt;a href=&quot;https://arxiv.org/abs/2606.18168&quot;&gt;All Smoke, No Alarm&lt;/a&gt;, looked specifically at what agent-written tests assert. It covered 86,156 test-file patches from 33,596 agent-authored pull requests spanning 2,807 repositories (Codex, Copilot, Devin, Cursor, and Claude Code).&lt;/p&gt;
&lt;p&gt;80.2% of those patches contained weak or no explicit oracle signals. An agent rewarded for a green build learns very quickly that the cheapest path to green is an assertion that cannot fail.&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;# 100% line coverage on process_payment. Verifies essentially nothing.
def test_process_payment():
    result = process_payment(100)
    assert result is not None
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;That test passes if &lt;code&gt;process_payment&lt;/code&gt; charges the right amount. It also passes if it charges zero, double-charges, returns a stale object, or silently swallows a declined card. Coverage went up. Confidence should not have.&lt;/p&gt;
&lt;h3&gt;Mutation testing is the fix&lt;/h3&gt;
&lt;p&gt;The fix is mutation testing, which measures the thing you actually care about: if I break the code, does a test go red?&lt;/p&gt;
&lt;p&gt;Stryker for JS/TS, Infection for PHP, mutmut for Python, PIT for Java. Mutation score is the only coverage-adjacent metric I have found that agents cannot game by writing more assertions of nothing.&lt;/p&gt;
&lt;h2&gt;Error handling that hides the failure&lt;/h2&gt;
&lt;p&gt;Back in the ICSME coverage study, there is a number that gets less attention than it deserves. Existing tests miss 86.0% of the try/catch blocks agents touch in Java, and 81.0% of Python error-handling constructs. The recovery paths are the least-tested code in the diff.&lt;/p&gt;
&lt;p&gt;This is the worst possible failure shape. A crash is loud, has a stack trace, and pages someone.&lt;/p&gt;
&lt;p&gt;A &lt;code&gt;catch&lt;/code&gt; block that logs a generic string and returns a default value produces a system that keeps running while quietly returning wrong answers. You do not find those in staging. You find them in a reconciliation report three weeks later.&lt;/p&gt;
&lt;p&gt;When you review agent output, read the &lt;code&gt;catch&lt;/code&gt; blocks first. Ask what happens to the caller when the block executes, and whether the log line contains enough context to reconstruct the failure at 3am.&lt;/p&gt;
&lt;p&gt;That question is also the difference between &lt;a href=&quot;https://ansezz.com/blog/logging-vs-monitoring/&quot;&gt;logging and monitoring&lt;/a&gt;: a swallowed exception is logged, and monitored by nobody.&lt;/p&gt;
&lt;h2&gt;The throughput and stability trade&lt;/h2&gt;
&lt;p&gt;The &lt;a href=&quot;https://dora.dev/dora-report-2025/&quot;&gt;2025 DORA State of AI-assisted Software Development&lt;/a&gt; report is the macro version of everything above. Its central finding: higher AI adoption correlates with an increase in delivery throughput &lt;em&gt;and&lt;/em&gt; an increase in delivery instability, at the same time.&lt;/p&gt;
&lt;p&gt;That is not an argument against AI. It is a statement about where the bottleneck moved.&lt;/p&gt;
&lt;p&gt;When change volume goes up and the control systems (automated testing, version control discipline, fast feedback) stay where they were, instability is the arithmetic result. DORA&apos;s own ROI model puts a number on it: in their sample calculation, a change failure rate drifting from 5% to 6% after AI adoption costs $344,000 in downtime.&lt;/p&gt;
&lt;p&gt;AI amplifies whatever your delivery process already was. That is the same trade-off I mapped out in &lt;a href=&quot;https://ansezz.com/blog/ai-vs-traditional-development/&quot;&gt;AI vs traditional development&lt;/a&gt;, now with a large-scale dataset behind it instead of an argument.&lt;/p&gt;
&lt;h2&gt;What I actually measure&lt;/h2&gt;
&lt;p&gt;Coverage percentage is a vanity metric here. These four are not:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Change failure rate, segmented.&lt;/strong&gt; Tag agent-authored PRs at open time and compute CFR separately from human-authored changes. If you cannot split the two, you cannot tell whether AI is helping.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Mutation score on the diff.&lt;/strong&gt; Not the repo: the changed lines. It answers &quot;would a test catch a regression here&quot; directly.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Test-change ratio.&lt;/strong&gt; What share of code-modifying PRs also modify tests. Industry baseline is roughly 50%. Yours should be visible on a dashboard.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Diff coverage, not total coverage.&lt;/strong&gt; Total coverage hides new code behind a large tested legacy base. Diff coverage exposes exactly the lines that just arrived.&lt;/li&gt;
&lt;/ul&gt;

  &lt;div&gt;Total line coverage at 90%, with weak assertions hiding behind a large tested legacy base.&lt;/div&gt;
  &lt;div&gt;Diff coverage, mutation score on the changed lines, and change failure rate split by who wrote the PR.&lt;/div&gt;

&lt;h2&gt;The verification pipeline&lt;/h2&gt;
&lt;figure&gt;
&lt;p&gt;Manual review does not scale against agent output. A reviewer facing 800 lines of plausible-looking code per hour is not reviewing; they are skimming for style.&lt;/p&gt;
&lt;p&gt;The gate has to be automatic, and it has to run on the diff. I make the full case for &lt;a href=&quot;https://ansezz.com/blog/stop-reading-code-ai-review/&quot;&gt;giving up line-by-line reading&lt;/a&gt; separately; this is the tooling that has to exist first.&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;name: Agentic PR gate
on:
  pull_request:
    types: [opened, synchronize, reopened]

jobs:
  sast:
    runs-on: ubuntu-latest
    container:
      image: semgrep/semgrep
    steps:
      - uses: actions/checkout@v5
      - run: semgrep ci --config=p/owasp-top-ten

  diff-coverage:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v5
        with:
          fetch-depth: 0
      - uses: shivammathur/setup-php@v2
        with:
          php-version: &quot;8.4&quot;
          coverage: pcov
      - run: composer install --no-interaction --prefer-dist
      - run: vendor/bin/phpunit --coverage-cobertura=coverage.xml
      - run: pipx install diff-cover
      # Fail on new lines that no test executes — total coverage is irrelevant here.
      - run: diff-cover coverage.xml --compare-branch=origin/${{ github.base_ref }} --fail-under=90

  mutation:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v5
        with:
          fetch-depth: 0
      - uses: shivammathur/setup-php@v2
        with:
          php-version: &quot;8.4&quot;
          coverage: pcov
      - run: composer install --no-interaction --prefer-dist
      # Mutate only the changed files, and require tests to actually kill the mutants.
      - run: |
          vendor/bin/infection \
            --git-diff-filter=AM \
            --git-diff-base=origin/${{ github.base_ref }} \
            --min-msi=70 \
            --threads=max
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Three layers, each catching what the previous one cannot:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Semgrep&apos;s OWASP ruleset catches the XSS and injection patterns that dominate the failure table above.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;diff-cover&lt;/code&gt; refuses the PR where new lines are unexecuted.&lt;/li&gt;
&lt;li&gt;Infection refuses the PR where new lines are executed but unasserted: the oracle problem, enforced by a machine rather than by a tired reviewer.&lt;/li&gt;
&lt;/ul&gt;

Add the `diff-cover` job from the workflow above to one repo this week, and see how many recent agent PRs it would have blocked.

&lt;h3&gt;Two practices upstream of the pipeline&lt;/h3&gt;
&lt;p&gt;These two are worth more than any of it:&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Write the spec first.&lt;/strong&gt; Give the agent the test file, the OpenAPI schema, or the behavioral contract before it writes the implementation. It is much better at satisfying an explicit oracle than at inventing one, and you keep authorship of the definition of correct.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Give the agent real context.&lt;/strong&gt; A large share of the XSS failures come from the model not being able to see the rendering context. Wiring your agent into the actual schema, actual codebase, and actual docs (the &lt;a href=&quot;https://ansezz.com/blog/claude-mcp-dev-tools/&quot;&gt;MCP tooling story&lt;/a&gt;) measurably reduces guessing. It reduces it. It does not remove the need to verify.&lt;/p&gt;
&lt;figure&gt;
&lt;p&gt;None of this is an argument for writing code by hand. I ship agent-authored code every week.&lt;/p&gt;
&lt;p&gt;The argument is that verification is the part of the job that did not get automated, and pretending otherwise just moves the discovery of your bugs from CI to your customers.&lt;/p&gt;
&lt;p&gt;If the only thing between an agent-authored PR and production today is &quot;a human skimming the diff,&quot; that is worth fixing this quarter. &lt;a href=&quot;https://ansezz.com/contact/&quot;&gt;Tell me what your stack looks like&lt;/a&gt; and I will tell you where I would put the first gate. 🤘&lt;/p&gt;

- **Polish stopped being a proxy for scrutiny.** 95% syntax correctness against a 55% security pass rate means clean formatting now tells you nothing about whether the logic holds.
- **Failures cluster in context-dependent categories.** Crypto and SQL injection pass 82 to 86% of the time. XSS and log injection pass 13 to 15%. Review output encoding first.
- **Half of agentic PRs touch code without touching tests**, and existing suites execute as little as 27% of the changed lines. Gate on test presence, not good intentions.
- **Mutation score over line coverage.** 80.2% of agent-written test patches carry weak or absent oracles. Only mutation testing catches an assertion that cannot fail.
- **Read the catch blocks first.** Test suites miss over 80% of the error-handling paths agents touch, which means the likely production symptom is a wrong answer, not a crash.

&lt;p&gt;What is currently standing between an agent-authored PR and production in your pipeline?&lt;/p&gt;
&lt;/figure&gt;&lt;/figure&gt;</content:encoded><category>ai</category><category>ai</category><category>code-quality</category><category>agentic-ai</category><category>ci-cd</category></item><item><title>AI coding is like an addiction (in the best way)</title><link>https://ansezz.com/blog/ai-coding-workflow-levels/</link><guid isPermaLink="true">https://ansezz.com/blog/ai-coding-workflow-levels/</guid><description>A level-by-level map of the AI coding workflow: gateway prompts, codebase RAG, then multi-agent orchestration over MCP, and why manual coding now drags.</description><pubDate>Sat, 01 Aug 2026 00:00:00 GMT</pubDate><content:encoded>&lt;p&gt;AI coding is strangely addictive.&lt;/p&gt;

- AI coding grows in levels: gateway prompts, then codebase context and RAG, then multi-agent loops over MCP.
- Context is what changes the output. Specs, tests and pgvector memory beat clever prompts.
- Split the agents so the one writing the code is never the only one grading it.

&lt;p&gt;You start with a single prompt to fix a regex or center a div. You tell yourself it&apos;s a one-time thing to save ten minutes.&lt;/p&gt;
&lt;p&gt;Then you watch it refactor an entire &lt;strong&gt;Laravel&lt;/strong&gt; controller in seconds. Suddenly you&apos;re asking it to write your unit tests. Before long you&apos;re building custom agents that manage a &lt;strong&gt;Shopify&lt;/strong&gt; store over &lt;strong&gt;GraphQL&lt;/strong&gt;.&lt;/p&gt;
&lt;p&gt;The shift happens slowly at first. Then all at once.&lt;/p&gt;
&lt;h2&gt;The real problem is blank-page fatigue&lt;/h2&gt;
&lt;p&gt;The problem it solves for most of us isn&apos;t typing speed. It&apos;s blank-page fatigue. Staring at a legacy codebase or a fresh architecture doc feels like a mountain of manual labor.&lt;/p&gt;
&lt;p&gt;You burn hours on boilerplate instead of business logic. That friction is where motivation goes to die.&lt;/p&gt;
&lt;p&gt;And the cost of not evolving compounds. Coding without AI in 2026 feels like writing a book with a quill while everyone else runs a word processor. It isn&apos;t only speed. It&apos;s &lt;strong&gt;cognitive load&lt;/strong&gt;. Energy spent on syntax and API nuance is energy not spent on architecture and strategy.&lt;/p&gt;
&lt;p&gt;The answer isn&apos;t &quot;use AI.&quot; It&apos;s building a structured &lt;strong&gt;AI coding workflow&lt;/strong&gt;: moving from passive user to engineer who orchestrates systems. Once you&apos;ve felt a multi-agent loop close on its own, there&apos;s no going back.&lt;/p&gt;
&lt;h2&gt;Levels 1 to 5: the gateway prompts&lt;/h2&gt;
&lt;p&gt;Almost everyone starts here. You treat the model like an interactive Stack Overflow. Paste a snippet, ask for a fix, move on.&lt;/p&gt;
&lt;p&gt;At &lt;strong&gt;Level 1&lt;/strong&gt; you&apos;re generating small functions and boilerplate. At &lt;strong&gt;Level 5&lt;/strong&gt; you&apos;re debugging. Instead of manually scanning logs, you drop a stack trace into a chat and get a diagnosis. That alone saves real hours.&lt;/p&gt;
&lt;p&gt;But you&apos;re still stuck in the copy-paste loop. You write the code. The AI patches the errors. It&apos;s a helpful assistant that has no idea what you&apos;re building.&lt;/p&gt;
&lt;p&gt;The trap at this level is letting the model freestyle without context. Escaping it means writing specs instead of wishes. You stop saying &quot;fix this&quot; and start saying something like the right side here:&lt;/p&gt;

  &lt;div&gt;&quot;Fix this.&quot;&lt;/div&gt;
  &lt;div&gt;&quot;Refactor this Laravel service to follow the Repository pattern, keep the existing public method signatures, and make sure database exceptions surface as domain exceptions.&quot;&lt;/div&gt;

&lt;p&gt;Same model. Completely different output.&lt;/p&gt;
&lt;h2&gt;Levels 10 to 20: building context&lt;/h2&gt;
&lt;p&gt;At this stage you realize the model is only as good as the information it can see. Isolated chat windows stop being enough.&lt;/p&gt;
&lt;p&gt;You start using tools that read your whole codebase. This is the point where the &lt;a href=&quot;https://ansezz.com/blog/ai-vs-traditional-development/&quot;&gt;AI vs traditional development&lt;/a&gt; question stops being philosophical and turns into a workflow decision.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Level 10&lt;/strong&gt; is tests. Writing unit tests is usually the chore you postpone; AI makes it fast. A full &lt;strong&gt;Pest&lt;/strong&gt; or &lt;strong&gt;PHPUnit&lt;/strong&gt; suite for a Laravel feature drops in seconds.&lt;/p&gt;
&lt;p&gt;You&apos;re not just producing code anymore. You&apos;re producing a safety net that lets the agents at higher levels move fast without wrecking things.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Level 20&lt;/strong&gt; is when the AI actually knows your codebase. Codebase indexing, embeddings, RAG. The model retrieves the three files that matter instead of guessing from the file tree.&lt;/p&gt;
&lt;p&gt;Many teams go further and stand up a local &lt;strong&gt;pgvector&lt;/strong&gt; database holding internal docs, ADRs, and runbooks. It&apos;s the same retrieval discipline behind the &lt;a href=&quot;https://ansezz.com/blog/7-rag-mistakes-production/&quot;&gt;7 mistakes wrecking your production RAG stack&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;The payoff is that you stop re-explaining your architecture in every session. Your event-driven layer, your custom service container bindings, your weird legacy billing table: the agent looks it up.&lt;/p&gt;
&lt;figure&gt;
&lt;h2&gt;Level 50+: the agentic shift&lt;/h2&gt;
&lt;p&gt;This is where the addiction matures into an engineering practice. You&apos;re no longer chatting with a model. You&apos;re building systems that act on your behalf.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Level 50&lt;/strong&gt; is the &lt;a href=&quot;https://ansezz.com/blog/claude-mcp-dev-tools/&quot;&gt;Model Context Protocol&lt;/a&gt;. MCP lets agents connect to real tools: the Shopify Admin GraphQL API, your database, your cloud infrastructure.&lt;/p&gt;
&lt;p&gt;It&apos;s the same plumbing behind &lt;a href=&quot;https://ansezz.com/blog/agentic-commerce-shopify/&quot;&gt;agentic commerce on Shopify&lt;/a&gt;, pointed at your own workflow instead of at a shopper. An agent can watch incoming orders and adjust inventory according to rules you described in plain language, because it holds an actual connection instead of a description of one.&lt;/p&gt;
&lt;p&gt;The Level 50 loop I actually run looks like this:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;&lt;strong&gt;Plan.&lt;/strong&gt; You write a technical spec in markdown: scope, constraints, acceptance criteria.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Execute.&lt;/strong&gt; An agent reads the spec and generates the Laravel migrations, models, and controllers.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Verify.&lt;/strong&gt; A &lt;em&gt;separate&lt;/em&gt; agent writes tests and runs them until they pass.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Deploy.&lt;/strong&gt; A deployment agent ships to a &lt;a href=&quot;https://ansezz.com/blog/coolify-self-hosted-saas/&quot;&gt;Coolify instance&lt;/a&gt; and tails the logs for errors.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;You become the conductor. You own the &lt;em&gt;what&lt;/em&gt; and the &lt;em&gt;why&lt;/em&gt;; the agents grind through the &lt;em&gt;how&lt;/em&gt;.&lt;/p&gt;
&lt;h3&gt;Why the separate verifier matters&lt;/h3&gt;
&lt;p&gt;The separation in step 3 matters more than it looks.&lt;/p&gt;
&lt;p&gt;An agent that writes both the implementation and its tests will happily write tests that pass against its own bug.&lt;/p&gt;
&lt;p&gt;Two agents with different context catch what one agent rationalizes away.&lt;/p&gt;
&lt;p&gt;That is why I stopped reading diffs line by line and moved to a &lt;a href=&quot;https://ansezz.com/blog/stop-reading-code-ai-review/&quot;&gt;multi-agent review pipeline&lt;/a&gt;, and why &lt;a href=&quot;https://ansezz.com/blog/testing-ai-generated-code/&quot;&gt;AI-generated code still needs its own test discipline&lt;/a&gt;.&lt;/p&gt;
&lt;figure&gt;
&lt;h2&gt;Why manual coding feels slow now&lt;/h2&gt;
&lt;p&gt;Once you&apos;ve run an agentic workflow, the friction of manual coding becomes physically annoying. Five-minute tasks feel like an eternity.&lt;/p&gt;
&lt;p&gt;Hunting the correct GraphQL mutation shape for a Shopify app feels absurd when an agent with schema access resolves it in two seconds.&lt;/p&gt;
&lt;p&gt;The addiction isn&apos;t to the tool. It&apos;s to &lt;strong&gt;flow&lt;/strong&gt;. AI removes the micro-frictions that shatter concentration: the doc lookup, the typo, the forgotten import, the &quot;wait, what&apos;s this method called again.&quot; You stay in a high-level creative state for longer stretches, so you solve bigger problems.&lt;/p&gt;
&lt;p&gt;It also quietly redefines what senior means. Not knowing every syntax detail from memory. Knowing how to decompose a system, and how to steer an AI into building it correctly. Builder to architect.&lt;/p&gt;
&lt;h2&gt;Practical steps to level up&lt;/h2&gt;
&lt;p&gt;You don&apos;t drift into Level 50. You have to build the infrastructure for it.&lt;/p&gt;
&lt;h3&gt;1. Master MCP&lt;/h3&gt;
&lt;p&gt;Start with custom MCP servers for the tasks you repeat weekly. If you work on Shopify apps, expose a tool that queries your store&apos;s Admin GraphQL API directly, and another that validates a mutation against the current schema version.&lt;/p&gt;
&lt;p&gt;That single step kills most of the copy-paste in your day. Keep the surface small. Every extra tool is context tax and one more thing the agent can misuse.&lt;/p&gt;

Pick one task you repeat every week and wrap it in a single small MCP tool. Use it for a week before adding a second one.

&lt;h3&gt;2. Implement RAG over your codebase&lt;/h3&gt;
&lt;p&gt;Don&apos;t rely on general knowledge for project-specific questions. Index your project.&lt;/p&gt;
&lt;p&gt;If you&apos;re running a Laravel SaaS, make sure the agent can retrieve your service-layer conventions and your event contracts, not just guess from &lt;code&gt;app/&lt;/code&gt;. Storing documentation embeddings in &lt;strong&gt;pgvector&lt;/strong&gt; is the cheapest long-term memory you&apos;ll ever buy, and it lives in the Postgres you already run.&lt;/p&gt;
&lt;h3&gt;3. Use multi-agent orchestration&lt;/h3&gt;
&lt;p&gt;Stop thinking about one AI and start thinking about a team. Planner, implementer, reviewer.&lt;/p&gt;
&lt;p&gt;Separation of concerns produces better code and fewer hallucinations, for the same reason it does with humans: the reviewer isn&apos;t emotionally invested in the plan.&lt;/p&gt;
&lt;h3&gt;4. Optimize for Shopify GraphQL&lt;/h3&gt;
&lt;p&gt;Shopify has moved on from REST for new development. Make sure your agents target the current &lt;strong&gt;GraphQL Admin API&lt;/strong&gt; version and don&apos;t reach for deprecated fields they memorized from a 2023 blog post.&lt;/p&gt;
&lt;p&gt;Pin the API version explicitly in your prompts and your client. Schema drift is the single most common source of confidently wrong Shopify code.&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;// Example of a Laravel service using a Shopify GraphQL mutation.
// An agent writes the boilerplate; your spec dictates the contract.
public function updateProductInventory(string $inventoryItemId, int $newQuantity)
{
    $mutation = &amp;lt;&amp;lt;&amp;lt;&apos;GRAPHQL&apos;
    mutation inventorySetQuantities(
      $input: InventorySetQuantitiesInput!
      $idempotencyKey: String!
    ) {
      inventorySetQuantities(input: $input) @idempotent(key: $idempotencyKey) {
        inventoryAdjustmentGroup {
          createdAt
          reason
          changes {
            name
            delta
            quantityAfterChange
          }
        }
        userErrors {
          code
          field
          message
        }
      }
    }
    GRAPHQL;

    $variables = [
        &apos;idempotencyKey&apos; =&amp;gt; (string) \Illuminate\Support\Str::uuid(),
        &apos;input&apos; =&amp;gt; [
            &apos;name&apos; =&amp;gt; &apos;available&apos;,
            &apos;reason&apos; =&amp;gt; &apos;correction&apos;,
            // Required on current Admin API: compare-and-set. null skips the check.
            &apos;quantities&apos; =&amp;gt; [
                [
                    &apos;inventoryItemId&apos; =&amp;gt; $inventoryItemId,
                    &apos;locationId&apos; =&amp;gt; config(&apos;shopify.default_location_id&apos;),
                    &apos;quantity&apos; =&amp;gt; $newQuantity,
                    &apos;changeFromQuantity&apos; =&amp;gt; null,
                ],
            ],
        ],
    ];

    return $this-&amp;gt;shopifyClient-&amp;gt;query($mutation, $variables);
}
&lt;/code&gt;&lt;/pre&gt;
&lt;h2&gt;What schema drift breaks&lt;/h2&gt;
&lt;p&gt;Two details in there are exactly the kind of thing schema drift breaks.&lt;/p&gt;
&lt;p&gt;The &lt;code&gt;@idempotent&lt;/code&gt; directive arrived as optional in API version &lt;code&gt;2026-01&lt;/code&gt; and became &lt;strong&gt;required&lt;/strong&gt; in &lt;code&gt;2026-04&lt;/code&gt;. Any agent working from a 2024 blog post will emit this mutation without it and get rejected outright.&lt;/p&gt;
&lt;p&gt;Worse, a model that half-remembers the shape will reach for &lt;code&gt;inventorySetQuantity&lt;/code&gt; (singular), which isn&apos;t a mutation in the current schema at all.&lt;/p&gt;
&lt;p&gt;And note &lt;code&gt;userErrors&lt;/code&gt;. Shopify returns a &lt;code&gt;200&lt;/code&gt; with a populated &lt;code&gt;userErrors&lt;/code&gt; array for most business-rule failures, so an agent that only checks HTTP status will report success on a write that silently did nothing.&lt;/p&gt;
&lt;p&gt;Bake both rules into your spec once and every generated mutation inherits them.&lt;/p&gt;

Add two lines to your agent spec: &quot;always send `@idempotent` with a key&quot; and &quot;treat a non-empty `userErrors` as a failure.&quot; Then regenerate one mutation and compare.


- **Start small, aim high.** Level 1 prompts are a doorway, not a destination. The value lives in the loops.
- **Context is king.** RAG and pgvector give the model specific knowledge of your codebase and business rules instead of internet averages.
- **Embrace MCP.** Real tool connections (Shopify GraphQL, your database, your infrastructure) beat pasted screenshots every time.
- **Split the agents.** Whoever writes the code should not be the only one grading it.
- **Standardize the loop.** Plan, execute, verify, deploy. The structure is what keeps quality from collapsing as speed goes up.
- **Focus on architecture.** As implementation gets cheap, your value moves to design, constraints, and judgment.

&lt;p&gt;The hardest part of AI coding isn&apos;t the learning curve. It&apos;s realizing you can&apos;t go back. You&apos;ve tasted a different level of efficiency and the old way now looks like manual labor.&lt;/p&gt;
&lt;p&gt;This isn&apos;t about replacing yourself. It&apos;s about amplifying yourself until you&apos;re doing the work of a team.&lt;/p&gt;
&lt;p&gt;If you want to compare agent stacks, &lt;a href=&quot;https://ansezz.com/contact/&quot;&gt;get in touch&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;How are you structuring your AI coding workflow beyond simple chat prompts?&lt;/strong&gt;&lt;/p&gt;
&lt;/figure&gt;&lt;/figure&gt;</content:encoded><category>ai</category><category>shopify</category><category>laravel</category><category>code-quality</category><category>vibe-coding</category><category>pgvector</category><category>claude</category><category>mcp</category></item><item><title>Stop reading every line of AI-generated code</title><link>https://ansezz.com/blog/stop-reading-code-ai-review/</link><guid isPermaLink="true">https://ansezz.com/blog/stop-reading-code-ai-review/</guid><description>Line-by-line review breaks on agent-sized diffs. How I moved to specs, property tests, and a multi-agent review pipeline, and the 3% I still read.</description><pubDate>Thu, 30 Jul 2026 00:00:00 GMT</pubDate><content:encoded>&lt;p&gt;Nobody wants to read a 5,000-line diff.&lt;/p&gt;

- Human review works in chunks of a few hundred lines. Agent diffs blow past that, so line-by-line reading turns into theater.
- Move the gate to specs, property tests, contract tests and machine-checked rules, then let narrow review agents run in CI.
- I still open migrations, auth and permissions, money paths, new seams and anything nobody asked for.

&lt;p&gt;But that is what lands in the pull request when an agent spends an afternoon refactoring a legacy service or scaffolding a new Laravel module end to end.&lt;/p&gt;
&lt;p&gt;The failure mode that follows is worth naming precisely, because it does not look like failure while it is happening.&lt;/p&gt;
&lt;p&gt;An agent scaffolds a multi-tenant module in one pass: migrations, models, policies, jobs, tests. The diff is correct, mostly. You spend two evenings reading it line by line and approve it.&lt;/p&gt;
&lt;p&gt;Weeks later something breaks in production: a queued job that ran outside the tenant scope. You read that file. You read that exact method. Your eyes went over it and your brain filed it as &quot;looks like the other ones.&quot;&lt;/p&gt;
&lt;p&gt;It feels like diligence. It is theater.&lt;/p&gt;
&lt;h2&gt;Where line-by-line review actually breaks&lt;/h2&gt;
&lt;p&gt;Code review guidance has been consistent for two decades: reviewers find defects reliably in chunks of roughly 200 to 400 lines, and effectiveness drops sharply past that.&lt;/p&gt;
&lt;p&gt;Nothing about that number has changed because we bolted an LLM onto the front of the process. Human attention is the constant. The volume of code is the variable, and it just went up by an order of magnitude.&lt;/p&gt;
&lt;p&gt;Three things go wrong when you push past that limit:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;You review syntax, not semantics.&lt;/strong&gt; Naming, formatting, and shape are cheap to evaluate, so tired brains drift toward them. A perfectly formatted diff can still ship an N+1 query, a missing index, or a broken state machine.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;You lose the cross-file thread.&lt;/strong&gt; The bug is almost never in the file you are reading. It is in the interaction between the job, the observer, and the tenant scope: three files you looked at twenty minutes apart.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;You pattern-match against yourself.&lt;/strong&gt; Agent-generated code is internally consistent. That consistency reads as correctness. Every file looks like the last one, so your reviewer instinct stops firing.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;None of this is new. What changed is that we used to write code slowly enough that review capacity roughly matched output.&lt;/p&gt;
&lt;p&gt;That coupling is gone. Generation scales with tokens; reading scales with eyeballs.&lt;/p&gt;
&lt;figure&gt;
&lt;h2&gt;What agents do better, and what they don&apos;t&lt;/h2&gt;
&lt;p&gt;A review agent pointed at a repository does not read files the way you do. Given the right tooling it walks the AST, follows call graphs, and traces a value from a controller through a service into a model and out to an external API.&lt;/p&gt;
&lt;p&gt;It does that for file forty with the same attention it gave file one.&lt;/p&gt;
&lt;p&gt;That is the real advantage: &lt;strong&gt;breadth and consistency&lt;/strong&gt;, not intelligence. An agent will happily check all 340 controller actions for a missing authorization call. You will check the twelve you remember.&lt;/p&gt;
&lt;p&gt;I want to be equally clear about the other side, because &quot;agents review better than humans&quot; is a bad summary of what I actually believe:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Agents hallucinate findings. They will confidently flag a race condition that cannot occur, and the fix they suggest can be worse than the code.&lt;/li&gt;
&lt;li&gt;Agents have no idea whether the feature should exist. Product intent is not in the diff.&lt;/li&gt;
&lt;li&gt;Agents are weak on the thing that only shows up at runtime under load: the query that is fine with 200 rows and fatal with 2 million.&lt;/li&gt;
&lt;li&gt;An agent reviewing code written by the same model family shares its blind spots.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;So the move is not &quot;trust the agent instead of your eyes.&quot; It is: give the agent the work that scales with volume, and keep for yourself the work that scales with judgment.&lt;/p&gt;
&lt;p&gt;That split is the same one I drew in &lt;a href=&quot;https://ansezz.com/blog/ai-vs-traditional-development/&quot;&gt;AI vs traditional development&lt;/a&gt;. The boundary moved; it did not disappear.&lt;/p&gt;
&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Dimension&lt;/th&gt;
&lt;th&gt;Human line-by-line review&lt;/th&gt;
&lt;th&gt;Agentic verification&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Effective scope&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;A few hundred lines before quality drops&lt;/td&gt;
&lt;td&gt;Whole repository, via AST and call-graph traversal&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Consistency&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Degrades with fatigue and diff size&lt;/td&gt;
&lt;td&gt;Same checks applied to file 1 and file 400&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Typical focus&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Style, naming, local logic&lt;/td&gt;
&lt;td&gt;Invariants, contracts, types, test outcomes&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Failure mode&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Misses cross-file interactions, rubber-stamps&lt;/td&gt;
&lt;td&gt;Confident false positives, misses product intent&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Cycle time&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Hours to days&lt;/td&gt;
&lt;td&gt;Minutes, on every push&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;h2&gt;The shift: own the spec, not the syntax&lt;/h2&gt;
&lt;p&gt;If you are not reading the code, something else has to hold the line. For me that is the specification layer, and writing it now pays off more than anything else I do on an agent-assisted project.&lt;/p&gt;
&lt;p&gt;Concretely, that means:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Executable acceptance criteria.&lt;/strong&gt; Not a Notion doc. Feature tests that fail before the agent starts and pass when it is done.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Property-based tests for anything with arithmetic or state.&lt;/strong&gt; Pricing, proration, inventory, refunds. Instead of three examples, assert the invariant: a refund never exceeds the captured amount, total allocated inventory never exceeds stock on hand.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Contract tests at every boundary.&lt;/strong&gt; Webhook payloads, third-party API responses, queue message shapes. This is where agent code fails quietly, because the happy path is the only path in the training data.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Machine-checkable rules for the things I keep repeating.&lt;/strong&gt; Static analysis at a strict level, an architecture-test suite asserting &quot;no job may run without a tenant context,&quot; a lint rule for direct DB access outside repositories.&lt;/li&gt;
&lt;/ul&gt;
&lt;h3&gt;Turn repeated comments into rules&lt;/h3&gt;
&lt;p&gt;That last one is the real trick. Every review comment I would type twice becomes a rule instead.&lt;/p&gt;
&lt;p&gt;If the agent can violate an invariant and the pipeline stays green, that is my bug, not the agent&apos;s.&lt;/p&gt;
&lt;p&gt;The numbers behind why this layer is non-negotiable, and the CI configuration I run, are in &lt;a href=&quot;https://ansezz.com/blog/testing-ai-generated-code/&quot;&gt;test AI code too&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;When a check fails, I do not hand-patch the file. I fix the prompt, tighten the spec, or add the missing rule, then re-run.&lt;/p&gt;
&lt;p&gt;That loop is the practical core of &lt;a href=&quot;https://ansezz.com/blog/agentic-workflows-vibe-coding/&quot;&gt;agentic workflows&lt;/a&gt;, and it only works if the feedback the agent receives is precise. Vague context produces vague code, the point I made in &lt;a href=&quot;https://ansezz.com/blog/prompt-engineering-vs-context-engineering/&quot;&gt;prompt engineering vs context engineering&lt;/a&gt;.&lt;/p&gt;

Scroll through your last ten review comments. Any comment you wrote twice is a candidate for a test, a static-analysis level or an architecture test.

&lt;h2&gt;A multi-agent review pipeline that earns its cost&lt;/h2&gt;
&lt;p&gt;One giant &quot;review this PR&quot; prompt produces mush. Narrow agents with narrow briefs produce findings you can act on.&lt;/p&gt;
&lt;p&gt;This is the verify stage of the &lt;a href=&quot;https://ansezz.com/blog/ai-coding-workflow-levels/&quot;&gt;plan, execute, verify, deploy loop&lt;/a&gt;, and it deserves its own agents for the same reason it deserves its own step. The setup I run now has three, and they all execute inside CI rather than in my editor:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;&lt;strong&gt;Correctness.&lt;/strong&gt; Runs the suite, static analysis, and the architecture tests. Then reviews the diff strictly against the written acceptance criteria; its brief explicitly forbids style commentary. Output: does this satisfy the spec, and where does it not.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Security.&lt;/strong&gt; Injection paths, authorization gaps on new routes, secrets in config, unsafe deserialization, mass-assignment on new models, anything touching a webhook signature. This one gets the OWASP-shaped checklist and nothing else.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Regression.&lt;/strong&gt; Diffs behavior against the previous stable build. It reads the migration files, flags schema changes without a rollback path, hunts for queries added to hot code paths, and cross-references the touched files against past incident history.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;Each agent needs real access to be useful: the schema, the logs, the actual test output, not a pasted snippet. That is exactly the problem &lt;a href=&quot;https://ansezz.com/blog/claude-mcp-dev-tools/&quot;&gt;MCP servers&lt;/a&gt; solve, and it is the difference between a reviewer that guesses and one that checks.&lt;/p&gt;
&lt;h3&gt;Two rules that keep it quiet&lt;/h3&gt;
&lt;p&gt;First, findings are severity-ranked and anything below &quot;would break in production&quot; goes to a comment, never a block.&lt;/p&gt;
&lt;p&gt;Second, a second agent tries to &lt;em&gt;refute&lt;/em&gt; each finding before I see it. A large share of the initial findings die there, and they are exactly the ones that would otherwise burn an afternoon.&lt;/p&gt;
&lt;figure&gt;
&lt;h2&gt;The loop&lt;/h2&gt;
&lt;p&gt;The pipeline is only worth building if it closes without me in the middle of it:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;[Spec + tests] --&amp;gt; [Agent generates] --&amp;gt; [Static analysis + type checks]
                          ^                          |
                          |                          v
                   [Self-correction] &amp;lt;-- [Test suite + review agents]
                          |
                          v (all green)
                   [Human: seams review] --&amp;gt; [Merge / deploy]
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Failures feed back into the agent&apos;s context automatically. I only see the branch once it is green.&lt;/p&gt;
&lt;p&gt;That is the same discipline that makes &lt;a href=&quot;https://ansezz.com/blog/ci-vs-cd/&quot;&gt;CI and CD&lt;/a&gt; work in the first place: the pipeline is the gate, not the reviewer&apos;s inbox.&lt;/p&gt;
&lt;h2&gt;What I still read myself&lt;/h2&gt;
&lt;p&gt;&quot;Stop reading code&quot; is a slogan, and taken literally it is wrong. Here is my actual list of things I open every time, no matter how green the pipeline is:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Migrations.&lt;/strong&gt; Anything irreversible or lock-heavy on a large table.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Auth and permission boundaries.&lt;/strong&gt; Policies, scopes, middleware, anything that decides who sees what.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Money paths.&lt;/strong&gt; Charges, refunds, discounts, tax, billing webhooks. Tests are necessary here and not sufficient.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;New architectural seams.&lt;/strong&gt; A new queue, a new external dependency, a new cache layer. The code may be fine; the decision may not be.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Anything the agent changed that nobody asked it to change.&lt;/strong&gt; Unrequested scope is the loudest smell in agent diffs.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;That list is maybe 3% of a large diff. Reading 3% carefully beats skimming 100%, and it is the part where my decade of production scars actually transfers.&lt;/p&gt;
&lt;p&gt;The rest (the 340 controller actions, the DTO fields, the test scaffolding) is machine work, and I stopped pretending otherwise.&lt;/p&gt;

On your next large agent PR, open only the files on that list. Note how much of the diff that covers.


- **Line-by-line review does not scale to agent-sized diffs.** Past a few hundred lines you are performing diligence, not doing it.
- **Use agents for breadth, not judgment.** Cross-file tracing and repeated checks are their edge; product intent and architectural taste are not.
- **Convert review comments into rules.** Anything you would say twice belongs in a test, a static-analysis level, or an architecture test.
- **Split the review agent into narrow briefs** (correctness, security, regression) and make a second pass try to refute each finding before it reaches you.
- **Keep a short human read list:** migrations, auth, money, new seams, unrequested changes.

&lt;p&gt;The uncomfortable question is what your team&apos;s review process is actually for. If it exists to catch defects, most of it should be automated by now. If it exists to spread knowledge, say that out loud and redesign it around that goal instead.&lt;/p&gt;
&lt;p&gt;Where does your review process still depend on someone reading every line, and what would it take to turn that into a check? Tell me via &lt;a href=&quot;https://ansezz.com/contact/&quot;&gt;contact&lt;/a&gt;, I collect these. 🤘&lt;/p&gt;
&lt;/figure&gt;&lt;/figure&gt;</content:encoded><category>ai</category><category>code-quality</category><category>agentic-ai</category><category>ci-cd</category><category>architecture</category></item><item><title>Vibe coding vs agentic engineering: which ships?</title><link>https://ansezz.com/blog/vibe-coding-vs-agentic-engineering/</link><guid isPermaLink="true">https://ansezz.com/blog/vibe-coding-vs-agentic-engineering/</guid><description>Vibe coding is for prototypes, agentic engineering is for production. The daily split I use to ship AI-written code without hidden technical debt.</description><pubDate>Fri, 24 Jul 2026 00:00:00 GMT</pubDate><content:encoded>&lt;p&gt;The era of manual syntax is over.&lt;/p&gt;

- Vibe coding is for discovery: fast prototypes and spikes whose code you throw away.
- Agentic engineering is for production: a written spec, tests and agents reviewing each other&apos;s diffs before anything merges.
- Split the day between the two, and never let the morning branch merge.

&lt;p&gt;In 2026 the question is no longer whether AI writes your code. It&apos;s how you govern the AI that does.&lt;/p&gt;
&lt;p&gt;Most developers I talk to are caught between two modes: the high-speed thrill of vibe coding and the slower discipline of agentic engineering.&lt;/p&gt;
&lt;p&gt;Both are real. Both work. But they don&apos;t work for the same job.&lt;/p&gt;
&lt;p&gt;Vibe coding will conjure a working application in an afternoon. Agentic engineering is what makes that application survive contact with production. Shipping in 2026 means knowing which one you&apos;re in at any given moment, and stopping the vibes before they reach &lt;code&gt;main&lt;/code&gt;.&lt;/p&gt;
&lt;h2&gt;The rise and fall of vibe coding&lt;/h2&gt;
&lt;p&gt;Vibe coding was the breakout habit of 2025. It&apos;s a conversational approach where the feel of the interaction takes precedence over the underlying architecture.&lt;/p&gt;
&lt;p&gt;You describe a feature, the model returns a large block of code, you run it to see whether it works. It breaks, you paste the stack trace back, you ask for a fix. Repeat.&lt;/p&gt;
&lt;p&gt;That cycle is fast. It&apos;s addictive. It feels like magic right up until you try to scale a system built entirely on vibes.&lt;/p&gt;
&lt;p&gt;The real problem isn&apos;t the code quality; models are good now. The problem is that vibe coding is &lt;strong&gt;development without verification&lt;/strong&gt;.&lt;/p&gt;
&lt;p&gt;When the model hands you 500 lines and you ship because it looks right, you&apos;re operating on faith.&lt;/p&gt;
&lt;p&gt;You&apos;ve moved the bottleneck from typing to reviewing, and then you skipped the reviewing.&lt;/p&gt;
&lt;h3&gt;Where it still helps&lt;/h3&gt;
&lt;p&gt;None of that makes it useless. The first pass of a Shopify storefront section or a Laravel reporting dashboard can come together in an afternoon this way.&lt;/p&gt;
&lt;p&gt;The trouble shows up six weeks later: no tests, three competing patterns for the same problem, and a &lt;code&gt;Controller&lt;/code&gt; doing the job of a service, a job, and a repository.&lt;/p&gt;
&lt;p&gt;That&apos;s not a code problem, it&apos;s a process problem. It&apos;s the same failure mode I wrote about in &lt;a href=&quot;https://ansezz.com/blog/vibe-coding/&quot;&gt;why projects need more than just logic&lt;/a&gt;.&lt;/p&gt;
&lt;h2&gt;Agentic engineering: the architecture of intent&lt;/h2&gt;
&lt;p&gt;Agentic engineering is the professional evolution of the same tooling. It isn&apos;t chatting with a single model. It&apos;s running a system of agents that plan, implement, test, and review under your supervision. Your role changes from coder to architect of intent.&lt;/p&gt;
&lt;p&gt;In an agentic workflow you supply a specification, not a vibe: the requirement, the architectural constraints, the acceptance criteria.&lt;/p&gt;
&lt;p&gt;The system decomposes it. One agent researches the API surface. One writes the implementation. One writes the tests. One reads the diff looking for reasons to reject it.&lt;/p&gt;
&lt;p&gt;The spec is the whole trick, and it&apos;s usually shorter than people expect:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;## Task: subscription pause endpoint

Constraints

- Laravel 12, existing `SubscriptionService`, no new packages
- Idempotent: repeat calls with the same `Idempotency-Key` return the first result
- Authorization via existing `SubscriptionPolicy@pause`

Done when

- Feature test: pause, double-pause, unauthorized, already-cancelled
- No changes to `routes/api.php` ordering
- `php artisan test` and `vendor/bin/pint --test` both green
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;You&apos;re no longer reviewing lines, a habit that &lt;a href=&quot;https://ansezz.com/blog/stop-reading-code-ai-review/&quot;&gt;stops scaling at agent-sized diffs&lt;/a&gt;. You&apos;re reviewing a pull request that other agents already argued about.&lt;/p&gt;
&lt;p&gt;The human decision shrinks to go/no-go, which is exactly where a human decision is worth the most.&lt;/p&gt;
&lt;p&gt;That&apos;s the architecture side of it, and I go deeper into the MCP and loop mechanics in &lt;a href=&quot;https://ansezz.com/blog/agentic-workflows-vibe-coding/&quot;&gt;the shift to agentic workflows&lt;/a&gt;.&lt;/p&gt;
&lt;figure&gt;

Take the next feature you&apos;d normally vibe and write the spec first: constraints and a &quot;done when&quot; list. Keep it under 15 lines.

&lt;h2&gt;Side by side: vibe coding vs agentic engineering&lt;/h2&gt;
&lt;p&gt;Most AI-assisted projects that stall share one root cause: vibe coding applied to a problem that needed agentic engineering.&lt;/p&gt;
&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Dimension&lt;/th&gt;
&lt;th&gt;Vibe coding&lt;/th&gt;
&lt;th&gt;Agentic engineering&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Primary goal&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Speed and exploration&lt;/td&gt;
&lt;td&gt;Correctness and scale&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Your role&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Conversational partner&lt;/td&gt;
&lt;td&gt;Architect, mission control&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Verification&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;&quot;Does it seem to work?&quot;&lt;/td&gt;
&lt;td&gt;Automated tests plus peer-agent diff review&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Structure&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Loose, improvised&lt;/td&gt;
&lt;td&gt;Written specs, repeatable SOPs&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Best for&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Prototypes, spikes, one-offs&lt;/td&gt;
&lt;td&gt;Production SaaS, Shopify Plus apps&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Tech debt&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;High and invisible&lt;/td&gt;
&lt;td&gt;Managed and visible&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Failure mode&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Silent wrongness&lt;/td&gt;
&lt;td&gt;Slow starts, over-specification&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;p&gt;Note the last row. Agentic engineering has its own failure mode: you can spend an hour writing a spec for something you could have vibed in ten minutes and thrown away.&lt;/p&gt;
&lt;p&gt;Discipline applied to a throwaway prototype is just waste with better manners.&lt;/p&gt;
&lt;h2&gt;The hybrid workflow: mornings vibe, afternoons engineer&lt;/h2&gt;
&lt;p&gt;The people shipping fastest in 2026 don&apos;t pick a side. They split the day. Creative exploration in the high-energy hours, engineering rigor in the disciplined ones.&lt;/p&gt;
&lt;p&gt;If you want the rung-by-rung version of how a workflow gets there, I mapped &lt;a href=&quot;https://ansezz.com/blog/ai-coding-workflow-levels/&quot;&gt;the levels from gateway prompts to agentic systems&lt;/a&gt; separately.&lt;/p&gt;
&lt;h3&gt;Morning: the vibe&lt;/h3&gt;
&lt;p&gt;Start with exploration. If I&apos;m adding a RAG-backed feature, I don&apos;t open a spec document. I open the editor and vibe out the retrieval logic.&lt;/p&gt;
&lt;p&gt;Try pgvector, try a hosted index, see how the chunking feels against real documents. Wire &lt;a href=&quot;https://ansezz.com/blog/claude-mcp-dev-tools/&quot;&gt;Claude and MCP&lt;/a&gt; into the local environment and let it poke at the database directly.&lt;/p&gt;
&lt;p&gt;The output of the morning is not code you keep. It&apos;s a decision you keep. Nothing from this session is allowed to merge.&lt;/p&gt;
&lt;h3&gt;Afternoon: the rigor&lt;/h3&gt;
&lt;p&gt;Once the shape is proven, the vibes end. The prototype becomes the input to a spec: schema, API contract, error semantics, test coverage.&lt;/p&gt;
&lt;p&gt;Then the agents refactor that morning code into something documented and tested, and a review agent tries to break it.&lt;/p&gt;
&lt;p&gt;The hard rule that makes this work: &lt;strong&gt;the morning branch never merges&lt;/strong&gt;. It gets read, summarized into a spec, and deleted.&lt;/p&gt;
&lt;p&gt;If you let vibe-coded code merge &quot;just this once,&quot; you&apos;ve quietly reverted to mode one, and today&apos;s speed becomes next month&apos;s outage.&lt;/p&gt;

  &lt;div&gt;Exploration code. Proves the shape, gets read, summarized into a spec, and deleted.&lt;/div&gt;
  &lt;div&gt;Spec-driven code. Documented, tested, attacked by a review agent, then merged.&lt;/div&gt;

&lt;h2&gt;Building the agentic stack on Laravel and Shopify Plus&lt;/h2&gt;
&lt;p&gt;Agents need predictable ground to stand on. My stack is Laravel for application logic and Shopify Plus when the surface is commerce. That&apos;s not nostalgia. It&apos;s because both are legible to a model.&lt;/p&gt;
&lt;p&gt;Laravel&apos;s conventions are the point. Service providers, policies, form requests, and a canonical directory layout mean an agent can answer &quot;where does this belong?&quot; without guessing.&lt;/p&gt;
&lt;p&gt;Shopify&apos;s GraphQL Admin API is similarly self-describing: typed, introspectable, versioned. An agent can discover the mutation it needs instead of hallucinating a REST route that was deprecated two versions ago.&lt;/p&gt;
&lt;p&gt;That predictability is most of what makes &lt;a href=&quot;https://ansezz.com/blog/agentic-commerce-shopify/&quot;&gt;agentic commerce on Shopify&lt;/a&gt; tractable.&lt;/p&gt;
&lt;h3&gt;Give the agents memory&lt;/h3&gt;
&lt;p&gt;The other half is memory. Your agents need your codebase, your ADRs, and your incident history. Otherwise every session starts from zero and you re-litigate decisions you settled in March.&lt;/p&gt;
&lt;p&gt;A vector store over your own repository and docs is the cheapest win in the stack, provided the retrieval layer is honest.&lt;/p&gt;
&lt;p&gt;Garbage context produces confident garbage code, which is exactly the failure pattern behind most &lt;a href=&quot;https://ansezz.com/blog/7-rag-mistakes-production/&quot;&gt;RAG mistakes in production&lt;/a&gt;.&lt;/p&gt;
&lt;figure&gt;
&lt;h2&gt;Deploying with confidence&lt;/h2&gt;
&lt;p&gt;The last place vibes leak into production is the deploy. If a human is manually clicking ship after an agent wrote the change, the human is the weakest link. They&apos;re approving a diff they didn&apos;t write against tests they didn&apos;t read.&lt;/p&gt;
&lt;p&gt;Push the verification into the pipeline instead: migrations checked, feature tests green, a smoke pass against a preview environment, error rate watched for a window after rollout, automatic rollback if it moves.&lt;/p&gt;
&lt;p&gt;Docker plus Coolify gets you this on your own boxes without a platform bill, which is the whole premise of &lt;a href=&quot;https://ansezz.com/blog/coolify-self-hosted-saas/&quot;&gt;self-hosting your SaaS&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;The goal isn&apos;t zero human involvement. It&apos;s that a bad vibe can&apos;t reach customers without something automated objecting first.&lt;/p&gt;

List every manual step between &quot;agent opened a PR&quot; and &quot;customers see it.&quot; Each one is a candidate for a pipeline check.


- Vibe coding is a discovery tool. Use it for prototypes, UI spikes, and messy ideas, then throw the code away and keep the decision.
- Agentic engineering is a production tool. Specs, tests, and multi-agent review are what make AI-written code safe to charge money for.
- The skill that matters in 2026 is writing unambiguous specs. It&apos;s the new senior-engineer bottleneck, and it&apos;s a writing skill more than a coding one.
- Give your agents memory. Vector-indexed code, docs, and incident history stop every session from restarting at zero.
- Split your day, and enforce the boundary. The morning branch does not merge.
- Watch the opposite failure too: over-specifying a throwaway spike is waste, not discipline.

&lt;p&gt;If you&apos;re trying to get an AI-assisted team from prototypes to production, &lt;a href=&quot;https://ansezz.com/services/&quot;&gt;here&apos;s how I help&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;Which part of your workflow is still running on vibes alone, and what would an agent find if it audited that code tomorrow?&lt;/p&gt;
&lt;/figure&gt;&lt;/figure&gt;</content:encoded><category>ai</category><category>vibe-coding</category><category>agentic-ai</category><category>ai</category><category>claude</category><category>laravel</category><category>shopify</category><category>code-quality</category></item><item><title>AI vs machine learning: an engineering deep dive</title><link>https://ansezz.com/blog/ai-vs-machine-learning/</link><guid isPermaLink="true">https://ansezz.com/blog/ai-vs-machine-learning/</guid><description>AI is the umbrella, machine learning is the engine. See how the distinction shapes your RAG pipelines, agentic systems, and Laravel or Shopify architecture.</description><pubDate>Fri, 19 Jun 2026 00:00:00 GMT</pubDate><content:encoded>&lt;p&gt;Rules you write by hand can be AI. Patterns a model learns from data are machine learning. Mix them up and you build the wrong system.&lt;/p&gt;

- AI is the umbrella: any system that reasons, plans or decides, including plain hardcoded rules. Machine learning is one way to get there, by training a model on data.
- RAG pipelines and agents are hybrids: ML models (embeddings, LLMs) inside an AI system you design with code and prompts.
- The split shapes your stack: orchestration code runs on normal servers, while ML models need data pipelines, GPUs and drift monitoring.

&lt;p&gt;The tech industry often treats &quot;AI&quot; and &quot;machine learning&quot; as interchangeable. This confusion leads to real architectural debt when teams build intelligent features without understanding the underlying mechanics.&lt;/p&gt;
&lt;p&gt;You end up trying to build a predictive engine out of static rule-based systems or, the other way around, over-engineering a simple decision tree with a neural network.&lt;/p&gt;
&lt;p&gt;Picking the wrong tool produces bloated cloud bills, slow performance, and systems that fail to generalize to real-world data. When you mix up the umbrella field of artificial intelligence with the specific mechanics of machine learning, you lose the ability to choose the most efficient path for your product.&lt;/p&gt;
&lt;p&gt;This guide draws the line between the two concepts and shows how they show up in modern stacks like Laravel and Shopify, with a focus on RAG and agentic systems. The goal: a clear framework for deciding when to reach for rule-based logic and when to deploy a learned model.&lt;/p&gt;
&lt;h2&gt;The AI umbrella: broad intelligent systems&lt;/h2&gt;
&lt;p&gt;Artificial Intelligence (AI) is the broad field of creating systems that can perform tasks that usually require human intelligence. This is the &quot;umbrella&quot; term.&lt;/p&gt;
&lt;p&gt;It covers everything from simple &quot;if-then&quot; logic to the most complex large language models (LLMs).&lt;/p&gt;
&lt;h3&gt;AI does not have to learn&lt;/h3&gt;
&lt;p&gt;In engineering terms, AI is about the system&apos;s behavior. If a software system can reason, plan, or solve problems, it is an AI system. This does not mean it has to &quot;learn.&quot;&lt;/p&gt;
&lt;p&gt;Early AI systems, often called symbolic AI or expert systems, relied on hardcoded rules and logic. These systems are very predictable and easy to debug because every decision path is written out explicitly.&lt;/p&gt;
&lt;h3&gt;A rule-based example&lt;/h3&gt;
&lt;p&gt;Take a sophisticated shipping calculator in a Shopify Plus store that adjusts prices based on complex regional taxes and carrier API responses. It mimics human decision-making from a set of logical parameters, which puts it at the simple, rule-based end of AI.&lt;/p&gt;
&lt;p&gt;It is not machine learning, because it does not improve its performance based on past data unless a developer updates the code.&lt;/p&gt;
&lt;figure&gt;

Pick one &quot;smart&quot; feature in your product and ask: does it get better from data, or only when someone edits the code? If it is the second, it is rule-based, and you can test it like normal code.

&lt;h2&gt;Machine learning: the engine of pattern recognition&lt;/h2&gt;
&lt;p&gt;Machine Learning (ML) is a subset of AI focused on algorithms that let computers learn from data and make predictions. Instead of being explicitly programmed for a task, an ML model is &quot;trained&quot; on a dataset to find patterns and hidden structures.&lt;/p&gt;
&lt;h3&gt;When rules run out&lt;/h3&gt;
&lt;p&gt;When your product needs to handle high-dimensional data where rules are too complex to write by hand, ML is the solution. Think about image recognition or fraud detection.&lt;/p&gt;
&lt;p&gt;You cannot write enough &quot;if&quot; statements to account for every possible pixel arrangement in a photo of a cat. Instead, you feed an ML model thousands of images, and it learns the statistical representation of a &quot;cat.&quot;&lt;/p&gt;

  &lt;div&gt;A developer writes every decision path. Predictable, easy to debug, and it only improves when someone changes the code.&lt;/div&gt;
  &lt;div&gt;A model learns the patterns from data. Handles inputs too complex for rules, and needs data, training and evaluation to improve.&lt;/div&gt;

&lt;h3&gt;A different lifecycle&lt;/h3&gt;
&lt;p&gt;In production, ML involves a lifecycle that is distinct from traditional software development. It requires data collection, cleaning, feature engineering, model training, and evaluation.&lt;/p&gt;
&lt;p&gt;You can read more about how this differs from standard workflows in our post on &lt;a href=&quot;https://ansezz.com/blog/ai-vs-traditional-development/&quot;&gt;AI vs traditional development&lt;/a&gt;. For the deeper discriminative-vs-generative comparison inside ML itself, see &lt;a href=&quot;https://ansezz.com/blog/ml-vs-genai/&quot;&gt;machine learning vs generative AI&lt;/a&gt;.&lt;/p&gt;
&lt;h2&gt;AI vs machine learning in RAG systems&lt;/h2&gt;
&lt;p&gt;The distinction becomes critical when you move into modern AI engineering, particularly with Retrieval-Augmented Generation (RAG). A RAG system is a clear example of an AI system that uses several ML components to reach a goal.&lt;/p&gt;
&lt;p&gt;In a RAG pipeline, the system behavior is the AI part. How a user query is received, how a search runs against a vector database, and how the results go into a prompt is a design problem. The components doing the heavy lifting, however, are ML models.&lt;/p&gt;
&lt;h3&gt;Embedding models and vector databases&lt;/h3&gt;
&lt;p&gt;The &quot;retrieval&quot; part of RAG relies on embedding models. These are ML models (specifically deep learning models) that turn text into high-dimensional vectors.&lt;/p&gt;
&lt;p&gt;When you store these vectors in a tool like pgvector or a dedicated vector database, you are using the output of a machine learning process.&lt;/p&gt;
&lt;h3&gt;The generator (LLM)&lt;/h3&gt;
&lt;p&gt;The &quot;generation&quot; part is handled by a large language model. This is a massive ML model trained on trillions of tokens of text.&lt;/p&gt;
&lt;p&gt;Whether you call it through an API or a local deployment, the model itself is a static file of weights learned through intensive training.&lt;/p&gt;
&lt;h3&gt;Which job are you doing?&lt;/h3&gt;
&lt;p&gt;When you refine your RAG system by changing the chunking strategy or the system prompt, you are doing AI engineering.&lt;/p&gt;
&lt;p&gt;You are only doing ML engineering if you decide to fine-tune the embedding model or the LLM itself on your domain data, a trade-off covered in &lt;a href=&quot;https://ansezz.com/blog/rag-vs-fine-tuning/&quot;&gt;RAG vs fine-tuning&lt;/a&gt;. Understanding these layers helps prevent &lt;a href=&quot;https://ansezz.com/blog/7-rag-mistakes-production/&quot;&gt;common RAG mistakes in production&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;You are only doing ML engineering if you decide to fine-tune the embedding model or the LLM itself.&lt;/p&gt;

Look at the last three changes you made to your RAG pipeline. Label each one &quot;AI engineering&quot; (chunking, prompts, routing) or &quot;ML engineering&quot; (training, fine-tuning). Most teams find nearly all of them are the first kind.

&lt;h2&gt;Agentic systems and autonomous workflows&lt;/h2&gt;
&lt;p&gt;Agentic systems take the AI vs machine learning comparison a step further. An &quot;agent&quot; is an AI system that uses an ML model as its &quot;brain&quot; to decide a sequence of actions toward a goal. The jump from a static model to an autonomous one is the focus of &lt;a href=&quot;https://ansezz.com/blog/llm-vs-ai-agent/&quot;&gt;LLM vs AI agent&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;In an agentic workflow, the ML model (the LLM) is just one tool in the agent&apos;s belt. The agent might also have access to a search engine, a calculator, or a database. The logic that handles the &quot;loop&quot; (Observe -&amp;gt; Think -&amp;gt; Act) is the AI system design.&lt;/p&gt;
&lt;h3&gt;Agents in commerce&lt;/h3&gt;
&lt;p&gt;For developers working with Shopify, &lt;a href=&quot;https://ansezz.com/blog/agentic-commerce-shopify/&quot;&gt;agentic commerce&lt;/a&gt; allows for autonomous customer service or inventory management.&lt;/p&gt;
&lt;p&gt;The agent uses machine learning to understand the customer&apos;s intent (NLP) but uses traditional software APIs to execute a refund or check stock levels.&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;// A conceptual example of an AI Agent &apos;thought&apos; process in a Laravel controller
public function handleAgentRequest(Request $request)
{
    $userInput = $request-&amp;gt;input(&apos;query&apos;);

    // ML Component: Identify intent using an LLM
    $intent = $this-&amp;gt;llmService-&amp;gt;identifyIntent($userInput);

    // AI System Logic: Choose the tool based on intent
    if ($intent === &apos;check_order_status&apos;) {
        return $this-&amp;gt;orderService-&amp;gt;getStatus($request-&amp;gt;user());
    }

    // AI System Logic: Fallback to RAG if intent is informational
    return $this-&amp;gt;ragService-&amp;gt;queryKnowledgeBase($userInput);
}
&lt;/code&gt;&lt;/pre&gt;
&lt;figure&gt;
&lt;h2&gt;Practical implementation: Laravel and Shopify contexts&lt;/h2&gt;
&lt;p&gt;Integrating AI and ML into existing frameworks like Laravel or Shopify requires a clear understanding of where the data lives and how the models are served.&lt;/p&gt;
&lt;h3&gt;Laravel and ML orchestration&lt;/h3&gt;
&lt;p&gt;Laravel is an excellent framework for building the &quot;AI system&quot; around an ML model. You can use Laravel&apos;s queue system to handle long-running ML tasks, or its HTTP client to talk to Python-based ML microservices.&lt;/p&gt;
&lt;p&gt;Many developers use Laravel to manage the &quot;human-in-the-loop&quot; side of AI, such as reviewing model outputs before they are published.&lt;/p&gt;
&lt;h3&gt;Shopify and AI&lt;/h3&gt;
&lt;p&gt;Shopify has built AI features directly into its platform through Shopify Magic. For custom Shopify Plus builds, you might implement your own ML-driven product recommendation engine.&lt;/p&gt;
&lt;p&gt;This involves capturing user behavior data, training a model (likely off-platform on Google Cloud or AWS), and serving those recommendations through a custom app or a Liquid block.&lt;/p&gt;

Put a queue between your Laravel app and any model call that can take more than a second. Dispatch a job, store the result, and let the UI poll or listen for it.

&lt;h2&gt;Cloud infrastructure for AI and machine learning&lt;/h2&gt;
&lt;p&gt;Deploying these systems requires different infrastructure strategies. AI systems (the orchestration code) can usually run on standard web servers or serverless functions.&lt;/p&gt;
&lt;p&gt;Machine learning models, especially for training or high-throughput inference, often require GPUs or specialized hardware.&lt;/p&gt;
&lt;h3&gt;Separate containers&lt;/h3&gt;
&lt;p&gt;Docker and tools like Coolify make it simpler to deploy these modular systems. You might host your Laravel application on a standard VPS while your vector database and ML inference server run in separate containers. For more on this, check out our guide on &lt;a href=&quot;https://ansezz.com/blog/coolify-docker-saas-hosting/&quot;&gt;Coolify and Docker for SaaS hosting&lt;/a&gt;.&lt;/p&gt;
&lt;h3&gt;Monitor different things&lt;/h3&gt;
&lt;p&gt;Monitoring is also different. For an AI system, you monitor latency and error rates. For an ML model, you monitor &quot;drift&quot; (when the real-world data starts to look different from the training data) and accuracy.&lt;/p&gt;
&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;What you run&lt;/th&gt;
&lt;th&gt;Where it runs&lt;/th&gt;
&lt;th&gt;What you monitor&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;AI system (orchestration code)&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Standard web servers or serverless&lt;/td&gt;
&lt;td&gt;Latency and error rates&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;ML model&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;GPUs or specialized hardware&lt;/td&gt;
&lt;td&gt;Drift and accuracy&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;

Add one drift check to a model you own: compare this week&apos;s input distribution (length, language, category mix) with the data it was trained or tuned on.


Telling AI and machine learning apart is about choosing the right architecture and team skill sets for your project, not about vocabulary.
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;AI is the &quot;what&quot;:&lt;/strong&gt; It describes the goal of creating intelligent behavior. It includes both hardcoded logic and learned models.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Machine Learning is the &quot;how&quot;:&lt;/strong&gt; It is a specific method for achieving AI by training models on data.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;RAG and agents are hybrid systems:&lt;/strong&gt; They use ML components (LLMs, embeddings) inside an AI system designed with code and prompts.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Framework integration matters:&lt;/strong&gt; Laravel is great for AI orchestration, while Shopify Plus provides a solid environment for ML-driven commerce.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Infrastructure needs differ:&lt;/strong&gt; AI code is lightweight. ML models require specialized environments for training and inference.
&lt;/li&gt;&lt;/ul&gt;

&lt;p&gt;Are you building a system that needs to follow strict regulatory rules, or one that needs to adapt to unpredictable user behavior?&lt;/p&gt;
&lt;/figure&gt;&lt;/figure&gt;</content:encoded><category>ai</category><category>ai</category><category>machine-learning</category><category>rag</category><category>agentic-ai</category><category>laravel</category><category>shopify</category></item><item><title>Training vs inference: scaling AI systems</title><link>https://ansezz.com/blog/training-vs-inference/</link><guid isPermaLink="true">https://ansezz.com/blog/training-vs-inference/</guid><description>How training and inference differ in compute, cost, and hardware, and how to architect each phase so your AI app stays fast and affordable at scale.</description><pubDate>Thu, 18 Jun 2026 00:00:00 GMT</pubDate><content:encoded>&lt;p&gt;Training is the expensive class you take once. Inference is the bill you pay on every single request.&lt;/p&gt;

- Training adjusts a model&apos;s weights over a huge dataset. It is compute-heavy, runs on GPU clusters and happens once or now and then.
- Inference is a forward pass with frozen weights. It is cheaper per request, but it runs every time a user asks, so it usually becomes the bigger cost over time.
- Size each phase on its own: throughput and big interconnects for training, latency, quantization and smaller hardware for inference, plus RAG to add new knowledge without retraining.

&lt;p&gt;Most engineering teams treat AI models as a single black box. They allocate a massive GPU budget and hope for the best.&lt;/p&gt;
&lt;p&gt;But when the application hits production, latency spikes, costs spiral, and the &quot;intelligent&quot; features start timing out.&lt;/p&gt;
&lt;p&gt;This happens because developers fail to separate the two phases of an AI lifecycle: training and inference. Without a clear picture of how each stage consumes resources, your AI strategy is a shot in the dark.&lt;/p&gt;
&lt;h2&gt;The anatomy of training: learning from data&lt;/h2&gt;
&lt;p&gt;Training is the &quot;learning&quot; phase of a machine learning model. During this stage, you feed an algorithm a massive dataset.&lt;/p&gt;
&lt;p&gt;The model looks at the data, makes a guess, compares its guess to the actual answer, and adjusts its internal parameters (weights) to get closer to the truth next time. This process is repeated millions or even billions of times.&lt;/p&gt;
&lt;h3&gt;Why it is so compute-heavy&lt;/h3&gt;
&lt;p&gt;The main goal of training is to minimize error. Because this requires massive matrix multiplications and constant backpropagation, it is extremely compute-intensive.&lt;/p&gt;
&lt;p&gt;You are asking a computer to solve a giant calculus problem over and over again. This is why training usually happens on large clusters of high-end GPUs or TPUs.&lt;/p&gt;
&lt;h3&gt;A burst, then frozen&lt;/h3&gt;
&lt;p&gt;Training is usually a burst-heavy, high-upfront-cost activity. You might spend two weeks and $50,000 to train a custom model for your specific industry.&lt;/p&gt;
&lt;p&gt;Once the model reaches a satisfactory level of accuracy, the training phase ends. The model&apos;s weights are &quot;frozen,&quot; and it is ready to be used in the real world.&lt;/p&gt;
&lt;figure&gt;
&lt;h2&gt;The power of inference: applying knowledge&lt;/h2&gt;
&lt;p&gt;Inference is the &quot;execution&quot; phase. This is what happens when a user interacts with your application.&lt;/p&gt;
&lt;p&gt;A customer types a query into your Shopify store&apos;s AI assistant, the model processes that query using its frozen weights, and it returns an answer. No learning happens during inference. The model simply applies what it already knows.&lt;/p&gt;
&lt;h3&gt;A forward pass&lt;/h3&gt;
&lt;p&gt;In technical terms, inference is a &quot;forward pass.&quot; You provide an input, the data flows through the layers of the model, and an output is generated.&lt;/p&gt;
&lt;p&gt;There is no backpropagation and no weight updates. This makes inference much faster and less compute-intensive than training on a per-request basis.&lt;/p&gt;
&lt;h3&gt;The unbounded cost&lt;/h3&gt;
&lt;p&gt;However, inference is where the &quot;unbounded cost&quot; problem lives. Training is a one-time or periodic expense. Inference happens every time a user makes a request.&lt;/p&gt;
&lt;p&gt;If you have a million users making ten queries a day, you are running ten million inferences. Over the lifetime of a successful product, inference costs often end up far larger than training costs.&lt;/p&gt;

Estimate your monthly inference volume: daily active users, times queries per user, times 30. Multiply by your cost per request. Compare that with what the model cost to train or fine-tune.

&lt;h2&gt;The classroom metaphor: student vs. graduate&lt;/h2&gt;
&lt;p&gt;To make these ideas simpler, think of a student in medical school.&lt;/p&gt;

  &lt;div&gt;
&lt;p&gt;&lt;strong&gt;The years of study.&lt;/strong&gt; The student reads thousands of textbooks, attends lectures, and takes practice exams. This process is slow, expensive, and requires intense focus. The &quot;parameters&quot; of the student&apos;s brain are being adjusted as they learn how to diagnose diseases.&lt;/p&gt;
  &lt;/div&gt;
  &lt;div&gt;
&lt;p&gt;&lt;strong&gt;The doctor in the clinic.&lt;/strong&gt; A patient walks in with symptoms. The doctor uses existing knowledge to give a diagnosis and does not go back to medical school for every patient. The diagnosis happens in minutes, not years.&lt;/p&gt;
  &lt;/div&gt;

&lt;p&gt;If you are building an &lt;a href=&quot;https://ansezz.com/blog/ai-vs-traditional-development/&quot;&gt;AI vs traditional development&lt;/a&gt; strategy, you need to decide if you are training a new doctor (custom training) or simply hiring one that already exists (using a pre-trained model via API).&lt;/p&gt;
&lt;h2&gt;Hardware and infrastructure: GPUs vs. the rest&lt;/h2&gt;
&lt;p&gt;The hardware requirements for these two phases are very different. Understanding this can save you thousands in infrastructure costs.&lt;/p&gt;
&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Feature&lt;/th&gt;
&lt;th&gt;Training&lt;/th&gt;
&lt;th&gt;Inference&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Primary Goal&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;High Throughput&lt;/td&gt;
&lt;td&gt;Low Latency&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Compute Pattern&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Burst-heavy / Parallel&lt;/td&gt;
&lt;td&gt;Steady / Sequential&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Hardware&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Multi-GPU Clusters (H100, A100)&lt;/td&gt;
&lt;td&gt;Single GPU, CPU, or Edge (T4, L4, Apple Silicon)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Optimization&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Gradient Descent / Backprop&lt;/td&gt;
&lt;td&gt;Quantization / Model Compression&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Cost Type&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;CAPEX (Upfront)&lt;/td&gt;
&lt;td&gt;OPEX (Recurring)&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;h3&gt;Different priorities&lt;/h3&gt;
&lt;p&gt;For training, you need massive VRAM and high-speed interconnects (like NVLink) between GPUs. For inference, you often prioritize energy efficiency and &quot;cost per token.&quot;&lt;/p&gt;
&lt;p&gt;In many cases, a well-optimized model can run inference on standard CPUs or specialized &quot;edge&quot; chips, which is much cheaper than keeping a fleet of high-end GPUs.&lt;/p&gt;
&lt;p&gt;If you manage your own servers, you can split the workloads: put training tasks on high-performance clusters and move inference to smaller, distributed nodes closer to your users.&lt;/p&gt;

Try a quantized version (8-bit or 4-bit) of the model you serve on your smallest available GPU or a CPU. Measure latency and answer quality on 20 real prompts before paying for bigger hardware.

&lt;h2&gt;Integrating inference into Laravel applications&lt;/h2&gt;
&lt;p&gt;When building custom web solutions, you usually deal with the inference side of the equation. You are not training a frontier model from scratch.&lt;/p&gt;
&lt;p&gt;You are calling an API or a self-hosted model to perform a task. Here is a typical pattern for handling AI inference inside a Laravel controller.&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;namespace App\Http\Controllers;

use Illuminate\Http\Request;
use Illuminate\Support\Facades\Http;

class AIInferenceController extends Controller
{
    /**
     * Handle an AI inference request.
     */
    public function generate(Request $request)
    {
        $prompt = $request-&amp;gt;input(&apos;prompt&apos;);

        // We use a high-performance inference endpoint
        // This could be OpenAI, Anthropic, or a self-hosted vLLM server
        $response = Http::withHeaders([
            &apos;Authorization&apos; =&amp;gt; &apos;Bearer &apos; . config(&apos;services.ai.key&apos;),
        ])-&amp;gt;post(&apos;https://api.inference-provider.com/v1/completions&apos;, [
            &apos;model&apos; =&amp;gt; &apos;llama-3-70b&apos;,
            &apos;prompt&apos; =&amp;gt; $prompt,
            &apos;max_tokens&apos; =&amp;gt; 150,
            &apos;temperature&apos; =&amp;gt; 0.7,
        ]);

        if ($response-&amp;gt;successful()) {
            return response()-&amp;gt;json([
                &apos;result&apos; =&amp;gt; $response-&amp;gt;json(&apos;choices.0.text&apos;),
                &apos;latency&apos; =&amp;gt; $response-&amp;gt;header(&apos;X-Inference-Time&apos;),
            ]);
        }

        return response()-&amp;gt;json([&apos;error&apos; =&amp;gt; &apos;Inference failed&apos;], 500);
    }
}
&lt;/code&gt;&lt;/pre&gt;
&lt;h3&gt;Latency is the contract&lt;/h3&gt;
&lt;p&gt;This simple setup highlights a key architectural point: the &lt;a href=&quot;https://ansezz.com/blog/api-gateway-ai-stack/&quot;&gt;API Gateway for your AI stack&lt;/a&gt; must handle the latency needs of inference.&lt;/p&gt;
&lt;p&gt;Users expect an answer in seconds, not minutes, and the first token well under that. A slow gateway in front of a fast model still feels slow.&lt;/p&gt;

Log the time to first token and the total response time for every inference call, next to the model name. Those two numbers tell you whether to fix the model, the network, or the prompt size.

&lt;h2&gt;The role of RAG: inference with a memory&lt;/h2&gt;
&lt;p&gt;One way to bridge the gap between training and inference is retrieval-augmented generation (RAG).&lt;/p&gt;
&lt;p&gt;Instead of re-training a model every time your data changes (which is expensive and slow), you give the model &quot;context&quot; during the inference phase. That tradeoff is its own decision, covered in &lt;a href=&quot;https://ansezz.com/blog/rag-vs-fine-tuning/&quot;&gt;RAG vs fine-tuning&lt;/a&gt;.&lt;/p&gt;
&lt;h3&gt;A temporary memory&lt;/h3&gt;
&lt;p&gt;In a RAG system, you search a vector database for relevant information and &quot;stuff&quot; it into the prompt. The model then uses its pre-trained reasoning to answer based on that new data. This is inference acting like it has a temporary memory.&lt;/p&gt;
&lt;p&gt;Be careful, though. If you don&apos;t optimize your vector search, your inference latency will explode. You can read more about avoiding &lt;a href=&quot;https://ansezz.com/blog/7-rag-mistakes-production/&quot;&gt;RAG mistakes in production&lt;/a&gt; to keep your systems lean.&lt;/p&gt;
&lt;figure&gt;

- **Training is about learning.** It is a one-time or periodic compute-heavy process that builds the model&apos;s intelligence.
- **Inference is about acting.** It is the real-time application of that intelligence and represents the majority of long-term costs.
- **Hardware matters.** Don&apos;t use a massive GPU cluster for inference if a smaller, quantized model can run on a single T4 or even a CPU.
- **Optimize for your phase.** If you are training, focus on throughput (tokens per second). If you are serving users, focus on latency (time to first token).
- **RAG is your friend.** It allows you to give &quot;new knowledge&quot; to a frozen model during inference without the massive cost of re-training.

&lt;p&gt;If you&apos;re architecting an AI stack that has to stay fast and affordable at scale, &lt;a href=&quot;https://ansezz.com/services/&quot;&gt;here&apos;s how I help teams ship it&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;At what point in your product&apos;s growth do you expect inference costs to exceed your initial development budget?&lt;/p&gt;
&lt;/figure&gt;&lt;/figure&gt;</content:encoded><category>ai</category><category>llm</category><category>llm-inference</category><category>devops</category><category>rag</category><category>infrastructure</category><category>ai-engineering</category></item><item><title>Vector search vs graph search for RAG</title><link>https://ansezz.com/blog/vector-search-vs-graph-search/</link><guid isPermaLink="true">https://ansezz.com/blog/vector-search-vs-graph-search/</guid><description>Compare vector search and graph search for RAG. When to use embeddings via pgvector vs relationship-based knowledge graphs, and why GraphRAG often wins.</description><pubDate>Thu, 18 Jun 2026 00:00:00 GMT</pubDate><content:encoded>&lt;p&gt;Vector search finds things that are similar. Graph search finds things that are connected. Multi-hop questions need the second.&lt;/p&gt;

- Vector search (for example pgvector) turns text into embeddings and finds the nearest ones. It is easy to start with and great for fuzzy, semantic matching.
- Graph search stores entities and their relationships, so it can follow chains of facts that vector search misses.
- GraphRAG combines them: vectors find the starting points, graph traversal pulls in the connected context.

&lt;p&gt;Retrieval-Augmented Generation (RAG) forces a question most teams put off: how is data actually retrieved?&lt;/p&gt;
&lt;p&gt;Most production systems start with vector search because it is accessible and effective for basic similarity. But as queries get more complex, the limits of semantic similarity show.&lt;/p&gt;
&lt;p&gt;A system that finds &quot;similar&quot; things often fails when asked to explain &quot;connected&quot; things. That gap is where the choice between vector search and graph search decides whether your RAG strategy holds up.&lt;/p&gt;
&lt;p&gt;Relying only on vector embeddings can lead to what is known as the semantic trap. You might retrieve five document chunks that all mention a topic, but if those chunks do not link to each other, the LLM will struggle to put together a multi-hop answer.&lt;/p&gt;
&lt;p&gt;This often results in hallucinations or incomplete reasoning. If your RAG pipeline cannot traverse relationships, it is working with a deck of shuffled cards rather than an organized map.&lt;/p&gt;
&lt;p&gt;The fix starts with understanding the trade-offs between vector-based and relationship-based retrieval. Vector search excels at high-dimensional similarity; graph search offers structured traversals that preserve the logic of your data.&lt;/p&gt;
&lt;p&gt;Combining the two into a hybrid architecture is usually the safest path forward.&lt;/p&gt;
&lt;h2&gt;Understanding vector search and embeddings&lt;/h2&gt;
&lt;p&gt;Vector search works by converting unstructured data into dense numerical arrays called embeddings. These embeddings represent the semantic meaning of the text in a multi-dimensional space.&lt;/p&gt;
&lt;p&gt;When a user submits a query, that query is also converted into a vector. The system then calculates the distance between the query vector and the stored vectors using measures like cosine similarity or Euclidean distance.&lt;/p&gt;
&lt;h3&gt;pgvector makes it accessible&lt;/h3&gt;
&lt;p&gt;For developers working within the Laravel or Node.js ecosystems, tools like pgvector have made this very accessible. By adding a vector column to a standard Postgres database, you can run similarity searches right next to your relational data.&lt;/p&gt;
&lt;p&gt;This approach is very efficient for &quot;fuzzy&quot; matching. It can find a product description for a &quot;crimson summer dress&quot; even if the query only mentions a &quot;red lightweight gown.&quot;&lt;/p&gt;
&lt;h3&gt;No sense of structure&lt;/h3&gt;
&lt;p&gt;However, vector search is limited by its lack of structural awareness. It treats every chunk of data as an independent point in space.&lt;/p&gt;
&lt;p&gt;It has no built-in understanding that &quot;User A&quot; is the &quot;CEO&quot; of &quot;Company B&quot; unless those words sit together in a single text chunk.&lt;/p&gt;
&lt;figure&gt;

Write down three real questions your users ask that need two facts from different documents to answer. Run them against your current retriever and check whether both facts come back.

&lt;h2&gt;The mechanics of graph search&lt;/h2&gt;
&lt;p&gt;Graph search takes a different approach by modeling data as nodes (entities) and edges (relationships). Instead of looking for similarity in a coordinate system, graph search follows defined paths.&lt;/p&gt;
&lt;p&gt;A node might represent a person, a place, or a concept, while an edge defines how they relate. For example, an edge labeled &quot;works_at&quot; might connect a person node to a company node.&lt;/p&gt;
&lt;h3&gt;Multi-hop queries&lt;/h3&gt;
&lt;p&gt;This structure allows multi-hop queries that are nearly impossible for pure vector search. You can ask the system to &quot;find all employees at companies that use Laravel and were founded after 2015.&quot;&lt;/p&gt;
&lt;p&gt;A graph database like Neo4j or a graph-capable extension can follow these links precisely. In RAG, this means the retrieval engine can pull in a coherent chain of facts rather than a disjointed set of similar-sounding paragraphs.&lt;/p&gt;
&lt;h3&gt;The cost is ingestion&lt;/h3&gt;
&lt;p&gt;The challenge with graph search is the ingestion process. Vector search only requires an embedding model. Graph search requires entity extraction and schema mapping.&lt;/p&gt;
&lt;p&gt;You must identify which entities exist in your text and how they relate before you can store them in the graph. This adds complexity to your data pipeline but pays off in reasoning accuracy.&lt;/p&gt;
&lt;p&gt;A system that finds &quot;similar&quot; things often fails when asked to explain &quot;connected&quot; things.&lt;/p&gt;
&lt;h2&gt;Comparison: vector vs graph search&lt;/h2&gt;
&lt;p&gt;Choosing the right approach depends on the nature of your data and the questions your users ask. The table below outlines the main technical differences.&lt;/p&gt;
&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Feature&lt;/th&gt;
&lt;th&gt;Vector Search (pgvector)&lt;/th&gt;
&lt;th&gt;Graph Search (Knowledge Graph)&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Data Model&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;High-dimensional dense vectors&lt;/td&gt;
&lt;td&gt;Nodes, edges, and properties&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Query Type&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;K-Nearest Neighbors (k-NN)&lt;/td&gt;
&lt;td&gt;Traversals and pattern matching&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Strengths&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Semantic similarity, fuzzy match&lt;/td&gt;
&lt;td&gt;Complex relationships, multi-hop logic&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Weaknesses&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Struggles with structural reasoning&lt;/td&gt;
&lt;td&gt;High ingestion complexity&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Ideal For&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;FAQ bots, general search, broad Q&amp;amp;A&lt;/td&gt;
&lt;td&gt;Fraud detection, supply chain, reasoning&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Scaling&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Efficient with ANN indexing (HNSW)&lt;/td&gt;
&lt;td&gt;Sensitive to graph density and depth&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;p&gt;For a deeper look at avoiding common pitfalls in this space, see our guide on &lt;a href=&quot;https://ansezz.com/blog/7-rag-mistakes-production/&quot;&gt;7 RAG mistakes in production&lt;/a&gt;. Many teams start with vectors and only introduce graphs when they hit a &quot;reasoning wall.&quot;&lt;/p&gt;
&lt;h2&gt;GraphRAG: the hybrid evolution&lt;/h2&gt;
&lt;p&gt;The most advanced RAG systems are moving toward a hybrid model often called GraphRAG. This architecture does not choose one over the other. It uses both to give the LLM richer context.&lt;/p&gt;
&lt;p&gt;In a GraphRAG setup, the system first runs a vector search to find relevant starting points in the knowledge base. From those starting points, it uses graph traversals to pull in related entities and their relationships.&lt;/p&gt;

  &lt;div&gt;Five chunks that all mention the topic, with no links between them. The LLM has to guess how they fit.&lt;/div&gt;
  &lt;div&gt;Vector search finds the entry points, then graph traversal adds the linked facts. The LLM gets a small, connected subgraph.&lt;/div&gt;

&lt;h3&gt;A worked example&lt;/h3&gt;
&lt;p&gt;Imagine a medical research application. A vector search might find a paper about a specific drug.&lt;/p&gt;
&lt;p&gt;The graph search then identifies the chemical compounds in that drug, the clinical trials associated with it, and the known side effects reported in other related papers.&lt;/p&gt;
&lt;p&gt;The context given to the LLM is a structured &quot;subgraph&quot; of knowledge. This reduces the risk of hallucinations because the LLM is working with explicitly linked facts.&lt;/p&gt;
&lt;h3&gt;Running the stack&lt;/h3&gt;
&lt;p&gt;This hybrid approach needs a solid DevOps foundation. Tools like Docker and Coolify can help manage the services involved, including your vector store, graph database, and the extraction services that keep them in sync.&lt;/p&gt;
&lt;p&gt;If you are exploring how to host these stacks, our article on &lt;a href=&quot;https://ansezz.com/blog/coolify-self-hosted-saas/&quot;&gt;Coolify and self-hosted SaaS&lt;/a&gt; is a good starting point for infrastructure management.&lt;/p&gt;
&lt;figure&gt;

Before building a full graph, extract only the two or three entity types your users ask about most (for example products and suppliers) and the one relationship between them. See whether that alone fixes your multi-hop questions.

&lt;h2&gt;Technical implementation with pgvector and SQL&lt;/h2&gt;
&lt;p&gt;For teams already using Postgres, pgvector is the logical starting point for adding vector capabilities. It fits into existing SQL workflows.&lt;/p&gt;
&lt;p&gt;You can store your embeddings in a &lt;code&gt;vector&lt;/code&gt; column and use the &lt;code&gt;&amp;lt;-&amp;gt;&lt;/code&gt; (Euclidean) or &lt;code&gt;&amp;lt;=&amp;gt;&lt;/code&gt; (cosine distance) operators to query them.&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;-- Example: Finding similar document chunks in Postgres
SELECT content, 1 - (embedding &amp;lt;=&amp;gt; &apos;[0.1, 0.2, 0.3, ...]&apos;) AS similarity
FROM document_chunks
ORDER BY embedding &amp;lt;=&amp;gt; &apos;[0.1, 0.2, 0.3, ...]&apos;
LIMIT 5;
&lt;/code&gt;&lt;/pre&gt;
&lt;h3&gt;Let the index do its job&lt;/h3&gt;
&lt;p&gt;Order by the distance expression itself and keep the &lt;code&gt;LIMIT&lt;/code&gt;. That is the shape pgvector&apos;s HNSW and IVFFlat indexes can use. To see how big those indexes get and how much RAM they need, try my &lt;a href=&quot;https://ansezz.com/tools/pgvector-calculator/&quot;&gt;pgvector size calculator&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;A &lt;code&gt;WHERE&lt;/code&gt; filter on the similarity score (for example &lt;code&gt;&amp;gt; 0.8&lt;/code&gt;) cannot use the index and forces a full scan, so apply a score threshold to the five rows you get back instead.&lt;/p&gt;
&lt;h3&gt;When joins stop scaling&lt;/h3&gt;
&lt;p&gt;To approximate a graph without a dedicated graph database, you can model simple one-to-many or many-to-many relationships with relational joins.&lt;/p&gt;
&lt;p&gt;But as the number of hops grows, recursive joins and &lt;code&gt;WITH RECURSIVE&lt;/code&gt; queries get expensive fast, and the planner struggles to keep them efficient.&lt;/p&gt;
&lt;p&gt;That is the point to introduce a specialized graph layer such as Neo4j or the Apache AGE extension, which adds openCypher graph queries directly to Postgres. For the broader question of which retrieval components to assemble, see &lt;a href=&quot;https://ansezz.com/blog/picking-the-right-rag-stack/&quot;&gt;picking the right RAG stack&lt;/a&gt;.&lt;/p&gt;

Run `EXPLAIN ANALYZE` on your similarity query. If you do not see an index scan on your HNSW or IVFFlat index, rewrite it to `ORDER BY embedding &amp;lt;=&amp;gt; ... LIMIT k`.

&lt;h2&gt;Choosing your path&lt;/h2&gt;
&lt;p&gt;The decision between vector and graph search is not binary. It is a spectrum of technical complexity versus reasoning capability.&lt;/p&gt;
&lt;p&gt;For simple semantic search over a collection of PDFs, vector search with pgvector is almost always the right answer. It is fast, easy to implement, and needs little maintenance.&lt;/p&gt;
&lt;h3&gt;When the graph is worth it&lt;/h3&gt;
&lt;p&gt;If your application needs high precision, multi-step logic, or the ability to explain &quot;why&quot; a result was chosen, the investment in a knowledge graph is necessary.&lt;/p&gt;
&lt;p&gt;The overhead of building an extraction pipeline is the price you pay for a system that understands the relationships within your data.&lt;/p&gt;
&lt;h3&gt;Most systems land in the middle&lt;/h3&gt;
&lt;p&gt;Most production AI systems will eventually use vectors for broad discovery and graphs for deep reasoning. If you design your system to be modular today, your infrastructure is ready to evolve as your AI needs grow.&lt;/p&gt;

- Vector search is best for semantic similarity and is easy to implement using tools like pgvector.
- Graph search excels at multi-hop reasoning and mapping complex relationships between entities.
- Vector search treats data points as isolated, while graph search treats them as connected nodes.
- GraphRAG is a hybrid approach that uses vector search for discovery and graph search for context expansion.
- Start with vector search for most projects, but prepare for graph search if your queries require complex structural reasoning.
- Monitor retrieval metrics like recall and precision to spot when a vector-only strategy starts failing.

&lt;p&gt;If you&apos;re building a RAG pipeline for production, &lt;a href=&quot;https://ansezz.com/services/&quot;&gt;here&apos;s how I help teams ship it&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;How is your current RAG pipeline handling multi-hop queries that connect data points across documents?&lt;/p&gt;
&lt;/figure&gt;&lt;/figure&gt;</content:encoded><category>ai</category><category>rag</category><category>pgvector</category><category>vector-search</category><category>architecture</category><category>ai</category></item><item><title>RAG vs fine-tuning: choosing your AI architecture</title><link>https://ansezz.com/blog/rag-vs-fine-tuning/</link><guid isPermaLink="true">https://ansezz.com/blog/rag-vs-fine-tuning/</guid><description>RAG vs fine-tuning for production LLMs: knowledge vs behavior, latency, cost, privacy, and the hybrid approach. How to pick the right AI architecture.</description><pubDate>Fri, 12 Jun 2026 00:00:00 GMT</pubDate><content:encoded>&lt;p&gt;RAG gives your model an open book at runtime. Fine-tuning changes how the model behaves. Use RAG for facts and fine-tuning for style.&lt;/p&gt;

- RAG retrieves relevant chunks from your own data at request time, so answers stay fresh and access control stays in your database.
- Fine-tuning retrains the model&apos;s weights on a focused dataset to lock in tone, terminology and response patterns, with lower latency per request.
- Many production systems combine them: a fine-tuned model for behavior, RAG for live facts.

&lt;p&gt;Large language models are only as good as the information they can access. You build a custom application and realize the base model knows nothing about your internal documentation or yesterday&apos;s product launch. It starts making things up.&lt;/p&gt;
&lt;p&gt;This hallucination problem is the biggest hurdle for developers moving from a prototype to production, and it is exactly where the RAG vs fine-tuning decision gets made.&lt;/p&gt;
&lt;p&gt;You can either give the model a search engine to find the right information at runtime, or retrain the model to bake that information into its weights. These two methods are Retrieval-Augmented Generation (RAG) and fine-tuning.&lt;/p&gt;
&lt;p&gt;Choosing the wrong one wastes engineering hours and runs up infrastructure bills. A RAG system might be too slow for a high-traffic API. A fine-tuned model might become obsolete the moment you update your pricing page.&lt;/p&gt;
&lt;h2&gt;Understanding RAG as the open-book exam&lt;/h2&gt;
&lt;p&gt;Retrieval-Augmented Generation is like giving an LLM an open-book exam. Instead of relying on the model to remember everything from its original training, you provide relevant documents along with the user prompt.&lt;/p&gt;
&lt;p&gt;The model then uses this context to generate an accurate answer.&lt;/p&gt;
&lt;h3&gt;How the pipeline works&lt;/h3&gt;
&lt;p&gt;The workflow has a few moving parts. First, you convert your documents into numerical representations called embeddings and store them in a vector database like pgvector or Pinecone.&lt;/p&gt;
&lt;p&gt;When a user asks a question, your system runs a semantic search to find the most relevant &quot;chunks&quot; of text. These chunks are then injected into the prompt window of the LLM.&lt;/p&gt;
&lt;h3&gt;Built for changing data&lt;/h3&gt;
&lt;p&gt;RAG is the standard choice for applications where data changes frequently. If you are building a support bot for a Shopify store, it needs to know about current inventory levels.&lt;/p&gt;
&lt;p&gt;Retraining a model every time a product sells out is not practical. With RAG, you just update the vector index. You can read more about avoiding common pitfalls in our guide on &lt;a href=&quot;https://ansezz.com/blog/7-rag-mistakes-production/&quot;&gt;7 RAG mistakes in production&lt;/a&gt;.&lt;/p&gt;
&lt;figure&gt;
&lt;h2&gt;Fine-tuning as internalized knowledge&lt;/h2&gt;
&lt;p&gt;Fine-tuning takes a pre-trained model and continues its training on a smaller, specialized dataset. You are changing the &quot;brain&quot; of the model by adjusting its internal weights.&lt;/p&gt;
&lt;p&gt;The model then picks up the patterns, tone, and terminology of your domain without needing external documents for every query.&lt;/p&gt;
&lt;h3&gt;Behavior, not facts&lt;/h3&gt;
&lt;p&gt;This approach is less about adding new facts and more about teaching the model how to act. It shines when you need a consistent style, tone, or response pattern that prompting alone cannot pin down reliably.&lt;/p&gt;
&lt;p&gt;(For strict JSON shape, reach for structured outputs or constrained decoding first. Every major provider now guarantees schema-valid output at inference time, no training run required.)&lt;/p&gt;
&lt;h3&gt;Specialized fields, frozen facts&lt;/h3&gt;
&lt;p&gt;Fine-tuning is also common in specialized industries like legal or medical tech, where the model learns the specific &quot;language&quot; of the field.&lt;/p&gt;
&lt;p&gt;The major drawback is that it creates a static snapshot of knowledge. If the underlying facts change, the model stays stuck with its training data until you run another expensive training cycle.&lt;/p&gt;

  &lt;div&gt;Changes what the model can see. Update the index and the next answer uses the new facts.&lt;/div&gt;
  &lt;div&gt;Changes how the model behaves. New facts need a new training run.&lt;/div&gt;


Sort your last 20 bad model answers into two piles: &quot;wrong or missing facts&quot; and &quot;right facts, wrong tone or format.&quot; The first pile is a RAG problem. The second is a prompting or fine-tuning problem.

&lt;h2&gt;The latency and throughput battle&lt;/h2&gt;
&lt;p&gt;Performance is where these two architectures split sharply. RAG adds several steps to every single request.&lt;/p&gt;
&lt;p&gt;Your application must embed the query, search the vector database, and then send a much larger prompt (with the retrieved text) to the LLM. Each step adds milliseconds or even seconds to the total response time.&lt;/p&gt;
&lt;h3&gt;When latency is a deal-breaker&lt;/h3&gt;
&lt;p&gt;For high-traffic applications, this latency can be a deal-breaker. The retrieval step also means standing up and querying a vector store alongside your app. See &lt;a href=&quot;https://ansezz.com/blog/picking-the-right-rag-stack/&quot;&gt;picking the right RAG stack&lt;/a&gt; for how that choice shapes both speed and cost.&lt;/p&gt;
&lt;h3&gt;Fine-tuning is lean at runtime&lt;/h3&gt;
&lt;p&gt;Fine-tuning offers much lower latency at runtime. There is no external retrieval step, and the prompt stays short because the model already &quot;knows&quot; the context.&lt;/p&gt;
&lt;p&gt;This makes fine-tuned models a good fit for real-time applications or high-volume background tasks like sentiment analysis or lead scoring.&lt;/p&gt;
&lt;figure&gt;
&lt;h2&gt;Infrastructure and cost considerations&lt;/h2&gt;
&lt;p&gt;The cost of RAG is mostly operational. You pay for storing and querying the vector database.&lt;/p&gt;
&lt;p&gt;You also pay more for LLM tokens because your prompts are much longer. Over millions of requests, these &quot;context tokens&quot; add up quickly. RAG is cheaper to set up but can become more expensive at extreme scale.&lt;/p&gt;
&lt;h3&gt;Fine-tuning pays up front&lt;/h3&gt;
&lt;p&gt;Fine-tuning has a high upfront cost. You need to curate a high-quality dataset, which often requires human labeling, and significant GPU power to run the training.&lt;/p&gt;
&lt;p&gt;Once the model is trained, your per-query costs are lower. The prompts are shorter and you do not need to maintain a complex retrieval pipeline.&lt;/p&gt;
&lt;h3&gt;Which world can your team run?&lt;/h3&gt;
&lt;p&gt;The deeper split is operational. Fine-tuning lives in the &lt;a href=&quot;https://ansezz.com/blog/training-vs-inference/&quot;&gt;training&lt;/a&gt; world (GPUs, datasets, MLOps), while RAG lives in the inference-time data-pipeline world.&lt;/p&gt;
&lt;p&gt;Decide which world your team is actually equipped to run.&lt;/p&gt;

Measure the average prompt size of your RAG calls in tokens, multiply by your monthly request count and your model&apos;s input price. That is your monthly &quot;context tax,&quot; the number to compare against a fine-tuning run.

&lt;h2&gt;Data privacy and governance&lt;/h2&gt;
&lt;p&gt;For enterprise clients, data privacy is often the deciding factor. RAG offers better data governance.&lt;/p&gt;
&lt;p&gt;Since the information is retrieved from your own database at runtime, you can apply standard access controls and make sure a user only retrieves documents they are authorized to see. The LLM never &quot;learns&quot; the data permanently.&lt;/p&gt;
&lt;h3&gt;The memorization risk&lt;/h3&gt;
&lt;p&gt;Fine-tuning is riskier here. If you train a model on sensitive customer data, that information is baked into the model weights.&lt;/p&gt;
&lt;p&gt;Membership inference and training-data extraction attacks are well-documented ways to pull memorized data back out.&lt;/p&gt;
&lt;p&gt;This makes it hard to &quot;delete&quot; a user&apos;s data from a fine-tuned model short of retraining, which can lead to compliance issues under regulations like GDPR.&lt;/p&gt;
&lt;h2&gt;The hybrid case: RAG and fine-tuning together&lt;/h2&gt;
&lt;p&gt;In 2026, many advanced systems do not choose one over the other. They combine both.&lt;/p&gt;
&lt;p&gt;You might fine-tune a smaller, cheaper model (like a Llama variant) to learn your company&apos;s specific API schemas and brand voice. Then you use RAG to give that model access to live data.&lt;/p&gt;
&lt;h3&gt;The &quot;how&quot; and the &quot;what&quot;&lt;/h3&gt;
&lt;p&gt;This combination lets the model be both fast and accurate. Fine-tuning handles the &quot;how&quot; (formatting and style) while RAG handles the &quot;what&quot; (current facts and data).&lt;/p&gt;
&lt;p&gt;This works especially well with &lt;a href=&quot;https://ansezz.com/blog/claude-mcp-dev-tools/&quot;&gt;Claude and the Model Context Protocol (MCP)&lt;/a&gt;, where the model can use specific tools to fetch data while keeping a trained understanding of the environment.&lt;/p&gt;

Before you fine-tune anything, write a strong system prompt plus five example answers in your target style and run it through your RAG pipeline. If that closes the gap, you may not need a training run at all.


Choosing between RAG and fine-tuning depends on your goals for data freshness, latency, and budget.
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Use RAG for knowledge:&lt;/strong&gt; If your data changes frequently or you need to cite sources, RAG is the standard choice. It is easier to update and more transparent.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Use fine-tuning for behavior:&lt;/strong&gt; If you need a consistent style, a unique brand voice, or low-latency responses, fine-tuning is the way to go. For strict output formats, try structured outputs first.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Evaluate your infrastructure:&lt;/strong&gt; RAG requires a reliable data pipeline and vector database. Fine-tuning requires specialized training data and GPU resources.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Consider privacy early:&lt;/strong&gt; RAG is generally safer for handling sensitive or permission-based data because the model does not memorize the information.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Think hybrid for scale:&lt;/strong&gt; Combining a fine-tuned model for behavior with a RAG pipeline for facts gives complex applications the strongest results.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Monitor costs:&lt;/strong&gt; Watch your token usage in RAG systems as context windows grow. Conversely, budget for periodic retraining if you choose the fine-tuning path.
&lt;/li&gt;&lt;/ul&gt;

&lt;p&gt;If you&apos;re deciding between these paths for a real product, &lt;a href=&quot;https://ansezz.com/services/&quot;&gt;here&apos;s how I help teams ship it&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;Is your current AI architecture bottlenecked by the speed of retrieval or the accuracy of the model&apos;s internal knowledge?&lt;/p&gt;
&lt;/figure&gt;&lt;/figure&gt;</content:encoded><category>ai</category><category>rag</category><category>machine-learning</category><category>llm</category><category>architecture</category><category>laravel</category></item><item><title>RAG architectures: traditional, agentic, corrective</title><link>https://ansezz.com/blog/rag-architectures-traditional-agentic-corrective/</link><guid isPermaLink="true">https://ansezz.com/blog/rag-architectures-traditional-agentic-corrective/</guid><description>Compare traditional, agentic, and corrective RAG architectures, with the latency, cost, and accuracy trade-offs that decide which fits your AI app.</description><pubDate>Thu, 11 Jun 2026 00:00:00 GMT</pubDate><content:encoded>&lt;p&gt;Traditional RAG retrieves once and hopes. Agentic RAG plans and loops. Corrective RAG checks the context before it answers. Each step up costs more latency and tokens.&lt;/p&gt;

- Traditional RAG is one search and one LLM call: fast and cheap, but it has no way to notice when the retrieved context is wrong.
- Agentic RAG puts an LLM agent in a plan-act-observe loop that can split questions, call tools and search again, at higher cost and latency.
- Corrective RAG (CRAG) adds a lightweight evaluator that grades retrieval and falls back to refinement or web search before generating.

&lt;p&gt;Most developers build a basic RAG system only to find it hallucinating or failing on complex questions within a week of deployment.&lt;/p&gt;
&lt;p&gt;If your vector search returns the wrong context, your LLM will confidently lie to your face. This gap between basic search and reliable answers is why RAG architectures have grown from simple pipelines into self-correcting, agentic systems.&lt;/p&gt;
&lt;p&gt;The problem with many first AI implementations is their static nature. You feed a query into a vector database, pull some chunks, and hope the LLM makes sense of them.&lt;/p&gt;
&lt;p&gt;This is the traditional RAG model. It works for simple FAQs, but it breaks down when a query needs multi-step reasoning or when the retrieved data is irrelevant. The result is &quot;garbage in, garbage out&quot;: the model burns tokens trying to answer from junk context.&lt;/p&gt;
&lt;p&gt;This guide compares three RAG architectures so you can pick the right one for your workload: the speed of a traditional pipeline, the reasoning of agentic RAG, or the verification of corrective RAG (CRAG).&lt;/p&gt;
&lt;h2&gt;Traditional RAG: the linear standard&lt;/h2&gt;
&lt;p&gt;Traditional RAG is the foundation of most AI-driven applications. It follows a strictly linear, one-shot path: retrieve, then generate.&lt;/p&gt;
&lt;p&gt;You start by converting your documents into vector embeddings and storing them in a database like pgvector or Pinecone. When a user asks a question, the system embeds the query, runs a similarity search, and injects the top results into the prompt.&lt;/p&gt;
&lt;h3&gt;Fast and cheap&lt;/h3&gt;
&lt;p&gt;This architecture is prized for its low latency and simplicity. If you are building a simple internal search tool for a Shopify store or a basic documentation bot, Traditional RAG is often enough.&lt;/p&gt;
&lt;p&gt;It is cost-effective because it typically involves only one LLM call and one vector search.&lt;/p&gt;
&lt;h3&gt;No way to notice bad context&lt;/h3&gt;
&lt;p&gt;Its simplicity is also its biggest weakness. It assumes the first retrieval always succeeds.&lt;/p&gt;
&lt;p&gt;If the vector search returns noise, the LLM has no mechanism to tell that the context is wrong. It will try to answer regardless. This often leads to the &lt;a href=&quot;https://ansezz.com/blog/7-rag-mistakes-production/&quot;&gt;7 RAG mistakes in production&lt;/a&gt; that plague early-stage AI projects.&lt;/p&gt;
&lt;h3&gt;Key components of traditional RAG&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Vector store:&lt;/strong&gt; holds document chunks as embeddings.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Retriever:&lt;/strong&gt; a similarity search function that pulls the top-k relevant chunks.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Generator:&lt;/strong&gt; the LLM that synthesizes an answer from the retrieved chunks.&lt;/li&gt;
&lt;/ul&gt;

Log the top-k chunks next to every answer for a day. Read 20 of the bad answers. If the right chunk was never retrieved, your problem is retrieval, and a better prompt will not fix it.

&lt;h2&gt;Agentic RAG: the strategic pivot&lt;/h2&gt;
&lt;p&gt;Agentic RAG turns retrieval from a passive pipeline into an active control loop. Instead of a fixed sequence, an LLM agent acts as a &quot;brain&quot; that manages the whole workflow.&lt;/p&gt;
&lt;p&gt;The agent can plan its approach, decide which tools to use, and iterate until it finds a satisfactory answer.&lt;/p&gt;
&lt;figure&gt;
&lt;h3&gt;Splitting the question&lt;/h3&gt;
&lt;p&gt;In an Agentic RAG system, the agent might decide that a single search is not enough. It might break a complex request into three sub-queries, search different data sources for each, and then combine the results into one answer.&lt;/p&gt;
&lt;p&gt;This is particularly useful for &lt;a href=&quot;https://ansezz.com/blog/agentic-commerce-shopify/&quot;&gt;agentic commerce on Shopify&lt;/a&gt;, where a user might ask for a comparison between several products across different categories.&lt;/p&gt;
&lt;h3&gt;The plan-act-observe cycle&lt;/h3&gt;
&lt;p&gt;The core of this architecture is the plan-act-observe cycle (the same loop behind ReAct-style agents). The agent plans a step, performs an action (like calling a search tool), observes the result, and decides whether it needs more information.&lt;/p&gt;
&lt;p&gt;This lets it solve multi-hop problems, where the answer to the first part of a question provides the search terms for the second.&lt;/p&gt;
&lt;h3&gt;The price of loops&lt;/h3&gt;
&lt;p&gt;Agentic RAG is more capable, but it is also more expensive and slower than traditional methods. Each iteration requires another LLM call, which increases both the token cost and the time the user waits.&lt;/p&gt;
&lt;p&gt;Managing these loops takes solid infrastructure, often including an &lt;a href=&quot;https://ansezz.com/blog/api-gateway-ai-stack/&quot;&gt;API gateway in the AI stack&lt;/a&gt; to handle the extra traffic and orchestration complexity.&lt;/p&gt;
&lt;h2&gt;Corrective RAG (CRAG): the self-healing layer&lt;/h2&gt;
&lt;p&gt;Corrective RAG, or CRAG, adds a self-correction step to retrieval. Its goal is to cut hallucinations by putting a lightweight retrieval evaluator between the retrieval and generation steps to judge how relevant the retrieved documents are.&lt;/p&gt;
&lt;p&gt;The original &lt;a href=&quot;https://arxiv.org/abs/2401.15884&quot;&gt;CRAG paper&lt;/a&gt; uses a fine-tuned T5-large model as that evaluator.&lt;/p&gt;
&lt;figure&gt;
&lt;h3&gt;Three confidence levels&lt;/h3&gt;
&lt;p&gt;The evaluator sorts each retrieval into one of three confidence levels: correct, incorrect, or ambiguous.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Correct:&lt;/strong&gt; CRAG keeps the retrieved context but refines it with a decompose-then-recompose step that strips out irrelevant text before generation.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Incorrect:&lt;/strong&gt; CRAG discards the retrieval and triggers a large-scale web search to pull in more reliable knowledge.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Ambiguous:&lt;/strong&gt; CRAG combines both, using refined retrieval plus web search results.&lt;/li&gt;
&lt;/ul&gt;
&lt;h3&gt;Grounded verification&lt;/h3&gt;
&lt;p&gt;CRAG suits high-stakes environments where accuracy is non-negotiable. It adds a layer of grounded verification to the otherwise probabilistic behavior of LLMs, deciding whether to trust, refine, or replace retrieved context.&lt;/p&gt;
&lt;p&gt;By checking whether the ground truth is actually present in the retrieved data, CRAG keeps the model from inventing facts when the database comes up empty.&lt;/p&gt;
&lt;h3&gt;How the CRAG loop works&lt;/h3&gt;
&lt;ol&gt;
&lt;li&gt;&lt;strong&gt;Retrieve:&lt;/strong&gt; fetch initial context chunks.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Evaluate:&lt;/strong&gt; a lightweight evaluator scores each chunk&apos;s relevance into correct, incorrect, or ambiguous.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Correct:&lt;/strong&gt; if confidence is low, trigger a secondary retrieval (commonly a web search) and refine the context.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Generate:&lt;/strong&gt; synthesize the final answer only from verified or corrected context.&lt;/li&gt;
&lt;/ol&gt;
&lt;h2&gt;Comparison: speed vs accuracy vs reasoning&lt;/h2&gt;
&lt;p&gt;Choosing between these RAG architectures is a trade-off between performance, cost, and complexity. Use the table below to guide your decision.&lt;/p&gt;
&lt;p&gt;If you are still settling on the storage layer underneath, &lt;a href=&quot;https://ansezz.com/blog/picking-the-right-rag-stack/&quot;&gt;picking the right RAG stack&lt;/a&gt; covers the vector database choices in depth.&lt;/p&gt;
&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Feature&lt;/th&gt;
&lt;th&gt;Traditional RAG&lt;/th&gt;
&lt;th&gt;Agentic RAG&lt;/th&gt;
&lt;th&gt;Corrective RAG&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Flow Type&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Linear&lt;/td&gt;
&lt;td&gt;Cyclic / Iterative&lt;/td&gt;
&lt;td&gt;Evaluative Loop&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Latency&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Low&lt;/td&gt;
&lt;td&gt;High&lt;/td&gt;
&lt;td&gt;Medium&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Cost&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Low&lt;/td&gt;
&lt;td&gt;High&lt;/td&gt;
&lt;td&gt;Medium-High&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Use Case&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Simple FAQ, Lookup&lt;/td&gt;
&lt;td&gt;Complex Research, Workflows&lt;/td&gt;
&lt;td&gt;High-Accuracy Q&amp;amp;A&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Reliability&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Moderate&lt;/td&gt;
&lt;td&gt;High (Reasoning)&lt;/td&gt;
&lt;td&gt;Very High (Grounding)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Implementation&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Easy&lt;/td&gt;
&lt;td&gt;Complex&lt;/td&gt;
&lt;td&gt;Moderate&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;h3&gt;A sensible path&lt;/h3&gt;
&lt;p&gt;For most startups, the most logical path is to start with Traditional RAG and then add a Corrective layer. You ship quickly and still have a roadmap for more reliability as your dataset grows.&lt;/p&gt;

Before building a full CRAG loop, add one cheap relevance check: ask a small model &quot;does this context answer the question? yes/no&quot; before generating. Return &quot;I don&apos;t know&quot; on a no, and count how often it fires.

&lt;h2&gt;Implementation in production: Laravel and cloud&lt;/h2&gt;
&lt;p&gt;Building these architectures takes more than an LLM API key. It needs a solid backend to handle state, queues, and data processing.&lt;/p&gt;
&lt;p&gt;In a Laravel environment, you can run the agentic loops with job queues and dedicated service classes. Laravel&apos;s ecosystem suits the orchestrator logic that drives an agentic RAG system.&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;// Conceptual Laravel Service for a Corrective RAG Flow
class RagOrchestrator {
    public function handleQuery(string $userQuery) {
        // 1. Retrieve initial chunks
        $chunks = $this-&amp;gt;vectorStore-&amp;gt;search($userQuery);

        // 2. Evaluate with a Critic
        $evaluation = $this-&amp;gt;critic-&amp;gt;evaluate($userQuery, $chunks);

        if ($evaluation-&amp;gt;isIrrelevant()) {
            // 3. Corrective action: Web Search or Retry
            $chunks = $this-&amp;gt;webSearch-&amp;gt;search($userQuery);
        }

        // 4. Final generation
        return $this-&amp;gt;llm-&amp;gt;generate($userQuery, $chunks);
    }
}
&lt;/code&gt;&lt;/pre&gt;
&lt;h3&gt;Scale the pieces separately&lt;/h3&gt;
&lt;p&gt;When deploying these systems, Docker and cloud infrastructure management matter a lot. You need to scale your vector database and your orchestration layer independently.&lt;/p&gt;
&lt;p&gt;Tools like Coolify for self-hosting, or managed GCP services, help with the compute demands of multi-step agentic loops.&lt;/p&gt;

Cache agent sub-query results in Redis, keyed by a hash of the normalized sub-query, with a short TTL. Track the hit rate for a week to see how much repeated work your loops were doing.

&lt;h2&gt;Match the architecture to the task&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Traditional RAG&lt;/strong&gt; is for speed and simplicity. It is the baseline for all projects.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Agentic RAG&lt;/strong&gt; is for thinking tasks. Use it when the user needs a consultant, not just a search bar.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Corrective RAG&lt;/strong&gt; is for truth tasks. Use it when hallucinations are a business risk.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Caching&lt;/strong&gt; is non-negotiable in agentic RAG. Cache the results of sub-queries to cut cost and latency for recurring questions.&lt;/li&gt;
&lt;/ul&gt;

RAG is no longer &quot;one size fits all.&quot; The move toward Agentic and Corrective systems shifts the focus of AI engineering to reliability, so pick the architecture that gives your users answers instead of noise.
&lt;ul&gt;
&lt;li&gt;Start with Traditional RAG to validate your data and basic retrieval quality.&lt;/li&gt;
&lt;li&gt;Implement a Critic layer (Corrective RAG) early if accuracy is your primary KPI.&lt;/li&gt;
&lt;li&gt;Reserve Agentic RAG for workflows that require actual decision-making and tool use.&lt;/li&gt;
&lt;li&gt;Monitor your retrieval hit rate and token usage religiously.&lt;/li&gt;
&lt;li&gt;Use a modular backend structure like Laravel to manage the complexity of multi-loop architectures.
&lt;/li&gt;&lt;/ul&gt;

&lt;p&gt;If you&apos;re deciding which RAG architecture fits your product, &lt;a href=&quot;https://ansezz.com/services/&quot;&gt;here&apos;s how I help teams ship it&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;Which architecture currently provides the best balance of cost and accuracy for your production workloads?&lt;/p&gt;
&lt;/figure&gt;&lt;/figure&gt;</content:encoded><category>ai</category><category>rag</category><category>agentic-ai</category><category>llm</category><category>vector-search</category><category>ai-engineering</category></item><item><title>Prompt engineering vs context engineering</title><link>https://ansezz.com/blog/prompt-engineering-vs-context-engineering/</link><guid isPermaLink="true">https://ansezz.com/blog/prompt-engineering-vs-context-engineering/</guid><description>The shift from instruction design to data infrastructure: how context engineering uses RAG, MCP and memory to build accurate AI systems.</description><pubDate>Wed, 10 Jun 2026 00:00:00 GMT</pubDate><content:encoded>&lt;p&gt;Prompt engineering is about how you ask. Context engineering is about what the model can see when you ask. Past a certain point, only the second one moves accuracy.&lt;/p&gt;

- Prompts hit an &quot;instruction ceiling&quot;: no phrasing fixes a model that lacks the data, and crowded context windows lose details in the middle.
- Context engineering builds the system around the model: retrieval (RAG), tools (MCP), memory and workflow state.
- In practice that means a context layer in your backend that assembles the right documents, history and tools before the model sees the user&apos;s input.

&lt;p&gt;You spent three hours tweaking a system prompt so your LLM would stop inventing details about customer orders. It worked for ten minutes.&lt;/p&gt;
&lt;p&gt;Then a user asked about a return policy from 2024, and the model confidently described a 90-day cash-back guarantee that doesn&apos;t exist.&lt;/p&gt;
&lt;h3&gt;The instruction ceiling&lt;/h3&gt;
&lt;p&gt;You&apos;ve hit the instruction ceiling. No amount of &quot;You are a helpful assistant&quot; or &quot;Think step by step&quot; lets a model reason its way out of missing data.&lt;/p&gt;
&lt;p&gt;You&apos;re treating a data problem as a language problem. As we move from simple chatbots to agentic systems, the focus shifts from how we talk to models to how we feed them.&lt;/p&gt;
&lt;h2&gt;Where prompts stop working&lt;/h2&gt;
&lt;p&gt;Prompt engineering was the first discipline of the AI era. You craft instructions, examples and formatting rules to steer a Large Language Model (LLM), and you might spend days testing phrasing or adding few-shot examples.&lt;/p&gt;
&lt;p&gt;That works well for creative writing and basic text transformation.&lt;/p&gt;
&lt;h3&gt;Stateless and crowded&lt;/h3&gt;
&lt;p&gt;Prompts are stateless and limited. You squeeze logic, data and constraints into a finite context window, and when it gets crowded the model loses track of details.&lt;/p&gt;
&lt;p&gt;Researchers call this &lt;a href=&quot;https://arxiv.org/abs/2307.03172&quot;&gt;&quot;lost in the middle&quot;&lt;/a&gt;: models use information at the start and end of a long context better than information buried in the middle. Relying only on prompts also means relying on training data, which is static and often outdated.&lt;/p&gt;
&lt;h3&gt;Static instructions in production&lt;/h3&gt;
&lt;p&gt;In production, especially in &lt;a href=&quot;https://ansezz.com/blog/agentic-commerce-shopify/&quot;&gt;Shopify development&lt;/a&gt; or custom enterprise software, static instructions are dangerous. If the model doesn&apos;t know real-time stock levels or the specs of a new product, clever phrasing won&apos;t prevent a made-up answer.&lt;/p&gt;
&lt;h2&gt;What is context engineering?&lt;/h2&gt;
&lt;p&gt;Context engineering is the programmatic management of everything around the model. It covers the text you send, and also the architecture that decides which data, tools and memories the model can reach at any moment.&lt;/p&gt;
&lt;p&gt;If prompt engineering is writing a script for an actor, context engineering is building the stage, supplying the props and hiring the research team that feeds facts into the actor&apos;s earpiece.&lt;/p&gt;
&lt;h3&gt;The moving parts&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Retrieval pipelines:&lt;/strong&gt; fetch relevant data from external sources on demand.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Tool governance:&lt;/strong&gt; decide which APIs or functions the model can call.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Memory management:&lt;/strong&gt; store and retrieve past interactions for continuity.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;State orchestration:&lt;/strong&gt; track where the user is in a workflow or business process.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Moving from &quot;telling&quot; to &quot;showing&quot; lowers the load on the model. Instead of asking it to remember every policy, you build a system that finds the one relevant policy and puts it in front of the model.&lt;/p&gt;
&lt;figure&gt;
&lt;h2&gt;RAG: the context delivery engine&lt;/h2&gt;
&lt;p&gt;Retrieval-augmented generation (RAG) is the most common form of context engineering. It closes the knowledge gap by connecting your LLM to a vector store: Postgres with the &lt;a href=&quot;https://ansezz.com/blog/picking-the-right-rag-stack/&quot;&gt;pgvector extension&lt;/a&gt;, or a dedicated database like Pinecone, Weaviate or Qdrant.&lt;/p&gt;
&lt;p&gt;When a user asks a question, the system first converts it into an embedding (a numeric representation of meaning). It searches for the most similar documents, then injects those snippets into the prompt.&lt;/p&gt;

  &lt;div&gt;&quot;Answer questions based on our manual.&quot; The model guesses which part of the manual applies, or invents one.&lt;/div&gt;
  &lt;div&gt;&quot;Here are the three paragraphs from our manual that answer this question. Use them.&quot; The model works from the actual source.&lt;/div&gt;

&lt;p&gt;That change cuts the chance of the model making things up. RAG has its own pitfalls, though, and it&apos;s worth knowing the common &lt;a href=&quot;https://ansezz.com/blog/7-rag-mistakes-production/&quot;&gt;RAG mistakes in production&lt;/a&gt;.&lt;/p&gt;
&lt;h2&gt;MCP: the shared data plumbing&lt;/h2&gt;
&lt;p&gt;The &lt;strong&gt;Model Context Protocol (MCP)&lt;/strong&gt; is one of the most useful pieces of context engineering. Anthropic introduced it in November 2024 and donated it in December 2025 to the Agentic AI Foundation, a Linux Foundation fund co-founded by Anthropic, Block and OpenAI.&lt;/p&gt;
&lt;p&gt;Say you&apos;re building an agent that checks GitHub issues, looks up a customer in a CRM and writes a technical summary. Traditionally you&apos;d write custom integration code for each source. With MCP, servers expose those sources in a standard format any MCP client can discover and call.&lt;/p&gt;
&lt;h3&gt;Pull, don&apos;t push&lt;/h3&gt;
&lt;p&gt;MCP lets the model pull context when it needs it, so it explores your data instead of passively receiving one big prompt. It turns context from a static block of text into a queryable interface, and it&apos;s a core part of a modern &lt;a href=&quot;https://ansezz.com/blog/api-gateway-ai-stack/&quot;&gt;API gateway for AI stacks&lt;/a&gt;.&lt;/p&gt;
&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Feature&lt;/th&gt;
&lt;th&gt;Prompt engineering&lt;/th&gt;
&lt;th&gt;Context engineering&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Focus&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Phrasing and tone&lt;/td&gt;
&lt;td&gt;Data and tools&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Tooling&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Text editors, prompt playgrounds&lt;/td&gt;
&lt;td&gt;Vector DBs, MCP, RAG pipelines&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;State&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Mostly stateless&lt;/td&gt;
&lt;td&gt;Stateful and persistent&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Scalability&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Hard to maintain as docs grow&lt;/td&gt;
&lt;td&gt;Built for large document sets&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Primary goal&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Better behavior&lt;/td&gt;
&lt;td&gt;Better accuracy&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;p&gt;A model can only be as right as the context you hand it.&lt;/p&gt;

Take your longest system prompt and highlight every fact in it (policies, prices, product details). Move each one into a retrieval source or a tool, and keep only behavior rules in the prompt.

&lt;h2&gt;Memory and state&lt;/h2&gt;
&lt;p&gt;Prompting focuses on the &quot;now.&quot; Context engineering also handles the &quot;always&quot;: long-term memory.&lt;/p&gt;
&lt;p&gt;In a Laravel application, you might keep user preferences or past interactions in a database or Redis. When the user returns, the context layer retrieves those fragments and summarizes them for the model.&lt;/p&gt;
&lt;h3&gt;More than the last five messages&lt;/h3&gt;
&lt;ol&gt;
&lt;li&gt;&lt;strong&gt;Summarization:&lt;/strong&gt; condense long histories into short summaries. My &lt;a href=&quot;https://ansezz.com/tools/token-counter/&quot;&gt;token counter&lt;/a&gt; shows how much a summary saves.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Metadata filtering:&lt;/strong&gt; pull only memories relevant to the current topic.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Hierarchy:&lt;/strong&gt; decide which memories are &quot;core&quot; and which are &quot;ephemeral.&quot;&lt;/li&gt;
&lt;/ol&gt;
&lt;h2&gt;Agents vs chatbots&lt;/h2&gt;
&lt;p&gt;Context is what separates a basic chatbot from an AI agent. A chatbot waits for a prompt and responds. An agent works inside a context: tools (via MCP), knowledge (via RAG) and history (via memory stores).&lt;/p&gt;
&lt;p&gt;With a context-first mindset, you spend less time in a prompt playground and more time building reliable data connectors. You care about the &lt;strong&gt;quality of your data&lt;/strong&gt; more than the &lt;strong&gt;cleverness of your adjectives&lt;/strong&gt;.&lt;/p&gt;
&lt;h3&gt;A context layer in Laravel&lt;/h3&gt;
&lt;p&gt;For Laravel and Vue.js stacks, this means a context layer in your backend that gathers everything the AI needs before it sees the user&apos;s input.&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;// A simple context orchestrator in Laravel
class AIContextManager
{
    public function buildContext(User $user, string $query): array
    {
        $knowledge = $this-&amp;gt;vectorStore-&amp;gt;search($query);
        $history = $this-&amp;gt;memory-&amp;gt;getRecent($user-&amp;gt;id);
        $tools = $this-&amp;gt;mcp-&amp;gt;getAvailableTools([&apos;inventory&apos;, &apos;shipping&apos;]);

        return [
            &apos;system_prompt&apos; =&amp;gt; view(&apos;prompts.system&apos;)-&amp;gt;render(),
            &apos;retrieved_docs&apos; =&amp;gt; $knowledge,
            &apos;user_history&apos; =&amp;gt; $history,
            &apos;available_tools&apos; =&amp;gt; $tools,
            &apos;user_query&apos; =&amp;gt; $query,
        ];
    }
}
&lt;/code&gt;&lt;/pre&gt;
&lt;figure&gt;

Log the full context your app sends for ten real requests. For each one, mark which pieces the answer actually used. Anything that is never used is a candidate to drop or retrieve on demand.


- **Prompts are instructions; context is knowledge.** Stop trying to teach the model your whole business inside a system prompt.
- **Invest in RAG early.** Postgres with pgvector gives you a scalable way to handle growing documentation.
- **Adopt MCP for tool calling.** It standardizes how your AI reaches your APIs and databases.
- **Manage state outside the prompt.** Let your backend (Laravel, Node or similar) handle memory and session state.
- **Focus on data quality.** A perfect RAG system with bad data still gives bad answers. Context engineering is data engineering at heart.

&lt;p&gt;If you&apos;re building that context layer for production, &lt;a href=&quot;https://ansezz.com/services/&quot;&gt;here&apos;s how I help teams design RAG, MCP and memory for their AI features&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;How are you balancing long system prompts against external retrieval in your current AI work?&lt;/p&gt;
&lt;/figure&gt;&lt;/figure&gt;</content:encoded><category>ai</category><category>ai</category><category>rag</category><category>mcp</category><category>vector-search</category><category>laravel</category><category>devops</category></item><item><title>ML engineer vs AI engineer</title><link>https://ansezz.com/blog/ml-engineer-vs-ai-engineer/</link><guid isPermaLink="true">https://ansezz.com/blog/ml-engineer-vs-ai-engineer/</guid><description>ML engineer vs AI engineer: who trains the model, who orchestrates the system, their diverging toolsets, and which role your AI roadmap actually needs.</description><pubDate>Tue, 09 Jun 2026 00:00:00 GMT</pubDate><content:encoded>&lt;p&gt;An ML engineer builds the model. An AI engineer builds the product around a model someone else trained. Hire the wrong one and nothing ships.&lt;/p&gt;

- ML engineers train and tune models: data pipelines, feature stores, experiments and metrics like F1 score and loss curves.
- AI engineers orchestrate foundation models through APIs: RAG, agents, MCP, guardrails, latency and cost.
- Hire an ML engineer when no existing model fits your problem, and an AI engineer when a smart assistant with your data will do.

&lt;p&gt;You are ready to ship AI features, but your hiring roadmap is a mess of overlapping buzzwords and conflicting job descriptions.&lt;/p&gt;
&lt;p&gt;Hiring a researcher to build a production chatbot often means a month of experiments with zero shipped code. Asking a standard full-stack developer to optimize a vector search index usually ends in a high-latency disaster.&lt;/p&gt;
&lt;h3&gt;A wider gap than it looks&lt;/h3&gt;
&lt;p&gt;The gap between training a model and orchestrating a system is wider than most founders realize.&lt;/p&gt;
&lt;p&gt;The choice between an ML engineer and an AI engineer decides whether you build a proprietary brain or a fast application powered by existing intelligence.&lt;/p&gt;
&lt;h2&gt;The model scientist: defining the ML engineer&lt;/h2&gt;
&lt;p&gt;The machine learning engineer lives in the world of weights, biases and data distributions. Their main goal is to create, train or fine-tune models that solve specific predictive or generative tasks.&lt;/p&gt;
&lt;p&gt;They build the logic that lives inside the API, instead of calling someone else&apos;s.&lt;/p&gt;
&lt;h3&gt;A day in the life&lt;/h3&gt;
&lt;p&gt;An ML engineer might spend the day in PyTorch or TensorFlow designing a custom architecture. They handle the &quot;dirty work&quot; of data: cleaning large datasets, managing feature stores and dealing with data drift.&lt;/p&gt;
&lt;p&gt;Their mental model is rooted in applied statistics and experimental iteration. If you need a model that predicts fraudulent transactions from proprietary financial data, you need an ML engineer. They make sure the model generalizes well and doesn&apos;t overfit the training set.&lt;/p&gt;
&lt;h3&gt;Their stack&lt;/h3&gt;
&lt;p&gt;Their stack sits at the heavy end of the data world: Spark for data processing, Weights &amp;amp; Biases for experiment tracking and NVIDIA GPUs for heavy lifting.&lt;/p&gt;
&lt;p&gt;The output is a serialized model file or a dedicated inference service that other systems call. This is a deep-tech role focused on the &quot;how&quot; of intelligence, and the split between &lt;a href=&quot;https://ansezz.com/blog/training-vs-inference/&quot;&gt;training and inference&lt;/a&gt; shapes most of their day.&lt;/p&gt;
&lt;h2&gt;The systems architect: defining the AI engineer&lt;/h2&gt;
&lt;p&gt;The AI engineer is a fairly new kind of developer. They treat the model as a black-box service.&lt;/p&gt;
&lt;p&gt;Their focus is the infrastructure around the LLM that makes it useful for users, rather than training it. They are the bridge between raw intelligence and a working product.&lt;/p&gt;
&lt;h3&gt;A day in the life&lt;/h3&gt;
&lt;p&gt;An AI engineer spends their time on system design and software engineering. They work with foundation models like Claude, GPT and Gemini through APIs, and focus on RAG (retrieval-augmented generation) and agentic workflows.&lt;/p&gt;
&lt;p&gt;Instead of tweaking hyperparameters, they tweak system prompts and design tool-use schemas.&lt;/p&gt;
&lt;h3&gt;Owners of the AI user experience&lt;/h3&gt;
&lt;p&gt;The AI engineer owns the user experience of AI. That includes managing latency, adding guardrails and making sure the output is structured correctly for the frontend.&lt;/p&gt;
&lt;p&gt;If you are building a custom support bot on &lt;a href=&quot;https://ansezz.com/blog/agentic-commerce-shopify/&quot;&gt;Shopify&lt;/a&gt;, you want an AI engineer. They know how to connect the store&apos;s data to the LLM and handle multi-turn conversations.&lt;/p&gt;
&lt;p&gt;One role decides what the model knows. The other decides what users get from it.&lt;/p&gt;
&lt;figure&gt;
&lt;h2&gt;Technical stack: a side-by-side comparison&lt;/h2&gt;
&lt;p&gt;To see the differences, look at the tools used in 2026. There is overlap, but the main focus areas are distinct.&lt;/p&gt;
&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Feature&lt;/th&gt;
&lt;th&gt;ML Engineer&lt;/th&gt;
&lt;th&gt;AI Engineer&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Core Models&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Custom PyTorch/TensorFlow, XGBoost&lt;/td&gt;
&lt;td&gt;Claude, GPT, Llama, Gemini APIs&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Primary Task&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Training, Fine-tuning, Evaluation&lt;/td&gt;
&lt;td&gt;Prompt Engineering, RAG, Agents&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Data Focus&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Feature engineering, labeling, drift&lt;/td&gt;
&lt;td&gt;Chunking, indexing, retrieval quality&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Programming&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Python (heavy), C++, CUDA&lt;/td&gt;
&lt;td&gt;Python, TypeScript, PHP&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Infrastructure&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Kubernetes, GPUs, Feature Stores&lt;/td&gt;
&lt;td&gt;Vector DBs (pgvector), MCP, Serverless&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Success Metric&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;F1 Score, Accuracy, Loss curves&lt;/td&gt;
&lt;td&gt;Latency, Hallucination rate, User NPS&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;h3&gt;Two pipelines&lt;/h3&gt;
&lt;p&gt;The ML engineer owns the pipeline from raw data to a deployed model. The AI engineer owns the pipeline from a user query to a relevant, cited response.&lt;/p&gt;
&lt;p&gt;One builds the engine; the other builds the car and picks the right fuel.&lt;/p&gt;
&lt;h2&gt;The RAG bridge: where the roles meet&lt;/h2&gt;
&lt;p&gt;Retrieval-augmented generation (RAG) is the most common meeting point for these two roles. A solid RAG system needs high-quality embeddings and a fast, scalable vector database.&lt;/p&gt;
&lt;h3&gt;The ML side&lt;/h3&gt;
&lt;p&gt;An ML engineer might train a domain-specific embedding model or a custom reranker to improve search relevance. They look at the mathematical similarity between vectors and tune the distance functions.&lt;/p&gt;
&lt;h3&gt;The AI side&lt;/h3&gt;
&lt;p&gt;The AI engineer usually builds the end-to-end RAG system. They decide how to chunk documents, how to manage metadata and how to run &lt;a href=&quot;https://ansezz.com/blog/vector-search-vs-graph-search/&quot;&gt;hybrid search&lt;/a&gt; with tools like pgvector or Pinecone.&lt;/p&gt;
&lt;p&gt;They also handle context management: making sure the LLM gets exactly what it needs without exceeding its context window or blowing the budget. If you are just starting, avoid common &lt;a href=&quot;https://ansezz.com/blog/7-rag-mistakes-production/&quot;&gt;RAG mistakes in production&lt;/a&gt; by focusing on retrieval quality before model size.&lt;/p&gt;

Before you consider a bigger model or a custom embedding, build a set of 20 real questions with known answers and measure how often your retrieval returns the right chunk.

&lt;h2&gt;Agentic systems: the new frontier&lt;/h2&gt;
&lt;p&gt;In 2026, the focus has shifted from simple chatbots to agentic systems: AI agents that use tools, browse the web and run code to finish complex tasks.&lt;/p&gt;
&lt;h3&gt;AI engineers drive it&lt;/h3&gt;
&lt;p&gt;AI engineers are the main drivers of this shift. They use frameworks like LangGraph or the Claude Agent SDK to build multi-step workflows.&lt;/p&gt;
&lt;p&gt;They implement the &lt;a href=&quot;https://ansezz.com/blog/claude-mcp-dev-tools/&quot;&gt;Model Context Protocol (MCP)&lt;/a&gt; to give agents access to internal databases, local files and external APIs. That takes deep software engineering skills, because agents need reliable error handling and human-in-the-loop checkpoints to be useful in a business.&lt;/p&gt;
&lt;h3&gt;ML engineers supply the specialists&lt;/h3&gt;
&lt;p&gt;ML engineers support this by building the specialized tools agents call. An agent might call a custom fraud-detection model built by an ML engineer as part of its reasoning loop.&lt;/p&gt;
&lt;p&gt;The AI engineer orchestrates the logic, while the ML engineer provides the specialized predictions.&lt;/p&gt;

  &lt;div&gt;Collect data, train, evaluate on F1 and loss, ship a model file or inference service.&lt;/div&gt;
  &lt;div&gt;Take a user query, retrieve context, call a model and tools (maybe the ML engineer&apos;s model), check the output, return a cited answer.&lt;/div&gt;

&lt;h2&gt;DevOps and deployment: from MLOps to LLMOps&lt;/h2&gt;
&lt;p&gt;The deployment cycle looks very different for each role.&lt;/p&gt;
&lt;h3&gt;MLOps&lt;/h3&gt;
&lt;p&gt;ML engineers deal with MLOps. See &lt;a href=&quot;https://ansezz.com/blog/devops-vs-mlops/&quot;&gt;DevOps vs MLOps&lt;/a&gt; for how that discipline differs from classic ops.&lt;/p&gt;
&lt;p&gt;It means specialized infrastructure for model training, managing GPU clusters and watching for model drift over time. They often use Docker and Kubernetes so their models can scale to millions of inference requests.&lt;/p&gt;
&lt;h3&gt;LLMOps&lt;/h3&gt;
&lt;p&gt;AI engineers focus on LLMOps, or &quot;AI DevOps.&quot; Their concerns are API reliability, cost management and caching.&lt;/p&gt;
&lt;p&gt;They need their AI apps to stay fast and to swap a model version (for example, moving a Claude or GPT model to a newer release) without breaking the system. Tools like Coolify or cloud setups on Google Cloud are common here for hosting the middleware that connects the LLM to the world.&lt;/p&gt;
&lt;figure&gt;
&lt;h2&gt;How to choose the right path for your project&lt;/h2&gt;
&lt;p&gt;The decision depends on the &quot;intelligence&quot; you need.&lt;/p&gt;
&lt;h3&gt;When you need an ML engineer&lt;/h3&gt;
&lt;p&gt;If your problem is unique and no pre-trained model can solve it, you need an ML engineer. That is true for niche medical imaging, high-frequency trading or specialized sensor data analysis.&lt;/p&gt;
&lt;h3&gt;When you need an AI engineer&lt;/h3&gt;
&lt;p&gt;If a very smart assistant with access to your company data can solve it, you need an AI engineer. Most modern software falls into this group.&lt;/p&gt;
&lt;p&gt;You don&apos;t need to train a new model to build an AI-powered project management tool. You need a great system around a foundation model. This often comes down to a &lt;a href=&quot;https://ansezz.com/blog/rag-vs-fine-tuning/&quot;&gt;RAG vs fine-tuning&lt;/a&gt; decision, and the answer is usually RAG.&lt;/p&gt;
&lt;h3&gt;The new full-stack&lt;/h3&gt;
&lt;p&gt;&lt;a href=&quot;https://ansezz.com/blog/ai-vs-traditional-development/&quot;&gt;AI vs traditional development&lt;/a&gt; is becoming less about the code and more about data orchestration. The AI engineer is a full-stack developer who has learned to manage non-deterministic outputs.&lt;/p&gt;

Write one sentence describing the AI feature on your roadmap. If it needs a model that doesn&apos;t exist yet, start with an ML engineer; if it needs an existing model wired to your data, start with an AI engineer.


- **ML engineers** are model builders focused on training, data science and applied statistics.
- **AI engineers** are system builders focused on app development, RAG, agents and model orchestration.
- **The overlap** is Python and data basics, but the daily toolsets are moving apart.
- **RAG** is the main point where both roles add to one production feature.
- **Agents** are where AI engineering is heading, and they need strong backend logic and API integration skills.
- **Choosing the right role** avoids wasted budget and gets your AI features into production.

&lt;p&gt;If you need the AI engineering side (RAG, agents and MCP wired into your product), &lt;a href=&quot;https://ansezz.com/services/&quot;&gt;here&apos;s how I help teams ship production AI features&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;When you look at your roadmap, is the main bottleneck the lack of a custom model, or making an existing model work reliably with your data?&lt;/p&gt;
&lt;/figure&gt;&lt;/figure&gt;</content:encoded><category>ai</category><category>ai</category><category>machine-learning</category><category>llm</category><category>rag</category><category>agentic-ai</category></item><item><title>LLM vs AI agent: from prompts to action</title><link>https://ansezz.com/blog/llm-vs-ai-agent/</link><guid isPermaLink="true">https://ansezz.com/blog/llm-vs-ai-agent/</guid><description>The architectural shift from LLMs to autonomous AI agents. How memory, tool-use, and planning turn a stateless model into a system that takes action.</description><pubDate>Sat, 06 Jun 2026 00:00:00 GMT</pubDate><content:encoded>&lt;p&gt;An LLM gives you great answers and zero execution. An agent wraps it in tools, memory and a loop so it can actually do the work.&lt;/p&gt;

- An LLM is a stateless next-token predictor: no memory between calls, a knowledge cutoff and no access to outside systems.
- An agent runs the LLM inside a loop (think, act with a tool, observe the result) backed by memory, tools, planning and reasoning.
- Use a plain LLM for simple, linear, low-latency text tasks, and an agent when the work needs several steps or external systems.

&lt;p&gt;Most developers start their AI journey by sending a prompt to an API and waiting for a text response. That works for simple summaries or creative writing.&lt;/p&gt;
&lt;p&gt;It fails when the task needs real-world actions. A single chat completion cannot run a multi-step refund process in a Shopify store or navigate a complex database schema to build a report.&lt;/p&gt;
&lt;h3&gt;The architecture is the limit&lt;/h3&gt;
&lt;p&gt;What holds you back is the architecture around the model.&lt;/p&gt;
&lt;p&gt;Relying only on Large Language Models (LLMs) is like hiring a genius professor who has no hands, no memory of yesterday and no computer. You get great answers but nothing gets done.&lt;/p&gt;
&lt;h3&gt;Agents add the missing parts&lt;/h3&gt;
&lt;p&gt;AI agents wrap the LLM in tools, memory and planning logic. Moving from &quot;talking to a model&quot; to &quot;building an autonomous system&quot; is one of the main changes in how we architect software today.&lt;/p&gt;
&lt;h2&gt;The LLM as a prediction engine&lt;/h2&gt;
&lt;p&gt;A Large Language Model is a stateless next-token predictor. When you send a prompt, the model uses its training to calculate the most probable sequence of words to follow your input.&lt;/p&gt;
&lt;p&gt;It does not &quot;think&quot; in the human sense. It runs one forward pass per generated token through a very large neural network.&lt;/p&gt;
&lt;h3&gt;What a standalone LLM can&apos;t do&lt;/h3&gt;
&lt;p&gt;The core traits of a standalone LLM:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Statelessness:&lt;/strong&gt; the model does not remember previous interactions unless you include them in the current prompt.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Knowledge cutoff:&lt;/strong&gt; it only knows what was in its training set up to a certain date.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;No external interaction:&lt;/strong&gt; by default, it cannot check your email, query your production database or browse the web.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Single-turn logic:&lt;/strong&gt; it produces one output for one input. Any multi-step reasoning must happen inside that single output.&lt;/li&gt;
&lt;/ul&gt;
&lt;h3&gt;When that&apos;s enough&lt;/h3&gt;
&lt;p&gt;For simple applications, this is fine. If you are building a basic &lt;a href=&quot;https://ansezz.com/blog/api-gateway-ai-stack/&quot;&gt;API gateway for AI&lt;/a&gt;, a thin wrapper around a model might be all you need.&lt;/p&gt;
&lt;p&gt;As soon as you need the system to take initiative, the LLM alone falls short.&lt;/p&gt;
&lt;h2&gt;Defining the AI agent: the reasoning loop&lt;/h2&gt;
&lt;p&gt;An AI agent is an autonomous system that uses an LLM as its central reasoning engine. Unlike a single LLM call, an agent works inside a loop.&lt;/p&gt;
&lt;p&gt;It observes the environment, thinks about what to do next, takes an action with a tool, and then observes the result to decide its next step.&lt;/p&gt;
&lt;h3&gt;Agents fix their own mistakes&lt;/h3&gt;
&lt;p&gt;This loop lets the agent correct itself. If a database query fails, a standalone LLM would simply report the failure in its final response.&lt;/p&gt;
&lt;p&gt;An agent sees the error, works out what went wrong and tries a different query. Interleaving a reasoning step with an action and then observing the result is the ReAct (Reasoning + Acting) approach introduced by Yao et al. in 2022.&lt;/p&gt;
&lt;p&gt;The model answers. The loop around it is what gets things done.&lt;/p&gt;
&lt;figure&gt;
&lt;h2&gt;The four pillars of agency&lt;/h2&gt;
&lt;p&gt;To turn an LLM into an agent, you add four layers of infrastructure.&lt;/p&gt;
&lt;h3&gt;1. Memory&lt;/h3&gt;
&lt;p&gt;LLMs have a &quot;context window,&quot; but it is temporary and expensive. Agents use external memory systems to keep state across sessions.&lt;/p&gt;
&lt;p&gt;That includes short-term memory for the current task steps and long-term memory for user preferences or historical data. We often use vector databases like pgvector to store and retrieve these memories. The difference between the &lt;a href=&quot;https://ansezz.com/blog/context-window-vs-memory/&quot;&gt;context window and persistent memory&lt;/a&gt; is what separates a toy from a production agent.&lt;/p&gt;
&lt;h3&gt;2. Tools&lt;/h3&gt;
&lt;p&gt;Tools are the hands of the agent: external functions, APIs or scripts the agent can choose to run.&lt;/p&gt;
&lt;p&gt;When the agent sees it needs information it doesn&apos;t have, it generates a structured command (usually a JSON object that matches the tool&apos;s schema) to call a tool. This is what lets agents act on stacks like Laravel or &lt;a href=&quot;https://ansezz.com/blog/agentic-commerce-shopify/&quot;&gt;a Shopify store&lt;/a&gt;.&lt;/p&gt;
&lt;h3&gt;3. Planning&lt;/h3&gt;
&lt;p&gt;Complex goals need to be broken into smaller tasks. An agent uses the LLM to create a roadmap.&lt;/p&gt;
&lt;p&gt;For example, a high-level request like &quot;Audit our cloud spend&quot; gets split into sub-tasks: &quot;List all AWS instances,&quot; &quot;Query pricing API&quot; and &quot;Generate CSV report.&quot;&lt;/p&gt;
&lt;h3&gt;4. Reasoning&lt;/h3&gt;
&lt;p&gt;Reasoning governs how the agent uses the other three pillars. It is the control loop that keeps the system running until the goal is reached or a stopping condition is met.&lt;/p&gt;

Take one task you currently handle with a single prompt and write down its steps. If it has more than one step that touches an outside system, it is a candidate for an agent loop.

&lt;h2&gt;Technical comparison&lt;/h2&gt;
&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Feature&lt;/th&gt;
&lt;th&gt;Large Language Model (LLM)&lt;/th&gt;
&lt;th&gt;AI agent&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Execution&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Passive (prompt-response)&lt;/td&gt;
&lt;td&gt;Active (goal-oriented)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Persistence&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;None (stateless)&lt;/td&gt;
&lt;td&gt;Persistent (external memory)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Capabilities&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Text generation and analysis&lt;/td&gt;
&lt;td&gt;Tool use, API calls, web browsing&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Reasoning&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;One-shot internal logic&lt;/td&gt;
&lt;td&gt;Multi-step iterative loop&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Connectivity&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Isolated&lt;/td&gt;
&lt;td&gt;Integrated with external systems&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Architecture&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Model-centric&lt;/td&gt;
&lt;td&gt;System-centric&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;h2&gt;Transitioning from RAG to agentic workflows&lt;/h2&gt;
&lt;p&gt;Retrieval-Augmented Generation (RAG) was the first step toward more capable AI. In a standard RAG setup, you retrieve relevant documents from a vector store and stuff them into the LLM prompt. It is a linear process.&lt;/p&gt;
&lt;h3&gt;Agentic RAG&lt;/h3&gt;
&lt;p&gt;Agentic RAG goes further. Instead of a fixed retrieval step, the agent decides &lt;em&gt;when&lt;/em&gt; to search, &lt;em&gt;what&lt;/em&gt; keywords to use and &lt;em&gt;whether&lt;/em&gt; the results were actually useful.&lt;/p&gt;
&lt;p&gt;If the first search results are poor, the agent refines its query and searches again. I cover this in more depth in &lt;a href=&quot;https://ansezz.com/blog/rag-architectures-traditional-agentic-corrective/&quot;&gt;traditional vs agentic vs corrective RAG&lt;/a&gt;.&lt;/p&gt;

  &lt;div&gt;Retrieve once, stuff the results into the prompt, answer. Poor results go straight into the answer.&lt;/div&gt;
  &lt;div&gt;The agent decides when and what to search, checks if the results help, and searches again with a better query if they don&apos;t.&lt;/div&gt;

&lt;h3&gt;Fewer bad retrievals&lt;/h3&gt;
&lt;p&gt;Take the &lt;a href=&quot;https://ansezz.com/blog/7-rag-mistakes-production/&quot;&gt;7 common RAG mistakes&lt;/a&gt;. An agentic approach can reduce problems like &quot;hallucinated retrieval&quot; by cross-referencing multiple sources or checking facts against a structured database.&lt;/p&gt;
&lt;h2&gt;Building agents in production&lt;/h2&gt;
&lt;p&gt;Building an agentic system takes more than an API key. You need a solid backend to manage state and run the tools.&lt;/p&gt;
&lt;p&gt;Frameworks like LangGraph and CrewAI are popular with Python developers. In the PHP ecosystem, you can build capable agentic backends with Laravel and tools like &lt;a href=&quot;https://ansezz.com/blog/claude-mcp-dev-tools/&quot;&gt;Claude MCP&lt;/a&gt;.&lt;/p&gt;
&lt;h3&gt;MCP for tools&lt;/h3&gt;
&lt;p&gt;The Model Context Protocol (MCP) is especially useful for agent development. It gives agents a standard way to connect to local and remote data sources.&lt;/p&gt;
&lt;p&gt;Instead of writing custom connectors for every tool, you can use MCP to give your agent direct access to your filesystem, GitHub repos or database schemas.&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;// Example of a tool definition in a Laravel-based agent
public function getTools(): array
{
    return [
        [
            &apos;name&apos; =&amp;gt; &apos;query_shopify_orders&apos;,
            &apos;description&apos; =&amp;gt; &apos;Retrieves order details from Shopify using GraphQL.&apos;,
            &apos;parameters&apos; =&amp;gt; [
                &apos;type&apos; =&amp;gt; &apos;object&apos;,
                &apos;properties&apos; =&amp;gt; [
                    &apos;order_id&apos; =&amp;gt; [&apos;type&apos; =&amp;gt; &apos;string&apos;],
                ],
            ],
        ],
    ];
}
&lt;/code&gt;&lt;/pre&gt;
&lt;h3&gt;Clear tool definitions&lt;/h3&gt;
&lt;p&gt;Clear tool definitions tell the agent exactly what it can do. The LLM then acts as the router, deciding which tool to trigger based on the user&apos;s intent.&lt;/p&gt;
&lt;figure&gt;

Rewrite the `description` of each tool your agent has so it says what the tool does, when to use it and what it returns. Vague descriptions are a common reason agents pick the wrong tool.

&lt;h2&gt;When to choose an agent over an LLM&lt;/h2&gt;
&lt;p&gt;Not every feature needs to be an agent. Agents are more complex to build, harder to test and can cost more because of multiple LLM calls.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Use a standalone LLM when:&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;You need immediate, low-latency text generation.&lt;/li&gt;
&lt;li&gt;The task is simple and doesn&apos;t need external data.&lt;/li&gt;
&lt;li&gt;The workflow is linear and predictable.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;strong&gt;Use an AI agent when:&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;The task needs multiple steps or logic branches.&lt;/li&gt;
&lt;li&gt;The system must interact with external APIs or databases.&lt;/li&gt;
&lt;li&gt;The goal is open-ended (for example, &quot;Research this topic and find three competitors&quot;).&lt;/li&gt;
&lt;li&gt;The system needs to learn and adapt over time using memory.&lt;/li&gt;
&lt;/ul&gt;

- **LLMs are the engine.** They provide the reasoning but need a system around them to do real work.
- **Agency is architectural.** You build it by adding memory, tool use and planning layers to your model.
- **Reasoning loops are key.** Observing and correcting actions is what makes agents autonomous.
- **Start with RAG, then move to agents.** Agentic RAG is a natural next step for teams already using vector databases.
- **Standardize your tools.** Protocols like MCP make it easier to give agents the data they need without custom boilerplate.

&lt;p&gt;If you want help turning a prompt-response feature into an agent that takes action, &lt;a href=&quot;https://ansezz.com/services/&quot;&gt;here&apos;s how I work with teams shipping agents with tools, memory and MCP&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;Is your current AI implementation stuck in a passive prompt-response loop, or are you ready to build systems that actually take action?&lt;/p&gt;
&lt;/figure&gt;&lt;/figure&gt;</content:encoded><category>ai</category><category>llm</category><category>agentic-ai</category><category>rag</category><category>architecture</category><category>mcp</category></item><item><title>Context window vs memory: building AI that remembers</title><link>https://ansezz.com/blog/context-window-vs-memory/</link><guid isPermaLink="true">https://ansezz.com/blog/context-window-vs-memory/</guid><description>Stop context-stuffing your LLM prompts. The difference between the context window and persistent memory, and how RAG + pgvector scale AI agents affordably.</description><pubDate>Thu, 04 Jun 2026 00:00:00 GMT</pubDate><content:encoded>&lt;p&gt;A context window is a desk. Memory is a library. Stop trying to fit the whole library on the desk.&lt;/p&gt;

- The context window is the model&apos;s short-term working memory: big, temporary and paid for on every request.
- Long-term memory lives outside the model, usually in a vector database such as pgvector, and RAG pulls only the relevant chunks into the window.
- Production agents use tiers: recent messages in context, episodic and semantic memory through RAG, and tools (often via MCP) to fetch the rest on demand.

&lt;p&gt;Large language models have a memory problem that costs you money and performance. You spend thousands of tokens feeding the same documentation, user history and context into every prompt.&lt;/p&gt;
&lt;p&gt;Yet the moment the session ends, the model forgets everything. It is like hiring a genius consultant who gets total amnesia the instant they walk out the door.&lt;/p&gt;
&lt;h3&gt;Why context stuffing breaks down&lt;/h3&gt;
&lt;p&gt;This cycle of &quot;context stuffing&quot; doesn&apos;t hold up in production. Relying only on a massive context window leads to high latency and the &quot;lost in the middle&quot; effect, where models ignore data buried in the center of a large prompt.&lt;/p&gt;
&lt;p&gt;To build agentic systems that actually remember, you must separate the short-lived context window from persistent long-term memory.&lt;/p&gt;
&lt;p&gt;A solid AI architecture mixes RAG, vector databases and careful context management. This guide breaks down the technical differences between context and memory, and how to build a hybrid that scales.&lt;/p&gt;
&lt;h2&gt;Understanding the context window&lt;/h2&gt;
&lt;p&gt;The context window is the model&apos;s immediate working memory. It is the total number of tokens (words or parts of words) the model can process at one moment.&lt;/p&gt;
&lt;p&gt;When you send a prompt to a frontier model like Claude or GPT, the window holds your current instruction, the previous conversation and any files you attached. To see how much of a window your own prompt uses, paste it into my &lt;a href=&quot;https://ansezz.com/tools/context-window-checker/&quot;&gt;context window checker&lt;/a&gt;.&lt;/p&gt;
&lt;h3&gt;The desk analogy&lt;/h3&gt;
&lt;p&gt;Think of the context window as a physical desk. You can only fit so many papers on it at once. Add a new stack of documents and you have to push the old ones off.&lt;/p&gt;
&lt;p&gt;Once a token falls out of this window, the model loses all awareness of it. It does not matter if the information was vital. It is gone.&lt;/p&gt;
&lt;h3&gt;Big windows are still temporary&lt;/h3&gt;
&lt;p&gt;Modern models offer very large context windows: current Claude and Gemini models both go up to one million tokens. That is impressive, but it is still temporary, and it is not a replacement for a database.&lt;/p&gt;
&lt;p&gt;Using a large window for everything is an expensive way to handle data that should be stored permanently. Bigger is not automatically better either: accuracy and recall drop as the window fills, a problem the field now calls &quot;context rot.&quot;&lt;/p&gt;

Paste your largest production prompt into the [context window checker](/tools/context-window-checker/) and mark which parts are the same on every request. Those repeated parts are your first candidates for memory instead of context.

&lt;h2&gt;The illusion of long-term memory&lt;/h2&gt;
&lt;p&gt;Many developers mistake a long context window for long-term memory. It is a dangerous technical shortcut.&lt;/p&gt;
&lt;p&gt;If you are building for &lt;a href=&quot;https://ansezz.com/blog/agentic-commerce-shopify/&quot;&gt;Shopify Plus&lt;/a&gt;, for example, you might be tempted to dump your entire product catalog into the prompt. That creates three immediate problems:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;&lt;strong&gt;Cost.&lt;/strong&gt; You pay for those tokens every time the user asks a question.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Latency.&lt;/strong&gt; The more tokens you send, the longer the model takes to reason and respond.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Accuracy.&lt;/strong&gt; Large context windows are prone to noise. The model may hallucinate because it is overwhelmed by irrelevant data.&lt;/li&gt;
&lt;/ol&gt;
&lt;h3&gt;What real memory looks like&lt;/h3&gt;
&lt;p&gt;True long-term memory is persistent. It lives outside the model.&lt;/p&gt;
&lt;p&gt;It lets an AI agent remember a user&apos;s preference from three months ago without including that preference in every API call. This is where Retrieval-Augmented Generation (RAG) becomes the hero of your architecture.&lt;/p&gt;
&lt;p&gt;A bigger desk doesn&apos;t help if you never build the library.&lt;/p&gt;
&lt;h2&gt;RAG: the external brain for AI&lt;/h2&gt;
&lt;p&gt;Retrieval-Augmented Generation (RAG) is the bridge between a stateless LLM and a persistent knowledge base.&lt;/p&gt;
&lt;p&gt;Instead of stuffing everything into the context window, you store your data in a vector database. When a query comes in, you run a semantic search to find only the most relevant &quot;chunks&quot; of information.&lt;/p&gt;
&lt;h3&gt;Lean prompts, focused model&lt;/h3&gt;
&lt;p&gt;Those chunks are then injected into the context window. The prompt stays lean and the model stays focused. RAG turns the &quot;desk&quot; (context window) into a tool for reasoning over a &quot;library&quot; (vector database).&lt;/p&gt;
&lt;h3&gt;pgvector for Laravel teams&lt;/h3&gt;
&lt;p&gt;For teams in the Laravel ecosystem, RAG has become much easier with tools like &lt;a href=&quot;https://github.com/pgvector/pgvector&quot;&gt;pgvector&lt;/a&gt;. You can store embeddings directly in your PostgreSQL database, so your relational data and your AI logic live side by side.&lt;/p&gt;
&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Feature&lt;/th&gt;
&lt;th&gt;Context Window&lt;/th&gt;
&lt;th&gt;Long-Term Memory (RAG)&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Duration&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Session-based (Temporary)&lt;/td&gt;
&lt;td&gt;Persistent (Permanent)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Capacity&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Limited (up to ~1M tokens)&lt;/td&gt;
&lt;td&gt;Virtually Unlimited&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Cost&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;High per-request cost&lt;/td&gt;
&lt;td&gt;Low per-request (fixed storage)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Update Speed&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Instant for the session&lt;/td&gt;
&lt;td&gt;Requires indexing/embedding&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;figure&gt;
&lt;h2&gt;The economics of tokens vs infrastructure&lt;/h2&gt;
&lt;p&gt;Choosing between a larger context window and a RAG pipeline is an economic decision.&lt;/p&gt;
&lt;p&gt;For a small internal tool with ten users, context stuffing is fine. The engineering hours needed to build a RAG pipeline would exceed the token savings.&lt;/p&gt;
&lt;h3&gt;When the math flips&lt;/h3&gt;
&lt;p&gt;For a SaaS application or a high-volume e-commerce store, the math shifts quickly. Sending 100,000 tokens per request at scale will destroy your margins. A well-optimized RAG system might send only 2,000 tokens per request.&lt;/p&gt;
&lt;p&gt;Run both numbers through my &lt;a href=&quot;https://ansezz.com/tools/llm-cost-calculator/&quot;&gt;LLM cost calculator&lt;/a&gt; to see the monthly gap.&lt;/p&gt;

  &lt;div&gt;About 100,000 tokens per request: the whole catalog and history, paid for every time, with slower answers and more noise.&lt;/div&gt;
  &lt;div&gt;About 2,000 tokens per request: only the top chunks from the vector store, with a small fixed storage cost.&lt;/div&gt;

&lt;h3&gt;Storage is cheaper than tokens&lt;/h3&gt;
&lt;p&gt;A vector database like Pinecone, or a self-hosted pgvector instance, often costs a fraction of the wasted tokens. The trade-offs between managed and self-hosted stores are worth weighing up front: see &lt;a href=&quot;https://ansezz.com/blog/picking-the-right-rag-stack/&quot;&gt;picking the right RAG stack&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;Either way, you avoid the common &lt;a href=&quot;https://ansezz.com/blog/7-rag-mistakes-production/&quot;&gt;RAG mistakes in production&lt;/a&gt; by focusing on retrieval quality rather than prompt size.&lt;/p&gt;

Put your current tokens per request and your daily request count into the [LLM cost calculator](/tools/llm-cost-calculator/), then repeat with 2,000 tokens per request. The difference is your monthly budget for building RAG.

&lt;h2&gt;Implementing persistent memory with pgvector&lt;/h2&gt;
&lt;p&gt;If you run a Laravel application, you do not need a separate, complex vector database for basic memory. PostgreSQL with the pgvector extension is often the best choice for mid-sized applications. It lets you run similarity searches alongside your standard Eloquent queries.&lt;/p&gt;
&lt;h3&gt;Keywords vs meaning&lt;/h3&gt;
&lt;p&gt;Imagine a user searching for &quot;shoes for rainy weather.&quot; A traditional database looks for the keyword &quot;rainy.&quot; With embeddings and pgvector, the system understands the semantic link between &quot;rainy&quot; and &quot;waterproof.&quot;&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;// Example of a semantic search in Laravel using pgvector
// Pseudocode: inject your embedder; there is no Laravel AI:: facade.
$queryEmbedding = $embedder-&amp;gt;embed(&quot;shoes for rainy weather&quot;);

$products = Product::query()
    -&amp;gt;selectRaw(&apos;name, description, embedding &amp;lt;=&amp;gt; ? as distance&apos;, [$queryEmbedding])
    -&amp;gt;orderBy(&apos;distance&apos;)
    -&amp;gt;limit(5)
    -&amp;gt;get();
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;By storing these embeddings, you create a persistent memory of your product catalog that is always ready for the LLM. You only pull the relevant products into the context window when they are needed.&lt;/p&gt;
&lt;h2&gt;Claude MCP and the future of context&lt;/h2&gt;
&lt;p&gt;The Model Context Protocol (MCP), created by Anthropic, changes how we handle context. It lets models connect directly to external data sources like Google Drive, Slack or your local filesystem.&lt;/p&gt;
&lt;h3&gt;Fetch on demand&lt;/h3&gt;
&lt;p&gt;Instead of you managing what goes into the context window, the model uses &lt;a href=&quot;https://ansezz.com/blog/claude-mcp-dev-tools/&quot;&gt;Claude MCP servers&lt;/a&gt; to fetch what it needs on demand.&lt;/p&gt;
&lt;p&gt;This blurs the line between context and memory. The model &quot;remembers&quot; where to find information and retrieves it when needed.&lt;/p&gt;
&lt;h3&gt;Reasoning over size&lt;/h3&gt;
&lt;p&gt;This is the foundation for agentic systems. An agent that can query its own database or read its own logs via MCP doesn&apos;t need a massive context window.&lt;/p&gt;
&lt;p&gt;It needs a high &quot;reasoning capacity&quot; to know which piece of memory to grab at the right time.&lt;/p&gt;
&lt;figure&gt;
&lt;h2&gt;Hybrid strategies for agentic systems&lt;/h2&gt;
&lt;p&gt;Advanced AI systems do not choose one over the other. They use a tiered memory strategy:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;&lt;strong&gt;Short-term context.&lt;/strong&gt; The last 5 to 10 messages of the conversation for immediate flow.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Episodic memory.&lt;/strong&gt; RAG-based retrieval of previous conversations with this specific user.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Semantic knowledge.&lt;/strong&gt; RAG-based retrieval of the general knowledge base (manuals, docs, catalogs).&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Tool-based memory.&lt;/strong&gt; Tools (often via MCP) that fetch live data on demand, wrapped in &lt;a href=&quot;https://ansezz.com/blog/circuit-breakers-vector-db/&quot;&gt;circuit breakers&lt;/a&gt; so a slow tool doesn&apos;t stall the agent.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;This layered approach gives the model what it needs to solve a problem without the bloat of an oversized prompt.&lt;/p&gt;

Sort everything in your current prompt into the four tiers above. Anything that isn&apos;t short-term context belongs in a store you retrieve from, not in every request.


- **Stop context stuffing.** If your prompt is regularly over 50k tokens, you are likely wasting money and reducing accuracy.
- **Use RAG for persistence.** Move static or long-term data into a vector database like pgvector or Pinecone.
- **Optimize for latency.** Smaller prompts mean faster responses and a better user experience.
- **Use MCP.** The Model Context Protocol gives your agents a standard way to &quot;reach out&quot; to their memory stores.
- **Monitor token counts.** Track how many tokens actually help the final output and how many are noise.

&lt;p&gt;As models get smarter, the &quot;size&quot; of the desk matters less than the &quot;organization&quot; of the library. If you&apos;re designing memory for a production agent, &lt;a href=&quot;https://ansezz.com/services/&quot;&gt;here&apos;s how I help teams build RAG memory that stays fast and affordable&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;Are you building a bigger desk, or a better library?&lt;/p&gt;
&lt;/figure&gt;&lt;/figure&gt;</content:encoded><category>ai</category><category>rag</category><category>pgvector</category><category>llm</category><category>mcp</category><category>ai-engineering</category></item><item><title>Machine learning vs generative AI</title><link>https://ansezz.com/blog/ml-vs-genai/</link><guid isPermaLink="true">https://ansezz.com/blog/ml-vs-genai/</guid><description>Machine Learning predicts; Generative AI creates. The discriminative-vs-generative split decides your architecture, infra, and monthly cloud bill.</description><pubDate>Sat, 30 May 2026 00:00:00 GMT</pubDate><content:encoded>&lt;p&gt;Machine learning predicts. Generative AI creates. Pick the wrong one and you burn GPU credits on a model that hallucinates when it should be calculating.&lt;/p&gt;

- Traditional ML is discriminative: it learns `P(y | x)` from structured data to classify or predict, cheaply and precisely.
- Generative AI learns how data is distributed so it can create text, code or images, at a much higher compute cost and with hallucination risk.
- Strong production systems are hybrid: ML for scoring and routing, GenAI for the language layer users see.

&lt;p&gt;Your data may be sitting idle in a warehouse while competitors ship agentic systems that write code and predict churn in the same stack.&lt;/p&gt;
&lt;h3&gt;Hype blurs the line&lt;/h3&gt;
&lt;p&gt;Marketing hype blurs the line between these two technologies, and stakeholders use the terms interchangeably. That mismatch breeds technical debt.&lt;/p&gt;
&lt;p&gt;Build a generative model for a task that demands strict mathematical precision and you set yourself up for failure. Rely on traditional models for creative automation and your product feels rigid and outdated.&lt;/p&gt;
&lt;h3&gt;Know the engineering difference&lt;/h3&gt;
&lt;p&gt;The fix is understanding the engineering differences between predictive and creative systems. If you want to zoom out first, my breakdown of &lt;a href=&quot;https://ansezz.com/blog/ai-vs-machine-learning/&quot;&gt;AI vs machine learning&lt;/a&gt; shows where both sit in the broader AI hierarchy.&lt;/p&gt;
&lt;h2&gt;Machine learning: the logic of prediction&lt;/h2&gt;
&lt;p&gt;Traditional Machine Learning (ML) is the backbone of modern data science. It is mainly a discriminative technology.&lt;/p&gt;
&lt;p&gt;Its job is to tell different types of data apart or to predict a number from historical patterns. You ask it to categorize an input or forecast a trend.&lt;/p&gt;
&lt;h3&gt;Built for structured data&lt;/h3&gt;
&lt;p&gt;ML models thrive on structured data. They look at rows and columns in a database to find correlations.&lt;/p&gt;
&lt;p&gt;For instance, a regression model might analyze thousands of Shopify transactions to predict next month&apos;s revenue. A classification model might look at server logs to spot a potential DDoS attack.&lt;/p&gt;
&lt;h3&gt;One model, one job&lt;/h3&gt;
&lt;p&gt;Traditional ML is often task-specific. If you want to detect fraud, you train a fraud detection model, and that model cannot suddenly start recommending products.&lt;/p&gt;
&lt;p&gt;It is a precision tool built for a single objective. That focus makes ML very efficient in high-stakes settings where accuracy and predictability are what matter.&lt;/p&gt;
&lt;h2&gt;Generative AI: the architecture of creation&lt;/h2&gt;
&lt;p&gt;Traditional ML analyzes data to make a choice; GenAI uses data to create something new.&lt;/p&gt;
&lt;p&gt;It is built on deep learning architectures, mainly Transformers and Diffusion models. Instead of only classifying data, these systems learn the probability distribution of their training set so they can generate new outputs.&lt;/p&gt;
&lt;h3&gt;Next-token prediction, coherent results&lt;/h3&gt;
&lt;p&gt;When you prompt a frontier Large Language Model (LLM) like Claude or GPT, you are using a generative system. It predicts the next most likely token in a sequence, and the result is coherent text or a code snippet.&lt;/p&gt;
&lt;p&gt;That creative ability is what makes GenAI so useful for building &lt;a href=&quot;https://ansezz.com/blog/agentic-commerce-shopify/&quot;&gt;agentic commerce solutions on Shopify&lt;/a&gt;.&lt;/p&gt;
&lt;h3&gt;Foundation models&lt;/h3&gt;
&lt;p&gt;GenAI models are often foundation models, trained on huge unstructured datasets with billions of parameters. They handle a wide range of tasks without being retrained from scratch.&lt;/p&gt;
&lt;p&gt;One model can summarize a legal document, write a Python script and brainstorm marketing copy. That flexibility is its main strength, and it also brings the risk of hallucinations.&lt;/p&gt;
&lt;p&gt;One kind of model draws the line between answers. The other writes answers that never existed before.&lt;/p&gt;
&lt;figure&gt;
&lt;h2&gt;Machine learning vs generative AI: discriminative vs generative models&lt;/h2&gt;
&lt;p&gt;The core technical difference lies in their mathematical objectives. To know which one to deploy, look at how each processes information.&lt;/p&gt;
&lt;h3&gt;Discriminative models (traditional ML)&lt;/h3&gt;
&lt;p&gt;Discriminative models learn the boundary between classes. Mathematically, they model the conditional probability &lt;code&gt;P(y | x)&lt;/code&gt;: &quot;given the input &lt;code&gt;x&lt;/code&gt;, what is the probability of the label &lt;code&gt;y&lt;/code&gt;?&quot;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Focus:&lt;/strong&gt; telling data points apart.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Output:&lt;/strong&gt; a discrete label (Spam/Not Spam) or a continuous value (Price).&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Efficiency:&lt;/strong&gt; usually needs less compute for inference.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Example:&lt;/strong&gt; a Random Forest algorithm flagging fraudulent credit card transactions.&lt;/li&gt;
&lt;/ul&gt;
&lt;h3&gt;Generative models (GenAI)&lt;/h3&gt;
&lt;p&gt;Generative models learn how the data itself is distributed. They model the joint probability &lt;code&gt;P(x, y)&lt;/code&gt; or the probability of the input itself &lt;code&gt;P(x)&lt;/code&gt;: &quot;what does a typical example of this data look like?&quot;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Focus:&lt;/strong&gt; understanding the structure of the data to reproduce it.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Output:&lt;/strong&gt; new data samples (text, image, audio).&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Efficiency:&lt;/strong&gt; very resource-intensive, needing specialized GPUs.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Example:&lt;/strong&gt; a Transformer model generating a new Laravel controller from a prompt.&lt;/li&gt;
&lt;/ul&gt;
&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Feature&lt;/th&gt;
&lt;th&gt;Machine Learning (Discriminative)&lt;/th&gt;
&lt;th&gt;Generative AI (Generative)&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Primary Goal&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Classify or Predict&lt;/td&gt;
&lt;td&gt;Create New Content&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Data Type&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Structured (Tables, Logs)&lt;/td&gt;
&lt;td&gt;Unstructured (Text, Images)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Output Type&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Numbers, Labels, Scores&lt;/td&gt;
&lt;td&gt;Content, Code, Media&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Model Complexity&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Low to Medium&lt;/td&gt;
&lt;td&gt;Very High&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Training Data&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Task-Specific, Labeled&lt;/td&gt;
&lt;td&gt;Massive, Unlabeled/Self-Supervised&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;h2&gt;Use cases: when to choose one over the other&lt;/h2&gt;
&lt;p&gt;The right tool depends on your business goals and your data. Using an LLM to predict a stock price is an expensive mistake. Using a linear regression model to write a blog post is impossible.&lt;/p&gt;
&lt;h3&gt;When to use machine learning&lt;/h3&gt;
&lt;p&gt;ML is the better fit for tasks that need high precision and deterministic logic. If you are working through &lt;a href=&quot;https://ansezz.com/work/&quot;&gt;complex technical challenges in a real product&lt;/a&gt;, ML is often the right choice for the &quot;back-office&quot; logic.&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;&lt;strong&gt;Fraud detection:&lt;/strong&gt; spotting anomalies in financial transactions where false positives must be kept low.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Inventory forecasting:&lt;/strong&gt; predicting stock levels for an e-commerce store from seasonal trends.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Recommendation engines:&lt;/strong&gt; ranking products for a user based on their browsing history.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Medical diagnostics:&lt;/strong&gt; analyzing lab results to flag specific health markers.&lt;/li&gt;
&lt;/ol&gt;
&lt;h3&gt;When to use generative AI&lt;/h3&gt;
&lt;p&gt;GenAI shines when you need to bridge human language and machine logic. It is a strong fit for intuitive interfaces and creative automation.&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;&lt;strong&gt;Code generation:&lt;/strong&gt; automating boilerplate or converting legacy code to frameworks like Laravel and Vue.js.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Content personalization:&lt;/strong&gt; generating unique product descriptions or email subject lines for thousands of customers.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Search and retrieval:&lt;/strong&gt; using Retrieval-Augmented Generation (RAG) so users can &quot;chat&quot; with their own documentation. Learn more in my guide on &lt;a href=&quot;https://ansezz.com/blog/7-rag-mistakes-production/&quot;&gt;common RAG mistakes&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Prototyping:&lt;/strong&gt; quickly generating UI mockups or synthetic data to test a new application.&lt;/li&gt;
&lt;/ol&gt;

List your AI ideas and mark each one &quot;predict a number or label&quot; or &quot;produce text, code or media.&quot; The first group is an ML job, the second a GenAI job.

&lt;h2&gt;The hybrid future: combining ML and GenAI in production&lt;/h2&gt;
&lt;p&gt;In 2026, strong engineering teams don&apos;t choose one over the other. They build hybrid architectures, using traditional ML for the heavy data processing and GenAI for the user-facing interaction layer.&lt;/p&gt;
&lt;h3&gt;Support tickets&lt;/h3&gt;
&lt;p&gt;Consider a modern customer support system. An ML model runs sentiment analysis and routes the ticket to the right department based on urgency.&lt;/p&gt;
&lt;p&gt;Once routed, a GenAI agent drafts a response using internal knowledge bases. The system ends up both efficient and empathetic.&lt;/p&gt;
&lt;h3&gt;Churn prevention&lt;/h3&gt;
&lt;p&gt;Another example comes from &lt;a href=&quot;https://ansezz.com/blog/ai-vs-traditional-development/&quot;&gt;AI vs traditional development&lt;/a&gt;. An ML model predicts which users are likely to churn.&lt;/p&gt;
&lt;p&gt;A GenAI model then creates a custom discount offer and a personalized email tailored to that user&apos;s interests to keep them engaged.&lt;/p&gt;

  &lt;div&gt;An LLM reads every ticket, guesses urgency and writes the reply. Slow, expensive and inconsistent at triage.&lt;/div&gt;
  &lt;div&gt;A small ML model scores sentiment and urgency in milliseconds. The LLM only drafts replies for tickets that need one.&lt;/div&gt;

&lt;figure&gt;

Find one place where an LLM makes a yes/no or scoring decision. Try a small classifier on the same data and compare cost, speed and accuracy.

&lt;h2&gt;DevOps and deployment considerations&lt;/h2&gt;
&lt;p&gt;The two need different infrastructure strategies.&lt;/p&gt;
&lt;h3&gt;Traditional ML&lt;/h3&gt;
&lt;p&gt;Traditional ML models are often small enough to run on standard CPUs or even edge devices. They are easy to containerize with Docker and cheap to host on platforms like &lt;a href=&quot;https://ansezz.com/blog/coolify-docker-saas-hosting/&quot;&gt;Coolify or AWS&lt;/a&gt;.&lt;/p&gt;
&lt;h3&gt;Generative AI&lt;/h3&gt;
&lt;p&gt;GenAI models are a different beast. Even &quot;small&quot; LLMs need significant VRAM, and the &lt;a href=&quot;https://ansezz.com/blog/training-vs-inference/&quot;&gt;cost profile of training vs inference&lt;/a&gt; shapes every hardware decision.&lt;/p&gt;
&lt;p&gt;If you self-host, you need solid GPU orchestration. Many businesses use API-based options like Claude or OpenAI to avoid managing hardware. For teams concerned with data privacy or high volume, deploying open-weights models on Google Cloud or AWS with specialized inference servers is the standard approach.&lt;/p&gt;
&lt;h3&gt;Monitor the right failure mode&lt;/h3&gt;
&lt;p&gt;Whichever you choose, keep the architecture clean. Containerize for environment consistency and monitor the right failure mode: model drift in ML, hallucination rates in GenAI.&lt;/p&gt;
&lt;p&gt;That rigor keeps your AI solutions scalable and maintainable over time.&lt;/p&gt;

- **Define your goal first:** use ML for prediction and classification, GenAI for content creation and reasoning.
- **Data type matters:** ML excels with structured, tabular data. GenAI is built for unstructured data like text, images and code.
- **Cost and latency:** traditional ML is usually cheaper and faster to run. GenAI needs much more compute and has higher latency.
- **Hybrid works best:** combine the precision of ML with the flexibility of GenAI.
- **Plan infrastructure early:** use containers and cloud-native services for each technology&apos;s hardware needs.
- **Avoid the hype:** don&apos;t use an LLM because it is trending. Pick the model that solves the engineering problem most efficiently.

&lt;p&gt;If you&apos;re deciding where ML ends and GenAI begins in your product, &lt;a href=&quot;https://ansezz.com/services/&quot;&gt;here&apos;s how I help teams design and ship hybrid AI features&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;Is your current data strategy focused on predicting what will happen next, or are you ready to start creating the outcomes you want to see?&lt;/p&gt;
&lt;/figure&gt;&lt;/figure&gt;</content:encoded><category>ai</category><category>production</category><category>ai-engineering</category><category>machine-learning</category><category>llm</category><category>rag</category><category>architecture</category><category>ai</category></item><item><title>Claude MCP: connecting my dev tools to LLMs</title><link>https://ansezz.com/blog/claude-mcp-dev-tools/</link><guid isPermaLink="true">https://ansezz.com/blog/claude-mcp-dev-tools/</guid><description>The Model Context Protocol is a USB-C port for LLMs: one MCP server, any host, no MxN integration tax. The architecture, the servers I run, and why it is safe.</description><pubDate>Wed, 27 May 2026 00:00:00 GMT</pubDate><content:encoded>&lt;p&gt;Custom integrations for every tool are a maintenance tax that never ends. The Model Context Protocol (MCP) replaces them with one plug.&lt;/p&gt;

- Without a standard, M AI apps and N data sources need M x N custom integrations. MCP turns that into one server per tool that any compatible host can use.
- An MCP setup has three parts: the host the user works in, the client that speaks the protocol, and the server that exposes resources, tools and prompts.
- Local servers talk over `stdio` and remote servers use OAuth 2.1 with PKCE, so you can give each tool only the access it needs.

&lt;p&gt;Every time I build a custom integration for a new tool, I add one more thing to maintain forever. We have reached a point where building the product is often faster than setting up the pipes to connect it to our data.&lt;/p&gt;
&lt;p&gt;That is the exact problem Claude&apos;s MCP (Model Context Protocol) was built to kill.&lt;/p&gt;
&lt;h3&gt;A smart model in a room with no windows&lt;/h3&gt;
&lt;p&gt;If you have spent any time building &lt;a href=&quot;https://ansezz.com/blog/agentic-workflows-vibe-coding/&quot;&gt;agentic workflows and vibe coding&lt;/a&gt;, you know the feeling. You have a very capable LLM like Claude, but it is locked in a room with no windows.&lt;/p&gt;
&lt;p&gt;To give it context, you copy-paste code, export CSV files, or spend three days writing a brittle wrapper for a third-party API just so your assistant can &quot;see&quot; your work.&lt;/p&gt;
&lt;h3&gt;The architect who can&apos;t visit the site&lt;/h3&gt;
&lt;p&gt;This fragmentation is a major bottleneck in modern software development. Our models are capable, but they are cut off from our local files, our databases and our production logs.&lt;/p&gt;
&lt;p&gt;It is like having a world-class architect who isn&apos;t allowed to visit the construction site. They are guessing based on the photos you decide to send them. Enter the Model Context Protocol, or in Anthropic&apos;s own framing, a USB-C port for AI applications.&lt;/p&gt;
&lt;h2&gt;The fragmentation tax on your productivity&lt;/h2&gt;
&lt;p&gt;The problem is simple. Every AI application (Claude Desktop, a custom agent, an IDE extension) wants to talk to your data. On the other side, every data source (your GitHub repos, your Postgres databases, your Slack channels) has its own API and authentication flow.&lt;/p&gt;
&lt;h3&gt;The M x N problem&lt;/h3&gt;
&lt;p&gt;Without a standard, we are stuck in an M×N problem. If you have 5 AI apps and 10 data sources, you need 50 different integrations.&lt;/p&gt;
&lt;p&gt;(If you are weighing whether to expose a plain REST endpoint or an MCP server here, I broke that down in &lt;a href=&quot;https://ansezz.com/blog/api-vs-mcp/&quot;&gt;API vs MCP&lt;/a&gt;.)&lt;/p&gt;
&lt;p&gt;This is why most &quot;AI-powered&quot; tools feel shallow. They support a few basic integrations, and if you want to use your internal company data, you are back to writing custom glue code.&lt;/p&gt;
&lt;h3&gt;What it costs you&lt;/h3&gt;
&lt;p&gt;The cost is real. We waste hours rebuilding the same connectors, every new integration is another potential leak, and the &quot;magic&quot; of AI evaporates the moment we hit a data silo.&lt;/p&gt;

Write down every AI tool your team uses and every data source it needs. Multiply the two numbers. That is how many integrations you would maintain without a shared protocol.

&lt;h2&gt;MCP as a universal standard&lt;/h2&gt;
&lt;p&gt;Claude MCP (Model Context Protocol) is a serious, open attempt to standardize how AI applications discover and use data and tools. Instead of building a connector for every model and every tool, you build an MCP server.&lt;/p&gt;
&lt;h3&gt;The server as a translator&lt;/h3&gt;
&lt;p&gt;This server sits between your data and the AI and exposes a consistent interface that any MCP-compliant host (like Claude Desktop) can understand.&lt;/p&gt;
&lt;p&gt;It works like the USB standard. It doesn&apos;t matter if you plug in a mouse, a keyboard or an external drive. The protocol is the same, so it just works.&lt;/p&gt;
&lt;p&gt;This changes how you build &lt;a href=&quot;https://ansezz.com/blog/mcp-context-aware-agents/&quot;&gt;context-aware agents&lt;/a&gt;. Instead of hard-coding logic into the agent, you &quot;plug in&quot; the servers you need.&lt;/p&gt;

  &lt;div&gt;Each AI app gets its own connector for each data source. Five apps and ten sources means fifty integrations to build and secure.&lt;/div&gt;
  &lt;div&gt;Each data source gets one MCP server. Any MCP host can discover and use it, so you add a tool once.&lt;/div&gt;

&lt;figure&gt;
&lt;h3&gt;How the architecture works&lt;/h3&gt;
&lt;p&gt;There are three main players in the MCP ecosystem:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;&lt;strong&gt;The host.&lt;/strong&gt; This is the environment the user works in: Claude Desktop, a terminal or an IDE like Cursor. The host manages the lifecycle of the connection.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;The client.&lt;/strong&gt; This is the part of the host that speaks the protocol. It asks the server what it can do. Since the &lt;code&gt;2026-07-28&lt;/code&gt; spec there is no up-front handshake: each request carries its own protocol version and capabilities.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;The server.&lt;/strong&gt; This is a lightweight program that provides context (resources), actions (tools) and prompt templates.&lt;/li&gt;
&lt;/ol&gt;
&lt;h3&gt;A local example&lt;/h3&gt;
&lt;p&gt;Say I want Claude to read my local project files. I run a local MCP server that exposes those files as &quot;resources.&quot;&lt;/p&gt;
&lt;p&gt;The host (Claude Desktop) asks the server: &quot;what do you have?&quot; The server replies: &quot;I have these 10 files and a tool to run grep searches.&quot;&lt;/p&gt;
&lt;p&gt;The model can then call the &quot;grep&quot; tool whenever it needs to find a function definition. I didn&apos;t write a single line of logic inside Claude to make that happen. I connected the server.&lt;/p&gt;
&lt;h2&gt;Modularity and the MCP server ecosystem&lt;/h2&gt;
&lt;p&gt;Once a server is built, anyone can use it. The community has already built servers for almost everything. Here are a few I use in my daily workflow:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;A Postgres server.&lt;/strong&gt; I point Claude at a local or remote database so it can inspect schemas and run read-only queries to help me debug data issues without leaving the chat. Anthropic&apos;s original reference Postgres server is now archived, so I lean on a maintained community build.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;GitHub&apos;s official MCP server.&lt;/strong&gt; It lets the model search my repositories, list issues and open pull requests. It is like having a junior dev who knows where the code is. GitHub now ships and hosts this itself, with a remote option you authenticate via OAuth.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;A Google Drive server.&lt;/strong&gt; Handy when I need to cross-reference technical docs stored in Drive with the implementation in my IDE. The reference server is archived too, so I treat it as a starting point rather than something to trust blindly.&lt;/li&gt;
&lt;/ul&gt;
&lt;h3&gt;From chatting to delegating&lt;/h3&gt;
&lt;p&gt;Wiring these up is the step that separates chatting with a model from delegating to one. It is the point where a workflow crosses into &lt;a href=&quot;https://ansezz.com/blog/ai-coding-workflow-levels/&quot;&gt;the agentic levels&lt;/a&gt; instead of staying a faster autocomplete.&lt;/p&gt;
&lt;p&gt;It also helps with &lt;a href=&quot;https://ansezz.com/blog/agentic-commerce-shopify/&quot;&gt;agentic commerce for Shopify&lt;/a&gt;. Imagine an agent that talks to your Shopify store via MCP to check inventory levels or update product descriptions in real time, over a secure, standard connection.&lt;/p&gt;
&lt;p&gt;Build the connector once. Every host that speaks MCP gets it for free.&lt;/p&gt;

Before you write a server, search the [MCP Registry](https://registry.modelcontextprotocol.io/) for the tool you need and check whether the vendor maintains an official one.
&lt;p&gt;When you are ready to add a server to Claude Desktop, Claude Code, Cursor or VS Code, my &lt;a href=&quot;https://ansezz.com/tools/mcp-config-generator/&quot;&gt;MCP config generator&lt;/a&gt; writes the config file and checks the one you already have.
&lt;/p&gt;&lt;p&gt;&lt;/p&gt;
&lt;h2&gt;Security first: the sandbox model&lt;/h2&gt;
&lt;p&gt;The first question I get when I talk about connecting dev tools to an LLM is: &quot;is it safe?&quot;&lt;/p&gt;
&lt;p&gt;Security is a first-class concern in MCP&apos;s design. The server runs as a separate process that only exposes the tools and resources you grant it.&lt;/p&gt;
&lt;p&gt;(Note: a local stdio server still runs with your normal user privileges. It is process isolation, not a hardened sandbox, so only run servers you trust.)&lt;/p&gt;
&lt;h3&gt;Local servers: a narrow pipe&lt;/h3&gt;
&lt;p&gt;For local servers, the protocol typically uses &lt;code&gt;stdio&lt;/code&gt; (stdin/stdout). The server can only talk to the host through that narrow pipe. It has no open network ports listening for connections, and it only exists while the host is running it.&lt;/p&gt;
&lt;h3&gt;Remote servers: scoped OAuth&lt;/h3&gt;
&lt;p&gt;For remote servers, MCP standardizes on OAuth 2.1 (with PKCE) for authorization. That allows fine-grained, scope-based permissions. You can authorize a GitHub MCP server to read only public repositories, or a database server to access only specific tables.&lt;/p&gt;
&lt;h3&gt;Least privilege for AI tools&lt;/h3&gt;
&lt;p&gt;This is a big step up from the &quot;give me your master API key&quot; approach we have seen in the past. You can treat AI tools with the same least-privilege mindset you use for any other service in your stack.&lt;/p&gt;
&lt;p&gt;That matters when you are trying to avoid &lt;a href=&quot;https://ansezz.com/blog/7-rag-mistakes-production/&quot;&gt;RAG mistakes in production&lt;/a&gt;, where data leakage is a top-tier risk.&lt;/p&gt;
&lt;figure&gt;
&lt;h2&gt;Why I am betting on MCP&lt;/h2&gt;
&lt;p&gt;I have seen plenty of &quot;standards&quot; come and go. What makes MCP different is its simplicity and its backing.&lt;/p&gt;
&lt;p&gt;Anthropic made it open source, and in December 2025 donated it to the Agentic AI Foundation, a Linux Foundation fund, so no single vendor controls it.&lt;/p&gt;
&lt;h3&gt;Where this is heading&lt;/h3&gt;
&lt;p&gt;We are moving toward &quot;agentic&quot; software development. In this world, AI does more than write snippets of code. It acts as an orchestrator that can reach into your cloud infrastructure on GCP, check your Docker logs and suggest fixes for a failing Laravel app.&lt;/p&gt;
&lt;p&gt;Without a protocol like MCP, that vision is too expensive and too risky to build at scale. With MCP, tools become plug-and-play.&lt;/p&gt;
&lt;h3&gt;How to start&lt;/h3&gt;
&lt;p&gt;If you are ready to experiment, here is what I recommend:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Install the Claude Desktop app.&lt;/strong&gt; It is one of the most mature MCP hosts, and an easy place to start.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Try the filesystem server.&lt;/strong&gt; This is the easiest way to see it work. Give Claude access to a specific folder and watch it navigate your codebase.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Don&apos;t build, search first.&lt;/strong&gt; Browse the official MCP Registry before writing anything. The reference repo now keeps only a handful of maintained servers (filesystem, fetch, git, memory and a few others), and most well-known integrations are either archived or maintained by the vendor directly, like GitHub&apos;s own server.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Think in tools as well as prompts.&lt;/strong&gt; Ask what &quot;tools&quot; your internal systems could expose. If you have a custom admin panel, could it be an MCP server?&lt;/li&gt;
&lt;/ul&gt;

Connect the filesystem server to one project folder in Claude Desktop and ask it to find where a specific function is defined. Note how many copy-paste steps that saved you.


- MCP replaces M x N custom integrations with one server per tool.
- Host, client and server each have one job, and the server decides what it exposes.
- Local servers use `stdio`; remote servers use OAuth 2.1 with PKCE and scoped permissions.
- Only run servers you trust: a local server runs with your user privileges.
- Search the MCP Registry before you build, and prefer vendor-maintained servers.
- Connecting your tools cuts the switching between tabs, terminals and docs, so you stay in flow longer.

&lt;p&gt;If you want your internal tools and dev stack exposed to Claude through scoped MCP servers, &lt;a href=&quot;https://ansezz.com/services/&quot;&gt;here&apos;s how I help teams build and secure them&lt;/a&gt;, or &lt;a href=&quot;https://ansezz.com/contact/&quot;&gt;get in touch&lt;/a&gt; directly.&lt;/p&gt;
&lt;p&gt;What is the one internal tool you wish you could &quot;plug in&quot; to Claude right now?&lt;/p&gt;
&lt;/figure&gt;&lt;/figure&gt;</content:encoded><category>ai</category><category>mcp</category><category>claude</category><category>agentic-ai</category><category>llm</category></item><item><title>7 mistakes wrecking your production RAG stack</title><link>https://ansezz.com/blog/7-rag-mistakes-production/</link><guid isPermaLink="true">https://ansezz.com/blog/7-rag-mistakes-production/</guid><description>Naive chunking, no reranker, embedding drift, latency blowups: the structural mistakes that wreck a production RAG stack, and the fixes that ship.</description><pubDate>Sun, 17 May 2026 00:00:00 GMT</pubDate><content:encoded>&lt;p&gt;A RAG demo takes an afternoon. A RAG system that users trust takes fixing the seven structural mistakes below.&lt;/p&gt;

- Most RAG failures in production come from retrieval, not from the model: bad chunks, no reranker, no hybrid search and no metadata filters.
- Treat embeddings like a database schema. Pin the model, version the index and re-index when either changes.
- Stop vibe-checking. A golden set of 50 to 100 questions scored on faithfulness, relevance and context precision tells you if a change helped.

&lt;p&gt;Getting a RAG (retrieval-augmented generation) demo working is easy. You take a few PDFs, throw them into a vector database like Chroma or Pinecone, and ask a question. It feels like magic.&lt;/p&gt;
&lt;p&gt;If you&apos;re still choosing your foundation, my guide to &lt;a href=&quot;https://ansezz.com/blog/picking-the-right-rag-stack/&quot;&gt;picking the right RAG stack&lt;/a&gt; covers the trade-offs before you commit.&lt;/p&gt;
&lt;p&gt;But shipping RAG to production is where the magic dies.&lt;/p&gt;
&lt;p&gt;I&apos;ve seen too many teams launch a feature only to find users getting irrelevant answers, waiting 10 seconds for a response, or getting &quot;I don&apos;t know&quot; for questions that are clearly in the documentation. When the &quot;vibe check&quot; fails at scale, your users lose trust.&lt;/p&gt;
&lt;p&gt;I&apos;ve spent the last few years building &lt;a href=&quot;https://ansezz.com/work/&quot;&gt;custom web applications&lt;/a&gt; and AI systems, and I&apos;ve had to fix these same leaks in my own stacks. Here is how to get from &quot;it works on my machine&quot; to a production-grade AI system.&lt;/p&gt;
&lt;h2&gt;1. Naive chunking is killing your context&lt;/h2&gt;
&lt;p&gt;Most people start with a simple character-based or token-based splitter. You tell the library to &quot;give me chunks of 500 tokens with a 50-token overlap.&quot;&lt;/p&gt;
&lt;p&gt;This is a mistake.&lt;/p&gt;
&lt;p&gt;Naive chunking treats your data like raw soup. It might cut a sentence in half, split a table in the middle of a row, or separate a code example from the explanation before it.&lt;/p&gt;
&lt;p&gt;If the retriever pulls only one of those halves, the LLM has zero chance of giving a correct answer.&lt;/p&gt;
&lt;h3&gt;The fix: semantic or structural chunking&lt;/h3&gt;
&lt;p&gt;I always recommend chunking on the actual structure of the document first. Use headers (H1, H2, H3), paragraphs or Markdown delimiters so related ideas stay together.&lt;/p&gt;
&lt;p&gt;For complex data, use recursive character splitting that respects newlines and punctuation before it falls back to raw token counts.&lt;/p&gt;
&lt;p&gt;You can compare strategies on your own text with my &lt;a href=&quot;https://ansezz.com/tools/rag-chunk-splitter/&quot;&gt;RAG chunk splitter&lt;/a&gt;. Bad chunking is one of the most common reasons &lt;a href=&quot;https://ansezz.com/blog/why-your-rag-is-failing/&quot;&gt;your RAG fails in production&lt;/a&gt;.&lt;/p&gt;

Paste one of your longest real documents into the [RAG chunk splitter](/tools/rag-chunk-splitter/) and count how many chunks cut a sentence or a table row in half. If it is more than a couple, switch to header-based splitting first.

&lt;h2&gt;2. Skipping the reranker step&lt;/h2&gt;
&lt;p&gt;Vector search is great at finding &quot;roughly similar&quot; content, but it is not a precision instrument. It relies on cosine similarity, which documents can fool when they share a similar &quot;vibe&quot; but don&apos;t contain the answer.&lt;/p&gt;
&lt;p&gt;If you take the top 5 results from your vector store and shove them into the prompt, you&apos;re leaving quality on the table.&lt;/p&gt;
&lt;h3&gt;The fix: two-stage retrieval&lt;/h3&gt;
&lt;p&gt;I look at retrieval as a two-stage process:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;&lt;strong&gt;Fast and broad.&lt;/strong&gt; Pull the top 20 or 50 candidates from your vector database.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Slow and precise.&lt;/strong&gt; Use a cross-encoder or a reranking model (like Cohere&apos;s Rerank or BGE-Reranker) to score those candidates against the query more accurately.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;The reranker acts like a bouncer at a club. It doesn&apos;t care if a document looks &quot;okay.&quot; It only lets in the ones that are relevant to the question.&lt;/p&gt;
&lt;p&gt;Vector search finds neighbors. A reranker finds answers.&lt;/p&gt;
&lt;figure&gt;
&lt;h2&gt;3. Ignoring embedding drift and versioning&lt;/h2&gt;
&lt;p&gt;This is the silent killer. I&apos;ve seen teams upgrade their embedding model from &lt;code&gt;text-embedding-ada-002&lt;/code&gt; to &lt;code&gt;text-embedding-3-small&lt;/code&gt; without re-indexing their entire database.&lt;/p&gt;
&lt;p&gt;Suddenly, the vectors generated for new queries don&apos;t &quot;line up&quot; with the vectors stored in the index, and similarity scores go haywire.&lt;/p&gt;
&lt;p&gt;Even worse is changing the preprocessing logic (like how you format chunks) while keeping the old vectors.&lt;/p&gt;
&lt;h3&gt;The fix: pin your models and version your index&lt;/h3&gt;
&lt;p&gt;Treat your embedding model like a database schema. If you change the model, you must re-index.&lt;/p&gt;
&lt;p&gt;I always include the model name and version in the metadata of every index I build. That way I can test a new model side by side without breaking the production flow.&lt;/p&gt;
&lt;p&gt;My &lt;a href=&quot;https://ansezz.com/about/&quot;&gt;experience in cloud infrastructure&lt;/a&gt; has taught me that consistency beats a &quot;better&quot; model that doesn&apos;t match its data.&lt;/p&gt;

Add an `embedding_model` and `embedding_version` field to every chunk you write today, and make your query code refuse to search an index whose version does not match the model it is using.

&lt;h2&gt;4. The &quot;lost in the middle&quot; latency problem&lt;/h2&gt;
&lt;p&gt;Everyone wants more context. We see context windows of 128k or even 1M tokens and think, &quot;great, I&apos;ll give the LLM everything!&quot; This is a trap for two reasons.&lt;/p&gt;
&lt;h3&gt;Latency&lt;/h3&gt;
&lt;p&gt;Feeding tens of thousands of tokens of context into an LLM inflates your time-to-first-token. It can push response times into double-digit seconds.&lt;/p&gt;
&lt;h3&gt;Lost in the middle&lt;/h3&gt;
&lt;p&gt;Models still struggle with the &lt;a href=&quot;https://arxiv.org/abs/2307.03172&quot;&gt;&quot;lost in the middle&quot;&lt;/a&gt; effect. They reliably use information at the start and end of a long context but tend to ignore facts buried in the center.&lt;/p&gt;
&lt;p&gt;A bigger &lt;a href=&quot;https://ansezz.com/blog/context-window-vs-memory/&quot;&gt;context window is not the same as memory&lt;/a&gt;, and stuffing it rarely helps.&lt;/p&gt;
&lt;h3&gt;The fix: set a latency budget&lt;/h3&gt;
&lt;p&gt;I start with a latency budget. If the user expects a response in under 2 seconds, I can&apos;t afford to send 20 chunks.&lt;/p&gt;
&lt;p&gt;I limit retrieval to the top 3 to 5 high-quality chunks and start streaming as soon as the first token is ready.&lt;/p&gt;
&lt;p&gt;If you need more data, use a multi-step approach: a cheaper model summarizes the retrieved chunks before the refined info goes to your main model.&lt;/p&gt;
&lt;h2&gt;5. Forgetting about hybrid search&lt;/h2&gt;
&lt;p&gt;Vector search is bad at finding specific keywords or unique identifiers.&lt;/p&gt;
&lt;p&gt;If a user asks for &quot;error code XF-904,&quot; a vector search might return documents about general error handling because the &quot;vibe&quot; is similar. It might miss the one document that actually mentions &quot;XF-904.&quot;&lt;/p&gt;
&lt;h3&gt;The fix: dense plus sparse&lt;/h3&gt;
&lt;p&gt;I always combine dense vector search with traditional sparse search (like BM25). Blend the two result lists with something like Reciprocal Rank Fusion (RRF).&lt;/p&gt;
&lt;p&gt;You get the semantic understanding of vectors and the keyword precision of full-text search. This is non-negotiable for enterprise search or technical documentation.&lt;/p&gt;
&lt;p&gt;If keyword precision matters more than you expect, it&apos;s worth weighing &lt;a href=&quot;https://ansezz.com/blog/vector-search-vs-graph-search/&quot;&gt;vector search against graph search&lt;/a&gt; for your retrieval strategy.&lt;/p&gt;

  &lt;div&gt;Fixed 500-token chunks, top 5 from vector search straight into the prompt, one embedding model nobody tracks, and a few manual test questions.&lt;/div&gt;
  &lt;div&gt;Structural chunks, metadata filters first, hybrid search, a reranker over 20 to 50 candidates, a versioned index and a scored golden set.&lt;/div&gt;

&lt;h2&gt;6. Failing to filter by metadata&lt;/h2&gt;
&lt;p&gt;If your RAG system holds documents for different customers, versions or dates, pure vector search will betray you.&lt;/p&gt;
&lt;p&gt;You might ask about &quot;API changes in 2024&quot; and get results from 2022 because they share similar keywords.&lt;/p&gt;
&lt;p&gt;Relying on the LLM to &quot;ignore&quot; the wrong dates in the context wastes tokens and invites hallucinations.&lt;/p&gt;
&lt;h3&gt;The fix: hard metadata filters&lt;/h3&gt;
&lt;p&gt;Apply filters before the vector search even happens. If you know the user wants &quot;v2&quot; of your documentation, filter the query to chunks with &lt;code&gt;version: &apos;2&apos;&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;This shrinks the search space and improves accuracy. I use this heavily when building &lt;a href=&quot;https://ansezz.com/work/&quot;&gt;Shopify apps&lt;/a&gt;, where data must be strictly siloed by shop ID.&lt;/p&gt;

List the three questions your users ask most and write down which metadata field (version, date, tenant, product) would narrow each one. Add those fields to your index before you tune anything else.

&lt;h2&gt;7. Vibe-based evaluation&lt;/h2&gt;
&lt;p&gt;How do you know your RAG stack is getting better? Most devs ask a few questions, see that the answers look okay, and ship.&lt;/p&gt;
&lt;p&gt;This &quot;vibe-checking&quot; doesn&apos;t work. When you change a prompt or a chunk size, you might improve one answer while breaking ten others you didn&apos;t check.&lt;/p&gt;
&lt;h3&gt;The fix: a golden evaluation set&lt;/h3&gt;
&lt;p&gt;I use the Ragas framework or simple LLM-as-a-judge patterns to run automated evals. I keep a &quot;golden set&quot; of 50 to 100 questions with ground-truth answers.&lt;/p&gt;
&lt;p&gt;Every time I change the architecture, I run the eval and look at three metrics:&lt;/p&gt;
&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Metric&lt;/th&gt;
&lt;th&gt;Question it answers&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Faithfulness&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Is the answer actually derived from the context?&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Answer relevance&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Does it answer the user&apos;s question?&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Context precision&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Are the retrieved chunks actually useful?&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;figure&gt;
&lt;h2&gt;Practical rules for your stack&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Start with metadata.&lt;/strong&gt; Don&apos;t let the vector database guess. If you have categories or dates, use them as hard filters.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Rerank by default.&lt;/strong&gt; It&apos;s the single biggest quality jump you can make for the lowest effort.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Monitor retrieval, not only generation.&lt;/strong&gt; If your retriever fails, the best LLM in the world can&apos;t save you. Log your top-k retrieval results separately.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Don&apos;t over-engineer.&lt;/strong&gt; Sometimes a simple long-context prompt beats a complex agentic workflow. Measure before you add complexity.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Building production RAG is a game of millimeters. It&apos;s about cleaning your data, pinning your models and measuring what&apos;s happening under the hood.&lt;/p&gt;

- Chunk by document structure, not by raw token count.
- Retrieve broad, then rerank for precision.
- Pin the embedding model and re-index when it changes.
- Keep context small: 3 to 5 good chunks inside a latency budget.
- Combine vector and keyword search, and filter by metadata first.
- Score every change against a golden set instead of trusting a vibe check.

&lt;p&gt;If your RAG pipeline answers well in the demo but drifts in production, &lt;a href=&quot;https://ansezz.com/services/&quot;&gt;here&apos;s how I help teams fix retrieval and ship it&lt;/a&gt;. You can also &lt;a href=&quot;https://ansezz.com/contact/&quot;&gt;reach out&lt;/a&gt; if you&apos;re hitting a wall with your architecture.&lt;/p&gt;
&lt;p&gt;What&apos;s the one thing currently keeping you from hitting that &quot;deploy&quot; button?&lt;/p&gt;
&lt;/figure&gt;&lt;/figure&gt;</content:encoded><category>ai</category><category>rag</category><category>ai</category><category>llm</category><category>pgvector</category><category>production</category></item><item><title>MCP tool-use: building context-aware agents</title><link>https://ansezz.com/blog/mcp-context-aware-agents/</link><guid isPermaLink="true">https://ansezz.com/blog/mcp-context-aware-agents/</guid><description>Build context-aware agents with MCP. How tools, resources, and prompts let one server talk to any client and retire brittle one-off integrations for good.</description><pubDate>Sun, 05 Apr 2026 00:00:00 GMT</pubDate><content:encoded>&lt;p&gt;Every new data source used to mean new glue code for your agent. MCP replaces that glue with one protocol any client can speak.&lt;/p&gt;

- MCP is an open standard that puts a clean boundary between the AI client and the servers that expose your data and actions.
- It has three primitives: tools (model-controlled actions), resources (application-controlled data) and prompts (user-controlled templates).
- The server is the gatekeeper, so you can limit an agent to specific tables or read-only access, and swap models without rebuilding integrations.

&lt;p&gt;Building context-aware agents is harder than it should be. AI tooling is a mess of fragmented integrations.&lt;/p&gt;
&lt;p&gt;Every time I want to give an LLM access to a new data source or tool, I end up writing custom glue code that breaks the moment an API version changes. We force very capable models to peer through a keyhole when they should have a wide-open window into our data.&lt;/p&gt;
&lt;h3&gt;Plumbing eats your time&lt;/h3&gt;
&lt;p&gt;This fragmentation creates a lot of technical debt. You spend most of your time on plumbing and only a sliver on the agent&apos;s actual intelligence.&lt;/p&gt;
&lt;p&gt;Without a shared way to pass context, the model often hallucinates because it lacks real-time data. It gets stuck on &quot;I don&apos;t have access to that&quot; or, worse, &quot;I&apos;ll guess what that data looks like,&quot; which leads to unreliable output and a poor user experience.&lt;/p&gt;
&lt;h3&gt;One protocol instead&lt;/h3&gt;
&lt;p&gt;The &lt;strong&gt;Model Context Protocol&lt;/strong&gt; (MCP) changes this. It is an open standard created by Anthropic and donated in December 2025 to the Agentic AI Foundation, a Linux Foundation fund co-founded by Anthropic, Block and OpenAI.&lt;/p&gt;
&lt;p&gt;It lets me build agents that connect to any data source through one shared language. If you want the bigger picture, I broke down &lt;a href=&quot;https://ansezz.com/blog/api-vs-mcp/&quot;&gt;API vs MCP&lt;/a&gt; separately.&lt;/p&gt;
&lt;h2&gt;Why MCP matters for developers&lt;/h2&gt;
&lt;p&gt;A recurring hurdle in custom web applications has always been data silos. When I work on &lt;a href=&quot;https://ansezz.com/work/&quot;&gt;complex technical challenges&lt;/a&gt;, the goal is usually to make data actionable.&lt;/p&gt;
&lt;p&gt;Traditional tool use means wiring every schema and function call into each app by hand. With MCP, you define them once in a server, and any client can discover them.&lt;/p&gt;
&lt;h3&gt;A clear boundary&lt;/h3&gt;
&lt;p&gt;MCP acts as a bridge. It draws a clear line between the AI application (the client) and the data sources (the servers).&lt;/p&gt;
&lt;p&gt;That separation means I can swap the underlying model without rebuilding the data integration layer. If I move from Claude to another model that supports MCP, the tools and resources stay the same.&lt;/p&gt;
&lt;h3&gt;Less stuffing, more fetching&lt;/h3&gt;
&lt;p&gt;It also eases the &lt;a href=&quot;https://ansezz.com/blog/context-window-vs-memory/&quot;&gt;context window&lt;/a&gt; problem. Instead of stuffing a huge document into the prompt, I expose it as an MCP resource.&lt;/p&gt;
&lt;p&gt;The model only pulls what it needs, when it needs it. That is more efficient and cheaper, and it gives you agents that know their environment without drowning in it.&lt;/p&gt;

  &lt;div&gt;One hand-written wrapper per model and per data source. A model switch or API change means rewriting the integration.&lt;/div&gt;
  &lt;div&gt;One MCP server per data source. Any MCP client can use it, and switching models leaves the tools and resources untouched.&lt;/div&gt;

&lt;figure&gt;
&lt;h2&gt;The three pillars: tools, resources and prompts&lt;/h2&gt;
&lt;p&gt;To build with MCP, start with its three core primitives. They are the building blocks of any context-aware system.&lt;/p&gt;
&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Primitive&lt;/th&gt;
&lt;th&gt;Controlled by&lt;/th&gt;
&lt;th&gt;What it is&lt;/th&gt;
&lt;th&gt;Example&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Tools&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;The model&lt;/td&gt;
&lt;td&gt;Actions that change the world&lt;/td&gt;
&lt;td&gt;Write a file, POST to a Shopify API&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Resources&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;The app&lt;/td&gt;
&lt;td&gt;Read-only data for grounding&lt;/td&gt;
&lt;td&gt;Product docs for a support agent&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Prompts&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;The user&lt;/td&gt;
&lt;td&gt;Templates that guide tasks&lt;/td&gt;
&lt;td&gt;A standard &quot;summarize this ticket&quot; flow&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;h3&gt;Tools&lt;/h3&gt;
&lt;p&gt;Tools are model-controlled actions. Giving an agent a tool gives it the ability to change the world, like writing a file to disk or making a POST request to a Shopify API. The model decides when to call the tool based on the user&apos;s intent.&lt;/p&gt;
&lt;h3&gt;Resources&lt;/h3&gt;
&lt;p&gt;Resources are application-controlled data. Think of them as read-only files or database entries the agent can inspect. They give the agent grounding: for a support agent, the product documentation would be a resource it can search and read to answer accurately.&lt;/p&gt;
&lt;h3&gt;Prompts&lt;/h3&gt;
&lt;p&gt;Prompts are user-controlled templates that guide the interaction. MCP prompts let me standardize how users work with the agent across platforms, so the model interprets tasks consistently.&lt;/p&gt;

List what your agent needs and sort each item into tool, resource or prompt. Anything read-only that you currently paste into the system prompt is a candidate resource.

&lt;h2&gt;Building your first MCP server&lt;/h2&gt;
&lt;p&gt;I prefer TypeScript for MCP servers because of the mature official SDK. The protocol itself is language-agnostic, with official SDKs for Python, Java, Go, C#, Kotlin and more.&lt;/p&gt;
&lt;h3&gt;Use the v2 SDK&lt;/h3&gt;
&lt;p&gt;Version 2 of the TypeScript SDK is the stable line, released alongside the 2026-07-28 spec. It ships as split packages (&lt;code&gt;@modelcontextprotocol/server&lt;/code&gt; and &lt;code&gt;@modelcontextprotocol/client&lt;/code&gt;), and v1 keeps getting fixes for at least six months.&lt;/p&gt;
&lt;p&gt;Here is a basic server that exposes a weather tool with the high-level &lt;code&gt;McpServer&lt;/code&gt; API. If you have a sample tool response, my &lt;a href=&quot;https://ansezz.com/tools/json-to-typescript/&quot;&gt;JSON to TypeScript and Zod converter&lt;/a&gt; gives you the types.&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;import { McpServer } from &quot;@modelcontextprotocol/server&quot;;
import { StdioServerTransport } from &quot;@modelcontextprotocol/server/stdio&quot;;
import * as z from &quot;zod/v4&quot;;

const server = new McpServer({ name: &quot;weather-server&quot;, version: &quot;1.0.0&quot; });

server.registerTool(
  &quot;get_weather&quot;,
  {
    description: &quot;Get the current weather for a location&quot;,
    inputSchema: z.object({ location: z.string() }),
  },
  async ({ location }) =&amp;gt; {
    // logic to fetch weather from an API goes here
    return {
      content: [{ type: &quot;text&quot;, text: `It is sunny in ${location}` }],
    };
  },
);

async function main() {
  const transport = new StdioServerTransport();
  await server.connect(transport);
}

main();
&lt;/code&gt;&lt;/pre&gt;
&lt;h3&gt;Small and modular&lt;/h3&gt;
&lt;p&gt;The snippet shows how simple the protocol is. I define the tool and how to handle the call, and the MCP client handles the rest.&lt;/p&gt;
&lt;p&gt;This modular approach is what I look for when managing &lt;a href=&quot;https://ansezz.com/work/&quot;&gt;cloud infrastructure&lt;/a&gt; or complex backend systems. It is clean and it scales.&lt;/p&gt;

Copy the server above, replace the weather logic with one read-only call to a system you use daily, and connect it to an MCP client to watch the model call it.

&lt;h2&gt;Security and the MCP ecosystem&lt;/h2&gt;
&lt;p&gt;Security is a major concern when you give an AI agent access to your data. I have seen many setups where API keys are hardcoded or permissions are far too broad.&lt;/p&gt;
&lt;p&gt;MCP helps with a client-server design where the server controls exactly what is exposed.&lt;/p&gt;
&lt;h3&gt;The server is the gatekeeper&lt;/h3&gt;
&lt;p&gt;You can add fine-grained access control at the server level. For example, an MCP server connected to a database can be limited to specific tables or read-only queries.&lt;/p&gt;
&lt;p&gt;That level of control is essential for enterprise applications.&lt;/p&gt;
&lt;p&gt;Decide what the agent can touch on the server side, and the prompt can&apos;t talk it past that line.&lt;/p&gt;
&lt;h3&gt;A broad ecosystem&lt;/h3&gt;
&lt;p&gt;The ecosystem has matured fast. MCP has gone from an Anthropic experiment to an industry standard, and the Agentic AI Foundation has support from Google, Microsoft, AWS, Cloudflare and Bloomberg.&lt;/p&gt;
&lt;p&gt;On the tooling side, clients like Zed, Cursor, VS Code and Claude Code ship MCP support, so AI assistants write better code with real context. For a hands-on walkthrough, see how I &lt;a href=&quot;https://ansezz.com/blog/claude-mcp-dev-tools/&quot;&gt;connect my own dev tools through Claude MCP&lt;/a&gt;.&lt;/p&gt;
&lt;figure&gt;
&lt;h2&gt;Practical steps for getting started&lt;/h2&gt;
&lt;p&gt;If you want to dive into MCP, I recommend these steps:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;&lt;strong&gt;Explore the existing MCP servers&lt;/strong&gt; on GitHub. The reference repo ships servers for filesystem access, Git, web fetching and persistent memory. See how they are structured.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Pick a simple data source you use every day.&lt;/strong&gt; It could be your Obsidian notes or a local folder of markdown files. Build a basic server to expose them as resources.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Use a client like Claude Desktop&lt;/strong&gt; to test your server. Watch how the model works with your data, and adjust the tool descriptions so they are clearer for the AI.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Compose multiple MCP servers&lt;/strong&gt; once you are comfortable. Imagine an agent that reads your calendar and then drafts an email based on your upcoming meetings.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Add the coordination layer&lt;/strong&gt; when one agent is no longer enough. MCP connects an agent to its tools; A2A connects it to other agents. The &lt;a href=&quot;https://ansezz.com/blog/mcp-vs-a2a-vs-acp/&quot;&gt;agent protocol stack&lt;/a&gt; breaks down where each one belongs.&lt;/li&gt;
&lt;/ol&gt;

Give your first MCP server read-only access only. Add write tools one at a time, each with its own narrow permission.


- **MCP replaces one-off glue code** with one protocol between clients and servers.
- **Tools, resources and prompts** are the three primitives, controlled by the model, the app and the user.
- **Resources ease context window pressure** because the model fetches data only when needed.
- **The server is the gatekeeper:** limit tables, scopes and write access there.
- **Models become swappable** because the tools and resources stay the same.

&lt;p&gt;MCP marks a shift away from &quot;black box&quot; agents toward transparent, context-aware assistants you can reason about in production. If you&apos;re building agents that need real access to your data, &lt;a href=&quot;https://ansezz.com/services/&quot;&gt;here&apos;s how I help teams design and ship MCP servers&lt;/a&gt;, or &lt;a href=&quot;https://ansezz.com/contact/&quot;&gt;drop me a line&lt;/a&gt; to swap notes on real-world MCP server design.&lt;/p&gt;
&lt;p&gt;How are you planning to use MCP in your next project?&lt;/p&gt;
&lt;/figure&gt;&lt;/figure&gt;</content:encoded><category>ai</category><category>mcp</category><category>claude</category><category>agentic-ai</category><category>llm</category></item><item><title>Why your RAG implementation is failing in production</title><link>https://ansezz.com/blog/why-your-rag-is-failing/</link><guid isPermaLink="true">https://ansezz.com/blog/why-your-rag-is-failing/</guid><description>Vector-only retrieval quietly breaks production RAG. Hybrid search, BM25, rank fusion, re-rankers and evals: the fixes that make it reliable.</description><pubDate>Sun, 08 Mar 2026 00:00:00 GMT</pubDate><content:encoded>&lt;p&gt;When a production RAG system gives wrong answers, check retrieval before you blame the model. Fix how you find and rank context first.&lt;/p&gt;

- Vector search finds related ideas but misses exact identifiers like SKUs, error codes and project names, so pure-vector RAG drifts in production.
- Hybrid search (vectors plus BM25), merged with Reciprocal Rank Fusion, keeps both meaning and exact matches.
- A cross-encoder re-ranker and regular evaluation (faithfulness, response relevancy, context precision and recall) turn a good demo into a dependable system.

&lt;p&gt;You built a RAG (Retrieval-Augmented Generation) demo. On your machine, with a handful of PDFs, it looked convincing and the answers felt coherent.&lt;/p&gt;
&lt;p&gt;Then you pushed it to production.&lt;/p&gt;
&lt;h3&gt;Where the demo breaks&lt;/h3&gt;
&lt;p&gt;Users report that the LLM is &quot;hallucinating&quot; when the real issue is retrieval. Obvious answers go missing even though they&apos;re in the docs. Irrelevant chunks surface because they&apos;re semantically close but useless.&lt;/p&gt;
&lt;h3&gt;A retrieval design problem&lt;/h3&gt;
&lt;p&gt;If your RAG system feels unreliable, look at retrieval design first. Most production RAG systems fail because they lean too hard on vector search and mistake a strong demo for a dependable system.&lt;/p&gt;
&lt;p&gt;For the broader catalogue of ways this goes wrong, see &lt;a href=&quot;https://ansezz.com/blog/7-rag-mistakes-production/&quot;&gt;7 mistakes you&apos;re making with your production RAG stack&lt;/a&gt;. One pattern keeps showing up in my own work: &lt;strong&gt;a demo proves possibility, but production demands precision.&lt;/strong&gt;&lt;/p&gt;
&lt;h2&gt;The &quot;vector noise&quot; trap&lt;/h2&gt;
&lt;p&gt;In a demo, semantic resemblance often feels good enough. In production, &quot;good enough&quot; is where failures begin.&lt;/p&gt;
&lt;p&gt;Embeddings are useful. They map text into vectors so you can retrieve by meaning instead of exact wording. Semantic similarity still differs from retrieval accuracy.&lt;/p&gt;
&lt;h3&gt;Strong on concepts, weak on specifics&lt;/h3&gt;
&lt;p&gt;Vector search is good at finding related concepts and weak at specificity.&lt;/p&gt;
&lt;p&gt;If a user searches for &lt;em&gt;&quot;Project-X-99 deployment logs,&quot;&lt;/em&gt; vector search might return &quot;Project-A deployment&quot; or &quot;logging best practices,&quot; because they&apos;re semantically close. It can miss the exact identifier &quot;X-99,&quot; which carries little semantic weight in a high-dimensional space.&lt;/p&gt;
&lt;h3&gt;The model inherits the drift&lt;/h3&gt;
&lt;p&gt;Once retrieval drifts, the LLM inherits the drift. It can&apos;t reason its way out of missing or irrelevant context. You pay for tokens that produce confident but unhelpful answers, and users lose trust for a reason that sits one layer below the model.&lt;/p&gt;
&lt;figure&gt;
&lt;h2&gt;The fix: hybrid search (vector plus BM25)&lt;/h2&gt;
&lt;p&gt;Combine semantic retrieval with lexical precision. That combination is &lt;strong&gt;hybrid search&lt;/strong&gt;.&lt;/p&gt;
&lt;h3&gt;What is BM25?&lt;/h3&gt;
&lt;p&gt;BM25 (Best Matching 25, from the Okapi probabilistic retrieval framework) is the standard lexical ranking method behind classic search. It ignores meaning and rewards exact terms by how important they are in a document and across the collection, while accounting for document length and diminishing returns from repeated terms.&lt;/p&gt;
&lt;h3&gt;Why you need both&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Vector search&lt;/strong&gt; handles synonyms, multilingual queries and conceptual matches.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;BM25&lt;/strong&gt; handles exact matches: IDs, SKUs, product codes and technical jargon.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;User questions are rarely pure meaning or pure keyword. They&apos;re usually a mix. If you&apos;re still deciding how to structure retrieval in the first place, &lt;a href=&quot;https://ansezz.com/blog/vector-search-vs-graph-search/&quot;&gt;vector search vs graph search&lt;/a&gt; is a useful companion read.&lt;/p&gt;
&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Query type&lt;/th&gt;
&lt;th&gt;Vector search&lt;/th&gt;
&lt;th&gt;BM25&lt;/th&gt;
&lt;th&gt;Hybrid&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;&quot;How do I cancel my plan?&quot;&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Strong&lt;/td&gt;
&lt;td&gt;Decent&lt;/td&gt;
&lt;td&gt;Strong&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;&quot;Error E-4012 on checkout&quot;&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Often misses the code&lt;/td&gt;
&lt;td&gt;Strong&lt;/td&gt;
&lt;td&gt;Strong&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;&quot;SKU HB-220 return policy&quot;&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Often misses the SKU&lt;/td&gt;
&lt;td&gt;Strong on the SKU&lt;/td&gt;
&lt;td&gt;Strong&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;&quot;Ways to speed up the store&quot;&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Strong&lt;/td&gt;
&lt;td&gt;Weak on synonyms&lt;/td&gt;
&lt;td&gt;Strong&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;p&gt;Embeddings capture what a question means. Keywords catch exactly what it names.&lt;/p&gt;

Pull 20 real queries from your logs that contain an ID, SKU or error code. Run them through your current retriever and count how many return the exact matching document in the top 5. That number is your case for adding BM25.

&lt;h2&gt;Reciprocal Rank Fusion (RRF)&lt;/h2&gt;
&lt;p&gt;Running two retrieval strategies creates a new question: how do you combine them?&lt;/p&gt;
&lt;p&gt;A practical answer is &lt;strong&gt;Reciprocal Rank Fusion (RRF)&lt;/strong&gt;, introduced by &lt;a href=&quot;https://plg.uwaterloo.ca/~gvcormac/cormacksigir09-rrf.pdf&quot;&gt;Cormack, Clarke and Büttcher in 2009&lt;/a&gt;. It&apos;s simple and reliable, and it doesn&apos;t pretend that scores from different retrievers are directly comparable.&lt;/p&gt;
&lt;h3&gt;How it works&lt;/h3&gt;
&lt;ol&gt;
&lt;li&gt;&lt;strong&gt;Score by rank.&lt;/strong&gt; For every document returned by either method, compute a rank-based score.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;The formula.&lt;/strong&gt; &lt;code&gt;score = 1 / (k + rank)&lt;/code&gt;, where &lt;code&gt;rank&lt;/code&gt; is the 1-based position in each result list (so the code below adds &lt;code&gt;1&lt;/code&gt; to a 0-based index). The constant &lt;code&gt;k&lt;/code&gt; (60 in the original paper) keeps top-ranked items from dominating too much.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Sum it up.&lt;/strong&gt; If a document appears in both the vector and BM25 lists, its scores add together.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Sort.&lt;/strong&gt; The documents with the highest combined scores go to the LLM.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;Here&apos;s the minimal PHP version I drop into a Laravel service:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;function reciprocalRankFusion(array $resultSets, int $k = 60): array
{
    $scores = [];

    foreach ($resultSets as $results) {
        foreach ($results as $rank =&amp;gt; $docId) {
            $scores[$docId] = ($scores[$docId] ?? 0.0) + 1 / ($rank + 1 + $k);
        }
    }

    arsort($scores);

    return $scores;
}
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;A document that is semantically relevant &lt;em&gt;and&lt;/em&gt; lexically precise now rises to the top for a reason.&lt;/p&gt;
&lt;h2&gt;The second pass: re-rankers&lt;/h2&gt;
&lt;p&gt;Hybrid search is a strong foundation, but production RAG usually needs one more layer of judgment: a &lt;strong&gt;re-ranker&lt;/strong&gt;.&lt;/p&gt;
&lt;h3&gt;Judge the pair&lt;/h3&gt;
&lt;p&gt;A re-ranker like Cohere Rerank or BGE-Reranker is a cross-encoder that reads the query and the document together. Relevance is relational: the question is whether this document answers &lt;em&gt;this&lt;/em&gt; question, beyond what it happens to contain.&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Retrieve the top 50 results with hybrid search.&lt;/li&gt;
&lt;li&gt;Pass those 50 through the re-ranker.&lt;/li&gt;
&lt;li&gt;Send only the top 5 to your LLM.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;This cuts context stuffing and improves what reaches the model. It&apos;s one of the clearest differences between a demo and a production system that behaves consistently. The extra hop adds latency, which is where a &lt;a href=&quot;https://ansezz.com/blog/redis-semantic-caching-rag/&quot;&gt;Redis and semantic caching layer&lt;/a&gt; earns its keep.&lt;/p&gt;

  &lt;div&gt;Embed the query, take the top 5 vector matches and send them straight to the LLM. Exact codes get missed and near-miss chunks fill the context.&lt;/div&gt;
  &lt;div&gt;Run vector and BM25 search, fuse the lists with RRF, re-rank the top 50 with a cross-encoder and send the best 5. Then score the answers every week.&lt;/div&gt;

&lt;figure&gt;
&lt;h2&gt;Your production RAG checklist&lt;/h2&gt;
&lt;p&gt;A RAG system can impress in a demo and still be weak in production. Once real users, messy documents and ambiguous queries arrive, weak retrieval turns the LLM into expensive guesswork.&lt;/p&gt;
&lt;h3&gt;The fixes I rely on&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Stop relying on vector-only search.&lt;/strong&gt; Add a BM25 layer.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Use RRF.&lt;/strong&gt; Fuse lexical and semantic results without fiddly score calibration.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Tune chunking on purpose.&lt;/strong&gt; Chunks that are too small lose context, and chunks that are too large add noise. For technical docs, 512 to 1,024 tokens with 10 to 15% overlap usually works well for me.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Add a re-ranker.&lt;/strong&gt; Refine the final candidates before anything reaches the LLM.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Evaluate with RAGAS.&lt;/strong&gt; Track faithfulness, response relevancy, context precision and context recall instead of trusting intuition.&lt;/li&gt;
&lt;/ul&gt;

Build a test set of 30 real questions with known correct source documents. Run it through RAGAS before and after you add hybrid search and a re-ranker, and keep the scores in your repo so every retrieval change gets measured.


- **Retrieval first.** Most &quot;hallucinations&quot; in production RAG start with bad context.
- **Hybrid beats vector-only.** BM25 catches the IDs and codes embeddings miss.
- **Fuse with RRF.** Rank-based fusion avoids comparing incompatible scores.
- **Re-rank before you generate.** Fifty candidates in, five good ones out.
- **Measure it.** RAGAS scores beat gut feel.

&lt;p&gt;Building a RAG demo is easy. Building &lt;em&gt;reliable&lt;/em&gt; RAG takes a real understanding of retrieval, ranking and context design. If you&apos;re still choosing your foundation, &lt;a href=&quot;https://ansezz.com/blog/picking-the-right-rag-stack/&quot;&gt;picking the right RAG stack&lt;/a&gt; walks through the vector database trade-offs. If your production RAG keeps missing, &lt;a href=&quot;https://ansezz.com/services/&quot;&gt;here&apos;s how I help teams fix retrieval, ranking and evals&lt;/a&gt;, or &lt;a href=&quot;https://ansezz.com/contact/&quot;&gt;get in touch&lt;/a&gt; with your war story.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Where does your own system still behave like a demo when it should be behaving like production?&lt;/strong&gt;&lt;/p&gt;
&lt;/figure&gt;&lt;/figure&gt;</content:encoded><category>ai</category><category>rag</category><category>ai</category><category>vector-search</category><category>production</category></item><item><title>Picking the right RAG stack: vector databases for AI</title><link>https://ansezz.com/blog/picking-the-right-rag-stack/</link><guid isPermaLink="true">https://ansezz.com/blog/picking-the-right-rag-stack/</guid><description>pgvector, Pinecone, Weaviate, Qdrant: a 2026 field guide to picking the right vector store for your AI app, with hybrid search and scaling tips.</description><pubDate>Sun, 14 Dec 2025 00:00:00 GMT</pubDate><content:encoded>&lt;p&gt;Pick the vector database that fits your scale, your team and the database you already run.&lt;/p&gt;

- Default to pgvector if you already run Postgres: no new infrastructure, and your embeddings sit next to your relational data.
- Pick Pinecone when you want zero ops at large scale, and Weaviate or Qdrant when hybrid search and filtering decide your quality.
- Cheap wins matter more than the brand: load data before building the index, normalize vectors and keep metadata lean.

&lt;p&gt;You built a chatbot. It works on your machine until you feed it 50,000 internal documents. Then it hallucinates, it slows down, and it pulls a report from three years ago when you asked for last week&apos;s.&lt;/p&gt;
&lt;p&gt;Nine times out of ten, the weak link is the RAG stack, and usually the vector database underneath it.&lt;/p&gt;
&lt;h3&gt;The database wall&lt;/h3&gt;
&lt;p&gt;A Retrieval-Augmented Generation (RAG) system sounds like a weekend project. Past the &quot;hello world&quot; stage, you hit the database wall.&lt;/p&gt;
&lt;p&gt;Choosing the wrong vector store early leads to high latency, rising cloud costs and a painful migration six months later when your data outgrows the setup.&lt;/p&gt;
&lt;h3&gt;Pick for your scale&lt;/h3&gt;
&lt;p&gt;I&apos;ve seen teams freeze in front of the number of options in the AI ecosystem. Pick the right tool for your scale and your team.&lt;/p&gt;
&lt;p&gt;Here is the 2026 landscape, so you can stop scrolling and start shipping.&lt;/p&gt;
&lt;h2&gt;Why the database matters in RAG&lt;/h2&gt;
&lt;p&gt;An LLM like Claude or GPT knows a lot but remembers nothing about your data. RAG gives it that memory, and your vector database is the librarian. If the librarian is slow or loses books, the model can&apos;t do its job.&lt;/p&gt;
&lt;p&gt;If you&apos;re still deciding whether RAG is the right tool at all, versus baking knowledge into the model, start with my breakdown of &lt;a href=&quot;https://ansezz.com/blog/rag-vs-fine-tuning/&quot;&gt;RAG vs fine-tuning&lt;/a&gt;.&lt;/p&gt;
&lt;h3&gt;Three things to look for&lt;/h3&gt;
&lt;ol&gt;
&lt;li&gt;&lt;strong&gt;Latency:&lt;/strong&gt; can it find the right chunk in tens of milliseconds? When it can&apos;t, a &lt;a href=&quot;https://ansezz.com/blog/redis-semantic-caching-rag/&quot;&gt;Redis semantic cache in front of the store&lt;/a&gt; often helps more than swapping databases.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Hybrid search:&lt;/strong&gt; can it search by meaning (vectors) and by exact keywords (full-text)?&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Developer experience:&lt;/strong&gt; how much time will you spend on DevOps?&lt;/li&gt;
&lt;/ol&gt;
&lt;figure&gt;
&lt;h2&gt;The contenders&lt;/h2&gt;
&lt;h3&gt;pgvector: &quot;I already have a database&quot;&lt;/h3&gt;
&lt;p&gt;If you already run &lt;a href=&quot;https://ansezz.com/&quot;&gt;Postgres for your web applications&lt;/a&gt;, pgvector is usually the first stop. It&apos;s an extension that adds vector types and indexes to the database you already trust.&lt;/p&gt;
&lt;p&gt;It fits well under about 10 million vectors. You keep ACID guarantees and simple backups, and your relational data stays next to your embeddings. No new infra, no new security review.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Pros:&lt;/strong&gt; zero new infrastructure on Postgres, easy joins with user metadata, wide ecosystem support (Laravel, Django, Node.js).&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Cons:&lt;/strong&gt; 100M+ vectors needs serious hardware, and hybrid search means combining it with Postgres full-text search yourself.&lt;/li&gt;
&lt;/ul&gt;
&lt;h3&gt;Pinecone: &quot;I want zero ops&quot;&lt;/h3&gt;
&lt;p&gt;Pinecone is a managed, serverless vector database. You don&apos;t manage clusters or tune indexes. You send vectors and get results, and you pay for what you use.&lt;/p&gt;
&lt;p&gt;It&apos;s the usual pick for teams that want to grow toward a billion vectors without hiring a dedicated DevOps engineer.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Pros:&lt;/strong&gt; fully managed (pick a region and go), low latency, enterprise features like SOC 2.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Cons:&lt;/strong&gt; there is no open-source or self-hosted version. Since August 2026, Enterprise customers can use Bring Your Own Cloud (BYOC) to run the data plane in their own AWS, GCP or Azure account. Costs also climb quickly with heavy read and write volume.&lt;/li&gt;
&lt;/ul&gt;
&lt;h3&gt;Weaviate and Qdrant: hybrid search first&lt;/h3&gt;
&lt;p&gt;If your app needs to blend semantic search with classic keyword search, these two lead. Both are built for vector retrieval from the ground up, and both offer open-source and managed cloud versions.&lt;/p&gt;
&lt;p&gt;Weaviate does hybrid search out of the box. Qdrant, written in Rust, is fast and light on memory.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Pros:&lt;/strong&gt; strong hybrid search (BM25 plus vectors), flexible hosting (self-hosted Docker or managed cloud), good filtering (&quot;documents from 2025 that mention security&quot;).&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Cons:&lt;/strong&gt; more operational overhead than Pinecone, and a new database API to learn.&lt;/li&gt;
&lt;/ul&gt;
&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Option&lt;/th&gt;
&lt;th&gt;Best for&lt;/th&gt;
&lt;th&gt;Hosting&lt;/th&gt;
&lt;th&gt;Hybrid search&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;pgvector&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Teams already on Postgres&lt;/td&gt;
&lt;td&gt;Your Postgres&lt;/td&gt;
&lt;td&gt;With Postgres full-text&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Pinecone&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Zero ops at large scale&lt;/td&gt;
&lt;td&gt;Managed (BYOC on Enterprise)&lt;/td&gt;
&lt;td&gt;Supported&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Weaviate&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Hybrid search and filtering&lt;/td&gt;
&lt;td&gt;Self-hosted or managed&lt;/td&gt;
&lt;td&gt;Built in&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Qdrant&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Fast, memory-efficient search&lt;/td&gt;
&lt;td&gt;Self-hosted or managed&lt;/td&gt;
&lt;td&gt;Built in&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;p&gt;Pick the vector store your team can operate on a bad night, not the one that wins a benchmark.&lt;/p&gt;
&lt;h2&gt;How to choose: the engineering trade-offs&lt;/h2&gt;
&lt;p&gt;Pick the database that matches your constraints.&lt;/p&gt;
&lt;h3&gt;Factor 1: the &quot;billions&quot; problem&lt;/h3&gt;
&lt;p&gt;Most startups don&apos;t have a billion vectors. They have a few thousand PDFs. In the sub-1M range, pgvector is almost always the right answer.&lt;/p&gt;
&lt;p&gt;If you&apos;re building a global legal search engine or a large e-commerce recommendation system, you need the distributed design of Milvus or Pinecone. Don&apos;t build a large distributed system for a small amount of data.&lt;/p&gt;
&lt;h3&gt;Factor 2: hybrid search&lt;/h3&gt;
&lt;p&gt;Pure vector search is weak at exact technical terms. Search for &quot;PHP 8.4 features&quot; and you might get general PHP articles. Hybrid search blends the meaning of the vector with the precision of a keyword match.&lt;/p&gt;
&lt;p&gt;If search quality is your top metric, look at Weaviate or Qdrant. If your data is highly relational, weigh &lt;a href=&quot;https://ansezz.com/blog/vector-search-vs-graph-search/&quot;&gt;vector search vs graph search&lt;/a&gt; before you commit to pure vectors.&lt;/p&gt;
&lt;h3&gt;Factor 3: the DevOps tax&lt;/h3&gt;
&lt;p&gt;Every new piece of infrastructure is another thing that can break at 3 AM.&lt;/p&gt;
&lt;p&gt;With a small team, lean on managed services like Pinecone or Zilliz. With a strong infra team that wants to save on cloud margins at high scale, self-hosting Qdrant on Coolify or Kubernetes is the move.&lt;/p&gt;

Count the vectors you have today and estimate the count in 12 months. If both numbers are under a few million and you already run Postgres, install pgvector and build a prototype before you evaluate anything else.

&lt;h2&gt;pgvector with Laravel&lt;/h2&gt;
&lt;p&gt;Since I work a lot with &lt;a href=&quot;https://ansezz.com/&quot;&gt;custom web development using Laravel&lt;/a&gt;, here is what this looks like in practice. Laravel 13 with the AI SDK (&lt;code&gt;laravel/ai&lt;/code&gt;) has native vector columns and a &lt;code&gt;whereVectorSimilarTo&lt;/code&gt; query method on Postgres with pgvector.&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;// migration: an HNSW index with cosine distance
$table-&amp;gt;vector(&apos;embedding&apos;, dimensions: 1536)-&amp;gt;index();

// query: pass the user&apos;s question as a string and Laravel embeds it for you
$results = Document::query()
    -&amp;gt;select(&apos;content&apos;)
    -&amp;gt;whereVectorSimilarTo(&apos;embedding&apos;, $query, minSimilarity: 0.4)
    -&amp;gt;limit(5)
    -&amp;gt;get();
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Under the hood this is pgvector&apos;s cosine distance operator, &lt;code&gt;&amp;lt;=&amp;gt;&lt;/code&gt;. That snippet is the core of a RAG system: find the content, send it to the LLM and get a grounded answer.&lt;/p&gt;
&lt;p&gt;On older Laravel versions, the &lt;code&gt;pgvector/pgvector-php&lt;/code&gt; package gives you a &lt;code&gt;Vector&lt;/code&gt; cast and a &lt;code&gt;nearestNeighbors&lt;/code&gt; scope that do the same job.&lt;/p&gt;

  &lt;div&gt;Every chunk stores the full JSON document as metadata. The index grows fast, memory fills up and queries slow down.&lt;/div&gt;
  &lt;div&gt;The index stores the vector, a document ID and the few fields you filter on. The full record stays in Postgres and you join on the ID.&lt;/div&gt;

&lt;h2&gt;Three practical tips&lt;/h2&gt;
&lt;p&gt;These will save you weeks of refactoring.&lt;/p&gt;
&lt;h3&gt;Index after the initial load&lt;/h3&gt;
&lt;p&gt;Vector indexes like HNSW are fast to search but slow to insert into. For a large initial load, insert your vectors first, then create the index. The pgvector docs say the same: it&apos;s faster to build the index after loading your data.&lt;/p&gt;
&lt;h3&gt;Normalize your vectors&lt;/h3&gt;
&lt;p&gt;Make sure your embedding model and your vector database agree. If you use cosine similarity, normalize your vectors. It keeps scores consistent and prevents odd ranking bugs.&lt;/p&gt;
&lt;h3&gt;Keep the metadata lean&lt;/h3&gt;
&lt;p&gt;Don&apos;t store the whole JSON document inside the vector store. Store the vector and an ID, and keep the heavy data in your primary database. The index stays small and fast.&lt;/p&gt;
&lt;p&gt;These are the cheap wins. For the deeper traps (bad chunking, missing reranking, stale embeddings), see the &lt;a href=&quot;https://ansezz.com/blog/7-rag-mistakes-production/&quot;&gt;7 mistakes you&apos;re making with your production RAG stack&lt;/a&gt;. To test chunk sizes on your own documents, try my &lt;a href=&quot;https://ansezz.com/tools/rag-chunk-splitter/&quot;&gt;RAG chunk splitter&lt;/a&gt;.&lt;/p&gt;
&lt;figure&gt;

Pick your ten most common user questions and run them against your current setup with and without a keyword filter. If the keyword version wins on half of them, you need hybrid search.

&lt;h2&gt;My rule of thumb&lt;/h2&gt;
&lt;p&gt;I&apos;ve built these systems for &lt;a href=&quot;https://ansezz.com/work/&quot;&gt;startups and established businesses&lt;/a&gt;, and this is how I usually guide them:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Default to pgvector.&lt;/strong&gt; It&apos;s the path of least resistance for most web apps.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Move to Pinecone&lt;/strong&gt; if you need high performance and don&apos;t want to manage servers.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Choose Weaviate or Qdrant&lt;/strong&gt; if your app depends on hybrid search and metadata filtering.&lt;/li&gt;
&lt;/ul&gt;

- **pgvector** is the default for teams already on Postgres.
- **Pinecone** is the zero-ops option for scale, with BYOC for Enterprise teams that need data in their own cloud.
- **Hybrid search** (keyword plus vector) usually beats vector search alone.
- **Keep it simple.** Don&apos;t design for billions of vectors when you have thousands.

&lt;p&gt;The right stack is the one that lets you ship your AI features today. If you&apos;re choosing one for production, &lt;a href=&quot;https://ansezz.com/services/&quot;&gt;here&apos;s how I help teams design and ship RAG systems&lt;/a&gt;, or &lt;a href=&quot;https://ansezz.com/contact/&quot;&gt;reach out&lt;/a&gt; with your war stories.&lt;/p&gt;
&lt;p&gt;What&apos;s the hardest problem you&apos;ve hit with retrieval in your RAG system so far?&lt;/p&gt;
&lt;/figure&gt;&lt;/figure&gt;</content:encoded><category>ai</category><category>rag</category><category>vector-search</category><category>pgvector</category><category>laravel</category></item><item><title>Vibe coding: why projects need more than logic</title><link>https://ansezz.com/blog/vibe-coding/</link><guid isPermaLink="true">https://ansezz.com/blog/vibe-coding/</guid><description>Taste, intent and feel matter more in the Cursor and Claude era, and here is how to keep the codebase from becoming a ball of mud while you vibe.</description><pubDate>Sun, 30 Nov 2025 00:00:00 GMT</pubDate><content:encoded>&lt;p&gt;Users judge software by how it behaves. With AI writing more of the implementation, your taste and your intent decide whether a product feels right.&lt;/p&gt;

- &quot;Vibe coding&quot; (Andrej Karpathy, February 2025) means describing what you want and letting AI write the code; for professional work, he now prefers the term &quot;agentic engineering.&quot;
- Your value moves toward taste: noticing when a screen feels off and steering the model with feedback on the feel as well as the function.
- Vibe the surface and harden the core: keep a solid, tested foundation (Laravel, Docker) under an exploratory UI layer so the codebase doesn&apos;t turn into a ball of mud.

&lt;p&gt;Most developers are obsessed with logic. We spend years on syntax, query optimization and architecture debates, and we build systems that are technically correct but feel hollow.&lt;/p&gt;
&lt;p&gt;They work, but they don&apos;t sing. That gap is what vibe coding tries to close.&lt;/p&gt;
&lt;h3&gt;Users feel the product&lt;/h3&gt;
&lt;p&gt;Your users care about how the software feels, far more than clever recursion: whether a button responds, whether a layout makes sense, whether the flow is calm or stressful.&lt;/p&gt;
&lt;p&gt;Products that win will master that feel, and AI tools make it cheaper to iterate on it than ever.&lt;/p&gt;
&lt;h2&gt;The logic trap&lt;/h2&gt;
&lt;p&gt;For a long time I thought my job was to be a logic machine. If I followed every best practice and wrote the most efficient Laravel code possible, the project would succeed.&lt;/p&gt;
&lt;p&gt;I was wrong.&lt;/p&gt;
&lt;h3&gt;The skeleton and the home&lt;/h3&gt;
&lt;p&gt;Logic is the foundation, the skeleton that keeps the building standing. Nobody wants to live in a skeleton. People want a home with character and warmth, and in software that character comes from the vibe.&lt;/p&gt;
&lt;p&gt;When we focus only on logic, we get software that does what it says on the tin and leaves users feeling nothing. Or worse, it frustrates them, because nobody thought about the friction of a slow button or a confusing layout.&lt;/p&gt;
&lt;figure&gt;
&lt;h2&gt;Where &quot;vibe coding&quot; comes from&lt;/h2&gt;
&lt;p&gt;Andrej Karpathy coined &quot;vibe coding&quot; in a February 2025 post: &quot;fully give in to the vibes, embrace exponentials, and forget that the code even exists.&quot; He framed it as a mode for throwaway weekend projects.&lt;/p&gt;
&lt;p&gt;In a February 2026 retrospective, he wrote that programming through LLM agents is becoming a default workflow for professionals, &quot;except with more oversight and scrutiny,&quot; and named &quot;agentic engineering&quot; as his favorite term for that serious version.&lt;/p&gt;
&lt;h3&gt;The sense I mean&lt;/h3&gt;
&lt;p&gt;I use the broader sense the industry picked up: moving from writing code to curating intent with tools like Cursor and Claude. You describe the &lt;em&gt;feel&lt;/em&gt; and &lt;em&gt;behavior&lt;/em&gt; you want in natural language, and the AI does the heavy lifting on implementation.&lt;/p&gt;
&lt;h3&gt;Taste is the job&lt;/h3&gt;
&lt;p&gt;Your value as an engineer shifts from typing speed to taste: recognizing when an interface feels &quot;off&quot; and knowing how to steer the AI to fix it.&lt;/p&gt;
&lt;p&gt;That is really a question of &lt;a href=&quot;https://ansezz.com/blog/prompt-engineering-vs-context-engineering/&quot;&gt;prompt engineering versus context engineering&lt;/a&gt;: giving the model enough of the right context to make good calls on its own.&lt;/p&gt;
&lt;p&gt;On a Shopify store build, the checkout logic matters. The &lt;em&gt;feel&lt;/em&gt; of the checkout (smooth transitions, reassuring feedback, clean typography) is what moves conversions.&lt;/p&gt;
&lt;p&gt;When code gets cheap to write, taste becomes the scarce skill.&lt;/p&gt;
&lt;h2&gt;Tools that keep you in flow&lt;/h2&gt;
&lt;p&gt;To work this way you need tools that stay out of your way, so the gap between an idea and a working screen stays small.&lt;/p&gt;
&lt;h3&gt;Describe the feel&lt;/h3&gt;
&lt;p&gt;Cursor changed how I work. Instead of spending twenty minutes on boilerplate for a new Vue component, I describe it in the chat: &quot;Build me a dashboard widget that feels airy and modern, uses a bento grid layout and gives the user a sense of calm control over their data.&quot;&lt;/p&gt;
&lt;h3&gt;Give feedback on the feeling&lt;/h3&gt;
&lt;p&gt;The AI generates the code and I review it. If the feel is wrong, instead of fixing it line by line, I talk to the model again: &quot;This feels too cramped. Give it more white space and make the shadows softer.&quot;&lt;/p&gt;
&lt;p&gt;That&apos;s the heart of vibe coding: a high-level conversation about intent.&lt;/p&gt;

  &lt;div&gt;You open the generated component and start tweaking padding values and shadow numbers by hand until it looks less cramped.&lt;/div&gt;
  &lt;div&gt;You tell the model &quot;this feels cramped, give it more white space and softer shadows,&quot; review the diff, and keep the version that feels right.&lt;/div&gt;


Pick one screen in your app that feels off. Write three sentences about how it should feel (not what it should contain), give them to your AI editor and compare the result with what you would have changed by hand.

&lt;h2&gt;Guardrails for vibe coding&lt;/h2&gt;
&lt;p&gt;Some of you are thinking: &quot;This sounds like a recipe for a messy, unmaintainable codebase.&quot;&lt;/p&gt;
&lt;p&gt;You&apos;re right to worry. If you vibe through a project without discipline, you end up with a ball of mud. Experience matters more here, because someone has to decide what the AI may touch.&lt;/p&gt;
&lt;h3&gt;A solid core under the vibe layer&lt;/h3&gt;
&lt;p&gt;Vibe coding works when you shift your focus to where it pays off. Use your experience to build a solid core, so the vibe layer has something safe to sit on.&lt;/p&gt;
&lt;p&gt;For me that core is usually Laravel and Docker. Laravel is built for developer happiness, and it gives me a foundation I trust: authentication, database migrations and API structure.&lt;/p&gt;
&lt;p&gt;With that core in place and covered by tests, I can be exploratory with the frontend and the user experience. I vibe code the top layer because I trust the layer beneath it.&lt;/p&gt;
&lt;h2&gt;Shopify and vibe coding&lt;/h2&gt;
&lt;p&gt;In e-commerce, this approach fits well. Shopify has spent years refining how checkout and the admin feel.&lt;/p&gt;
&lt;h3&gt;Matching the brand&lt;/h3&gt;
&lt;p&gt;When I do &lt;a href=&quot;https://ansezz.com/work/&quot;&gt;Shopify customization&lt;/a&gt;, I write Liquid code and I also try to match the brand&apos;s feel. A luxury jewelry brand needs a very different experience from a high-energy fitness store.&lt;/p&gt;
&lt;p&gt;One should feel slow, deliberate and expensive. The other should feel fast, punchy and motivating. You get there by obsessing over the details a logic-only developer skips.&lt;/p&gt;
&lt;figure&gt;
&lt;h2&gt;How to start vibe coding today&lt;/h2&gt;
&lt;ol&gt;
&lt;li&gt;&lt;strong&gt;Train your taste.&lt;/strong&gt; Look at software as an experience. Which apps do you love using, and why: speed, animation, the way buttons respond? Keep a swipe file of great examples.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Treat AI as a partner.&lt;/strong&gt; Use Claude or Cursor to brainstorm whole concepts, beyond autocomplete. Wiring your editor into the rest of your stack with &lt;a href=&quot;https://ansezz.com/blog/claude-mcp-dev-tools/&quot;&gt;MCP to give the model real context&lt;/a&gt; makes this practical. Next comes real &lt;a href=&quot;https://ansezz.com/blog/agentic-workflows-vibe-coding/&quot;&gt;agentic workflows with MCP and agentic loops&lt;/a&gt;, and I mapped the whole path &lt;a href=&quot;https://ansezz.com/blog/ai-coding-workflow-levels/&quot;&gt;level by level, from gateway prompts to multi-agent orchestration&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Build a solid core.&lt;/strong&gt; Don&apos;t let the vibe turn into chaos. Laravel and Docker keep your infrastructure predictable, and the more you trust the foundation, the more you can play with the surface.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Iterate on the feeling.&lt;/strong&gt; Get the feel right first with a messy prototype, then use your technical skills to refactor and harden it.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Practice user empathy.&lt;/strong&gt; For every piece of logic, ask: &quot;How will this make the user feel?&quot; If the answer is &quot;nothing,&quot; there&apos;s more work to do.&lt;/li&gt;
&lt;/ol&gt;

Before your next vibe-coding session, write down the folders the AI may change freely and the ones it may only touch with tests passing. Put that list in your editor&apos;s rules file so every session starts with it.


- **Feel is part of the spec.** Users judge software by how it behaves and responds.
- **Taste is the skill to build.** Steering the AI well matters more than typing fast.
- **Vibe the surface and harden the core.** A tested Laravel and Docker foundation keeps the mess out.
- **Iterate on feel, then refactor.** Prototype fast, then make it production-grade.
- **For production, think agentic engineering:** the same speed, with oversight and review.

&lt;p&gt;Generating a function to sort an array is now a commodity. Building an experience that moves people is rare, and that&apos;s where engineers can still stand out. If you want to bring AI-assisted building into your team without losing code quality, &lt;a href=&quot;https://ansezz.com/services/&quot;&gt;here&apos;s how I help teams set up AI coding workflows with guardrails&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;What&apos;s the one app you use that just &quot;feels&quot; right, and what could you borrow from it for your next project?&lt;/p&gt;
&lt;/figure&gt;&lt;/figure&gt;</content:encoded><category>ai</category><category>vibe-coding</category><category>ai</category><category>claude</category><category>laravel</category></item></channel></rss>