<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Dan Giannone on Medium]]></title>
        <description><![CDATA[Stories by Dan Giannone on Medium]]></description>
        <link>https://medium.com/@DanGiannone?source=rss-8502e4f15932------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*dFqymIIdebrwqz3K</url>
            <title>Stories by Dan Giannone on Medium</title>
            <link>https://medium.com/@DanGiannone?source=rss-8502e4f15932------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Mon, 23 Nov 2026 16:50:11 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@DanGiannone/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[From Coding to Thinking: The Future of Software Development]]></title>
            <link>https://medium.com/@DanGiannone/from-coding-to-thinking-the-future-of-software-development-e9d5c71a2ffe?source=rss-8502e4f15932------2</link>
            <guid isPermaLink="false">https://medium.com/p/e9d5c71a2ffe</guid>
            <category><![CDATA[ai-software-developer]]></category>
            <category><![CDATA[ai-coding]]></category>
            <category><![CDATA[ai-development]]></category>
            <dc:creator><![CDATA[Dan Giannone]]></dc:creator>
            <pubDate>Mon, 17 Nov 2025 17:47:03 GMT</pubDate>
            <atom:updated>2025-11-17T17:47:03.079Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*VmityNSLcG_YK4s2m_H7ZQ.png" /></figure><p>Something fundamental has shifted in software development, and most organizations haven’t adjusted yet.</p><p>For decades, we optimized for implementation speed. We hired more developers, built larger teams, and measured success in velocity and tickets closed. The implicit assumption was always: <strong>good ideas are cheap, implementation is expensive.</strong></p><p>That assumption just flipped.</p><p>AI can now implement code faster and more reliably than humans. The bottleneck has moved entirely to the thinking layers — and most organizations are staffed backwards for this new reality.</p><p>Here’s what’s happening in practice: A team of 3–4 people who think strategically and know how to orchestrate AI agents can now out-ship traditional teams of 20–30 developers by a factor of 100x. Not 10% faster. Not 2x faster. <strong>100x more output, often with higher quality.</strong></p><p>This isn’t a prediction. It’s happening now. And it’s going to reshape the entire software industry within the next 12–18 months.</p><h3>Part 1: The Four Layers of Software (And Why Most Software Fails)</h3><p>Before we talk about AI, we need to understand what actually makes software great — and why most software is, shall we say, “less than great”.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/868/1*xjjwwLj5jEG7RGnJtlh3Zw.png" /></figure><p>Software succeeds or fails based on four distinct layers:</p><h3>Layer 1: Strategic Vision</h3><ul><li>What should we build and why?</li><li>Who are our users and what problems do they actually face?</li><li>What’s our competitive positioning and business model?</li><li>Which problems are worth solving?</li><li>How does this fit into the broader market and product strategy?</li></ul><p><strong>Why most software fails here:</strong> No one has done the hard work of understanding users deeply. “Build a customer dashboard” could mean a dozen different things depending on what decisions users need to make, what their workflows look like, and what success actually means. Without this clarity, even perfect implementation builds the wrong thing.</p><h3>Layer 2: Product Leadership &amp; Decision-Making</h3><ul><li>Making difficult trade-off decisions when priorities compete</li><li>Having the authority to say “no” to features that don’t serve the vision</li><li>Taking ownership of outcomes, not just outputs</li><li>Understanding sequencing and market timing</li><li>Someone who feels responsible for whether the software actually works</li></ul><p><strong>Why most software fails here:</strong> No one owns the decisions. Requirements bounce between stakeholders. Developers build something, hear “that’s not what we meant,” rebuild it, hear the same thing again. The cycle repeats until budget runs out. Teams are measured on velocity and tickets closed, not on whether they solved the actual problem.</p><h3>Layer 3: Technical Architecture &amp; Systems Thinking</h3><ul><li>How should we build this given our constraints?</li><li>What are the trade-offs between different approaches?</li><li>How do we ensure quality, security, and scalability?</li><li>What are the failure modes and how do we handle them?</li><li>Writing specifications that capture the full context and reasoning</li></ul><p><strong>Why most software fails here:</strong> Cookie-cutter thinking instead of first-principles reasoning. Teams apply “industry standard” patterns — microservices for 5 users, vector databases for data that’s never searched, multi-agent systems for simple problems — without understanding whether these patterns actually fit their constraints. When you ask “why this approach?”, the answer is “it’s best practice,” not “because our specific requirements make this the right choice.”</p><h3>Layer 4: Implementation &amp; Testing</h3><ul><li>Translating specifications into working code</li><li>Writing tests, documentation, and deployment scripts</li><li>Handling edge cases and error conditions</li><li>Framework-specific patterns and boilerplate</li><li>Integration between components</li></ul><p><strong>Why software used to fail here:</strong> Bugs, poor code quality, missed edge cases, accumulating technical debt. But honestly? This was never the primary reason software failed. It was just the most visible symptom.</p><h3>The Missing Piece: Communication</h3><p>All four layers require excellent communication:</p><ul><li>Clear documentation that teaches reasoning, not just states conclusions</li><li>Effective collaboration within teams</li><li>Translating technical decisions for non-technical stakeholders</li><li>Articulating trade-offs and constraints clearly</li><li>Writing specifications that others (including AI) can understand and implement</li></ul><p>Poor communication multiplies failures at every layer.</p><h3>Part 2: How AI Changes Each Layer</h3><p>Here’s the critical insight: <strong>AI’s impact is completely different at each layer.</strong></p><h3>Layer 1: Strategic Vision — AI as Thinking Partner</h3><p>AI can help you explore the strategic landscape:</p><ul><li>“What are different approaches to this market problem?”</li><li>“What are second-order effects of this decision?”</li><li>“How are companies in adjacent spaces solving this?”</li></ul><p>But AI can’t replace human judgment here. It can surface options and patterns, but it can’t tell you which option is right for <em>your</em> specific business context, users, and competitive position. It doesn’t have conviction about what will work.</p><p><strong>Impact: AI accelerates strategic thinking by maybe 2–3x through better research and exploration.</strong></p><h3>Layer 2: Product Leadership — AI as Collaborative Sounding Board</h3><p>AI can help you think through product decisions:</p><ul><li>“What are the trade-offs between approach A and B for this user workflow?”</li><li>“What am I not considering about this feature prioritization?”</li><li>“How might users react to this change?”</li></ul><p>AI can weigh trade-offs, analyze options, and challenge your assumptions. It’s genuinely helpful for thinking through hard decisions.</p><p>But AI can’t take ownership. It can’t feel responsibility for outcomes. It won’t wake up at 3am worried about whether the product is working for users. It won’t fight for a decision when stakeholders disagree.</p><p><strong>Impact: AI accelerates product thinking by 3–5x through rapid iteration on ideas.</strong></p><h3>Layer 3: Technical Architecture — AI as Expert Collaborator</h3><p>This is where AI becomes extremely powerful:</p><ul><li>“What are the architectural trade-offs for this data pipeline given these constraints?”</li><li>“What are the failure modes of this design?”</li><li>“How should I structure this system for these scale requirements?”</li><li>“What security considerations am I missing?”</li></ul><p>AI knows every pattern, framework, and best practice. It can evaluate trade-offs based on your constraints. It can spot architectural issues you might miss.</p><p>You still need to make the final decisions based on your specific context — your team’s skills, your budget, your timeline, your business priorities. But AI is a genuine expert collaborator here.</p><p><strong>Impact: AI accelerates architectural work by 5–8x through rapid exploration of design alternatives.</strong></p><h3>Layer 4: Implementation — AI Replaces Humans Entirely</h3><p>This is where everything changes.</p><p>AI doesn’t “help” with implementation. It <strong>does</strong> implementation. Completely. From scratch. Including tests, documentation, and deployment scripts.</p><p>And it does it better than most human developers:</p><ul><li>No bugs from typos or copy-paste errors</li><li>Consistent code style and patterns</li><li>Comprehensive edge case handling</li><li>Complete test coverage</li><li>Documentation that actually matches the code</li></ul><p><strong>Impact: AI makes implementation ~50–100x faster while often improving quality.</strong></p><h3>Why Most Organizations Are Getting This Wrong</h3><p>Here’s the mistake most organizations are making: they’re giving AI coding assistants to everyone equally.</p><p>They hand out Copilot licenses to their entire development team — junior developers, mid-level implementers, senior engineers, architects — and expect productivity to increase uniformly.</p><p>It doesn’t work that way.</p><p><strong>Here’s what actually happens when you give an AI coding assistant to a developer whose job is to take specs and write code:</strong></p><p>Yes, they might code 20–30% faster. They’ll generate more lines of code per day. Your velocity metrics might tick up slightly.</p><p>But here’s the reality: <strong>you don’t need that developer anymore.</strong></p><p>An architect or senior engineer can give the requirement directly to the AI for implementation. The entire role of “person who takes specs and translates them into code” has been automated.</p><p>When organizations give AI tools to implementation-focused developers, they’re optimizing the wrong part of the process. They’re making obsolete roles slightly more efficient instead of eliminating them and empowering the strategic thinkers.</p><p><strong>The AI coding assistant belongs in the hands of the architect and the strategic engineer</strong> — the people working on Layers 1–3. The people who:</p><ul><li>Understand what needs to be built and why</li><li>Can evaluate whether the AI’s output is architecturally sound</li><li>Can make trade-off decisions based on constraints</li><li>Own the outcomes, not just the code</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*eauThVHklG9i9x_9x-UTyg.png" /></figure><h3>Why You Hear Developers Complaining About AI</h3><p>This explains the negativity you hear from parts of the developer community:</p><p><em>“It writes bad code.”</em><br><em>“It slows me down.”</em><br><em>“I spend more time fixing its mistakes than writing it myself.”</em></p><p>These developers are treating AI as an autocomplete tool while still fundamentally typing code line by line. They’re context-switching constantly. They’re reviewing suggestions one at a time. They’re fighting with the AI about formatting and style.</p><p>Of course it’s slower. They’re using an implementation replacement tool as an implementation assistance tool.</p><p>Compare this to the architect who spends hours thinking deeply about the architecture, then specifies what needs to exist and has AI generate it entirely. For them, it’s transformative.</p><p><strong>The difference is who’s holding the tool and what layer they’re working on.</strong></p><p>This is why organizations see wildly different results with AI:</p><ul><li>Company A gives Copilot to 100 developers who take specs and write code → slight productivity gain, lots of complaints, still need all 100 developers</li><li>Company B gives AI coding assistants to 5 architects who think strategically → 50x productivity increase, can ship what previously required 50 people</li></ul><p>The tool is the same. The layer it’s being applied to is completely different.</p><h3>Part 3: A Real Example — Building a Data Pipeline in 3 Hours</h3><p>Let me give you a concrete example from a project I completed last month.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*xnACTe9nCLE6l3PANYb9Nw.png" /></figure><p><strong>The Goal:</strong> Build a data pipeline that:</p><ul><li>Ingests data from 3 different sources</li><li>Cleans and aggregates it into Azure Cosmos DB</li><li>Exposes the data via an MCP (Model Context Protocol) server</li><li>Deploys on Azure Container Apps</li></ul><p><strong>Traditional Approach:</strong> This would be 2–3 weeks of work for a senior developer:</p><ul><li>Days 1–2: Architecture planning and research</li><li>Days 3–5: Setting up the ingestion pipelines</li><li>Days 6–8: Database schema and integration</li><li>Days 9–10: Building the MCP server</li><li>Days 11–12: Writing deployment scripts</li><li>Days 13–14: Testing, debugging, documentation</li></ul><p><strong>My Approach with AI:</strong></p><p><strong>Phase 1: Planning (2 hours)</strong></p><p>I spent 2 hours in “Plan” mode with my AI coding assistant, having a back-and-forth conversation:</p><p><em>Me: “I need to build a data pipeline from three sources into Cosmos DB. Sources are: [details]. I need to handle incremental updates, deal with rate limits on source APIs, and ensure data consistency.”</em></p><p><em>AI: “Let’s think through the architecture. For the rate limits, we should implement exponential backoff with jitter. For incremental updates, we can track watermarks per source. For consistency, I’d recommend…”</em></p><p>We went back and forth on:</p><ul><li>Data modeling decisions (single container vs. multiple containers)</li><li>Error handling and retry strategies</li><li>Authentication approaches for each source</li><li>Cost optimization (request units, storage patterns)</li><li>Deployment architecture</li></ul><p>The AI helped me think through trade-offs:</p><ul><li>“Approach A gives you simpler code but higher RU costs”</li><li>“Approach B is more complex but handles failures more gracefully”</li><li>“Consider this edge case: what happens when source X is down for 6 hours?”</li></ul><p>After 2 hours, we had complete alignment on:</p><ul><li>Architectural decisions with documented reasoning</li><li>Data models and schemas</li><li>Error handling strategies</li><li>Deployment approach</li></ul><p><strong>Phase 2: Best Practices &amp; Guardrails (1 hour)</strong></p><p>I spent an hour researching and implementing the latest AI coding assistant best practices and guardrails:</p><ul><li>Setting up instruction files for the AI agents</li><li>Defining code patterns and architectural boundaries</li><li>Configuring automated checks and testing requirements</li><li>Establishing documentation standards</li><li>Creating templates for common patterns</li></ul><p>This upfront investment ensures the AI generates high-quality, consistent code that follows my architectural decisions.</p><p><strong>Phase 3: Implementation (5 minutes)</strong></p><p>I hit “build.”</p><p>In 5 minutes, I had:</p><ul><li>✅ Complete working codebase</li><li>✅ All three ingestion pipelines implemented</li><li>✅ Database integration with proper error handling</li><li>✅ Full MCP server implementation</li><li>✅ Comprehensive test suite</li><li>✅ Complete documentation</li><li>✅ Bicep deployment scripts for Azure</li><li>✅ Zero bugs</li></ul><p>Not “mostly working code that needs debugging.” <strong>Production-ready code.</strong></p><p>Total time:<strong> 3 hours and 5 minutes </strong>vs. 2–3 weeks.</p><p>And here’s the key: <strong>all 3 hours was valuable strategic work.</strong> The planning required deep architectural thinking. The guardrails setup was about ensuring quality and consistency at scale.</p><p>The implementation? That was trivial. The AI did it perfectly in minutes.</p><h3>Part 4: The New Bottlenecks (And They’re All About Thinking)</h3><p>As my codebase has grown, something interesting has happened. I’m now managing multiple AI coding agents simultaneously — I can kick off 3 separate feature requests in parallel via browser-based agents, then review the pull requests and merge them.</p><p>But I’ve discovered two new bottlenecks:</p><h3>Bottleneck A: How Fast I Can Think</h3><p>The limiting factor is now:</p><ul><li>How quickly can I think through what should come next?</li><li>How clearly can I specify the feature requirements?</li><li>How well can I design the feature architecture?</li><li>How fast can I evaluate the AI’s implementation and spot any issues?</li></ul><p>This is pure cognitive work. It can’t be parallelized. It requires deep understanding of the product, users, and technical constraints.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*jcYfukP7nCwc00UqCRQtJw.png" /></figure><h3>Bottleneck B: Managing the AI Agents</h3><p>As my codebase has grown to thousands of files, I’m putting more effort into:</p><ul><li>Repository structure and organization</li><li>Comprehensive documentation of patterns and practices</li><li>Instruction files that constrain the AI agents</li><li>Automated checks and testing pipelines</li><li>Design systems and component libraries that AI can work within</li><li>Clear architectural boundaries</li></ul><p>The better I set these up, the more autonomy the AI agents have and the higher quality their output is.</p><p>This is essentially “management” work — but instead of managing humans, I’m managing AI agents. And it scales much better because:</p><ul><li>AI agents don’t have bad days</li><li>They follow instructions perfectly</li><li>They never get bored or cut corners</li><li>They work in perfect parallel</li><li>They cost pennies per feature</li></ul><p><strong>I haven’t written a single line of code myself in 2 years.</strong></p><p>I am putting all my energy into Layers 1–3 (strategy, product, architecture) and managing the AI agents that handle Layer 4 (implementation).</p><p>And I’m producing more software than I ever did when I was writing code myself. By at least a factor of 50x.</p><h3>Part 5: The 100x Team vs. The Traditional Team</h3><p>Now we can understand why small AI-native teams will 100x traditional organizations.</p><h3>Traditional Team: 20+ Developers</h3><p><strong>Structure:</strong></p><ul><li>Multiple architects and tech leads</li><li>Senior engineers writing detailed specs</li><li>Many mid-level engineers implementing those specs</li><li>Junior engineers handling smaller tasks</li><li>Product managers coordinating</li><li>Multiple layers of hierarchy and handoffs</li></ul><p><strong>How they work:</strong></p><ul><li>Architects design the system</li><li>Senior engineers write detailed specifications</li><li>Specifications get handed off to implementation teams</li><li>Implementations get reviewed by seniors</li><li>Constant coordination meetings across all these layers</li><li>Pull request reviews, code reviews, design reviews</li><li>Tickets, Jira workflows, sprint planning, retrospectives</li></ul><p><strong>Output characteristics:</strong></p><ul><li>Features take weeks to months to ship</li><li>Significant coordination overhead slows everything down</li><li>Implementation quality varies widely by developer</li><li>Technical debt accumulates from rushed decisions and changing requirements</li><li>Slow feedback cycles make it hard to iterate</li></ul><p><strong>The core problem:</strong> Most of the team is doing work that AI can now do better and faster. The structure optimizes for a world where implementation is the bottleneck.</p><h3>AI-Native Team: 3–4 Strategic Thinkers</h3><p><strong>Structure:</strong></p><ul><li>3–4 people who are all strong across Layers 1–3</li><li>Each person manages multiple AI coding agents</li><li>Flat structure, minimal coordination overhead</li><li>Everyone can operate across strategy, product, and architecture</li></ul><p><strong>How they work:</strong></p><ul><li>Deep thinking about strategy and user needs (Layer 1)</li><li>Clear product ownership and decision-making (Layer 2)</li><li>Solid architectural thinking (Layer 3)</li><li>AI agents handle all implementation (Layer 4)</li><li>Code reviews focus on architectural soundness, not syntax</li><li>Each person can kick off multiple features in parallel</li><li>Direct implementation means immediate feedback and rapid iteration</li></ul><p><strong>Output characteristics:</strong></p><ul><li>Features ship in days instead of months</li><li>Minimal coordination overhead — decisions happen in hours, not weeks</li><li>High consistency because AI follows patterns perfectly once they’re defined</li><li>Technical debt stays low because architectural oversight is continuous</li><li>Fast feedback enables constant learning and improvement</li></ul><p><strong>The core advantage:</strong> The entire team works on the layers that actually matter. Implementation happens instantly once the thinking is done.</p><p><strong>The Real Difference:</strong></p><p>It’s not just about speed. It’s about where human effort goes.</p><p><strong>Traditional team:</strong> 90% of effort on implementation (Layer 4), 10% on thinking (Layers 1–3)</p><p><strong>AI-native team:</strong> 100% of effort on thinking (Layers 1–3), implementation happens automatically</p><p>When AI makes implementation essentially free, the team that spends all their time on strategic thinking will absolutely demolish the team that’s still organized around implementation as the primary activity.</p><p>This isn’t theory. This is happening right now. And it will become the standard within the next 12–18 months.</p><h3>Part 6: What This Means for Organizations</h3><p>The implications are stark:</p><h3>For Companies</h3><p><strong>Winners:</strong></p><ul><li>Companies that identify their best strategic thinkers</li><li>Give them full autonomy and AI tools</li><li>Remove layers of coordination and overhead</li><li>Measure outcomes, not process</li></ul><p><strong>Losers:</strong></p><ul><li>Companies organized around “developer headcount” as a capacity metric</li><li>Organizations with deep hierarchies of specs → implementation → review</li><li>Teams optimized for the old bottleneck (implementation)</li></ul><h3>For Development Teams</h3><p>Most development teams will need to shrink dramatically. But not evenly.</p><p><strong>Roles that become 10x more valuable:</strong></p><ul><li>Strategic thinkers who understand users deeply</li><li>Product leaders who can make hard decisions</li><li>Architects who can evaluate trade-offs and design systems</li><li>Engineers who can orchestrate and manage AI agents</li></ul><p><strong>Roles that become obsolete:</strong></p><ul><li>Pure implementers who take specs and write code</li><li>Junior developers hired primarily for coding speed</li><li>Mid-level developers without strategic skills</li><li>Roles built around the assumption that typing code is valuable</li></ul><p>This is uncomfortable, but it’s reality.</p><h3>For Architects: Resist the Siren Call</h3><p>Having “architect” in your title doesn’t automatically make you indispensable in the AI era. The nature of what makes a good architect is evolving.</p><p><strong>The siren call:</strong> Following whatever architecture pattern is trending on LinkedIn and in conference talks, then applying it to every problem regardless of fit.</p><p>This has always been a challenge in the tech world. First it was “everything should be microservices.” Then “everything should be event-driven architecture.” Now it’s “everything should be multi-agent systems.” The hype cycle has always existed.</p><p>But now, resisting this pattern is more critical than ever. Here’s why:</p><p><strong>AI can read the same LinkedIn posts you can.</strong> It knows all the trendy patterns. It can tell you what’s popular. It can implement whatever architecture is currently fashionable.</p><p>What AI can’t do is understand your client’s specific business constraints deeply enough to know what will actually work for them. That requires judgment from experience and first-principles thinking.</p><p><strong>The architects who will struggle:</strong></p><ul><li>Make recommendations based on what’s trending rather than client-specific constraints</li><li>Can explain the hot new pattern but not why it’s right for this particular problem</li><li>Optimize for resume keywords and conference talks over business value</li></ul><p><strong>The architects who will thrive:</strong></p><ul><li>Develop deep understanding of business problems and constraints</li><li>Can articulate trade-offs precisely for specific contexts</li><li>Have the conviction to say “I know X is hot right now, but you don’t need it — here’s what you actually need and why”</li><li>Focus relentlessly on delivering actual business value</li></ul><p><strong>The test:</strong> Could your architectural advice be replaced by asking ChatGPT “What architecture should I use for [description]”? If yes, it’s time to shift from pattern-matching to first-principles thinking.</p><p>The architects who think from first principles rather than following trends will become more valuable than ever.</p><h3>Part 7: Personal Development — Three Paths Forward</h3><p>If you’re currently in a development role, you have choices to make:</p><h3>Path 1: Grow Toward Strategy &amp; Product</h3><p><strong>Focus on:</strong></p><ul><li>Learning to talk to users and deeply understand their problems</li><li>Developing strong opinions about what should be built and why</li><li>Practicing making trade-off decisions with incomplete information</li><li>Taking ownership of outcomes, not just code quality</li><li>Understanding business models and competitive dynamics</li></ul><p><strong>This makes you:</strong> Someone who can own Layer 1 and Layer 2</p><h3>Path 2: Grow Toward Architecture &amp; Systems</h3><p><strong>Focus on:</strong></p><ul><li>Studying real-world systems and understanding why they’re designed that way</li><li>Learning to articulate trade-offs clearly based on specific constraints</li><li>Getting good at evaluating approaches and making architectural decisions</li><li>Becoming expert at specifying systems that AI can implement</li><li>Understanding how to manage and constrain AI agents for quality output</li></ul><p><strong>This makes you:</strong> Someone who can own Layer 3 and manage Layer 4</p><h3>Path 3: Master AI Orchestration</h3><p><strong>Focus on:</strong></p><ul><li>Learning advanced prompting and AI collaboration techniques</li><li>Building systems for managing multiple AI agents in parallel</li><li>Creating documentation and constraint systems that guide AI</li><li>Developing workflows for reviewing and validating AI output</li><li>Understanding the strengths and limitations of current AI tools</li></ul><p><strong>This makes you:</strong> Someone who can maximize the leverage of AI agents</p><h3>Path 4: Stay in Implementation</h3><p><strong>Reality:</strong> This is a losing bet.</p><p>You can become really good at:</p><ul><li>Reviewing AI-generated code</li><li>Handling the 5% of code that AI struggles with</li><li>Manual debugging</li></ul><p>But this role is shrinking rapidly, and it will likely be fully automated within 2–3 years as AI improves.</p><h3>The Core Skills That Matter Now</h3><p>Across all three winning paths, certain skills have become essential:</p><h3>1. Clear Communication</h3><p>The better you can articulate what you want, the better AI can build it. This means:</p><ul><li>Writing specifications that teach reasoning, not just state requirements</li><li>Documenting trade-offs and constraints clearly</li><li>Explaining why you chose one approach over alternatives</li><li>Creating documentation that guides AI agents effectively</li></ul><h3>2. Strategic Thinking</h3><p>Understanding context and making good decisions:</p><ul><li>What are we actually trying to achieve?</li><li>What are the constraints that matter?</li><li>What are the trade-offs between approaches?</li><li>What are we not considering?</li></ul><h3>3. Systems Thinking</h3><p>Seeing how pieces fit together:</p><ul><li>How do architectural decisions ripple through the system?</li><li>What are the failure modes?</li><li>How does this scale?</li><li>What are the long-term maintenance implications?</li></ul><h3>4. Judgment &amp; Decision-Making</h3><p>The willingness and ability to make calls:</p><ul><li>Choosing between imperfect options</li><li>Saying “no” to requests that don’t serve the vision</li><li>Taking responsibility for outcomes</li><li>Iterating based on results</li></ul><h3>5. Independent Thinking &amp; First-Principles Reasoning</h3><p>Develop your own opinions based on direct experience, not what’s trending on social media or at conferences.</p><p>The technology industry is full of noise:</p><ul><li>Hype cycles for every new framework or architecture pattern</li><li>“Best practices” that get applied everywhere regardless of context</li><li>Influencers promoting whatever is hot this month</li><li>Vendor marketing disguised as technical advice</li><li>Conference talks optimized for engagement over truth</li></ul><p><strong>The ability to cut through this noise and think from first principles has become critical.</strong></p><p>When AI can generate code in any pattern or framework, the differentiator is knowing which patterns actually matter for your specific context. Not which patterns are popular, but which patterns solve your actual problems given your actual constraints.</p><p>This means:</p><ul><li>Building real things and learning from what works (and what doesn’t)</li><li>Being skeptical of any “best practice” until you understand what problem it solves</li><li>Forming opinions based on your actual constraints and requirements</li><li>Being willing to go against consensus when your experience shows a different path</li><li>Asking “why is this the right choice for our situation?” instead of “what’s everyone else doing?”</li></ul><p><strong>Example:</strong> Right now, a huge percentage of technical content is about multi-agent systems. Every other post is about orchestrating multiple AI agents. But talk to people actually shipping products at scale — most aren’t using multi-agent systems at all. They’re using much simpler architectures that solve the actual problem without the complexity.</p><p>The architects and engineers who can see through hype and build what actually works — based on first-principles thinking about their specific constraints — will be infinitely more valuable than those who just implement whatever is trending.</p><p>AI can tell you what the industry consensus is. It can’t tell you when that consensus is wrong for your situation. That requires judgment built from real experience and the willingness to think independently.</p><h3>Conclusion: The Coming Reorganization</h3><p>The software industry is about to go through a massive reorganization.</p><p><strong>What’s happening:</strong></p><ul><li>Implementation is becoming essentially free</li><li>The bottleneck has moved entirely to strategic thinking</li><li>Small teams can now out-ship large organizations by 100x</li><li>The people who create value are the ones who think clearly about problems</li></ul><p><strong>What this means:</strong></p><p>For individuals: Your value is no longer in your ability to type code. It’s in your ability to think strategically, make good decisions, and orchestrate AI effectively.</p><p>For teams: The winning structure is 3–4 strategic thinkers with AI agents, not 20–30 developers with coordination overhead.</p><p>For companies: Your competitive advantage is no longer “we can hire more developers.” It’s “we have people who understand our users deeply and can orchestrate AI to build the right things.”</p><p><strong>The uncomfortable truth:</strong> Most development organizations are currently staffed backwards for this new reality. They have many people in roles that AI has or will make obsolete in the next 24–36 months, and too few people in roles that AI has made 10x more valuable.</p><p>The teams that recognize this and reorganize quickly will have an incredible competitive advantage.</p><p>The teams that don’t will wonder why they’re getting out-shipped by companies a tenth their size.</p><p>The transition is already happening. The question is whether you’ll lead it or get swept up by it.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=e9d5c71a2ffe" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[The Problem with AI Agent “Memory”]]></title>
            <link>https://medium.com/@DanGiannone/the-problem-with-ai-agent-memory-9d47924e7975?source=rss-8502e4f15932------2</link>
            <guid isPermaLink="false">https://medium.com/p/9d47924e7975</guid>
            <category><![CDATA[long-term-memory]]></category>
            <category><![CDATA[ai-agent]]></category>
            <category><![CDATA[ai-memory]]></category>
            <category><![CDATA[ai-agent-memory]]></category>
            <dc:creator><![CDATA[Dan Giannone]]></dc:creator>
            <pubDate>Fri, 14 Nov 2025 19:17:21 GMT</pubDate>
            <atom:updated>2025-11-14T19:17:21.247Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*udPbJ9vmyE2CR_UwP5Rm_Q.png" /></figure><h3>Introduction: The Illusion of Long-Term Memory</h3><p>Over the last year, “Long-term Memory” has become a staple component of AI agents and agentic systems. It shows up in product announcements, vendor demos, and enterprise architecture decks. The central promise is always some variation of:</p><p>“I’ll remember your preferences.”</p><p>“I’ll keep this in mind for next time.”</p><p>“I get better the more you use me.”</p><p>On paper, this sounds fantastic. An assistant that learns from every interaction, accumulates context over time, and gets smarter the more you work with it — that’s the dream.</p><p>The reality, however, falls woefully short.</p><p>I have been using all the leading AI tools — Claude, ChatGPT, Copilot, and others — for 2+ years now. Yesterday I made the decision to turn off memory in all of them.</p><p>Not because I think long-term memory is a bad idea. And not because I don’t believe it could eventually become a core part of how we work with AI.</p><p>I turned it off because the current version of memory — under the hood, in most tools — is half-baked. It’s built on a fragile architecture where many things have to go right in a row, and if any one piece misfires, memory doesn’t just fail silently. It actually makes the experience worse — for individual users and for teams trying to reason about system behavior.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*F-JX6OtDni-TO2TxAVbi8Q.png" /></figure><p>It is important for teams to understand the reality of current long-term memory systems when making decisions about how to roll out or design AI for their organization.</p><p>In this article, I will cover:</p><ul><li>How “memory” actually works in today’s AI agents (the technical pipeline and its dependencies)</li><li>Why this approach is so fragile (four fundamental problems with the architecture, including user experience impacts)</li><li>How this contrasts with human memory (and why that gap matters)</li><li>What a real agent memory system would require (conceptually, as frontier research)</li><li>How you should approach memory features today (the practical recommendations)</li></ul><p>The bottom line: it’s okay to experiment with the built-in memory features from major providers — they’re interesting beta functionality. But make sure you understand the reality.</p><h3>How “Memory” Actually Works in Today’s AI Agents</h3><p>Let’s start with the technical reality. When ChatGPT or Claude or any modern AI agent claims to “remember” something about you, here’s what’s actually happening under the hood:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*SCj6Hz_JgRtga1Y-jNe0CA.png" /></figure><ol><li><strong>Something gets flagged as “important.”</strong> During a conversation, the system decides (via heuristics, classifiers, or another LLM call) that a piece of information might be worth remembering. Maybe you mentioned your job title, or your favorite programming language, or where you live.</li><li><strong>A snippet gets stored and embedded.</strong> That fragment of text gets saved to a database, and an embedding model converts it into a high-dimensional vector. This vector gets indexed in a vector database alongside thousands or millions of other snippets.</li><li><strong>Later, you start a new conversation without context.</strong> Three weeks pass. You begin a fresh conversation and ask a question that assumes prior context — but you don’t explicitly restate that context because you assume the agent “remembers.”</li><li><strong>The agent decides whether to query its memory.</strong> Based on your new message, another system component decides if it should search the memory store. If it does, it converts your current message to an embedding and runs a similarity search against stored vectors.</li><li><strong>Retrieved snippets get stuffed into the prompt.</strong> If the search returns results, those text snippets get injected into the context window alongside your current message. The LLM sees both and generates a response.</li></ol><p>Notice the chain of dependencies: importance detection must work, retrieval must trigger at the right time, similarity search must surface relevant (not stale) information, and the LLM must correctly integrate old snippets with new context. <strong>If any link breaks, the entire mechanism fails — or worse, appears to work while injecting subtle errors.</strong></p><p><strong>A concrete example:</strong></p><blockquote><em>You told ChatGPT three months ago: “I work at Acme Corp as a product manager.”</em></blockquote><blockquote><em>That sentence gets embedded and stored. Today, you’ve switched jobs to a new company, but you haven’t explicitly told the AI.</em></blockquote><blockquote><em>You ask: “Can you help me draft an email to my CEO about our Q2 roadmap?”</em></blockquote><blockquote><em>The memory system dutifully retrieves the old snippet. The LLM now “knows” you work at Acme Corp and might reference that company’s context, or use language calibrated to your old role.</em></blockquote><blockquote><em>You get a response that feels subtly wrong — not catastrophically broken, just… off. And because the error is buried in assumed context rather than explicit facts, it’s hard to debug.</em></blockquote><p>This happens constantly. And it’s a direct consequence of the architecture.</p><h3>Why This Approach Is So Fragile</h3><p>The vector-store-as-memory paradigm has four fundamental problems that make it unsuitable as a foundation for reliable agent behavior:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*t8ertuK3L1a-6XqxXhs_KA.png" /></figure><p>Let’s examine each.</p><h4>Snippets, Not Understanding</h4><p>Vector databases don’t store understanding — they store text fragments with no inherent structure or relationships. When you tell an agent “I have two kids, ages 7 and 9,” it doesn’t build a mental model of your family. It stores a sentence. If you later say “my older daughter,” the system has no guaranteed way to connect that to “age 9.” It might retrieve both snippets via similarity, or it might not. The “memory” is a bag of decontextualized strings, not a knowledge graph.</p><p>Human memory works through interconnected concepts, schemas, and narratives. We remember events in relation to other events, facts in relation to personal significance, preferences as part of identity. Vector similarity is a crude approximation of semantic relatedness — better than nothing, but fundamentally not the same thing as relational understanding.</p><h4>Retrieval Is Bolted On, Not Integrated</h4><p>In current architectures, memory retrieval is an external process that happens before or alongside the LLM’s reasoning. The model doesn’t organically “recall” information as part of its thought process — instead, a separate system decides what to inject into its context. This creates a fundamental disconnect: the retrieval system and the reasoning system are optimizing for different things.</p><p>The retriever uses embedding similarity, which captures semantic proximity but not temporal relevance, importance to current task, or likelihood of having changed. The LLM has no direct feedback loop to say “that retrieved context was wrong” or “I needed X but got Y.” The two systems are coupled through a one-way pipe, with no mechanism for learning or adaptation.</p><h4>No Real Time, Consolidation, or Forgetting</h4><p>Human memory is dynamic. We consolidate important experiences, forget trivial details, update our models as new information arrives, and reconstruct memories with context-dependent emphasis. Current agent memory does none of this. Every stored snippet persists with equal weight indefinitely. There’s no mechanism to say “I told you this a year ago, and it’s stale now” versus “I told you this yesterday, and it’s current.”</p><p>Some systems add timestamps or recency boosting, but these are band-aids on a broken model. True memory involves active maintenance: reconsolidation, interference, decay, and adaptive retrieval based on current goals. A vector store has none of these properties. It’s a static archive masquerading as dynamic recall.</p><h4>Failure Is Noisy and Confidence-Amplifying</h4><p>When memory fails in humans, we know it. We say “I don’t remember” or “I might be misremembering this.” When agent memory fails, it often produces confidently wrong responses that blend stale retrieved context with current information. The LLM has no built-in mechanism to detect that a retrieved snippet is outdated or irrelevant — it treats memory injections the same way it treats any other prompt text.</p><p>This creates a particularly insidious failure mode: the agent appears to be personalizing its response based on what it “knows” about you, which increases your trust, but the personalization is based on incorrect or stale information, which should decrease your trust. The system’s confidence becomes inversely correlated with its reliability.</p><p><strong>For power users who already provide the full context in their prompt,</strong> memory often makes things worse. When working on a specific task with full context already in the prompt, the memory system retrieves snippets based on keyword overlap — frequently from different projects, different timeframes, or different contexts entirely. The agent might reference the wrong client or mix details from multiple projects. When something goes subtly wrong because of stale memory, users spend cognitive effort debugging whether the error came from the model or from injected context.</p><p><strong>For casual users,</strong> the problem is inconsistency. Yes, there are moments when the agent helpfully remembers something from three conversations ago without prompting — that feels great. But those moments are outnumbered by times when it confidently states something out of date, retrieves irrelevant details, or fails to retrieve something obvious. Users can’t build a reliable mental model of what will be remembered and when, which means they can’t trust or effectively leverage the feature.</p><p><strong>The organizational costs compound:</strong></p><ul><li><strong>Token cost and latency:</strong> Every spurious memory retrieval burns tokens (money for providers) and adds retrieval time, slowing responses</li><li><strong>Cognitive load:</strong> The LLM must filter signal from noise in injected context</li><li><strong>Support burden:</strong> Teams field questions like “why does it think I still work at my old company?”</li><li><strong>Trust erosion:</strong> Users experience a slow degradation of confidence that’s hard to measure but very real</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*7fVulcwPzuFiq0TvxF2cUg.png" /></figure><h3>A High-Level Contrast with Human Memory</h3><p>To understand why current agent memory feels so brittle, it helps to contrast it with how human memory actually works.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*YgJpImxiO7SyziT1VWMY2g.png" /><figcaption>A visualization — Human memory vs AI Agent memory</figcaption></figure><p><strong>Human memory is multi-layered:</strong> working memory for immediate tasks, episodic memory for events and experiences, semantic memory for facts and concepts, procedural memory for skills. These systems interact. When I recall a conversation with you, I’m reconstructing it from fragments, influenced by my current goals, emotional state, and subsequent experiences. My memory of what you said is shaped by what I needed to hear, what surprised me, and how it connected to my existing mental models.</p><p><strong>Human memory is relational.</strong> Facts don’t exist in isolation — they’re nodes in a vast web of associations. When you tell me you live in Philadelphia, that connects to my knowledge of the city, your potential accent, the sports teams you might follow, the climate you experience. Future mentions of “home” or “the city” automatically carry this context because the information is woven into a graph, not floating as an isolated vector.</p><p><strong>Human memory is selective and goal-oriented.</strong> We remember what matters, forget what doesn’t, and retrieve what’s relevant to current concerns. If you ask me for advice on your career, I don’t automatically recall that you like Thai food — even though I “know” that fact — because it’s not germane. The retrieval process itself is context-sensitive.</p><p><strong>Current AI memory, by contrast:</strong> one undifferentiated bag of text snippets indexed by cosine similarity.</p><p>It’s less like your life experience and more like your browser history: a chronological list of things you looked at, searchable by keywords, with no understanding of why they mattered or how they relate.</p><h3>What a Real Agent Memory System Would Need (Conceptually)</h3><p>Before we get to practical recommendations, it’s worth understanding what actual long-term memory for agents would require. I want to be clear: <strong>we’re not there yet. This is frontier research territory.</strong> I’m sketching this not as a blueprint for what you should build, but as a way to calibrate expectations about the problem’s difficulty and why current solutions are inadequate.</p><p>A real memory system for agents would need multiple components working together:</p><p><strong>1. Working state for current tasks</strong></p><p>An agent needs to maintain context about what it’s doing right now — not just in a single conversation, but across a session or project. This is more than a context window; it’s a structured representation of active goals, intermediate results, and next steps. When you pause a task and come back later, this is what lets the agent resume intelligently rather than starting from scratch.</p><p><strong>2. Episodic history of events, actions, and outcomes</strong></p><p>The agent should remember what happened, in order, with some understanding of cause and effect. Not just “user mentioned X” but “user asked about Y, agent suggested Z, user implemented it, outcome was good/bad.” This creates a feedback loop for learning what works. Critically, these episodes need timestamps, context markers, and ideally some consolidation over time (recent events stored in detail, older events summarized or forgotten).</p><p><strong>3. Structured knowledge representation</strong></p><p>Instead of text snippets, imagine a knowledge graph: entities (you, your projects, your preferences), relationships between them, attributes with confidence levels and recency markers. When you mention “my manager” in two different conversations three months apart, a real system should maintain that as a stable entity reference, updated as new information arrives. This is closer to how databases work than how vector stores work — and that’s the point.</p><p><strong>4. Policies, habits, and reusable behaviors</strong></p><p>Over time, an agent should learn not just facts about you, but patterns in how you work. If you always want code in Python, prefer concise explanations, and care about performance over readability, that’s not a bag of snippets — it’s a behavioral policy. These policies should be extractable, inspectable, and editable by users, not buried in an opaque embedding space.</p><p><strong>5. Vectors as a supporting index, not the definition of memory</strong></p><p>Embeddings are useful for initial retrieval or for finding related content when you don’t have structured queries. But they should be one tool in the toolkit, not the primary data structure. Use vectors to search unstructured text when you need to; use graphs and tables for everything else.</p><p>The key insight: building this system is a frontier lab problem, not an internal IT project. It requires advances in model architecture (agents that can natively access and update external state), training paradigms (learning from user feedback loops), and infrastructure (distributed, secure knowledge stores with strong consistency guarantees). OpenAI, Anthropic, Google DeepMind — these organizations are actively researching this, and they haven’t solved it yet.</p><p>Which brings us to the practical question: what should you do today?</p><h3>How You Should Treat Memory Features Today</h3><p>The landscape for agent memory is actually quite simple right now. You have two choices: use the built-in memory from major providers (ChatGPT, Claude, Copilot, etc.), or don’t use long-term memory at all. There’s no middle ground where building your own makes sense.</p><h4>Built-In Memory: Experiment, But Treat as Beta</h4><p>It’s perfectly reasonable to enable the out-of-the-box memory features in tools like ChatGPT, Claude, or Microsoft Copilot. These features are generally well-engineered within the constraints of current technology, and they’re backed by teams that are actively iterating on them based on large-scale user feedback.</p><p>But treat them as experimental functionality, not production-grade primitives:</p><p><strong>✓ It may help occasionally</strong></p><p>For simple preferences (preferred language, communication style, basic biographical facts), memory can reduce friction. If the system remembers you’re a Python developer who prefers concise explanations, it might save you a few keystrokes per interaction. That’s nice.</p><p><strong>✗ It may also inject noise or stale information</strong></p><p>As discussed above, retrieval is imperfect, and the system has no robust way to detect when information has become outdated. You’ll see occasional weird responses where the agent is clearly operating on incorrect assumptions pulled from old context.</p><p><strong>⚠ Don’t rely on it for core, high-stakes workflows</strong></p><p>If you’re using AI agents for critical business processes, don’t depend on memory to maintain state or context. Build explicit context management into your workflow: store task state in your CRM, pass relevant data as structured input, use conversation-level context windows for continuity. Treat memory as a nice-to-have enhancement, not a load-bearing component.</p><p>The upside of using built-in memory: you get the benefits of ongoing research and iteration. When Anthropic or OpenAI makes their memory systems better, you automatically get those improvements. The downside is limited: if it doesn’t work well for you, turn it off.</p><h3>Custom Long-Term Memory: Just Don’t</h3><p>Here’s where I need to be blunt: <strong>do not build your own “long-term memory” layer for AI agents.</strong></p><p>I see this pattern often. A team gets excited about AI agents, recognizes that the built-in memory is limited, and decides to build something better. This is always a mistake. Here’s why:</p><p><strong>You’ll recreate the same fragile architecture with fewer resources.</strong> The problems with vector-store memory aren’t implementation details — they’re fundamental to the approach. Your custom system will have the same issues with snippet decontextualization, retrieval timing, staleness detection, and confidence calibration. But you’ll have less budget for evaluation, fewer engineers monitoring edge cases, and no direct line to the model providers for debugging.</p><p><strong>You’ll waste engineering time on an unsolved problem.</strong> Memory is genuinely hard. Frontier labs with billions in funding and teams of PhDs haven’t made it work reliably yet. If Anthropic and OpenAI are still treating this as an active research problem, your internal team is not going to solve it. The engineering effort required to get even marginally better results than the built-in systems is massive, and the opportunity cost is enormous.</p><p><strong>Your effort is better spent elsewhere.</strong> Want to improve your AI agents? Focus on clean data, tool integration, and MCP servers. <a href="https://medium.com/@DanGiannone/stop-building-your-own-internal-chatbots-agents-focus-on-your-mcp-servers-b650863b37e8">More reading here.</a></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*h_8OwDVmYpE8XdtDvndOfg.png" /></figure><p><strong>The failure mode to avoid:</strong></p><p>A team spends three months building a custom memory system, launches it with fanfare, discovers it has all the problems discussed in this article (plus new ones specific to their implementation), and then either abandons it quietly or commits to ongoing maintenance of a brittle, low-value feature.</p><h3>Conclusion: Treat Long-term Memory as a Beta Feature</h3><p>Let me restate the core argument clearly: today’s long-term memory implementations for AI agents are a half-baked first attempt at a genuinely hard problem, not a solved primitive you should build your application on top of.</p><p><strong>The fundamental issues:</strong></p><p>The vector-store-as-memory paradigm has architectural limitations that can’t be fixed with better tuning. It treats memory as snippet retrieval rather than structured knowledge, bolts retrieval onto stateless models rather than integrating it into reasoning, and has no robust mechanism for temporal dynamics, consolidation, or confidence calibration. These aren’t bugs — they’re consequences of the approach itself.</p><p><strong>The research reality:</strong></p><p>Frontier labs understand this. They’re actively researching next-generation memory systems that involve structured state, knowledge graphs, agentic learning loops, and architecturally integrated recall. We’re starting to see glimpses of what this might look like: models that can natively access databases, agents that update their own knowledge bases as they work, systems that explicitly represent uncertainty about remembered information. But we’re not there yet.</p><p><strong>What you should do:</strong></p><p><strong>✓ It’s okay to toggle on the built-in memory features if you know what you’re getting.</strong> Treat them as interesting beta functionality. They’ll occasionally delight you and occasionally confuse you. For personal use or low-stakes workflows, that’s fine. Just don’t depend on them for anything critical.</p><p><strong>✗ But under no circumstances should you be trying to engineer your own long-term memory system on top of a vector store.</strong> If Anthropic, OpenAI, and the rest haven’t made this work reliably yet, your internal IT team is not going to solve it. The problem is harder than it looks, the payoff is smaller than you expect, and your engineering effort is better spent on literally anything else.</p><p>Treat memory as experimental garnish, not core architecture, until the underlying paradigm evolves. When real, robust agent memory arrives, it’ll be unmistakable — because it’ll actually work. Until then, be skeptical, stay pragmatic, and focus on building systems that don’t require magic to function reliably.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=9d47924e7975" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Stop building your own internal chatbots & agents — focus on your MCP servers]]></title>
            <link>https://medium.com/@DanGiannone/stop-building-your-own-internal-chatbots-agents-focus-on-your-mcp-servers-b650863b37e8?source=rss-8502e4f15932------2</link>
            <guid isPermaLink="false">https://medium.com/p/b650863b37e8</guid>
            <category><![CDATA[ai-tools]]></category>
            <category><![CDATA[genai]]></category>
            <category><![CDATA[mcp-protocol]]></category>
            <category><![CDATA[generative-ai-tools]]></category>
            <category><![CDATA[mcp-server]]></category>
            <dc:creator><![CDATA[Dan Giannone]]></dc:creator>
            <pubDate>Wed, 29 Oct 2025 14:08:18 GMT</pubDate>
            <atom:updated>2025-10-29T14:08:18.676Z</atom:updated>
            <content:encoded><![CDATA[<h3>Stop building your own internal chatbots &amp; agents — focus on your MCP servers</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*b2x1emWyd99laBSCrZYMng.png" /></figure><p>For the last 3 years, companies have been frantically trying to build “their” version of ChatGPT; ChatGPT but leveraging their proprietary data &amp; business logic. The “Chat With Your Data”, standard cookie-cutter RAG architecture project has been pervasive, almost every medium/large organization has tried their hand at building an inhouse chatbot. We recently saw a report by MIT stating that 95% of AI projects failed to meaningfully move the company top/bottom line in production, and these internal chatbots are very much part of that statistic.</p><p>So the question is: <strong>why? </strong>Why are so many of these internally developed chatbots falling short?</p><p>Engineering high-quality software is hard by itself, even before you factor AI into the equation. If you’ve worked in corporate America before, think about how many times you’ve encountered a high-quality piece of inhouse-built software? Unless you work at Meta or Google, the answer is probably “never”. If you market your internal chatbot as “our version of ChatGPT”, users are inevitably going to be disappointed/frustrated when the user experience doesn’t come close. OpenAI has dozens of engineers &amp; product people making $800k/year, some of the top engineering talent in the world, building ChatGPT. Your company’s team of junior offshore developers with no clear product owner, no UX lead, and minimal stakeholder engagement is not going to be able to build a comparable product.</p><p>In addition to the challenges of standard software development, we also have to add AI engineering into the mix. Agentic design patterns, retrieval strategies, context engineering, chunking/embeddings, prompt engineering, long term memory, how to handle long-running conversation compaction, and many other concepts/challenges need to be handled to build a comparable experience to ChatGPT/Claude/others. I have seen internal dev teams struggle for 6 months to build the “upload your file to the chatbot” feature that users considered table-stakes 2 years ago.</p><p>Building a compelling front-end in the agentic AI era is even more challenging than the AI part. Look at this screenshot of Perplexity’s user interface on a given query:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/870/1*09jicZa3xVjwWmBAeU5yvQ.png" /></figure><p>It’s clean, seamless, responsive, and intuitive. Trying to replicate this would be extremely difficult, even with the power of AI-coding assistants. Outside of the backend, the frontend, and the integration between the two, there are also countless other complexities that come with building your own: identity management &amp; data access controls, security, governance, model life-cycle management, etc. Here are some other articles I’ve written on the topic of how &amp; why building internal chatbots is so difficult:</p><blockquote><a href="https://medium.com/@DanGiannone/the-non-technical-challenges-with-rag-e91fb165565e">The Non-Technical Challenges with RAG | by Dan Giannone | Medium</a></blockquote><blockquote><a href="https://www.linkedin.com/pulse/my-first-rag-use-case-key-insights-lessons-learned-dan-giannone-sa7ne/?trackingId=k1krT2HyTZqGWtW4O0NH3w%3D%3D">(4) My First RAG Use-Case — Key Insights &amp; Lessons Learned | LinkedIn</a></blockquote><blockquote><a href="https://www.linkedin.com/pulse/evaluating-rag-applications-deep-dive-dan-giannone-qonce/?trackingId=k1krT2HyTZqGWtW4O0NH3w%3D%3D">(4) Evaluating RAG Applications — A Deep Dive | LinkedIn</a></blockquote><p>Now, despite all this, there are cases where a business would want to build their own chatbot. If the chatbot is externally facing, say part of your main website, it may make sense to invest heavily here if you consider it a potential competitive advantage and need full control. But frankly, even if you do have the engineering talent inhouse, those engineering cycles are likely better spent elsewhere (discussed later in the article).</p><h3>What’s the alternative?</h3><p>In July of 2025, Anthropic released a feature which got relatively little attention, but to me marks one of the biggest shifts in the industry of the last year. The “custom connector”, the ability to plug your custom-built MCP server into Claude and have it leverage the data/tools:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*degb8Y6VrinZucVcDPZxhg.png" /></figure><p>Why is this so important? This means that you can now have the “ChatGPT but for your business” experience, without having to build your own frontend &amp; all of the advanced AI engineering features that systems like Claude have out-of-the-box.</p><p>Combine this with the fact that Claude recently switched its entire system architecture to move away from basic LLM responses to “agentic” behavior, and we can see how powerful this combination can be. Not only can Claude leverage your data for basic chatbot question/answer functionality, it can now start to handle actual business workflows, take actions, etc. Let’s look at this example of a recent query I gave Claude:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/819/1*Ue7XOz9ibvaytArFE3IMnQ.png" /></figure><p>We can see that Claude planned out the steps and iterated through them in an agentic fashion. We also have all the features and functionality we would expect from a modern chatbot (citations, upload, model selection, settings). Even if you could build all of this inhouse, companies like Anthropic/OpenAI <strong>will </strong>outpace you when it comes to building these general-purpose AI assistant systems.</p><h3>What does this mean and how should you think about AI strategy?</h3><ol><li>Focus on hardening your data quality/data governance &amp; building your own high-quality MCP servers backed by high-quality data &amp; well-designed tools</li><li>Focus your AI engineering cycles on highly custom/specific workflows that are core to your business.</li></ol><p>Let’s break this down further:</p><p><strong>Build MCP Servers, Not Chatbots</strong></p><p>Instead of spending 6–12 months and hundreds of thousands of dollars building a mediocre chatbot that users will complain about, invest that same time and money into building robust MCP servers. These servers should expose your company’s proprietary data and business logic in a clean, well-documented way. Think of it as building a high-quality API layer that any LLM system can leverage.</p><p>The beauty of this approach is that you’re not locked into any single vendor or interface. Build your MCP servers once, and they work with Claude today, potentially with ChatGPT/Gemini tomorrow, and with whatever comes next. You’re future-proofing your AI strategy while simultaneously reducing your technical debt and maintenance burden.</p><p><strong>Data Quality Is Your Competitive Advantage</strong></p><p>Here’s the reality: OpenAI and Anthropic will always have better general-purpose AI systems than you. Google will always have better search infrastructure. But they don’t have your data, and they don’t understand your business context. That’s where you should be investing.</p><p>Your competitive advantage isn’t in building a prettier chatbot interface or implementing a slightly better RAG pipeline. It’s in having clean, well-structured, easily accessible data that accurately represents your business. Most companies are sitting on decades of valuable institutional knowledge locked away in siloed systems with inconsistent formats, poor metadata, and no clear governance structure. Fix that first. <strong>Structure your data &amp; MCP tools in a way that provides the general-purpose AI systems the context they need to answer the questions/accomplish the tasks that you expect your users to be requesting.</strong></p><p><strong>Reserve Custom Development for Core Workflows</strong></p><p>There are legitimate cases where you should still build custom AI applications. If you’re a healthcare company building a diagnostic tool, a financial services firm building a trading algorithm, or a logistics company building a route optimization system — these are core to your business and warrant significant investment. These are the workflows where off-the-shelf solutions won’t cut it and where you need complete control over the user experience and underlying logic.</p><p>But your internal HR chatbot? Your basic document Q&amp;A system? Your “ask me anything about company policies” tool? These don’t need to be built from scratch. Plug an MCP server into Claude and move on.</p><p><strong>The ROI Conversation</strong></p><p>Let’s do some quick math. Say you’re considering building an internal chatbot with a team of 3–4 developers over 9 months, plus ongoing maintenance. That’s easily $500k-$1M in engineering costs for the first year alone. Now compare that to the cost of an enterprise subscription to one of the leading AI tools. It doesn’t even come close.</p><p>Not only is the MCP approach dramatically cheaper, but you also get a better user experience, more features, faster innovation cycles, and a more maintainable architecture. The decision should be obvious.</p><p><strong>Final Thoughts</strong></p><p>The era of every company building their own ChatGPT knockoff is coming to an end, and good riddance. The market is consolidating around a few exceptional general-purpose AI assistants, and that’s exactly what should happen. Just like most companies don’t build their own email clients or word processors anymore, most companies shouldn’t be building their own chatbots.</p><p>Focus your limited engineering resources on what actually matters: your data, your domain expertise, and your core business workflows. Build the connective tissue (MCP servers) that lets first-class AI systems like Claude access and leverage your proprietary knowledge. Let Anthropic, OpenAI, and others handle the hard problems of building great AI assistants.</p><p>The companies that figure this out early will have a massive advantage over those still trying to build everything themselves. Don’t be the company that’s still maintaining your custom-built email server in 2025 — or in this case, your custom-built chatbot.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=b650863b37e8" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Using Gen AI for Policy Compliance: Why “Default RAG” Won’t Cut It]]></title>
            <link>https://medium.com/@DanGiannone/using-gen-ai-for-policy-compliance-why-default-rag-wont-cut-it-9dcf42beb4c5?source=rss-8502e4f15932------2</link>
            <guid isPermaLink="false">https://medium.com/p/9dcf42beb4c5</guid>
            <category><![CDATA[ai]]></category>
            <category><![CDATA[ai-design]]></category>
            <category><![CDATA[generative-ai-use-cases]]></category>
            <category><![CDATA[genai]]></category>
            <category><![CDATA[retrieval-augmented-gen]]></category>
            <dc:creator><![CDATA[Dan Giannone]]></dc:creator>
            <pubDate>Mon, 24 Feb 2025 17:40:34 GMT</pubDate>
            <atom:updated>2025-02-24T17:40:34.563Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*cl1B6wi984vStgDdKj2AfA.jpeg" /></figure><h3>Introduction</h3><p>The first time I ever worked on a project using generative AI, it quickly became apparent to me that new design pattern the industry was coalescing around was great for demos and quickly delivering a proof of concept, but it was not suited for most real-world production scenarios (<a href="https://www.linkedin.com/pulse/my-first-rag-use-case-key-insights-lessons-learned-dan-giannone-sa7ne/?trackingId=6sVQ3wJ%2B6RNZRCNlQa3eBQ%3D%3D">relevant previous article</a>).</p><p>Let’s quickly review the anatomy of what I call “Default RAG”:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*m1SNyJ5CzM8LYaFSlwegiw.png" /><figcaption>Default RAG</figcaption></figure><p>The general idea is that we can’t fit all the hundreds or thousands of documents into the context window, so we need to “chunk” them and only return the N most relevant “chunks”. We load the chunks into a search index and then use a vector search to find the most semantically relevant chunks for the user’s query.</p><p>This pattern does work well for a number of use-cases. An internal chatbot that answers questions from the employee handbook, or an FAQ, is the most common example.</p><p>However, the reality is that this approach falls short for a large number of use-cases. Default RAG made sense back when we had 16k token context windows. In 2025, there is almost certainly a better way to design your AI use-case. In this article, I will illustrate an example of where default RAG falls short, how to actually solve the particular problem, and some guiding principles on how to design Gen AI use-cases.</p><h3>The Use-Case: Using Gen AI to Check for Compliance</h3><p>Let’s say your organization is a consulting firm. For every client engagement, there is a statement of work (SOW). A <strong>Statement of Work (SOW)</strong> for a consulting firm is a formal document that defines the <strong>scope, objectives, deliverables, and timeline</strong> for a consulting engagement. It is essentially a binding contract for both parties. As with any legally binding contract, the legal &amp; compliance department needs to review it before signing.</p><p>Today, employees have to read the document, and then comb through hundreds of pages of policy, compliance, and legal documents to make sure all aspects of the SOW are in compliance. It can be challenging and time-consuming, as the policies are constantly being updated and new regulations are put in place. They may even rely on memory in some cases, leading to missing certain pieces which should have been flagged. If we could design a Gen AI system to validate the SOW (or any input document) against a large corpus of company policy or regulations, we could boost turn-around time, improve accuracy, and reduce cost.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ydIITlJTA_RdEKKzZ7cOvw.png" /></figure><h3>Could Default RAG Work?</h3><p>Let’s deep dive into this use-case and explore how Default RAG would perform. First, we will chunk up our policy documents and load them to an index. Then, we will chunk up our input document (the SOW). For each input chunk, we run a vector search to get back the top 5–10 policy chunks and compare them. The LLM will do the comparison and flag any potential issues.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*7DtkSqyVjAxE8CwXxl1-Xg.png" /><figcaption>Logical Flow using Default RAG</figcaption></figure><p>At first glance, this seems like it will work pretty well, and a proof of concept would likely support this notion. Under the surface, however, there are some glaring flaws in this design.</p><h3>The Issues</h3><p>Every use-case has what I call an “Accuracy Threshold”. This is the percentage accuracy required for it to actually provide real value and become adopted at-scale. If the accuracy is below the threshold, users will lose faith in the system and abandon it. This use-case has legal implications, so the accuracy threshold will need to be better than humans (i.e. likely 97–99%). It has to be so accurate that a human does not have to check the AI’s work. If a human has to check the AI’s work, are we actually saving time or money? The answer is most likely no, and the ROI would be negative.</p><h3>Issue #1 — Incomplete Context</h3><p><strong>Limited Retrieval</strong><br>For each input document chunk, the vector search returns what it believes are the top 5–10 most relevant policy chunks. But what if there are 20, 50, or even 100 policy chunks that matter? Retrieving only a small subset might leave out critical paragraphs.</p><p><strong>Missing References</strong><br>Often, one chunk references another. If the linked chunk isn’t pulled in, the reader (or the model) lacks key context. Think of it as trying to piece together a legal puzzle with half the pieces missing.</p><p><strong>Broad Context Needed</strong><br>In legal and compliance, the devil truly is in the details. A single paragraph might not suffice to understand a policy’s broader implications. Imagine trying to interpret 15 random paragraphs from a 100-page document — out of order — and figure out how they fit together.</p><p><strong>Contextual Contradictions</strong><br>Sometimes, a paragraph is <em>technically</em> out of compliance in isolation, but when combined with the next paragraph, it becomes compliant (or vice versa). Working strictly in disjointed “chunks” means the model can’t capture these nuances.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*SPRGguJ48oSQRGAP0YNE-w.png" /><figcaption>The hidden dangers of defaulting to vector search</figcaption></figure><h3>Issue #2 — Semantically Divergent Wording</h3><p><strong>Vector Search Isn’t Magic</strong><br>Yes, vector search is powerful for finding semantically similar text. But consider a scenario where the SOW’s language doesn’t resemble the policy’s language at all — yet they still contradict each other. Example:</p><p>SOW Paragraph:</p><blockquote>“The project team plans to conduct quarterly morale-building gatherings in the advanced chemical wing, where participants can invite family and close friends to foster a transparent workplace culture. These informal events include facility tours showcasing non-sensitive project highlights.”</blockquote><p>Policy Paragraph:</p><blockquote>“Access to high-security research areas is restricted to credentialed employees and pre-approved contract staff only. Any form of public or external entry into these zones is strictly prohibited, as it could compromise safety protocols and proprietary research.”</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*YmuUlrcQHj-ohnhJmiiNsg.png" /><figcaption>Both paragraphs might actually be quite far apart as vectors</figcaption></figure><p>The SOW uses phrases like “morale-building gatherings,” “transparent workplace culture,” and “facility tours,” with no direct mention of “public,” “prohibited,” or “unauthorized.” The policy uses terms such as “restricted to credentialed employees,” “prohibited,” and “safety protocols.” Although both paragraphs concern who may enter a particular area, their language diverges significantly. One focuses on cultural aspects; the other on security restrictions. A purely semantic (vector-based) approach might not rank these passages as closely related — even though they clearly conflict when read from a compliance perspective.</p><h3>Issue #3 — Compliance by Omission</h3><p><strong>Unstated Requirements</strong><br>What if a policy says, “You must include a security review,” but the SOW doesn’t mention it at all? There’s no direct text overlap — so a search algorithm might never retrieve that policy chunk.</p><p><em>Result:</em> A violation goes unnoticed simply because the SOW fails to say something it should.</p><h3>Why Accuracy Suffer</h3><p>When these issues pile up — missing context, partial matches, semantic divergence, and omissions — your accuracy can easily get stuck around 70–80%. That might seem high for some use-cases, but in legal compliance, it’s a non-starter if humans still have to do all the heavy lifting. Instead of speeding up the process, you end up with more overhead and potential risk.</p><p>This is the fundamental reason why, despite looking great in a demo or proof of concept, “Default RAG” often struggles for real-world use-cases that are anything beyond looking up information.</p><h3>A Better Approach — Exhaustive Iteration</h3><p>I often find the best way to design Gen AI systems is to consider how a human would solve the problem. If you told a team member “it is critical we flag any potential policy violation in this SOW or we could face legal and financial impacts”, what would be their process? Assuming they care about their job, they will <strong>check every page of the SOW against every policy we have.</strong></p><p>If we want to reach 98–99% accuracy, we need to be truly exhaustive. We need to check every part of the input document against every single policy. How would we do this from a technical perspective? Consider the following diagram:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*UeX07aOuNTh7viB9VubOwg.png" /><figcaption>Exhaustive Iteration through all the policy</figcaption></figure><p>This diagram illustrates the following steps:</p><ol><li>Load the entire input document into the context window of the LLM</li><li>Take however many tokens are left in the context window and add as much policy as will fit. You have now maxed out the context window of the model.</li><li>Execute the LLM — have it flag potential policy/compliance violations</li><li>Repeat steps 1–3 until you have iterated through every single page of the policy documents</li></ol><p>On loop iteration one, we load the full SOW and say, 35 pages of policy documents into the context window. The LLM does its review and flags any potential policy violations. Then we repeat the process for the next 35 pages of policy, and so on until we have compared the entire SOW against every piece of policy.</p><p>After running this process, we will be able to confidently say we have checked the entire document against every policy we have.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*pNPLqLL2dArD6L4FcL-Pfw.png" /></figure><p>Now, you might be thinking “What if my SOW doesn’t fit into the context window? What about latency, isn’t this going to take forever? Does this truly address all of the pitfalls of default RAG? What about the issue of compliance by omission?” These are good questions, let’s unpack them one-by-one.</p><h4>What if my input document doesn’t fit into the context window?</h4><p>As of today (February 2025), most LLMs have a max context window of 128,000 tokens. This is generally enough to fit a word document that has hundreds of pages. If your document is 400 pages and it doesn’t fit, wait 4–6 weeks for GPT4.5/Claude 4 and your problem is solved. A key tenet of “Engineering in the age of AI” involves not spending your time on complex engineering which will be rendered obsolete by the next generation of models. We want to build our systems and processes so we can take full advantage of the next models when they arrive. This applies not only for context window, but also raw LLM reasoning ability. Even if gpt4o struggles with this much context in one go, by the time you are done with the development, a new model will likely be in play.</p><h4>What about latency, isn’t this going to take forever?</h4><p>In the world of Gen AI, latency always takes a back seat to accuracy. If we can’t reach the accuracy threshold, the latency is irrelevant because no one will use the tool. I often need to re-orient end-users who complain about latency to reframe the way they think about. How long would it take you to do this yourself? If the AI can do it faster, then it’s a win. Even if it can’t, it is still a win because now your bandwidth is freed up to work on other, more value-adding activities.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*1DEsKeBeVK9E-l9weRIkEw.png" /><figcaption>You might consider focusing on cost optimization after accuracy, but accuracy is always the most important thing. No one cares how much the solution costs or how fast it is if it has no users.</figcaption></figure><p>All of this said, there are still ways to resolve the latency challenges. Each loop iteration could be parallelized, potentially cutting the latency down to 20–30 seconds for the whole process. Additionally, as the model context window improves, that means less loop iterations. Once we reach a certain size of max context window, we may be able to pass the SOW and all the policy documents into a single LLM call.</p><h4>Does this truly address all of the pitfalls of default RAG? What about the issue of compliance by omission?</h4><p>If we look closely at this solution, some of the gaps I outlined in Default RAG would be solved, but others would still persist. Let’s revisit each point.</p><p><strong>Compliance by Omission</strong></p><p>This is solved because we now have the full SOW in the context window. So each LLM call will be able to determine if the SOW is missing something from the policy.</p><p><strong>Semantically Divergent Wording</strong></p><p>This is solved because we are no longer using vector search at all.</p><p><strong>Missing References &amp; Contextual Contradictions</strong></p><p>This is not solved. If one large batch of policy references another, the individual LLM call won’t have the ability to cross-reference the two. The SOW might be out of compliance when looking at the first 35 pages of policy in isolation, and the second 35 pages in isolation, but not when looking at the first 70 together.</p><p>So, how do we solve this problem? The key idea here is that we have reduced the prevalence of the problem and boosted accuracy by giving the LLM as much context as possible. We might be able to fully address this through some very complex &amp; creative engineering, but my suggestion would be to simply wait until we can fit the full SOW &amp; all the policy into the context window. This is likely less than 6 months away, and this design will be able to take advantage of that without any changes whatsoever.</p><h3>Key Takeaways &amp; Guiding Principles</h3><p>If I were to distill the lessons learned from this use-case and other use-cases from the last 2 years into a set of guiding principles, they would be the following:</p><ol><li><strong>Prioritize the accuracy threshold</strong></li></ol><p>Each use case has a minimum accuracy level required for real-world adoption. For legal and compliance cases, this might be 97–99%. Prioritize this over latency.</p><p><strong>2. Outline how a human would solve the problem</strong></p><p>Design your solution based on the steps a human would take, not whatever design pattern is hot right now. This also helps determine ROI by understanding how long the process would take a human.</p><p><strong>3. More context is better than less</strong></p><p>The more info/context you can give the LLM, the better. For high-stakes scenarios, prioritize exhaustive iteration over search/sampling.</p><p><strong>4. Forward-compatible Architecture</strong></p><p>Design systems that can take advantage of future model improvements without any need for code changes. Don’t spend cycles on problems that the next model will solve for you.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*1mjUaVx-r1G1mD8CWL59rg.png" /><figcaption>The keys to Gen AI design success</figcaption></figure><h3>Closing Thoughts</h3><p>The reality is that we’re moving into the next phase of Gen AI implementation. Default RAG was a sensible starting point when we were working with 16k token context windows and just figuring out how to leverage LLMs, but it’s time to evolve. The most successful teams I’ve seen are the ones willing to challenge the standard patterns and partner closely with business stakeholders to make sure their design actual stands up in the real world.</p><p>Take a critical look at your current Gen AI implementations. Are they hitting the accuracy threshold needed for actual adoption? Are they designed around how a human expert would approach the problem? Are you planning for the capabilities of tomorrow’s models rather than over-engineering around today’s limitations?</p><p>As context windows continue to expand and model capabilities improve, the teams who embrace these principles will be positioned to take advantage.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=9dcf42beb4c5" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Demystifying AI Agents: ReAct-Style Agents vs Agentic Workflows]]></title>
            <link>https://medium.com/@DanGiannone/demystifying-ai-agents-react-style-agents-vs-agentic-workflows-cedca7e26471?source=rss-8502e4f15932------2</link>
            <guid isPermaLink="false">https://medium.com/p/cedca7e26471</guid>
            <category><![CDATA[ai-agent]]></category>
            <category><![CDATA[generative-ai-use-cases]]></category>
            <category><![CDATA[ai-agent-development]]></category>
            <category><![CDATA[agents]]></category>
            <dc:creator><![CDATA[Dan Giannone]]></dc:creator>
            <pubDate>Sun, 09 Feb 2025 20:37:04 GMT</pubDate>
            <atom:updated>2025-02-09T20:37:04.669Z</atom:updated>
            <content:encoded><![CDATA[<h3>Demystifying Agents: ReAct-Style Agents vs “Agentic Workflows”</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ihNFoP__mBuykdt0UzVxNA.jpeg" /></figure><h3>Introduction</h3><p>As the excitement for “AI Agents” has grown to a fever-pitch over the last few months and companies rush to roll out their own agents, I have started to notice the industry coalesce around a particular agent architecture as the “default”. In this article I will make the case that this default architecture — while powerful in certain contexts — should not necessarily be the default, and offer my opinion on how to approach agentic system design in a more thoughtful manner.</p><h3>Simple ReAct Agents &amp; the “Generalist” Approach</h3><p>The pattern that most of the industry is coalescing around is what I call the “Simple ReAct Agent”. Based on the <a href="https://arxiv.org/pdf/2210.03629">ReAct pattern</a> (Reason-&gt;Act), it is essentially a LLM running in a loop that has access to some number of “tools”. A tool is an abstraction in the same way the term “agent” is. It is just a piece of code that does something (often connects to some external system).</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/804/1*kvQVlT9Wi3TX-hBDHA4DIQ.png" /><figcaption>Standard ReAct loop</figcaption></figure><p>The LLM will look at the user’s input, determine what tool to call, call the tool, evaluate the output, and repeat in a loop until it (hopefully) reaches the goal.</p><p>When the term “agent” is used these days, this is what is implied most of the time. The thought process is always “give the LLM tools and let it figure out how to solve the problem”. I call this thought process of agent design the “Generalist” approach. The majority of no-code/low-code platforms today use this pattern. Even many of the leading-edge pro-code agent frameworks such as CrewAI &amp; AutoGen define their agents in this way. These multi-agent frameworks allow you to create some very powerful systems that can solve a wide range of problems.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*GBej4DtrjxiIpt-o4PPVJg.png" /><figcaption>Example of a common pattern in multi-agent systems. The “Planner” agent will create a plan and orchestrate other agents to solve the problem step-by-step.</figcaption></figure><p>So what is the problem with the “generalist” approach?</p><p>I’ve been building agents for about 2 years now. I’ve experimented with all sorts of different approaches and frameworks. The fundamental reality is this: <strong>for a given task/problem, there is almost always a “best” way to solve the problem.</strong></p><h3>Agentic Workflows</h3><p>Imagine a new coworker is hired onto your team and you are tasked with getting them up to speed. Their first assignment is helping to put together the monthly financials report to send to the CFO. Imagine two different ways to provide them guidance and what the result would be in each scenario:</p><ol><li>Here’s access to the database, some scripts/macros, and here’s what the final report looks like. Good luck!</li><li>Here’s the documented steps to generate the report:</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/633/1*1LF1LJEVry-Wlq32Qtd-eA.png" /></figure><p>In scenario #1, maybe your new coworker ends up figuring it out, but more likely than not they are going to not be able to do it or at minimum will make a mistake. It is also going to take them 10x as long as if you were to just go with scenario #2 and provide them the step-by-step process.</p><p>This is the reality for most business processes that organizations are looking to automate with agents. They follow a pre-defined set of steps. Each individual step may require a good bit of advanced reasoning (such as discerning insights from numerous data sources), but there is ultimately a “correct” way to solve the problem.</p><p>Take another theoretical example:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/839/1*_6_35PkEYNFmygZNWltuNA.png" /></figure><p>Let’s say we want to build an agent to automate this process. If we know this should always be the process, why would we give the agent the ability to go down a wrong path (say, going from Step B to Step F) and not just hard-wire the agent to always follow this workflow.</p><p>This example illustrates the distinction between the two primary schools of thought for AI Agent design: emergent problem solving (ReAct-style/Generalist Approach) and explicit workflow engineering, also known as “<strong>Agentic Workflows</strong>”.</p><p>It’s important to think about the back story of each of these approaches and what they are trying to solve in order to understand which to use. ReAct came from a research paper, and many of the generalist multi-agent approaches (MagenticOne, AutoGen) are also coming out of the research world. It’s important to understand that researchers are trying to push the boundaries of what is possible, and create multi-agent systems that are capable of solving any problem. This work is no doubt cutting edge, and I ultimately believe the future will belong to the generalist approach.</p><p>However, most organizations are not trying to build AGI. They are trying to solve specific business problems with well-defined workflows. This is where <strong>agentic workflows</strong> shine.</p><p>LangGraph was the first framework to embrace this school of thought. They realized that in the generalist approach, the system would often end up going off the rails. The LangGraph approach emphasizes pre-defined steps, control, and guardrails to maximize achieving the goal for a given use-case. Let’s look at some example flows:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/475/1*d5EZvGq-_NO405c5tj0daQ.jpeg" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/690/1*h3NnRwTUF3bqVEQJEgAWiw.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*3TIlL07hadhmOE0mG5iB7g.png" /></figure><p>The ability to constraint the system to always follow a set of pre-defined pathways and guardrails is key in a large portion of modern agent use-cases. If you can articulate how a person would solve the problem step-by-step, you will almost always get a better, more reliable result if you build your process that way.</p><p>I often opt for a combination of LangGraph and pure python in many of the agents I build. The notion that “you should always use frameworks for everything” is another damaging trend that has unfortunately become the norm (a topic for another day). For now, I will just say that good old-fashioned, clever programming can go a long way to improve your system in ways that the pre-defined frameworks won’t be able to help with. Let’s look at an example.</p><p><a href="https://github.com/DanGiannone1/Agentic_RAG">Here</a> is an “Agentic RAG” implementation I put together for a client recently.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/827/1*qOqZhZXQGT8jIjtXkZCodQ.png" /><figcaption>Agentic RAG via LangGraph &amp; Pure Python</figcaption></figure><p>As opposed to standard one-shot RAG, agentic RAG takes multiple attempts at finding the best documents to answer the user’s query. There are a number of agentic RAG implementations out there that use a ReAct loop with a single LLM call to iteratively call the search tool with a different search query. While that approach will certainly work, it is not the most optimal. You are giving a single LLM 3 jobs: the search query, reviewing the results, and responding to the question.</p><p>A best practice I prefer to follow when building agents is give each LLM call only 1 job. You can see from the diagram above that we have a separate LLM call for generating the search, one for reviewing/vetting the results, and one for generating the final answer from the vetted results. Similar to people, the more tasks you give them to juggle at once, the more likely they are to make a mistake.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*-1q07FMfJjmWzJBqBf40Cg.png" /><figcaption>The perils of multi-tasking</figcaption></figure><p>We also use pure python to discard the document chunks that were deemed not useful and persist the valuable ones to the next iteration. This way we don’t waste tokens looking at irrelevant chunks a second time.</p><p>Let’s look at another example:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1010/1*xj4GcRHMqEzifViGZGrW2A.png" /><figcaption>Report Generation Agent</figcaption></figure><p>This is a fairly common use-case: <strong>report generation</strong>. The idea is that we take a user prompt, create a report outline with various sections, do research for each section, and then write the intro/conclusion. We know the process is always going to be the same workflow, so we codify that into the system. This leads to reliable results.</p><p>Most vertical AI Agent startups are following the explicit workflow approach for this reason (quality and consistency are more important than flexibility, particularly in regulated industries).</p><h3>Reminiscence of Default RAG</h3><p>The coalescing around the simple ReAct agent loop as the “default” design pattern for agents is reminiscent of the early days of RAG. The default pattern of chunking up documents into 500–1000 token “chunks”, vectorizing the chunks, and then running a hybrid search to pull back the right context to ground the LLM quickly became the norm. However, the gaps in this approach quickly became apparent to those of us developing RAG systems. As it turns out, retrieving the right data to answer a user’s question is actually quite hard and requires thoughtful design depending on the domain and question sets. While default RAG was the right choice for some scenarios (corporate FAQ/employee handbook), often times it wasn’t. <a href="https://www.linkedin.com/pulse/my-first-rag-use-case-key-insights-lessons-learned-dan-giannone-sa7ne/?trackingId=6sVQ3wJ%2B6RNZRCNlQa3eBQ%3D%3D">My first article</a> detailed this realization and walked through how I had to get creative to resolve some of the issues &amp; ultimately boost the quality. The industry is just now realizing the limitations of default RAG, and I suspect it will be a while before people have this same realization with the “default” agent pattern.</p><p>To be clear, I am not saying that the generalist/ReAct approach is always the wrong approach, or even mostly the wrong approach. What I am saying is that <strong>considering it at the default approach is a mistake</strong>. Similarly to how we can look back at a giant graveyard of failed RAG POCs, I suspect a year from now we will likewise look back at an equally large graveyard of failed agent POCs. In both cases the limitation will have not been with the underlying technology, but the lack of thought put into the design process. The unfortunate part is that the failure of the POC is often blamed on the former without realizing it was the latter, hampering overall adoption &amp; investment.</p><h3>The Case for the Generalist Approach</h3><p>There are rarely absolutes when it comes to architecture &amp; design; there are always trade-offs. While it is likely clear by now that I lean towards the agentic workflow approach overall, I can recognize the trade-offs.</p><h4>Sometimes We Don’t Know the Solution</h4><p>Let’s face it: <strong>requirements gathering is hard</strong>. In order to build an explicitly defined workflow, you need to know the following:</p><ol><li>The input data — What specific systems, tables, columns, documents, etc? (including sample data)</li><li>What does the output look like? Including samples</li><li>What specific steps do you need to go through to get from input -&gt; output?</li></ol><p>Often times when clients come to me with an idea for an AI Agent use-case, I will start by asking these 3 questions and more often than not get met with blank stares. It can be difficult to find the right SMEs who know the process to this level of depth, or maybe it’s an “unsolved problem”. Often times the “right” process is within individuals’ heads, and codifying that into detailed requirements can be a time-consuming undertaking.</p><p>Rolling out a generalist agent or multi-agent system to hundreds or thousands of internal users, while it might fail miserably at certain user tasks, it will likely succeed at some sizeable percentage. This provides quick value, and can also help elicit additional use-cases by looking at the types of tasks users are asking the system. For the tasks that the generalist system fails at, you can consider building agentic workflows.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*U2II_SzqtcC_Ov6GFTDkig.png" /></figure><p>No-code/low-code platforms are a good way to quickly get agents in front of business users and see what they can come up with, with can help define where you might need to opt for a pro-code approach.</p><h4>The Future Belongs to the Generalist Approach</h4><p>We are marching towards AGI, so it stands to reason that there will come a point in time when approaches like <a href="https://www.microsoft.com/en-us/research/articles/magentic-one-a-generalist-multi-agent-system-for-solving-complex-tasks/">Magentic-One</a>, powered by extremely powerful state-of-the-art models, will overtake pre-defined, explicit workflows. We have also seen the emergence of “computer use” from OpenAI and Anthropic (the ability to control mouse/keyboard and reason over what’s on the screen). While it’s still early days, we can envision a future within the next few years where agents can be dropped into a company and use the computer the same as any other employee. There is definitely value for an organization putting some amount of resources into trying to stay on the leading edge of research and positioning themselves to capitalize when we reach that point.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*UXfFcWboQeo4S7b9ZsArug.png" /><figcaption>The current state of agent architectures. When will the balance shift?</figcaption></figure><h4>Not Swimming Against the Tide</h4><p>Even if it is not the most efficient or optimal approach, the fact remains that the industry is coalescing around ReAct as the “default” pattern. “Swimming against the tide” may add complexity and cause integration headaches with companies that adhere to the “industry standard”. I am not convinced of this argument, but wanted to call it out regardless.</p><h3>Choosing the Right Approach Today</h3><p>To summarize, Agentic Workflows excel when you have:</p><ol><li>Well-defined business processes requiring advanced reasoning at specific steps</li><li>Clear input/output requirements</li><li>Strong subject matter expertise to define the workflow</li><li>Need for consistency and reliability in execution</li></ol><p>The Generalist Approach makes sense when:</p><ol><li>Use cases are still emerging or poorly defined</li><li>You need flexibility to handle diverse tasks</li><li>Quick deployment and iteration are priorities</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/916/1*Yc27vsN0XK8-MPdI9WOE3Q.png" /></figure><p>Also, consider that <strong>you might not need an agent at all</strong>. There are many ways to solve problems, some do not require AI at all, some might not even need a technical solution. Often times friction and challenges at large companies stem from business process &amp; organizational problems, or poor data quality/data governance. Avoid the temptation to throw an “agentic hand-grenade” at every problem.</p><p>Ultimately, understanding the different architectural approaches and deciding which one suits your needs matters more than following trends. Focus on the core problem you’re trying to solve, and identify the most effective method. Gaining hands-on experience is key to developing the engineering intuition necessary to balance trade-offs. Your goal should be to build systems that deliver real value, not just to chase what’s popular. Take the time to make thoughtful technology choices — it will pay off in the long run.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=cedca7e26471" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[The Non-Technical Challenges with RAG]]></title>
            <link>https://medium.com/@DanGiannone/the-non-technical-challenges-with-rag-e91fb165565e?source=rss-8502e4f15932------2</link>
            <guid isPermaLink="false">https://medium.com/p/e91fb165565e</guid>
            <category><![CDATA[rags]]></category>
            <category><![CDATA[genai]]></category>
            <dc:creator><![CDATA[Dan Giannone]]></dc:creator>
            <pubDate>Sun, 26 Jan 2025 15:48:42 GMT</pubDate>
            <atom:updated>2025-01-26T15:48:42.459Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*WjU3Q7a37HvnRPdsCeGI8w.jpeg" /></figure><p>Retrieval Augmented Generation (RAG) has become the generally accepted design pattern for building “chat with your data” Gen AI solutions. While some have fully integrated RAG into production, others haven’t progressed beyond the proof-of-concept stage. Even organizations that have scaled to enterprise-wide RAG chatbots are receiving mixed feedback, much of it likely negative. Because of this, there is a widespread misconception that AI is overhyped or that it’s “too early” to adopt, based on incorrect answers from initial RAG implementations. While there are many technical reasons a RAG project may fail, often times the main reasons are not technical at all.</p><p>Let’s quickly review the standard RAG architecture.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/744/1*Ij0enWpxPdBrrSGpj90deA.png" /><figcaption>Standard RAG Architecture — A user inputs a query, we execute a search against an index of documents, then the LLM synthesizes the retrieved documents into a final answer</figcaption></figure><p>Fundamentally, RAG is a search engine. We pass the search results into the LLM and it gives us an answer based on the content ‘chunks’. There are many technical strategies we can employ to improve each step of this process, but often times the issues stem from a fundamental misunderstanding of what RAG is by the business and how to approach RAG from a business process perspective. Let’s look at the most common problems I see in my day-to-day interactions with organizations.</p><h3>A misconception that we are “training” an AI</h3><p>The most common misconception I see among business teams is that they think they are “training” an AI model on their data, and that the more data they feed it the smarter it will get. This generally has the opposite effect and ends up polluting the index, resulting in worse responses. A basic understanding of what RAG is helps the business to understand we aren’t training anything and to be more selective in their data vetting.</p><p>As a simplistic example, let’s say we have 1 single question that get asked to the chatbot and we have 1 document in our index that answers that question. Every time a user asks a question, the system lands on the 1 document and provides the correct answer. Now, what happens when we add another document to the index that doesn’t answer the question? There is now a chance that we land on the wrong document and aren’t able to answer the question. What happens if we add a third document? The chance of not finding the right document goes up. I often tell customers that you are better off with 10 highly curated documents than a dump of 1000 documents that may or may not be valuable.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/584/1*K7SmsFprmpkQQyoDp89Ckw.png" /></figure><p>Another simplistic example would be if you were to ask a colleague “Here is a question. Go find me the answer by digging through files in that filing cabinet over there”. This is essentially what is happening with RAG. Now, if we ask the colleague to go find the answer in a room with 100 filing cabinets, is that going to make their job easier or harder?</p><p>There were simplistic examples, but I see this play out at almost every customer I work with. The business dumps thousands upon thousands of documents into the search index, when there are probably only 100–200 that would be needed to answer 90% of the user questions. The larger your index, the less likely you are to land on the correct document for a given question.</p><p>The phrase “garbage in, garbage out” that is always said in the context of AI projects applies just as much to RAG as it does traditional AI.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*1_UdO2niiPPPXupLobtpxQ.jpeg" /></figure><h3>We don’t know what we are solving for</h3><p>In any software project, you need to understand the requirements and expected functionality. Interestingly, I’ve noticed that this process is generally not followed as much for RAG implementations. Teams will pump data into an index using ‘default’ chunking, indexing, and search strategies and then open the chatbot up to the users. Being able to “chat with your data” quickly delivers a “wow” moment to the users, but they will quickly start to notice hallucinations and wrong answers after the initial magic wears off.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/614/1*sqlxd8mSQuTbKxplP59zVQ.png" /></figure><p>In a <a href="https://www.linkedin.com/pulse/evaluating-rag-applications-deep-dive-dan-giannone-qonce/?trackingId=JMS3nnWgicQofx7M4CQF0w%3D%3D">previous article</a>, I provide a framework for evaluating RAG applications. One of the core ideas of the article is that you 100% need the following to develop a truly successful RAG solution:</p><ol><li>A list of questions we are trying to answer (gold standard questions)</li><li>What is the correct answer to each question?</li><li>What are the best sources to answer each question?</li></ol><p>These will need to come from the business. Once we have these 3 items, we can understand what we are designing for and how to best design the system (or if the system is already in place, what we need to re-design or change). Here is why we need this information:</p><ul><li>We can be tactical with what data we add to our index. We only add data that addresses gold standard questions.</li><li>“Default” RAG design patterns (token-based chunking, hybrid search, etc) will likely not be sufficient for all the questions. Certain questions may require different approaches. For example, questions that ask for a comprehensive summary will likely fail when using hybrid search. For these type of questions we would need to pass whole files to the LLM or use something like <a href="https://github.com/microsoft/graphrag">GraphRAG</a>. Or perhaps a question requires some important context that needs to be passed into the LLM context, or a filter on the search query.</li><li>Validation — If we don’t have these 3 things, we can’t actually validate that the system is behaving as expected. We can’t measure how accurate our replies are or how well we are answering the questions. You can’t improve what you can’t measure.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/878/1*Ctw1SqiWSDnogizpIuhz_A.png" /></figure><h3>Pushback</h3><p>The industry has reached a consensus that a robust evaluation framework is necessary for proper RAG implementations, but there will still often be some form of pushback from the business when you suggest that they need to create &amp; maintain the gold standard questions. It generally comes in 3 forms.</p><p>“We don’t know”</p><p>If there is nobody on the project who can provide this information, the project needs to be paused until the proper stakeholders can be brought in. If no one knows the data, what questions can be answered from the data, and what the best sources are to answer the questions, it is going to be very difficult to be successful. You will hover around 60–70% accuracy with no way of improving. The best RAG systems (90–100% accuracy) have dedicated SMEs who know the data intimately and how it ties to the gold standard questions.</p><p>“That’s a lot of work, we don’t have the time for that/we have other more pressing priorities”</p><p>Let’s say you have a RAG chatbot that is being leveraged by 1000 internal users. Your accuracy is hovering around 60–70% (very common scenario for large enterprise RAG chatbots based on my experience). This accuracy percentage is going to cause the user base to slowly lose confidence in the solution. As they lose confidence, they will stop using the tool, and the business value of the solution decreases.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/782/1*sxV8fP6u712w_wb03iDoqA.png" /></figure><p>If you as an organization can dedicate one or two subject matter experts from the business side to work with engineering on iteratively improving the solution, getting to 90–95, even 100% accuracy is achievable. Was it a fairly large time commitment for these SMEs? Yes, but now you have a real solution that is providing real business value and savings 1000 users many hours per week. It is hard to argue against that ROI.</p><p>A successful AI transformation requires prioritization from the business. It requires investment from a people &amp; funding perspective. If a project is everyone’s second or third priority, what are the chances of it being successful? Many C-Suites are still hesitant to invest heavily in AI as they view it as “unproven”. Ironically, the lack of investment commitment is what is causing the projects to not progress past the MVP stage in many cases.</p><p>“If we are having to manually enter all the questions &amp; answers, how is that any different from traditional flow-based chatbots that everyone hates?”</p><p>With traditional, flow-based chatbots, the questions and answers were used to program the bot. It could only present a list of questions, and each one had an answer associated with it. This was all hardcoded, it couldn’t answer any questions outside of what it was provided. This is what users hated them so much, the question you wanted to ask was almost never in the options. The term “Chatbot” still evokes negative emotions in people because of the bad experiences we have all had over the last decade with these systems.</p><p>With RAG chatbots, the purpose of the gold standard questions &amp; answers is fundamentally different. We are not hardcoding anything. The idea is that we are validating that the system can respond accurately to a broad range of different scenarios and different question types. With a sufficiently large number of gold standard questions, we can become extremely confident in the system’s ability to handle questions outside the gold standard list.</p><p>Let’s say we define 100 gold standard questions and answers. In our first evaluation, we find we are only getting 60 answers that receive a passing grade. We spend time and effort understanding what is causing the 40% failure rate, and then implement the associated design changes to fix the problems. Now we are seeing a 95% pass rate. Now when a user goes to ask a question outside of the gold standard list, they are much more likely to get the right answer as we have resolved the vast majority of “low hanging fruit” problems that were present in the system.</p><h3>Examples</h3><p>In my previous <a href="https://www.linkedin.com/pulse/my-first-rag-use-case-key-insights-lessons-learned-dan-giannone-sa7ne/?trackingId=YI8U70akT6aecEZv8Waf%2Bg%3D%3D">article</a>, I deep dive into an example of how we used this methodology to improve a RAG chatbot from 60% accuracy to 95% accuracy over the course of 3 months. This article focuses more on the technical solutions used to boost accuracy, but the key point was that the journey started with a list of gold standard questions and wrong answers provided by the business. We also see towards the end how the business dumping a new batch of documents into the index caused a sharp drop in accuracy.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*HrFNbZfebCqC3tbnc5mSUw.png" /></figure><p>Another example would be my own personal RAG project I build and maintain where I employ this same methodology. My search index consists of dozens of my personal documents. Documents like my homeowner’s insurance, HOA guidelines, appliance warranty documents, home inspection report, etc. Every time I need an answer or a piece of information about these topics, I ask my chatbot. This is the process I follow for each question:</p><ol><li>Add the question to the gold standard list of questions — I have deemed this question important, so it gets added to the list. I may stop adding questions once I reach 75–100, but for now it is only 25 questions.</li><li>Determine what is the answer to the question and what the best source documents are to answer it — this requires me to read through the documents manually and actually find the answer. The goal is that, a year from now when I have the same question again and forget the answer, I can simply just ask my chatbot instead of combing through the documents again.</li><li>Load the documents to my index if they are not already there</li><li>Ask the question and evaluate the response</li><li>Adjust the design accordingly until you get the right answer</li></ol><p>When I first started adding questions, I was getting wrong answers quite frequently. However, as I continued to add questions and improve the system iteratively, I now find that after I add new data sources and ask new questions, they are often accurate right from the beginning. This is a practical example of how as you improve the system for each question, subsequent questions outside of the gold standard have a higher likelihood of being handled correctly.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*9a_EQDLLlEnr_AZ58e2TMw.png" /></figure><h3>Summary</h3><p>It is okay to quickly deploy a RAG chatbot accelerator and dump some documents into the index to showcase the power of the Gen AI-infused “Chat With Your Data” experience to the business. This can generate a lot of excitement (and funding) for AI initiatives. However, once you have proven to the business that it is worth pursuing further, it is critical to adopt the approaches outlined above. Let’s summarize:</p><ol><li>Educate the business — Ensure a high-level understanding of RAG, how it works, how it differs from training traditional AI models, what are the strengths &amp; weaknesses, what it can do and what can’t it do, etc.</li><li>Start with what questions you want to be able to answer. Define the questions and the answers.</li><li>Identify the best data sets to answer the gold standard questions. Add them to the index if they are not present. Remove data that isn’t needed.</li><li>Run an evaluation, determine what questions the system is failing on and why.</li><li>Design &amp; develop the solutions to fix the problems</li></ol><p>Extremely accurate, high-value RAG systems are very much achievable with today’s technology, but it requires a thoughtful, methodical approach coupled with a strong business process, as well as tight collaboration between business and engineering.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=e91fb165565e" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>