<?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 Mangesh Pise on Medium]]></title>
        <description><![CDATA[Stories by Mangesh Pise on Medium]]></description>
        <link>https://medium.com/@mangeshpise?source=rss-fa36301a8416------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*tbMQWsAKE6NUpZxgkrMfwQ.png</url>
            <title>Stories by Mangesh Pise on Medium</title>
            <link>https://medium.com/@mangeshpise?source=rss-fa36301a8416------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Tue, 24 Nov 2026 08:05:25 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@mangeshpise/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[What separates Spec-Driven Development from Vibe-Coding?]]></title>
            <link>https://mangeshpise.medium.com/what-separates-spec-driven-development-from-vibe-coding-de4b1f2639b0?source=rss-fa36301a8416------2</link>
            <guid isPermaLink="false">https://medium.com/p/de4b1f2639b0</guid>
            <category><![CDATA[claude-code]]></category>
            <category><![CDATA[software-development]]></category>
            <category><![CDATA[technical-debt]]></category>
            <category><![CDATA[vibe-coding]]></category>
            <category><![CDATA[spec-driven-development]]></category>
            <dc:creator><![CDATA[Mangesh Pise]]></dc:creator>
            <pubDate>Wed, 22 Apr 2026 10:15:08 GMT</pubDate>
            <atom:updated>2026-04-22T10:15:08.569Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*sbOlvsljGQAV61uCIr8URA.png" /><figcaption>What is SpecGantry? | Image generated using AI</figcaption></figure><p>If you’ve been using AI to code lately, you’ve likely experienced the <em>vibe climax</em>, usually in about 3 months of shipping a product/feature. It starts with euphoria: (1) you prompt, (2) the AI generates, and (3) features ship in hours. But around month three, the “vibe” starts to shift. AI-generated code starts feeling inaccessible, simple modifications become troubleshooting projects, technical debt compounds, and you spend more time “fixing the AI’s fix” than building new features.</p><p>This is the cost of <strong>Vibe Coding</strong>. It’s fast, it’s fun, but it doesn’t scale. To build production-grade software that lasts, we need to return to a methodology grounded in engineering, not magic! That methodology is <strong>Spec-Driven Development</strong>.</p><h3>What is Spec-Driven Development (SDD)?</h3><p>Spec-Driven Development is the professional response to the chaos of unsupervised AI generation. Instead of jumping straight to code, you start with a <strong>Specification</strong> — a formal contract for how the system should behave.</p><p>In an SDD workflow, the specification is the “Source of Truth”, and the code is merely an “expression” of that truth. This decouples the <em>What</em> and <em>Why</em> (human intent) from the <em>How</em> (implementation).</p><p>In the gold rush of AI-assisted development, the “<em>AI spits out code, and it magically works”</em> approach is not scalable. Just to be clear, this topic is not about questioning the quality of AI-generated code, the number of errors it generates, etc. That’s a moot point. At this point, there is a general consensus that using AI to generate code works and also that AI-generated code works! This topic is around long-term manageability, extensibility, risks with using non-standard tooling, and potential vulnerabilities due to misaligned security standards. These will still be the concerns until code becomes so cheap that practically new code can be generated and trashed for every business workflow. Until then, a reliable software development and maintenance practice is essential, regardless of who generated the code (i.e., humans or machines).</p><h3>The Comparison: Vibe Coding vs. SDD</h3><p>To understand why SDD is becoming a better choice, let’s break down how it differs from vibe-coding, a method that relies on a build-as-you-go or fix-as-you-go approach.</p><h4>1. Context Management</h4><ul><li><strong>Vibe Coding:</strong> Relies on the AI’s <strong>ephemeral chat history</strong>. Once you clear that chat or hit the context limit, the “vibe” is lost. AI forgets the nuances of your database schema or your preference for functional programming.</li><li><strong>SDD:</strong> Uses <strong>persistent, versioned markdown specs</strong>. The context is externalized in your repository. Whether it’s day 1 or day 100, AI refers to a “living document” (a.k.a. specification) that defines exactly how the system should behave.</li></ul><h4>2. Scaling and Complexity</h4><ul><li><strong>Vibe Coding:</strong> Usually <strong>hits a wall</strong> as complexity grows. When a project reaches thousands of lines of code, “vibing” leads to regressions, circular logic, and technical debt that piles up faster than you can refactor.</li><li><strong>SDD:</strong> <strong>Manages complexity through decomposition</strong>. It forces you to break down large features into smaller, manageable sub-specs. By enforcing a gated structure, it ensures that Part A and Part B are architecturally compatible before a single line of code is written.</li></ul><h4>3. Traceability</h4><ul><li><strong>Vibe Coding:</strong> Leads to the dreaded <strong>“AI just wrote it”</strong> syndrome. When a bug appears in production six months later, no one knows <em>why</em> a specific logic gate was implemented that way.</li><li><strong>SDD:</strong> Provides a <strong>clear link from Requirement → Specification → Product</strong>. Every piece of generated code is an artifact of a specific task defined in a spec. This creates a paper trail that is essential for audits, debugging, and onboarding new developers.</li></ul><h4>4. Teamwork and Collaboration</h4><ul><li><strong>Vibe Coding:</strong> Is <strong>solo-centric and opaque</strong>. It’s hard to do a code review on a “vibe.” A product with 500 lines of AI-generated code and no documentation is a reviewer’s nightmare. Note, even inline comments within code are practically useless to see the bigger objective and approach behind the code.</li><li><strong>SDD:</strong> Shifts the focus to <strong>peer-reviewable architectural decisions</strong>. Teammates review the <em>Spec</em> and the <em>Plan</em> before the code is even generated. This allows domain leads, project mangers, and architects to course-correct early, ensuring the team stays aligned.</li></ul><h3>Further elevating SDD standards: A Case for “SpecGantry”</h3><p><strong>SpecGantry</strong> provides a structured harness that enforces Spec-Driven Development (SDD) within a gated workflow and modernizes the traditional agile software development lifecycle to an agentic software development lifecycle.</p><p>It brings the discipline of spec-driven development to AI-assisted software engineering — ensuring that every line of code is traceable to a design, every design is traceable to architecture, and every architecture decision is grounded in a validated project idea.</p><p>It is built to support architects, development leads, and project managers who want consistency, control, and traceability (<em>respectively</em>) across projects — without sacrificing the speed of AI-assisted development.</p><p>The industry has already seen early pioneers like <strong>Spec-Kit</strong>, <strong>OpenSpec</strong>, and <strong>Kiro</strong>. While they moved the needle, they often leave enterprise software development teams wanting more control.</p><p>On one end, some heavyweight SDD frameworks like GitHub’s Spec-Kit are powerful but can feel fragmented. It often spreads features across too many files, making it hard to see the “Big Picture” of the system state. Developers often complain that the code produced doesn’t always faithfully map to the spec intent without heavy manual steering.</p><p>On the other hand, lightweight SDD frameworks like OpenSpec use “delta specs” (only specifying what changes). It’s great for speed, but for large-scale enterprise projects, it can lack the “gated” rigor needed to prevent architectural drift. It’s a bit too trusting of the AI’s assumptions.</p><p>Then there are also SDD frameworks like Kiro that offer a beautifully IDE-integrated experience, but they come with heavy mandates for specific environments or cloud providers. Architects and developers need a framework that lives in the repo, not just in the tool.</p><h4>SpecGantry‘s workflow approach for Teams</h4><p><strong>SpecGantry</strong> isn’t just another set of templates; it’s a <strong>structured harness</strong>. It is specifically built for development leads who want the speed of AI but the control of a senior architect.</p><p>SpecGantry organizes collaboration between you (in the role of a Dev Lead) and SpecGantry (in the role of a governor) across five ordered phases (<strong><em>Ideation -&gt; Planning -&gt; Detailed Design -&gt; Development -&gt; Deployment Readiness</em></strong><em> -&gt; Deploy</em>), each phase operating on a <strong><em>Draft -&gt; Review -&gt; Finalize</em></strong> loop. Each phase consists of:</p><ul><li><strong>A defined objective</strong> — what must be true before the phase is done.</li><li><strong>Artifacts</strong> — specific files that are created, updated, or reviewed.</li><li><strong>Skills</strong> — slash commands that drive Claude Code’s behavior.</li><li><strong>Governance triggers</strong> — explicit rules that prevent AI from unilaterally marking tasks as &quot;Complete&quot; without the lead’s approval.</li><li><strong>A gate</strong> — an explicit handoff point that requires review and approval before the next phase begins.</li></ul><p>The project’s ground truth lives in the ./SPECS/ directory. Source code lives in ./src/. Deployment artifacts live in ./deploy/. The ./STATUS.md file is the single pane of glass for project health at any moment.</p><h4>The SpecGantry Advantage</h4><ul><li><strong>Enforced Gating:</strong> Unlike other frameworks that let you rush to implementation, SpecGantry enforces a “Gated Workflow.” SpecGantry gracefully navigates you through the phases, ensuring code is grounded on your inputs and approvals.</li><li><strong>Co-Authorship:</strong> SpecGantry co-authors specifications with you during the planning and detailed design phases, emulating the freedom of vibe coding while controlled through a structured interview process.</li><li><strong>Traceability by Design:</strong> It creates a rigid link between the high-level “why” and the low-level “how.” Every line of code can be traced back to a specific requirement registered in SpecGantry.</li><li><strong>Repo Centric:</strong> SpecGantry lives in your repository that actively governs an entire project lifecycle — from raw idea to production-ready release.</li><li><strong>Consistency across projects:</strong> For teams managing multiple microservices or projects, SpecGantry provides a “Skeleton” that ensures every project speaks the same architectural language.</li></ul><h3>How to Get Started</h3><p>Ready to stop “vibing” and start engineering? SpecGantry is designed to be dropped into existing projects or used for greenfield development.</p><h4>Prerequisites</h4><ul><li><a href="https://claude.ai/code">Claude Code</a> installed and authenticated.</li><li>Bash/Zsh environment (Linux, macOS, or WSL).</li></ul><h4>Setup</h4><p>To integrate Spec-Gantry into your project, run the following command in your project’s root directory. This will download the latest version of the framework with the necessary skills and specs.</p><p>curl -sfL https://raw.githubusercontent.com/mppise/spec-gantry--claude/main/install.sh | bash</p><p>Then, open Claude Code in your project directory.</p><p>claude</p><p>NOTE: Make sure Claude Code is NOT in plan mode to utilize SpecGantry.</p><p>At this point, you are ready to go. There are many ways to start a project:</p><ol><li>Start with as simple as a Hi , or I want to build an application that ...</li></ol><p>2. Alternatively, kick off the ideation phase using the /ideate skill. Describe your project idea.</p><p>3. Yet another alternative would be to write down your project idea in ./SPECS/artifacts/A_Project.md — in part or full, and then engage with option (1) or (2) above.</p><p>4. SpecGantry will guide you through the lifecycle phases.</p><p>5. Track progress at any time by reading STATUS.md or by asking SpecGantry.</p><h3>Final Thought</h3><p>While we speak to the benefits of Spec-Driven Development, it must be acknowledged that vibe coding can be a better choice in early product development stages where <em>quick-and-dirty</em> prototyping is acceptable.</p><p>That said, AI is an extraordinary “engine,” but every engine needs a chassis. <strong>SpecGantry is that chassis!</strong> It gives you the structural integrity to move fast without breaking the things that matter.</p><blockquote><em>Stop guessing. Start specifying. Build with </em><strong><em>SpecGantry</em></strong><em>.</em></blockquote><p><em>Question for you — What is the biggest challenge you face when trying to keep AI-generated code aligned with your original project architecture?</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=de4b1f2639b0" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[What’s up, “vibe coding”!?]]></title>
            <link>https://mangeshpise.medium.com/whats-up-vibe-coding-ee4531253315?source=rss-fa36301a8416------2</link>
            <guid isPermaLink="false">https://medium.com/p/ee4531253315</guid>
            <category><![CDATA[vibe-coding]]></category>
            <category><![CDATA[copilot-programming]]></category>
            <category><![CDATA[software-development]]></category>
            <category><![CDATA[gen-ai-for-business]]></category>
            <category><![CDATA[gen-ai-tools]]></category>
            <dc:creator><![CDATA[Mangesh Pise]]></dc:creator>
            <pubDate>Sun, 27 Apr 2025 21:25:00 GMT</pubDate>
            <atom:updated>2025-04-27T21:25:00.853Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/916/1*C4c3ziwGtwrTH1Tu37DKlg.png" /><figcaption>Image generated using AI</figcaption></figure><p>In 1940, von Neumann — a mathematician, physicist, computer scientist, and engineer — talked about a concept called “universal constructor,” based on the idea that machines could potentially self-replicate (i.e., “self-replicating machine”). It has been more than just a theory since then. Many areas within science have successfully implemented this concept, including malware, but the most fascinating one is Xenobots, which find other cells and build copies of themselves (Kriegman et al., 2021).</p><p>While there is no autonomous self-replication (<em>at least yet</em>) with the new way of coding with AI, it might be a convincing parallel since we can now simply “describe” our problem statement in a natural language, which, by the way, doesn’t even have to be only in English. AI generates complete code in the choice of one’s programming language. This blog post attempts to share a point of view on how IT leaders can exploit the <em>vibes</em> with a reasonable balance.</p><h3>Co-Pilots weren’t enough!…?</h3><p>This disruptive nature of coding, first described by Andrej Karpathy earlier this year (February 2025 on X) as “vibe coding,” almost instantly became the next big thing in AI. It nearly gave birth to vibe-coding-friendly IDEs (Integrated Development Environments) and Platforms that use agentic AI to code, test, and deploy applications <em>almost</em> autonomously.</p><p>What earlier seemed like a co-pilot experience perfectly overlaps the <a href="https://en.wikipedia.org/wiki/Pair_programming">pair-programming</a> paradigm. One can only imagine gaining from the improved speed and quality while lowering the cost of developing software. In the absence of an intelligent co-pilot, developers would have to rely on researching a complex requirement via search engines, asking on forums, or seeking out help on crowdsourcing platforms. That would take time, and there was no guarantee that a recommended solution would be a perfect fit. However, GenAI, the game-changer that it is, can understand the situation and provide various permutations and combinations of code blocks to solve the given problem. This is undoubtedly exciting for developer productivity!</p><p>GenAI can speak both ways. It can not only convert a requirement in plain natural language to a programming language, but also explain a code block in simple natural language. Thus, as a coding co-pilot, it can potentially speed up mundane tasks, such as creating documentation, explaining code for debugging, and even fixing the code when it does not work or the requirements change.</p><h3>Pushing the envelope … carefully!</h3><p>Unless it is thoughtless, nothing is wrong with asking for more, especially hyper-automation. Repetitive, mundane, scheduled tasks must be automated so we can make room for progress (and critical thinking). Remember, Generative AI can also perform critical thinking and creative tasks! But who checks if GenAI’s approach to a given problem is contextual? Must read: the <a href="https://www.merriam-webster.com/wordplay/trolley-problem-moral-philosophy-ethics">Trolley Problem</a>.</p><blockquote>(hands-off frontend)</blockquote><p>Prototyping is a common approach during early ideation of any new concept. However, considering the longevity of this prototype, it may be counter-productive to spend a significant amount of time and energy creating a basic frontend. Focus on user experience (UX) could be minimal in the early phase, so a simple user interface (UI) with page navigation, clicks, and data visualizations could be enough to let most of the focus be spent on collecting data to validate the concept. This can be easily hyper-automated using GenAI and vibe-coding, i.e., describing basic UI, events, and interactions to let AI build a fully functional frontend.</p><p><strong>⚠️ ADVICE: </strong><em>Understanding the difference between UI and UX is critical to deciding how AI-generated code can be used in a productive and non-productive development lifecycle.</em></p><blockquote>(hands-off backend)</blockquote><p>Complex and incomplete business requirements with strict deadlines are uncomfortable, but also, many times, uncontrollable elements in software development lifecycles. GenAI and vibe-coding can offer the opportunity to take a methodical TDD (<a href="https://en.wikipedia.org/wiki/Test-driven_development">Test Driven Development</a>) approach to create modular software components, ensuring better requirements coverage.</p><p><strong>⚠️ ADVICE: </strong><em>Backend services, where the core business processes reside from a software standpoint, are complex and fragile to </em><a href="https://en.wikipedia.org/wiki/Side_effect_(computer_science)"><em>side effects</em></a><em>. Maturity in Change Management must be assessed to treat changes by AI similarly to those by humans.</em></p><blockquote>(oh! full-stack build)</blockquote><p>With the ability to develop fully-functional UI and backend services, this is where the metaphorical envelope is getting bloated. Visionary statements, such as <em>AI will write 90% of code</em> [<a href="https://fortune.com/2025/03/13/ai-transforming-software-development-jobs-meta-ibm-anthropic/">1</a>][<a href="https://economictimes.indiatimes.com/news/new-updates/90-of-coding-by-ai-fewer-jobs-for-software-engineers-zohos-sridhar-vembu-and-openais-sam-altman-give-techies-a-reality-check/articleshow/119333225.cms">2</a>][<a href="https://www.techspot.com/news/107411-microsoft-cto-predicts-ai-generate-95-percent-code.html">3</a>], seem to be excitingly disruptive as well as scary. These are the uncharted territories, but who is to say it will not be tested time and again!? There is nothing wrong with being cautiously optimistic!</p><p><strong>⚠️ ADVICE:</strong><em> Having great clarity at all levels (viz., Infrastructure, Data, Application, User, Security, Deployment, and Maintenance) is essential before identifying a use case for such extreme dependence on AI. It is also crucial to assess whether you would entrust one individual/entity to manage the entire stack (please don’t counter with “agents”)!</em></p><blockquote>(now anyone can build apps)</blockquote><p>Because AI can enact the interface between someone who can speak and express in natural language and a high-level programming language, the entire experience can be encapsulated within wrapper-style AppDev tools called Low-Code/No-Code platforms. These tools empower expert business users to create department-centric applications, bridging the time-to-market gaps and cutting through the perceived red tape in IT processes.</p><p><strong>⚠️ ADVICE:</strong><em> Digital transformation is not easy, and “</em><a href="https://en.wikipedia.org/wiki/Shadow_IT"><em>Shadow IT</em></a><em>” certainly does not make it any easier. While the short-term success of low-code/no-code platforms is enormous, uncontrolled use can increase technical debt and make core IT systems rigid to further innovation. Business user empowerment to drive productivity, followed by a feedback loop to scale, requires a rather collaborative governance process and not another layer of red tape.</em></p><h3>So, what’s up with vibe-coding?</h3><p>GenAI is not the next fast car; it’s the fuel. It has been and will continue to find its way into our lives. It is deemed to disrupt the speed at which progress will be measured. Software development is no stranger to this idea, and the developer community, as well as the IT leadership, are excited about the idea of using AI to develop software. This early-stage idea deserves more evaluation from all aspects of the software development lifecycle, so we can confidently apply the lessons, dos, and don’ts to the proper use cases. However, logic cannot beat the hype, and IT leaders will have to look at the complete lifecycle where AI can be used to create software, maintain it, and eventually scale it within the guardrails of their risk appetite.</p><p>At this point, “vibe coding” is giving rise to new IDEs and platforms that simplify coding as a task, but basic GenAI skills, such as prompt engineering, still supersede for effective vibing! In the grand scheme of things, one may find that <strong>coding</strong> is a task, and tasks deserve automation. However, the big picture of <strong>software development</strong>, let alone <strong>innovation</strong>, consists of multiple cognitive workstreams.</p><p>It must not be forgotten that software development is an “engineering” skill set, and some aspects require more than “just code” (e.g., Systems design, Code reviews, Regulatory validations, Trust/Risk/Security, Ethics, etc.).</p><h3>References</h3><p>Von Neumann, J., &amp; Goldstine, H. H. (1966). <em>Theory of self-reproducing automata</em> (A. W. Burks, Ed.). University of Illinois Press.</p><p>S. Kriegman, D. Blackiston, M. Levin, &amp; J. Bongard, Kinematic self-replication in reconfigurable organisms, Proc. Natl. Acad. Sci. U.S.A. 118 (49) e2112672118, <a href="https://doi.org/10.1073/pnas.2112672118">https://doi.org/10.1073/pnas.2112672118</a> (2021).</p><p>Shallow, C., Iliev, R., &amp; Medin, D. (2011). Trolley problems in context. <em>Judgment and Decision Making</em>, <em>6</em>(7), 593–601. doi:10.1017/S1930297500002631</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=ee4531253315" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[OGSM Framework for AI Strategy Development]]></title>
            <link>https://mangeshpise.medium.com/ogsm-framework-for-ai-strategy-development-156fb653042f?source=rss-fa36301a8416------2</link>
            <guid isPermaLink="false">https://medium.com/p/156fb653042f</guid>
            <category><![CDATA[enterprise-ai-development]]></category>
            <category><![CDATA[ai-strategy-framework]]></category>
            <category><![CDATA[ai-architecture-strategy]]></category>
            <category><![CDATA[ai-thought-leadership]]></category>
            <dc:creator><![CDATA[Mangesh Pise]]></dc:creator>
            <pubDate>Mon, 03 Feb 2025 00:39:49 GMT</pubDate>
            <atom:updated>2025-02-03T00:39:49.530Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/800/1*aopVAdENDibbGbHV3EzG7w.gif" /><figcaption>AI Strategy components using OGSM</figcaption></figure><p>In a world where artificial intelligence (AI) is rapidly transforming industries, developing a cohesive and effective AI strategy is crucial for enterprises looking to stay competitive. But a challenging question still for most is how to get started with developing an effective AI strategy for their organization. One approach to come up with an effective strategy would be based on a popular framework called the OGSM framework — an acronym for Objectives, Goals, Strategies, and Measures. This structured approach could provide clarity, focus, and alignment in driving organizational priorities, especially in a rapidly evolving domain like AI.</p><p>In this blog, we will delve into how OGSM works, why it’s a powerful tool for crafting enterprise AI strategies, and how it can be applied to support three key AI objectives: building trust, enabling automation, and making a meaningful impact on business outcomes.</p><h3>What is OGSM and Why is it effective?</h3><p>The OGSM framework originated in the corporate strategy world and has been widely adopted by organizations globally, including Fortune 500 companies. The simplicity and adaptability of OGSM make it a preferred choice for aligning teams, especially around shared priorities.</p><p>At its core, OGSM links high-level aspirations (Objectives) to actionable, measurable plans (Measures) through clear intermediate steps (Goals and Strategies). This logical flow ensures that long-term visions remain actionable while keeping every stakeholder on the same page.</p><p>AI strategies require balancing long-term innovation with short-term operational efficiency. OGSM’s structured approach ensures that no element — be it trust, automation, or business impact — is overlooked. Furthermore, it helps enterprises categorize investments, align diverse stakeholders, and track success through measurable outcomes.</p><p>Let’s look at Objectives, Goals, Strategies, and Missions individually and how the framework can be used to build an effective AI adoption strategy.</p><h3>O: Objectives</h3><p>When developing an AI strategy for an enterprise, it’s essential to ground the approach in objectives that reflect both the technical and business imperatives of AI adoption. The three core objectives —</p><ol><li>building trust,</li><li>enabling automation, and</li><li>making a meaningful business impact,</li></ol><p>collectively form the backbone of a successful enterprise AI strategy.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/605/1*4vCbqoPNdzVvL6oPBcEvgQ.png" /><figcaption>Objectives expected from an AI Strategy</figcaption></figure><p>Each of these objectives shapes how an enterprise prioritizes investments, deploys resources, and manages risks in its AI initiatives. Here’s how these objectives connect directly to the development of a comprehensive enterprise AI strategy.</p><h4>Trust: The Foundation of Responsible and Scalable AI</h4><p>Trust is not just an ethical consideration — it is a strategic necessity. The “trust” here, is not just between humans and machines, but also within the brand and customers. Without trust, AI initiatives will face resistance from employees, customers, and regulatory bodies, which can derail even the most promising technologies. For enterprises, trust must underpin every element of their AI strategy, ensuring that AI adoption is responsible, compliant, and aligned with the organization’s values.</p><p><strong>How This Shapes Enterprise AI Strategy</strong></p><ul><li>Governance and Policies: Developing an AI strategy requires clear governance policies that ensure the ethical and transparent use of AI. This includes establishing frameworks for data governance, bias mitigation, and explainability. For instance, an enterprise might adopt guidelines such as <a href="https://www.nist.gov/itl/ai-risk-management-framework">NIST’s AI Risk Management Framework</a> or <a href="https://genai.owasp.org/">OWASP Security Guidance</a>, or create its own AI ethics board to oversee major projects.</li><li>Customer-Centric Design: Enterprises must design AI systems that build customer confidence. For example, a bank introducing an AI-based loan approval system should focus on transparency and provide clear explanations for approval or rejection.</li></ul><p><strong>Development Considerations</strong></p><ul><li>Include explainability tools and frameworks in model development pipelines to address transparency requirements.</li><li>Make data audits and security assessments routine checkpoints in the AI development lifecycle.</li><li>Implement training programs for employees to foster trust and understanding of AI tools.</li></ul><h4>Automation: The Key to Scaling AI for Operational Excellence</h4><p>Automation is at the heart of enterprise AI strategies. AI’s ability to reduce manual workloads, streamline decision-making, and operate at scale makes it a vital tool for modern enterprises looking to stay competitive. However, incorporating automation into an AI strategy is more than implementing technology — it requires rethinking workflows, processes, and organizational structures.</p><p><strong>How This Shapes Enterprise AI Strategy</strong></p><ul><li>Operational Alignment: Enterprises must evaluate which areas of their operations are ripe for automation and prioritize accordingly. For instance, back-office processes, supply chain operations, and customer support are common candidates for returns on automation investments.</li><li>Technology Investment: Automation requires investment in AI tools such as robotic process automation (RPA), natural language processing (NLP), and predictive analytics. The AI strategy must allocate resources to the right technologies and employee training based on the organization’s goals.</li></ul><p><strong>Development Considerations</strong></p><ul><li>Identify processes that create bottlenecks or require high manual intervention, such as invoice processing, customer query resolution, or compliance reporting.</li><li>Measure potential automation success with pilots, testing how much time or cost is saved.</li><li>Build feedback loops to continuously improve automated systems through retraining and refinement.</li></ul><h4>Impact: The Ultimate Goal of Enterprise AI</h4><p>Every AI strategy must ultimately deliver measurable and meaningful impact. For enterprises, this means focusing on initiatives that create tangible business value — whether through cost savings, revenue growth, or innovation. The impact is what differentiates experimental AI efforts from strategic, enterprise-wide transformations.</p><p><strong>How This Shapes Enterprise AI Strategy</strong></p><ul><li>Business Alignment: A meaningful AI strategy starts with a clear understanding of business goals. For example, an enterprise seeking to increase profitability might focus on cost-saving AI initiatives like predictive maintenance or operational optimization.</li><li>Prioritization of Use Cases: Not all AI initiatives will deliver equal value. Enterprises must prioritize high-impact use cases that align with their strategic objectives. Tools like ROI analysis and feasibility studies can guide these decisions.</li></ul><p><strong>Development Considerations</strong></p><ul><li>Establish baseline metrics (e.g., revenue growth, cost reduction, or time savings) for every AI initiative.</li><li>Use Agile or iterative development approaches to test and refine high-impact use cases quickly.</li><li>Create cross-functional teams to ensure AI initiatives address both technical and business needs.</li></ul><h3>G: Goals</h3><p>In the OGSM framework, while the objectives provide an overarching vision and direction, the goals translate those objectives into specific, measurable outcomes. Objectives are broad, qualitative aspirations that define <em>what</em> an organization seeks to achieve, whereas goals are more precise and focus on <em>how</em> success will be realized in alignment with the objectives. This structured relationship ensures that high-level strategic aims are connected to actionable outcomes, enabling organizations to track progress, prioritize efforts, and achieve clarity in execution.</p><p>In the context of enterprise AI strategy, each objective — building trust, enabling automation, and making a meaningful impact — guides the focus of the strategy, while the corresponding goals define the tangible results needed to fulfill those aspirations.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/640/1*bekiAH17AEpD5o0N7ycGFQ.png" /><figcaption>Goals expected from an AI Strategy</figcaption></figure><p>The above figure shows the relationship between objectives and goals expected from an AI strategy.</p><h4>Trust → TRiSM</h4><p>The goal that aligns with the objective of building trust is TRiSM (Trust, Risk, and Security Management). Trust in AI systems hinges on their ability to operate transparently, ethically, and securely. TRiSM focuses on critical aspects such as data quality, model accuracy, explainability, security, and risk management. These attributes are essential to building confidence among stakeholders, ensuring compliance with regulations, and mitigating risks. Without a structured approach like TRiSM, the broader objective of trust remains unattainable.</p><h4>Automation → Autonomy</h4><p>The goal that aligns with automation is Autonomy. Automation in enterprises is about more than just automating repetitive tasks — it’s about creating AI systems that can operate independently, make intelligent decisions, and adapt dynamically. Autonomy emphasizes developing AI systems that deliver faster decision-making, reduce human intervention, and improve operational efficiency. By focusing on autonomy, enterprises unlock the potential of AI to scale processes and achieve true automation at a strategic level.</p><h4>Impact → Value</h4><p>The goal that aligns to make a meaningful business impact is Value. The ultimate aim of any AI initiative is to generate measurable business impact, whether through cost savings, revenue growth, or innovation. The goal of value ensures that AI projects deliver tangible returns on investment, align with strategic business priorities, and maximize resources. By focusing on outcomes such as time saved, costs reduced, and new opportunities created, this goal ensures the meaningful impact promised by the objective is achieved.</p><h3>M: Measure</h3><p>Measurement is the cornerstone of the OGSM framework, providing the accountability and clarity necessary to turn strategic aspirations into tangible results. While objectives define the “what” and goals specify the “how,” measures “quantify progress” and ensure alignment with organizational priorities.</p><p>In the OGSM framework, measuring is the glue that connects aspirations to reality. It provides clarity, structure, and evidence, ensuring that the strategies and actions undertaken are impactful, efficient, and aligned with the organization’s goals. Without robust measures, even the most well-thought-out objectives and goals risk falling short of their potential.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/687/1*tj1iV6bLdWYjhle71Z7BNA.png" /><figcaption>Measures to track progress of the AI strategy</figcaption></figure><h4>Key Measures of TRiSM</h4><ol><li><strong>Data Quality: </strong>High-quality, unbiased, and well-labeled data is crucial for trustworthy AI systems. Poor data quality undermines model accuracy, fairness, and reliability.</li><li><strong>Security and Audit:</strong> Ensuring robust security measures protect sensitive data, while regular audits maintain compliance with regulations like GDPR or HIPAA.</li><li><strong>Accuracy and Explainability:</strong> Stakeholders must understand how AI systems arrive at decisions. Transparency builds confidence, while accuracy ensures the system delivers reliable outcomes.</li></ol><h4>Key Measures of Autonomy</h4><ol><li><strong>Intelligence: </strong>AI systems must continuously improve through learning. Intelligence is demonstrated by a system’s ability to adapt to new data and contexts.</li><li><strong>Swift Decision-Making: </strong>Speed is a key metric for autonomy. Systems that make faster decisions reduce time-to-market and enhance operational efficiency.</li><li><strong>Independence:</strong> The accuracy and success rate of AI-driven decisions determine how effectively autonomous systems can achieve desired outcomes with or without human oversight, depending on the use case.</li></ol><h4>Key Measures of Value</h4><ol><li><strong>Time:</strong> Measuring how AI reduces operational timeframes, accelerates processes, or increases speed to market.</li><li><strong>Money:</strong> Tracking cost savings or revenue growth attributable to AI initiatives.</li><li><strong>Resources: </strong>Evaluating how AI optimizes resource allocation, such as workforce efficiency or supply chain improvements.</li></ol><h3>S: Strategy</h3><p>The 3-pillar strategy — comprising Movers, Shakers, and Disruptors — is a guiding approach for categorizing and prioritizing enterprise AI use cases based on their business impact. Each pillar defines distinct areas of impact, helping organizations strategically allocate resources, align efforts with objectives, and ensure measurable results.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/686/1*UmvnM1VIyE27SlezX1OlPg.png" /><figcaption>The 3-pillar strategy to guide AI adoption</figcaption></figure><p>When integrated into the OGSM framework, this 3-pillar strategy serves as a decision-making funnel that aligns AI initiatives with the organization’s broader aspirations, enabling enterprises to channel investments toward high-value opportunities.</p><p>The 3-pillar strategy plays a critical role in ensuring that enterprise AI use cases are evaluated, categorized, and executed in alignment with the objectives, goals, strategies, and measures of the organization. In addition, one of the biggest challenges in enterprise AI is identifying and prioritizing the right use cases from a sea of possibilities. The 3-pillar strategy addresses this by creating a structured funnel for evaluation:</p><h4>1. Establishing a Clear Decision Framework</h4><ul><li>By categorizing use cases into Movers, Shakers, and Disruptors, organizations can evaluate their potential business impact, feasibility, and strategic alignment.</li><li>This framework allows enterprises to balance short-term operational improvements with long-term innovation and growth.</li></ul><h4>2. Guiding Resource Allocation and Investment</h4><ul><li>Movers require moderate investment but deliver immediate, tangible benefits, making them ideal for early-stage AI adoption or quick wins.</li><li>Shakers may require more sophisticated systems and data but provide measurable financial returns, justifying mid-level investments.</li><li>Disruptors demand the highest investment and risk tolerance but have the potential to transform the business, making them priority areas for innovation-focused enterprises.</li><li>Example: An enterprise might prioritize a Mover project, like automating HR workflows, for immediate productivity gains while simultaneously investing in a Disruptor project, like launching an AI-powered subscription service, for future growth.</li></ul><h4>3. Balancing Strategic Focus and Flexibility</h4><ul><li>The 3-pillar approach ensures that no area is neglected. Enterprises can simultaneously pursue operational excellence (Movers), financial efficiency (Shakers), and innovation (Disruptors), maintaining a balanced AI portfolio.</li><li>This balance prevents over-commitment to high-risk projects while ensuring long-term competitive advantage.</li></ul><h4>4. Evaluating and Reprioritizing Continuously</h4><ul><li>As each use case progresses, its impact can be measured using OGSM’s Measures. This data helps organizations continuously evaluate and reprioritize their portfolio.</li><li>Example: If a Shaker project initially expected to deliver significant cost savings starts underperforming, resources can be redirected to a Disruptor initiative with higher potential returns.</li></ul><h3>Conclusion</h3><p>The OGSM framework is a powerful tool for structuring and implementing an enterprise AI strategy. By focusing on the three core objectives — building trust, enabling automation, and creating meaningful impact — organizations can align their AI initiatives with long-term business goals. Additionally, categorizing investments into Movers, Shakers, and Disruptors provides clarity on where to allocate resources for maximum strategic advantage.</p><p>As enterprises embrace AI, a thoughtful strategy built on the OGSM framework ensures that their investments not only deliver value but also position them for sustained growth in the AI-driven future.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=156fb653042f" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Journey from Automation to Autonomous Systems]]></title>
            <link>https://mangeshpise.medium.com/journey-from-automation-to-autonomous-systems-3140aadec02e?source=rss-fa36301a8416------2</link>
            <guid isPermaLink="false">https://medium.com/p/3140aadec02e</guid>
            <category><![CDATA[ai-technology-trends]]></category>
            <category><![CDATA[ai-strategy]]></category>
            <category><![CDATA[genarative-ai]]></category>
            <category><![CDATA[ai-business-applications]]></category>
            <category><![CDATA[ai-tools]]></category>
            <dc:creator><![CDATA[Mangesh Pise]]></dc:creator>
            <pubDate>Mon, 16 Dec 2024 03:18:29 GMT</pubDate>
            <atom:updated>2024-12-16T03:18:29.615Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*IM2XhuPZz_9cJcjInySARg.png" /><figcaption>Images generated using Generative Artificial Intelligence</figcaption></figure><p>The last two years have been nothing but a rapid-fire round around the consumerization of Generative AI (GenAI). From the evolution of Large Language Models (LLMs) to multi-modality, from just chatbots to complex application development concepts, such as Agentic workflows using AI, it has been a constant race to validate how GenAI will impact our lives in some form or fashion. On the one hand, this rapid evolution showed us the art of possibilities and how it can impact our jobs. On the other hand, it also demonstrated the infancy of this new technology. This journey is far from over, but through this blog, I would like to remind us all what this journey is about and highlight some milestones in the journey thus far. I hope you will connect this to your own interactions with GenAI.</p><h3>“Automation” v/s “Autonomous” Systems</h3><p>I want first to acknowledge that this is not a new journey. We have been on this track for almost half a decade already. Our primary focus until now was on performing repetitive tasks with better accuracy, higher speed, and at a fraction of current costs. Yes, I am talking about “automation”. We have become so good at it that it has been the primary reason businesses have been investing in IT solutions (<em>of course, after ensuring a cost-benefit advantage</em>). Every time you place an order on your favorite online retail store, you get notified about the whereabouts of your order. Same with returns. Some retailers refund your money when the product leaves your hands through a courier service and before it reaches the retailer (<em>idea: improve customer satisfaction and trust by refunding your money asap</em>). That’s hyper-automation. With such automation, we have seen much improvement in quality of life. So, where do we go next, and why?</p><p>Well, as stated earlier, automation is only performing repetitive tasks over and over again with speed and accuracy. Sadly, there is no human-like intelligence associated with it. For example, there is no system today to carry out your Christmas shopping and have the gifts shipped to your extended family. That’s still a hard sell for automation systems to undertake. Traditional automation misses out on personalization or adjusting the workflows to adapt to environmental changes. For example, selecting gifts for the extended family would require a system that knows a little bit more about the family members (<em>viz, age, preferences, etc.</em>). There may even be a selection of retailers involved because different retailers would have different catalogs, shipping costs/speeds, etc. A system would need to also stay within a certain budget. All this requires a super-intelligent system that would be “autonomous” and possibly your digital twin (<em>something that “thinks” like you</em>).</p><p>So, if that is our next goal, we are on our journey to build autonomous systems. Accomplishing the future will need different kinds of tools than those used for automation. We cannot relinquish automation yet, but we will need to pick up different tools, skills, and mindsets!</p><p>AI will certainly play a BIG role here! So, for the rest of this blog, let us focus on key updates in GenAI tools and techniques and how they impact the development of use cases.</p><h3>1. Plethora of options</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ST4ayj7abPEyMlNA2rnMOw.png" /><figcaption>Plethora of Large Language Models and Model-versions</figcaption></figure><p>What took everyone’s attention at the onset of the GenAI consumerization journey — ChatGPT from OpenAI, not only granted access to everyday users to interact with LLMs but also opened up our minds to understand and appreciate thousands of other LLMs from providers like Google, Anthropic, Meta, etc. In a race to next-level excellence, each provider published more than one LLM with varying capabilities (text-only to multi-modality) at varying price points and sizes (parameters).</p><blockquote>Effectively, we have many options to pick from to develop our use cases.</blockquote><h3>2. Key factors driving new LLMs</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*CKWzHEn2ConQNqJt8GXOeg.png" /><figcaption>Top 5 factors driving need for multiple LLMs</figcaption></figure><p>While we have many LLM options, we must understand the key reasons for such a race to publish new models so frequently. Obviously, each new model from every provider is better than the previous, but the improvement in many cases is not marginal. For example, OpenAI’s GPT-3.5 and GPT-4o not only significantly improve accuracy and speed but also add multi-modality, significantly changing our ability to deliver next-level applications. As another example, Google’s Gemini-pro and Gemini-flash (<em>experimental as of the publication date of this blog</em>) are game changers in terms of using not only multi-modal inputs but also multi-modal outputs (<em>i.e. generating text and images using the same model</em>).</p><blockquote>Effectively, we have the capability to develop a wide range of super-intelligent use cases.</blockquote><h3>3. New prompt-engineering techniques</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*MQMPCePlKhqv99zrdLv-GA.png" /><figcaption>Prompt-Engineering landscape is growing due to better LLMs</figcaption></figure><p>Prompt-Engineering plays a huge role in developing use cases. Newer LLMs analyze and respond to instructions differently than the earlier ones. This opens the ability to experiment with and develop newer prompting techniques. For example, in the earlier releases, Chain-of-Thought (CoT) instruction prompted LLMs to think step-by-step, which ensured better quality response; we don’t need to pass such specific instructions in the latest releases because they do that inherently (<em>see GPT-o1</em>). This helps us ask more from LLMs; for example, we can now ask LLMs to validate their own responses and ensure accuracy (<em>self-reflection</em>), or better yet, given a problem statement, we can instruct LLMs to develop an approach to solve the problem and then go about solving the problem (<em>reasoning</em>).</p><blockquote>Effectively, we can increase trust and reliability in systems utilizing advanced LLMs.</blockquote><h3>4. AppDev Techniques &amp; TRiSM</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*K1OSlipjRLUzHTptzyNAbA.png" /><figcaption>Maturing Application Development Lifecycles</figcaption></figure><p>As we started understanding how to avoid LLM hallucinations by using “grounding” (<em>i.e. providing context along with questions in the prompt</em>), we found Retrieval Augmented Generation (RAG) became the most popular approach to allow dynamic grounding. That introduced new technologies, such as Vector databases or reinvigorated Knowledge Graph databases. This also introduced new application development techniques like using interim ML models (<em>text-embedding</em>), prompt-chaining, the latest Agentic approach to manage AI workflows, fine-tuning LLMs for embedded deterministic AI, etc. Lastly, the heightened sense of security due to the nature of how GenAI is perceived, and in general due to DevSecOps principles, we have seen elevated importance of practices such as “red-teaming” (<em>simulation of threats via prompting in this context</em>) embedded within the application development process.</p><blockquote>Effectively, it is still in its infancy, but there is a general consensus to formulate GenAI-specific SDLC process.</blockquote><h3>5. Stakeholder management is critical</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*kd9lUdEL5w1jr12Xa54o8g.png" /><figcaption>Stekeholders with different stakes</figcaption></figure><p>GenAI is not a commodity <em>yet</em>, unlike cloud platforms. So, it is still an area of investment that must have an associated return. Thus, like any other executive discussions involving investments, there is a need to have a clear business case for funding AI initiatives. It is important to understand your stakeholders so you can explain the benefits and value AI will bring to your organization. Executives who are responsible for business operations are interested in improving efficiency, productivity, and revenue. So, positioning GenAI to address any one or all of these priorities is critical. In addition, it is crucial to understand that as much business executives want to ride the hype and not miss out on the competitive opportunities, they also want to de-risk the implementation. So, defining an approach to use AI in your use cases is as important as delivering the project on time and within budget. If you are a startup or dealing with financial investors, it is important to demonstrate how your adoption framework safeguards your organization from risks through well-defined governance, risk management, and organizational change management processes. As a development organization, GenAI use cases, such as code generation, cognitive testing, and documentation, have been popular so far. However, there is insufficient clarity on incorporating GenAI to make applications intelligent. A widely tested and adopted application development lifecycle approach is missing. So, as a software engineering leader, you must clearly map out the GenAI adoption plan in both these work streams.</p><blockquote>Effectively, a clear stakeholder management strategy must be a part of GenAI adoption to aptly inform of the value to your organization.</blockquote><h3>Conclusion</h3><p>This is a journey, so it is only obvious that it comprises critical milestones, crossroads, and/or complex terrains. The silver lining is that we have been on this journey for many decades. We have navigated similar paths before with concepts from the automation playbook. However, we must recognize that GenAI is a disruptive technology to the likes of the discovery of steam to run steam engines, which in turn was responsible for the Industrial Revolution, or the invention of the internet to bring us to a globally connected digital world, which in turn has lead to further innovations impacting the quality of life. In that sense, GenAI might be the technology that will fuel our prosperity for time to come. If so, we must adapt, re-skill, and understand its own evolutionary cycles/stages to help us write a new playbook for building autonomous systems.</p><p><em>I welcome you to discuss the ideas in this blog (and outside of this blog) around GenAI to expedite our learning together.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=3140aadec02e" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Break Free from the Automation Rut: Redefine Your AI Strategy]]></title>
            <link>https://mangeshpise.medium.com/break-free-from-the-automation-rut-redefine-your-ai-strategy-961215aab521?source=rss-fa36301a8416------2</link>
            <guid isPermaLink="false">https://medium.com/p/961215aab521</guid>
            <category><![CDATA[automation]]></category>
            <category><![CDATA[ai-leaders]]></category>
            <category><![CDATA[multi-agent-systems]]></category>
            <category><![CDATA[genarative-ai]]></category>
            <category><![CDATA[agentic-ai]]></category>
            <dc:creator><![CDATA[Mangesh Pise]]></dc:creator>
            <pubDate>Mon, 14 Oct 2024 02:49:07 GMT</pubDate>
            <atom:updated>2024-10-14T02:49:07.815Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*R742glOl6nrTY2YoCWc8Cw.png" /><figcaption>Image generated using Generative AI</figcaption></figure><h3>The Automation Rut: Are We Stuck?</h3><p>The conventional wisdom surrounding automation has long been rooted in a linear, step-by-step model. While adequate for straightforward tasks, this approach increasingly becomes a bottleneck as businesses encounter more intricate challenges.</p><p>Research shows that over 60% of automation initiatives fail to deliver the expected benefits, often due to a failure to adapt to the complexities of real-world problems (Herzberg et al., 2020). This raises a critical question: are we inadvertently locking ourselves into a cycle of repetitive automation that limits our innovation potential?</p><h3>Linear Thinking: Automation’s Traditional Path</h3><p>Our inherent tendency to solve problems through linear, step-by-step thinking is at the heart of traditional automation. This comes naturally to us as humans: when faced with a challenge, we create a sequence of actions that lead to a solution. Once we’ve defined these steps, we automate the process, making it efficient and reliable.</p><p>For many tasks, this works well. Automating simple, repetitive actions can save time and resources, improving productivity. However, as the scale and complexity of enterprise systems increase, this method begins to break down. Large, automated systems become too reliant on manual sequencing, which is fragile and often inefficient, especially when faced with interconnected, multifaceted challenges.</p><p>The crux of the problem is that sequential automation places an immense burden on the person or team defining the process. The system’s effectiveness is only as good as the expertise of the individual or team creating the sequence, often limiting themselves to a <em>happy path</em>. As complex problems multiply, the risk of bottlenecks and failures escalates, leaving organizations scrambling to meet demands.</p><h3>Agentic AI: A Smarter Way to Solve Problems</h3><p>The future of automation lies not in enhancing traditional, sequential methods but in adopting an entirely new paradigm. This approach embraces agentic AI, which leverages independent, intelligent agents to concurrently solve more minor parts of a problem while coordinating these solutions into a more extensive, cohesive system. It’s a modular, scalable way of addressing complex issues without relying on rigid, predefined sequences — similar to the concept of microservices in software architecture.</p><p>Microservices have revolutionized modern automation by breaking down large, monolithic systems into independent, manageable components that handle specific tasks. This has allowed for greater scalability, flexibility, and resilience in handling complex processes. However, while microservices are effective in decentralizing operations, they often lack the intelligence to adapt and optimize beyond the processes they’ve been explicitly programmed to perform. Microservices are automated but not intelligent, meaning they execute predefined tasks in isolation without dynamically understanding or adapting to the broader problem context.</p><p>Agentic AI adds to this equation an intelligent routing of process flows. In this model, intelligent agents perform specific tasks and coordinate with one another, understanding dependencies and adjusting to dynamic conditions. This makes the system more than just a collection of automated components — it becomes a network of intelligent, adaptable agents collaborating to deliver optimized, real-time solutions. Intelligent routing ensures that the suitable agents are engaged at the right time, facilitating a flow of information and decision-making that is far more agile and responsive than traditional automation or even microservices alone.</p><p>We can create a more flexible and responsive system by breaking complex challenges into smaller, more manageable sub-problems. Each sub-problem can be tackled independently by an autonomous AI agent focusing on a specific area of expertise. These agents work concurrently, feeding their results into a higher-level system aggregating and coordinating their efforts.</p><p>This agentic approach mimics the flexibility and intelligence of human decision-making but at a scale and speed that traditional methods can’t achieve. Each agent specializes in solving a specific problem, meaning the entire system doesn’t collapse if one part fails. Agents can be easily swapped, reconfigured, or retrained to adapt to changing conditions, making this approach highly resilient and adaptive to dynamic environments.</p><h3>Redefining Development: Embracing Flexibility with Agentic AI</h3><p>For developers, the agentic AI approach offers a new path forward. Instead of designing systems that rely on rigid workflows, developers can focus on building intelligent agents that operate independently and collaboratively. This means less debugging or reworking sequences and more time dedicated to innovation and development.</p><p>Moreover, agentic AI systems enable intelligent decision-making, allowing agents to autonomously determine their inputs, outputs, and dependencies on other agents. This capability facilitates seamless communication and collaboration among agents, ensuring they adapt to real-time conditions based on current needs and data.</p><p>This dynamism significantly simplifies the development process. Developers can focus less on rigidly defining workflows and more on creating adaptable agents that can automatically adjust their behavior in response to changes in the business environment. As a result, applications built on agentic AI can be inherently more resilient to fluctuations in requirements, market conditions, or operational challenges. By empowering agents to manage their dependencies intelligently, organizations can ensure that their systems remain efficient, responsive, and capable of meeting evolving demands without needing constant manual intervention or reconfiguration.</p><h3>Future-Proofing Your Business: The Strategic Importance of Agentic AI for Businesses</h3><p>This shift toward agentic AI is not just a technical evolution; it’s a strategic imperative for business leaders. The business landscape is evolving rapidly, and methods beyond traditional automation are needed to meet modern challenges. Leaders must recognize that embracing agentic AI enables creating flexible, adaptive systems that respond to real-time changes in market demands, customer preferences, and operational challenges. The ability to pivot quickly is invaluable, especially in e-commerce, finance, and healthcare industries, where rapid decision-making can lead to competitive advantages.</p><p>However, to effectively implement this change, business leaders must take a holistic approach to modernization. They mustn’t compartmentalize innovation and automation within individual departments; instead, they should foster a culture of collaboration across the entire organization. For instance, profit centers — such as sales and marketing — are often pushed to innovate rapidly to increase revenue and market share in many companies. They are encouraged to adopt new technologies and strategies to enhance customer engagement and drive sales. In contrast, cost centers, like finance and logistics, may face restrictions on their budgets and resources, inhibiting their ability to innovate. This imbalance leads to a scenario where profit centers focus on revenue generation while cost centers struggle to streamline operations effectively.</p><p>As a result, while revenue may increase due to aggressive innovation in profit centers, the need for corresponding improvements in cost centers can lead to rising operational costs. Total Cost of Ownership (TCO) continues to increase as outdated processes and technologies remain in place, creating inefficiencies that offset the gains achieved by profit-driven innovations. For example, a company may launch a cutting-edge marketing campaign that drives significant sales; however, the logistics department may still need to use updated methods for managing inventory and shipping products, causing costly delays and improving customer satisfaction. These inefficiencies may increase operational costs, ultimately negating the benefits achieved by the innovative logistics system.</p><p>This illustrates the need for an enterprise-wide approach, where innovation is not just a mandate for the profit centers but a shared goal across the organization. By leveraging agentic AI and creating a cohesive strategy encompassing both cost and profit centers, organizations can achieve a balance that drives revenue and manages operational costs effectively. As organizations embrace the agentic AI paradigm, they will become more resilient and better equipped to handle the complexities of modern business environments. By transforming business processes with an enterprise-wide perspective, leaders can ensure that their organizations remain agile and future-proof in the face of ongoing change.</p><h3>Redefining Automation: The Vision of a Multi-Agent System</h3><p>The ultimate vision for this new approach is the creation of an ecosystem of intelligent agents — each responsible for solving a specific part of a problem, working together in a coordinated system. The rigid structure of traditional automation does not limit this multi-agent system (MAS). Instead, it allows for dynamic collaboration between agents, guided by a central system orchestrating the process in real-time (Luzolo et al. 2024).</p><p>Numerous studies support the concept of agent collaboration, indicating that systems designed for concurrent problem-solving yield better results. For instance, MIT’s Computer Science and Artificial Intelligence Laboratory (CSAIL) research demonstrated that multi-agent systems could outperform traditional tasks, including logistics and resource allocation (Gordon, 2023).</p><p>Imagine a digital twin of a human coordinator capable of managing these intelligent agents. The digital twin could assign tasks, monitor progress, and ensure that agents work together to produce a solution, just as a human would — except at a scale and speed surpassing human capabilities.</p><h3>BroadAI: Transforming Automation with Multi-Agent Intelligence</h3><p>Leading the charge in intelligent automation is BroadAI, a groundbreaking multi-agent system (MAS) designed to simplify the creation of powerful and efficient AI solutions. By harnessing a MAS approach, the BroadAI framework enables developers and businesses to dissect complex problems into manageable sub-systems, each task handled by specialized agents with unique skills.</p><p>What sets BroadAI apart is its intelligent orchestration of agentic workflows. The framework dynamically selects the best agents for any challenge, optimizing their capabilities to deliver comprehensive solutions. As user queries are sent to the BroadAI API endpoint, the framework engages multiple agents that integrate with large language models (LLMs), APIs, or retrieval-augmented generation (RAG) infrastructure to provide optimized responses.</p><p>With BroadAI, intelligent applications are being developed faster and more efficiently. Its low-code framework allows users to easily integrate ready-to-use agents from an extensive Agent Store or build custom agents tailored to specific needs. This flexibility and scalability ensure businesses adapt swiftly to complex challenges while minimizing coding efforts and deployment times.</p><p>To see BroadAI in action and learn how it empowers organizations to create adaptive, intelligent solutions, visit their <a href="https://broad-ai.github.io/">homepage</a>.</p><h3>Conclusion</h3><p>We find ourselves entrenched in the traditional automation paradigm, yet a transformative path forward exists. The answer lies in embracing agentic AI and adopting a modular, concurrent approach to problem-solving. By deconstructing complex challenges into smaller, independent sub-systems and coordinating these solutions through intelligent agents, we can forge a new era of faster, more thoughtful, and highly scalable automation.</p><p>This shift demands reevaluating how developers construct systems while business leaders are crucial in championing this strategic change. By advocating for the agentic AI approach, organizations can transcend the limitations of sequential automation and unlock the potential for intelligent, adaptive systems that respond effectively to dynamic business environments.</p><p>The future of automation is not about adhering to rigid, predefined steps; it’s about cultivating a dynamic ecosystem of agents collaborating in real-time to address pressing challenges. As we stand on the brink of this exciting evolution, the time to embrace this new paradigm is now. Together, let’s redefine automation and harness the power of intelligent collaboration to shape a more resilient and responsive future.</p><h3>References</h3><p>Gordon, Rachel. “Multi-AI Collaboration Helps Reasoning and Factual Accuracy in Large Language Models.” <em>MIT CSAIL</em>, 18 Sept. 2023, <a href="https://www.csail.mit.edu/news/multi-ai-collaboration-helps-reasoning-and-factual-accuracy-large-language-models">https://www.csail.mit.edu/news/multi-ai-collaboration-helps-reasoning-and-factual-accuracy-large-language-models</a>.</p><p>Luzolo, Pedro Hilario, et al. “Combining Multi-Agent Systems and Artificial Intelligence of Things: Technical Challenges and Gains.” <em>ScienceDirect</em>, vol. 254, no. 266, 2024, pp. 1–13, <a href="https://www.sciencedirect.com/science/article/abs/pii/S2542660524003056">https://www.sciencedirect.com/science/article/abs/pii/S2542660524003056</a>.</p><p>Herzberg, Gary, et al. “The Imperatives for Automation Success.” <em>McKinsey &amp; Company</em>, 25 Aug. 2020, <a href="https://www.mckinsey.com/capabilities/operations/our-insights/the-imperatives-for-automation-success">https://www.mckinsey.com/capabilities/operations/our-insights/the-imperatives-for-automation-success</a>.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=961215aab521" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Understanding Low-Rank Adaptation (LoRA) in Fine Tuning LLM]]></title>
            <link>https://mangeshpise.medium.com/understanding-low-rank-adaptation-lora-in-fine-tuning-llm-3ed724c432c9?source=rss-fa36301a8416------2</link>
            <guid isPermaLink="false">https://medium.com/p/3ed724c432c9</guid>
            <category><![CDATA[large-language-models]]></category>
            <category><![CDATA[pre-trained-model]]></category>
            <category><![CDATA[model-efficiency]]></category>
            <category><![CDATA[fine-tuning]]></category>
            <dc:creator><![CDATA[Mangesh Pise]]></dc:creator>
            <pubDate>Fri, 04 Oct 2024 02:07:11 GMT</pubDate>
            <atom:updated>2024-10-04T02:07:11.048Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/640/1*5nBpHb80D8USeJFgp3fd3A.jpeg" /><figcaption>Image by Gerd Altmann from Pixabay</figcaption></figure><p>Neural networks are getting bigger, brighter, and more powerful. But these advances come with challenges — particularly when adapting these huge models for new tasks. Enter Low-Rank Adaptation (LoRA), a clever technique that makes this adaptation process much more efficient. It’s a game-changer for anyone working with large pre-trained models like GPT-3, which boasts an eye-watering 175 billion parameters!</p><p>So, what makes LoRA so exciting? Let’s break it down in simple terms.</p><h3>The Problem with Fine-Tuning Large Models</h3><p>Pre-trained models like GPT, BERT, or RoBERTa have become essential for language translation, question-answering, and text-generation tasks. These models, trained on massive amounts of data, can handle many tasks. But you must fine-tune them if you want them to excel at something specific — like generating text in a particular writing style or answering questions about a niche subject.</p><p>The catch? Fine-tuning these massive models requires updating all their parameters. For smaller models, this is fine. However, for a model like GPT-3, which has billions of parameters, updating everything is super expensive and requires tons of computational power. That’s where LoRA steps in to make things easier.</p><h3>What is Low-Rank Adaptation (LoRA)?</h3><p>At its core, LoRA tackles the problem of fine-tuning large models by updating only a tiny fraction of the model’s parameters. Instead of retraining the entire model, LoRA introduces a lightweight way of adapting it using low-rank updates — a fancy way to say that only the parts that need to be changed get attention.</p><p>Here’s how it works: LoRA leaves most of the model untouched, freezing the original weights (the model’s learned knowledge). Instead, it focuses on adjusting these weights using much smaller matrices. These smaller matrices handle the tweaks needed to adapt the model for the new task, all while keeping the original structure intact.</p><h3>How Does LoRA Work in Practice?</h3><p>Imagine you have a substantial pre-trained weight matrix, which is just a technical way of saying the model’s internal knowledge map. Typically, fine-tuning this matrix involves updating all the weights inside it. LoRA, however, freezes this big matrix and introduces two smaller ones — let’s call them A and B. These smaller matrices handle the heavy lifting of adapting the model, so instead of changing the original large weight matrix, you only train the much smaller A and B.</p><p>At the start, LoRA sets B to zero, so initially, nothing changes. However, as training progresses, A and B get tweaked to adjust the model for the specific task you want it to perform. This approach drastically reduces the number of parameters that must be trained and reduces the computational power required.</p><h3>Why LoRA is a Big Deal</h3><p>There are a few key reasons why LoRA is turning heads in the AI community:</p><ol><li><strong>Efficiency</strong>: LoRA dramatically reduces the number of parameters that need to be updated during fine-tuning. This means less computation, less memory usage, and faster training times. It’s perfect for when you want to fine-tune models without breaking the bank on hardware.</li><li><strong>Stability</strong>: By freezing the original weights and only tweaking small parts of the model, LoRA helps maintain the strength of the model’s architecture. This makes it less prone to overfitting (where a model becomes too specialized and doesn’t generalize well to new data).</li><li><strong>Resource-Friendly</strong>: LoRA’s efficiency makes it ideal for environments with limited resources. Imagine adapting a large model like GPT-3 to a new task while using much less memory and computational power — this opens the door for deploying models on devices with less energy, like mobile phones or edge computing platforms.</li></ol><h3>The Benefits Don’t Stop There</h3><p>Another huge perk of LoRA is its ability to handle quick task-switching. Imagine you’re deploying a large model in a service setting, and you need to switch between tasks like answering questions about history one minute and generating creative writing the next. With LoRA, you don’t need to reload the entire model for each task. Instead, you just swap out the small A and B matrices for the task-specific ones, which makes switching super fast and efficient.</p><h3>LoRA’s Limitations</h3><p>Of course, LoRA isn’t perfect. One limitation is that batching inputs for different tasks — each with its own A and B matrices — can be tricky. This means LoRA works best when you focus on one task at a time or when latency isn’t a critical concern. However, this is a minor trade-off for most real-world applications compared to the efficiency gains you get with LoRA.</p><h3>Conclusion</h3><p>Hands down, LoRA is a Game-Changer! Low-Rank Adaptation (LoRA) is a practical and efficient solution for adapting massive neural networks. LoRA drastically reduces the computational cost of fine-tuning without sacrificing model performance by focusing on low-rank updates. Whether working with massive language models or trying to adapt a model on resource-constrained devices, LoRA offers a highly efficient and scalable way forward.</p><p>In short, LoRA helps you get the best of both worlds: the power of massive pre-trained models and the flexibility to adapt them efficiently to new tasks. This makes it a promising technique poised to play a crucial role in the future of AI and machine learning.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=3ed724c432c9" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[My multi-talented bot built using BroadAI Agentic Framework]]></title>
            <link>https://mangeshpise.medium.com/my-multi-talented-bot-built-using-broadai-agentic-framework-64464edf0f9d?source=rss-fa36301a8416------2</link>
            <guid isPermaLink="false">https://medium.com/p/64464edf0f9d</guid>
            <category><![CDATA[broadai]]></category>
            <category><![CDATA[agentic-ai]]></category>
            <category><![CDATA[multi-agent-systems]]></category>
            <category><![CDATA[developer-tools]]></category>
            <category><![CDATA[generative-ai-tools]]></category>
            <dc:creator><![CDATA[Mangesh Pise]]></dc:creator>
            <pubDate>Sat, 21 Sep 2024 20:02:10 GMT</pubDate>
            <atom:updated>2024-09-21T20:02:10.276Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/891/1*xTp_AjolAvXGxqz0aMDD0w.png" /><figcaption>Image by Valeska Réon from Pixabay</figcaption></figure><p>Chatbot, by far, is still an exciting interaction channel through which most of us like to engage with something that is artificially intelligent. Even the Turing tests involve chat-like interactions to disguise a machine as a human (of course, to validate human-like qualities from the machine, not for cheating!). Chatbot development has evolved tremendously from rule-based chatbots (non-AI) to intent-based bots (NLP-based).</p><p>The latest, GenerativeAI-based chatbots rely on extracting relevant prior knowledge using techniques such as semantic retrieval from the stored knowledgebases and grounding it with an LLM prompt to generate meaningful responses, <em>albeit</em> even allowing contextual human-like follow-ups. This is popularly known as the RAG (Retrieval Augmented Generation) approach. Although this approach may work best for scenarios that rely on knowledge sources such as policies, documentation, or textbooks (law, medicine, history, etc.), one challenge with RAG-based chatbots is that they are monotonous and high maintenance (for knowledge management). Such applications/bots also lack awareness about current events and real-time information.</p><p>So, in this blog, I plan to share the latest Agentic approach to building bots. The main idea behind this approach is to equip the system (chatbot, in this case) with multiple talents or skills and exploit GenAI intelligence to not only &quot;generate&quot; information but also perform higher intelligence functions, such as planning a systematic approach using one or more of its talents to find the solution to a given question.</p><h3>Preface on BroadAI Framework</h3><p>Before we get into the specifics of the approach taken here to build an intelligent chatbot, it might be essential to spend about 30 seconds understanding how the <a href="https://broad-ai.github.io/">BroadAI framework</a> works, which allows it to be the Agentic framework of choice used in this approach.</p><blockquote><strong>BroadAI</strong> is a framework that supports the latest iteration around building smart and intelligent AI systems. It takes a <strong>Multi-Agent Systems</strong> (MAS) approach, where an AI system can demonstrate the orchestration of <strong>complex skills</strong> when working in an <strong>environment</strong>. Multiple expert agents with specialized skills collectively work towards achieving a given goal.</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/416/1*ABwFr_Lh0mKlPF76hhRuBQ.png" /><figcaption>BroadAI Agentic Framework comprising of the Multi-Agent System (MAS) and multiple Agents</figcaption></figure><p>Some critical features of the BroadAI Agentic framework are:</p><ul><li>Low-code developer accelerator for incorporating Generative AI in applications.</li><li>Plug-and-play agentic approach. Develop your own BroadAI agents using <a href="https://broad-ai.github.io/docu-agentic.html">BroadAI Agentic Framework</a> or incorporate them from the <a href="https://broad-ai.github.io/agent-store.html">Agent Store</a> to add broader capabilities to your application.</li><li>There is no need to be an expert in prompt engineering. Well-designed prompts are built into the <a href="https://broad-ai.github.io/docu-mas.html">BroadAI MAS framework</a>.</li><li>BroadAI framework effectively utilizes multiple agentic design patterns, viz. Planning, Reflection, Multi-Agent system, and Tool use.</li><li>Build stateless and stateful applications by simply enabling a configuration flag.</li></ul><h3>The Big Picture</h3><p>The final product can be seen on my website, <a href="https://mangeshpise.com/">https://mangeshpise.com</a>, where you can engage with the chatbot by clicking on the 💬 chat icon.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/593/1*1u6LUsksOl0u4h3qMhEibA.png" /><figcaption>High-level architecture showing main components of overall solution</figcaption></figure><p>The high-level architecture involves the primary website, hosted on a web server, and the landing page, which contains the chatbot. The chatbot sends the user&#39;s question to an API endpoint deployed as a serverless service, which performs the heavy lifting of taking the user&#39;s question and returning a response. The serverless service implements the BroadAI MAS framework along with multiple BroadAI Agents that, depending on their specific skills, integrate with LLMs, other API endpoints, or their own RAG infrastructure to generate a response. How each BroadAI Agents must be engaged is solely and dynamically determined by the BroadAI MAS framework based on the user&#39;s question. Thus, this agentic AI system can produce better outcomes for user interactions as it engages one or more skills incorporated within the system. Further, BroadAI allows one to easily extend the skillset by registering additional agents that can be downloaded from its agent store.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/751/1*m0JBRJGlhLWcLwnihF-hOQ.png" /><figcaption>Plug-and-Play &amp; Custom Agents used with BroadAI</figcaption></figure><p>As shown in the diagram above, I used the <em>FinancialAnalyst</em>, <em>NewsReporter</em>, <em>Randomizer</em>, and <em>Writer</em> agents from BroadAI&#39;s Agent Store. At the same time, I built my agent, <em>Mangesh</em>, using BroadAI&#39;s Agentic framework. <em>Mangesh</em> agent has been designed to look up all of my published blogs from a Vector store and provide a point-of-view on the topic asked in the user&#39;s question. Notice the different skills these agents offer, which allows BroadAI to answer a broad range of questions.</p><p>To provide a sense of benefits with this approach, below are two examples of the interactions with this chatbot:</p><blockquote><strong>Help me draft a short email covering Intel’s business, stock trends, and latest financial performance. I’d also like to include more if there is any headlines involving them or other players in their industry.</strong></blockquote><blockquote>Subject: Update on Intel Corporation<br>Dear Friends,</blockquote><blockquote>I wanted to share some insights about Intel Corporation, a leading player in the semiconductor industry, led by CEO Mr. Patrick P. Gelsinger. Recently, Intel has been focusing on innovation and expanding its manufacturing capabilities, which is crucial for maintaining its competitive edge in the market. In terms of financial performance, Intel reported a revenue of approximately $54.2 billion for the fiscal year ending December 30, 2023. The company achieved a gross profit of around $21.7 billion, with a net income of about $1.7 billion, translating to an earnings per share (EPS) of $0.4. You can find more detailed financial information in their latest SEC filing [here](https://www.sec.gov/Archives/edgar/data/50863/000005086324000010/intc-20231230.htm). Looking at the stock trends, on September 20, 2024, Intel’s stock closed at $21.87, reflecting a change of approximately 4.69% from the previous day. The stock has experienced some fluctuations, with a recent high of $23.14 and a low of $20.35. It’s worth noting that the semiconductor industry is continually evolving, and Intel’s recent strategies are essential to watch as they navigate this competitive landscape.</blockquote><blockquote>Best, [Your Name]</blockquote><p>The agentic approach to answering this question involved formulating a step-by-step plan that leveraged more than one available agent and their appropriate skills to come up with this response, as shown below:</p><blockquote>Step 1. Gather Intel’s business and financial information.<br> <strong>FinancialAnalyst</strong>.<strong>companyProfile</strong> {“stock_symbol”:”INTC”}</blockquote><blockquote>Step 2. Obtain Intel’s income statement for latest performance.<br><strong> FinancialAnalyst</strong>.<strong>incomeStatement</strong> {“stock_symbol”:”INTC”}</blockquote><blockquote>Step 3. Retrieve Intel’s latest stock trends.<br><strong> FinancialAnalyst</strong>.<strong>historicalStockPrices </strong>{“stock_symbol”:”INTC”,”number_records”:1}</blockquote><blockquote>Step 4. Collect recent news related Intel and its industry.<br><strong> NewsReporter</strong>.<strong>getHeadlines</strong> {“country_code”:”US”,”category”:”business”}</blockquote><blockquote>Step 5. Draft short email summarizing findings.<br><strong> Writer</strong>.<strong>composeEmail</strong> {“situation”:”Summarizing Intel’s business, stock trends, and financial performance”,”outcome”:”Provide concise overview Intel’s current status and news.”}</blockquote><p>This is another example that involved asking a question that needs reflecting on one of my blog posts about the <a href="https://mangeshpise.medium.com/deep-dive-prompting-technique-to-improve-the-quality-of-llms-response-233f3728223e">deep-dive prompting technique</a> (used to generate better-quality LLM responses). See the results below:</p><blockquote><strong>In English and Hindi, tell me what inspired you to develop the ‘deep-dive’ prompting technique, and how does it differ from other methods?</strong></blockquote><blockquote>‘Deep-dive’ prompting technique is inspired by concepts such as zero-shot prompting, few-shot prompting, chain-thought prompting, and Retrieval-Augmented Generation (RAG). This technique differs from other methods as it allows for a more comprehensive exploration of topics, enabling a deeper understanding and context in responses.</blockquote><blockquote>गहरी-खुदाई करने की तकनीक ऐसे विचारों से प्रेरित थी जैसे जीरो-शॉट प्रॉम्प्टिंग, कुछ-शॉट प्रॉम्प्टिंग, चेन-थॉट प्रॉम्प्टिंग, और रिट्रीवल-ऑगमेंटेड जनरेशन (RAG)। यह तकनीक अन्य तरीकों से इस प्रकार भिन्न है कि यह विषयों की अधिक व्यापक खोज की अनुमति देती है, जिससे प्रतिक्रियाओं में गहरी समझ और संदर्भ संभव होता है।</blockquote><p>Answering this request involved developing the following plan using the custom <em>Mangesh</em> Agent that can research my blogs and the <em>Writer</em> agent integrated from BroadAI&#39;s Agent Store, as shown below:</p><blockquote>Step 1. Generate response in English about deep-dive prompting technique inspiration and differences from other methods<br> <strong>Mangesh</strong>.<strong>referPublications</strong> {“topic”:”deep-dive prompting technique inspiration and differences from other methods”}</blockquote><blockquote>Step 2. Translate response into Hindi<br> <strong>Writer</strong>.<strong>translate</strong> {“originalText”:”The ‘deep-dive’ prompting technique was inspired by concepts such as zero-shot prompting, few-shot prompting, chain-thought prompting, and Retrieval-Augmented Generation (RAG). This technique differs from other methods by enabling a more comprehensive exploration of topics, allowing for deeper understanding and context in responses.”,”languageKey”:”hi”})</blockquote><h3>Low-Code approach to infusing GenAI in Applications</h3><p>The heavy lifting mentioned above, which deals with determining the best approach to engage different agents and their skills to lead to an answer, is entirely encapsulated within the BroadAI MAS framework. So, from a developer’s standpoint, they need to pass the question to BroadAI and instantly receive a response.</p><p>The code looks something like below:</p><pre>/* Import BroadAI MAS Framework */<br>import BroadAI from &quot;broadai&quot;;<br><br>/* Import BroadAI Agents (custom agent Mangesh) */<br>import mangesh from &quot;broadai-agent-mangesh&quot;;<br><br>/* Import BroadAI Agents (from Agent Store) */<br>import financialAnalyst from &quot;broadai-agents/FinancialAnalyst&quot;; <br>import newsReporter from &quot;broadai-agents/NewsReporter&quot;;<br>import randomizer from &quot;broadai-agents/Randomizer&quot;;<br>import writer from &quot;broadai-agents/Writer&quot;;<br><br>const _QUESTION_ = req.body[&#39;q&#39;]; // assuming user&#39;s question is passed as an API body parameter<br><br><br>// Create an instance of BroadAI MAS framework<br>// .............................................<br>let broadai = new BroadAI(<br>  [mangesh.agent, financialAnalyst.agent, newsReporter.agent, randomizer.agent, writer.agent],<br>  { /* broadai configuration discussed later */ }<br>);<br><br>/* -- agent registration discussed later -- */<br><br><br>// *** MOST IMPORTANT PART OF BROADAI *** //<br>// Handoff user&#39;s question to BroadAI using .go() method<br>// .......................................................... <br>broadai.go(_QUESTION_, audit, conversationHistory)<br>  .then((response) =&gt; {<br>    res.json(response);<br>});</pre><p>Internally, the BroadAI MAS framework develops and executes the plan by identifying relevant use of agent skills. Refer to the examples shown previously to see what the plan steps entail. BroadAI MAS framework also takes the burden of identifying appropriate input values required for each skill to provide the necessary output. For example, from the first example above, the <em>FinancialAnalyst </em>agent’s<em> companyProfile</em> skill identifies the stock symbol as “INTC”, which it intelligently determines based on the company, “Intel”, found in the user’s question. Likewise, the <em>NewsReporter </em>agent’s <em>getHeadlines</em> skill requires country code (which it identifies as ‘US’) and news category (which it describes as ‘business’).</p><p>This low-code approach enables developers to focus on the application&#39;s core functionality. At the same time, the Generative AI aspects are encapsulated in a combination of the BroadAI MAS framework and the BroadAI Agentic framework that the agents leverage.</p><h3>Double-click on Agents</h3><p>The most advantageous feature of the BroadAI framework is the <a href="https://broad-ai.github.io/agent-store.html">Agent Store</a>. Although a limited number of agents are available at this point, you can develop and submit agents to be listed on their Agent Store. BroadAI provides a dedicated BroadAI Agentic framework to help you build your agents.</p><p>There is great potential to leverage BroadAI’s Agent Store as a monetization channel by publishing your agents. For example, the <em>NewsReporter</em> agent on the Agent Store requires users to sign up and obtain an API Key from <a href="https://newsapi.org/">newsapi.org</a>. Likewise, one could build and publish their agents, granting access via API Keys.</p><p>BroadAI’s Agentic framework <a href="https://broad-ai.github.io/docu-agentic.html">documentation</a> provides a <a href="https://broad-ai.github.io/assets/docs/agentic_template.js">template</a> to expedite building the agent. On a high level, creating an agent involves defining the skills an agent is expected to offer. An example of the agent I built for my use case is shown below:</p><pre>/* Import BroadAI Agentic Framework */<br>const Agentic = require(&#39;broadai/agentic&#39;);<br><br><br><br>/* Define Agent */<br>module.exports = {<br>  register: (broadaiConfig, agentConfig) =&gt; {<br>    agentic = new Agentic(broadaiConfig);<br>    params = agentConfig;<br>  },<br><br>  agent: {<br>    &quot;agent-name&quot;: &quot;Mangesh&quot;,<br>    &quot;capability&quot;: &quot;A digital-twin that has full knowledge of Mangesh Pise&#39;s experience and point-of-views expressed in his blogs.&quot;,<br>    &quot;skills&quot;: [<br>      {<br>        &quot;skill-name&quot;: &quot;referPublications&quot;,<br>        &quot;objective&quot;: &quot;upon identifing given question is a request for point-of-view, generate a PoV using your published blogs&quot;,<br>        &quot;action&quot;: referPublications,<br>        &quot;parameters&quot;: {<br>          &quot;topic&quot;: &quot;string | topic of conversation&quot;<br>        }<br>      },<br>      {<br>        &quot;skill-name&quot;: &quot;referExperience&quot;,<br>        &quot;objective&quot;: &quot;upon identifing given question is a job interview question, generate a professional interview-style response&quot;,<br>        &quot;action&quot;: referExperience,<br>        &quot;parameters&quot;: {<br>          &quot;question&quot;: &quot;string | interview question&quot;<br>        }<br>      }<br>    ]<br>  }<br>};<br><br><br>/* Implement Skills */<br>const referPublications = (topic)=&gt;{<br>...<br>};<br><br>const referExperience = (question)=&gt;{<br>...<br>};</pre><p>BroadAI Agentic framework provides multiple utility functions that help implement the skills. For example, one of the utility functions, called <em>callExternalResource()</em>, helps call external APIs to retrieve real-time data. In contrast, another utility function, <em>getGenAIResponse()</em>, utilizes LLM to perform the desired task. You could <a href="/service/mailto:broad.agents.ai@gmail.com?subject=Re%20creating%20our%20BroadAI%20Agent">contact</a> the BroadAI team for help if you need support creating an agent.</p><h3>Incorporating BroadAI Agents in BroadAI MAS</h3><p>BroadAI Agents, either custom-built using the BroadAI Agentic framework or from the Agent Store, are incorporated in your application via the BroadAI MAS framework, some parts of which we saw earlier. It is a two-way handshake, where the first step informs the BroadAI MAS instance about agents that will be involved, and the second step registers the agent with the required parameters and authentication. See below for an example:</p><pre>/** ***** ***** ***** ***** ***** ***** ***** <br>    This code is part of your application<br>***** ***** ***** ***** ***** ***** ***** **/<br><br>// Import BroadAI MAS Framework &amp; BroadAI Agents<br>import BroadAI from &quot;broadai&quot;;<br>import newsReporter from &quot;broadai-agents/NewsReporter&quot;;<br><br><br>// STEP 1: Inform BroadAI MAS instance about agents that will be involved<br>// ........................................................................<br>let broadai = new BroadAI(<br>/* broadai agents list */<br>[newsReporter.agent],<br>  { /* broadai configuration */ }<br>);<br><br><br>// STEP 2: Register agents with required parameters and authentication<br>// .....................................................................<br>newsReporter.register(broadai.config, { &quot;newsapi&quot;: env[&#39;newsapi&#39;] }); // refer agent documentation<br><br><br>// FINAL STEP: Handoff user&#39;s question to BroadAI using .go() method<br>// ................................................................... <br>broadai.go(_QUESTION_, audit, conversationHistory)<br>  .then((response) =&gt; {<br>    res.json(response);<br>});</pre><p>This approach provides an added benefit that new capabilities can be added via additional agents as they are either built or published, analogous to the learning ability of any person. As a result, a modular agentic approach is enforced that completely eliminates the application code management burden from the core application developer, and AI capabilities are encapsulated within agents supported by a solid framework.</p><h3>Conclusion</h3><p>Chat-based applications are just one example of using an agentic approach to incorporate Generative AI capabilities into your applications. Agentic workflows can be highly advantageous in many other applications. A few examples of applications powered by multi-talented agents are provided on <a href="https://broad-ai.github.io/demo.html">BroadAI’s demo page</a>. Finally, I’d like to conclude by highlighting some key benefits of using the Agentic approach, and specifically the BroadAI framework, to develop modern applications:</p><p>1. Drive autonomy and decision-making</p><p>2. Build task-oriented and goal-driven systems</p><p>3. Improve context awareness</p><p>5. Take a multi-step approach with complex intelligent reasoning</p><p>6. Incorporate dynamic interaction with external tools and real-time information</p><p>7. Improve collaboration between multiple systems which can be considered as autonomous agents</p><h3>Additional references:</h3><p><a href="https://broad-ai.github.io/">https://broad-ai.github.io/</a> — BroadAI framework home page</p><p><a href="https://youtu.be/v85IR2VoBNY">https://youtu.be/v85IR2VoBNY</a> — [Video] Why another Agentic framework?</p><p><a href="https://youtu.be/_lAbdhE9FaY">https://youtu.be/_lAbdhE9FaY</a> —[Video] BroadAI Multi-Agent System teaser</p><p><a href="https://medium.com/@mangeshpise/what-exactly-are-agents-in-the-context-of-agentic-ai-fd9318fd8e1a">https://medium.com/@mangeshpise/what-exactly-are-agents-in-the-context-of-agentic-ai-fd9318fd8e1a</a> — [PoV] What exactly are “Agents” in the context of Agentic AI?</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=64464edf0f9d" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[OpenAI’s Structured Outputs for API Responses]]></title>
            <link>https://mangeshpise.medium.com/openais-structured-outputs-for-api-responses-6e07d18ac839?source=rss-fa36301a8416------2</link>
            <guid isPermaLink="false">https://medium.com/p/6e07d18ac839</guid>
            <category><![CDATA[structured-llm-output]]></category>
            <category><![CDATA[openai]]></category>
            <category><![CDATA[ai-app-development]]></category>
            <category><![CDATA[json-schema]]></category>
            <category><![CDATA[generative-ai-development]]></category>
            <dc:creator><![CDATA[Mangesh Pise]]></dc:creator>
            <pubDate>Sat, 10 Aug 2024 21:07:41 GMT</pubDate>
            <atom:updated>2024-08-10T21:07:41.117Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*WIjdYXKmSQtR9K5CjEaqzw.png" /><figcaption>Source: https://openai.com/index/introducing-structured-outputs-in-the-api</figcaption></figure><p>As per a <a href="https://openai.com/index/introducing-structured-outputs-in-the-api/">publication released on August 6, 2024</a>, OpenAI has released additional support for structured outputs, specifically for JSON responses. I am going to briefly touch upon this update and provide a point-of-view on it’s usefulness and scope for improvement.</p><h3>Why this matters!</h3><p>Developers often deal with structured formats, such as JSON and YAML. More than just the format it is essential that the structure is well-defined to be used in application development. When working with Large Language Model (LLM) APIs provided by LLM providers, such as, OpenAI, Gemini, Anthropic, etc., we know that the general structure of the API responses is JSON-based. However, the actual LLM response is just a text / string typed field within the overall JSON response. For example, observe GPT-4’s response to the following API call:</p><pre>curl https://api.openai.com/v1/chat/completions \<br>  -H &quot;Content-Type: application/json&quot; \<br>  -H &quot;Authorization: Bearer $OPENAI_API_KEY&quot; \<br>  -d &#39;{<br>     &quot;model&quot;: &quot;gpt-4o-mini&quot;,<br>     &quot;messages&quot;: [{&quot;role&quot;: &quot;user&quot;, &quot;content&quot;: &quot;Say this is a test!&quot;}],<br>     &quot;temperature&quot;: 0.7<br>   }&#39;</pre><p>Notice the instructions (prompt) within <em>messages[0].content</em>, which does not request any specific format.</p><pre>{<br>    &quot;id&quot;: &quot;chatcmpl-abc123&quot;,<br>    &quot;object&quot;: &quot;chat.completion&quot;,<br>    &quot;created&quot;: 1677858242,<br>    &quot;model&quot;: &quot;gpt-4o-mini&quot;,<br>    &quot;usage&quot;: {<br>        &quot;prompt_tokens&quot;: 13,<br>        &quot;completion_tokens&quot;: 7,<br>        &quot;total_tokens&quot;: 20<br>    },<br>    &quot;choices&quot;: [<br>        {<br>            &quot;message&quot;: {<br>                &quot;role&quot;: &quot;assistant&quot;,<br>                &quot;content&quot;: &quot;\n\nThis is a test!&quot;<br>            },<br>            &quot;logprobs&quot;: null,<br>            &quot;finish_reason&quot;: &quot;stop&quot;,<br>            &quot;index&quot;: 0<br>        }<br>    ]<br>}</pre><p>If you notice, the actual LLM response available at <em>choices[0].message.content</em>, which happens to be a simple text response; it is challenging to use such a response in an actual application because there is no structure to that response (with the exception of a chat application, but remember, not all applications are chat-based applications).</p><h4>Prompting to the rescue</h4><p>The way to influence LLM to generate a structured response with specific structural elements, is by supplying specific formatting instructions in the prompt as shown below:</p><pre>curl https://api.openai.com/v1/chat/completions \<br>  -H &quot;Content-Type: application/json&quot; \<br>  -H &quot;Authorization: Bearer $OPENAI_API_KEY&quot; \<br>  -d &#39;{<br>     &quot;model&quot;: &quot;gpt-4o-mini&quot;,<br>     &quot;messages&quot;: [{&quot;role&quot;: &quot;user&quot;, &quot;content&quot;: &quot;Say this is a test! \nFormat as JSON using this structure: \n{ \&quot;statement\&quot;:\&quot;&lt;statement here&gt;\&quot; }&quot;}],<br>     &quot;temperature&quot;: 0.7<br>   }&#39;</pre><p>To which, LLM now generates a response within the <em>choices[0].message.content</em> field as follows:</p><pre>{<br>  &quot;id&quot;: &quot;chatcmpl-abc123&quot;,<br>  &quot;object&quot;: &quot;chat.completion&quot;,<br>  &quot;created&quot;: 1723316911,<br>  &quot;model&quot;: &quot;gpt-4o-mini&quot;,<br>  &quot;choices&quot;: [<br>    {<br>      &quot;index&quot;: 0,<br>      &quot;message&quot;: {<br>        &quot;role&quot;: &quot;assistant&quot;,<br>        &quot;content&quot;: &quot;```json\n{ \&quot;statement\&quot;: \&quot;This is a test!\&quot; }\n```&quot;<br>      },<br>      &quot;logprobs&quot;: null,<br>      &quot;finish_reason&quot;: &quot;stop&quot;<br>    }<br>  ],<br>  &quot;usage&quot;: {<br>    &quot;prompt_tokens&quot;: 31,<br>    &quot;completion_tokens&quot;: 15,<br>    &quot;total_tokens&quot;: 46<br>  },<br>  &quot;system_fingerprint&quot;: &quot;fp_xxxxxx&quot;<br>}</pre><p>While this seems achievable, it is not guaranteed that the actual response will follow the exact srtucture. Over a period of time, LLMs have gotten much better at understanding the formatting requirements and adhering to them.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/566/1*vl4189mydyg7T0Oa4C7Z_g.png" /><figcaption>Chart showing reliability (%) in adhering to instructed format and structure requirements</figcaption></figure><p>Irrespective if the structure is understood by LLM and that the format is generated or not, it is still a text / string response and additional handling is required to convert the original response into a JSON response.</p><h3>OpenAI’s Structured Outputs</h3><p>With the latest release of <strong>gpt-4o-2024–08–06</strong> and <strong>gpt-4o-mini-2024–07–18</strong>, structured JSON responses can be obtained. Refer this published article to learn more about the actual usage, i.e. — (1) tool calls, and (2) via request parameter.</p><p>In my humble opinion, tool calls are overrated and I have my own method to manage tool calls outside of the LLM calls in a structured, economical, and performance concious manner. So, I am especially interested in utilizing this feature further using the<em> response_format</em> parameter in the API call.</p><p>As per the article, the request payload is extended with an additional object called <strong><em>response_format</em></strong>, as shown below:</p><pre>curl https://api.openai.com/v1/chat/completions \<br>  -H &quot;Content-Type: application/json&quot; \<br>  -H &quot;Authorization: Bearer $OPENAI_API_KEY&quot; \<br>  -d &#39;{<br>     &quot;model&quot;: &quot;gpt-4o-mini-2024-07-18&quot;,<br>     &quot;messages&quot;: [{&quot;role&quot;: &quot;user&quot;, &quot;content&quot;: &quot;Say this is a test!&quot;}],<br>     &quot;response_format&quot;:{<br>      &quot;type&quot;: &quot;json_schema&quot;,<br>      &quot;json_schema&quot;: {<br>        &quot;name&quot;: &quot;test_response&quot;,<br>        &quot;strict&quot;: true,<br>        &quot;schema&quot;: {<br>          &quot;type&quot;: &quot;object&quot;,<br>          &quot;properties&quot;:{<br>            &quot;statement&quot;: {<br>              &quot;type&quot;: &quot;string&quot;<br>            }<br>          },<br>          &quot;required&quot;: [&quot;statement&quot;],<br>          &quot;additionalProperties&quot;: false<br>        }<br>      }<br>     },<br>     &quot;temperature&quot;: 0.7<br>   }&#39;</pre><p>This generates the following response where you must observe now that the <em>choices[0].message.content</em> field contains a stringified JSON structure that I expect:</p><pre>{<br>  &quot;id&quot;: &quot;chatcmpl-abc123&quot;,<br>  &quot;object&quot;: &quot;chat.completion&quot;,<br>  &quot;created&quot;: 1723322338,<br>  &quot;model&quot;: &quot;gpt-4o-mini-2024-07-18&quot;,<br>  &quot;choices&quot;: [<br>    {<br>      &quot;index&quot;: 0,<br>      &quot;message&quot;: {<br>        &quot;role&quot;: &quot;assistant&quot;,<br>        &quot;content&quot;: &quot;{\&quot;statement\&quot;:\&quot;This is a test!\&quot;}&quot;,<br>        &quot;refusal&quot;: null<br>      },<br>      &quot;logprobs&quot;: null,<br>      &quot;finish_reason&quot;: &quot;stop&quot;<br>    }<br>  ],<br>  &quot;usage&quot;: {<br>    &quot;prompt_tokens&quot;: 17,<br>    &quot;completion_tokens&quot;: 9,<br>    &quot;total_tokens&quot;: 26<br>  },<br>  &quot;system_fingerprint&quot;: &quot;fp_xxxxxx&quot;<br>}</pre><h3>Scope for Improvement</h3><p>First, notice the <em>response_format.type</em> field in the API request that is set to <strong>“json_schema”</strong>. It is immediately followed by the definition of the <em>json_schema.schema</em>, which in my opinion is a complex structure comprised of <em>type</em>, <em>properties</em>, and <em>required</em> fields. I wish there was a way to simplify this further by passing an example structure instead of this complex schema definition. For example, as shown below where one could set the <em>schema</em> value to an example and let the LLM figure out the structure:</p><pre>... <br>     &quot;response_format&quot;:{<br>      &quot;type&quot;: &quot;json_schema&quot;,<br>      &quot;json_schema&quot;: {<br>        &quot;schema&quot;: {<br>          &quot;statement&quot;: &quot;&lt;statement here&gt;&quot;<br>      },<br>      &quot;required&quot;: [&quot;statement&quot;],<br>      &quot;strict&quot;: true<br>     }<br>...</pre><p>Secondly, if the LLM knows I am expecting a JSON response, I wish the <em>choices[0].message.content</em> field adapts to generate the JSON format instead of stringified JSON format.</p><p>Lastly, I wish the format-enforcing capability could be passed directly through prompting itself. I feel that is most optimal approach from development standpoint instead of relying on specific LLM-provider’s API specifications.</p><h3>Conclusion</h3><p>Ultimately, I am just happy to see this feature and mainly to know that OpenAI desires to make their tools <em>development-friendly</em>. I have heightened hopes that soon this capability will be an even playing field with all LLM providers.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=6e07d18ac839" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[What exactly are “Agents” in the context of Agentic AI?]]></title>
            <link>https://mangeshpise.medium.com/what-exactly-are-agents-in-the-context-of-agentic-ai-fd9318fd8e1a?source=rss-fa36301a8416------2</link>
            <guid isPermaLink="false">https://medium.com/p/fd9318fd8e1a</guid>
            <category><![CDATA[agentic-ai]]></category>
            <category><![CDATA[business-app-development]]></category>
            <category><![CDATA[generative-ai-tools]]></category>
            <category><![CDATA[agent-based-modeling]]></category>
            <category><![CDATA[artificial-intelligence]]></category>
            <dc:creator><![CDATA[Mangesh Pise]]></dc:creator>
            <pubDate>Sat, 03 Aug 2024 19:08:56 GMT</pubDate>
            <atom:updated>2024-08-03T19:08:56.755Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ssT2w7gz3dCAHr6N8FE-hw.jpeg" /><figcaption>Image by Peggy und Marco Lachmann-Anke from Pixabay</figcaption></figure><p>Ever needed a specialist to do a certain job? An electrician to install a fusebox(?) or a travel agent to help plan your international trip(?) or a real-estate agent to show or sell houses(?) or an ENT specialist for a special health requirement(?) — these are just a few obvious examples of specialist from every day lives. But why are they qualified specialists? The intent of this blog is to dive deeper into the role and responsibilities of such specialists, typically referred to as “agents” in the context of modern software systems backed by Artificial Intelligence (AI).</p><h3>Agents in systems’ context</h3><p>Agents are <em>autonomous systems</em> that possess <em>specific skills</em>. They emulate a digital twin of a specialist, with well-defined boundaries of what they <em>can</em> and <em>can not</em> do. An agent in the systems’ context can either be designed to have well-defined knowledge of their skills, or it could be designed to learn through data, environment, or feedback from it’s human handler. Thus, an agent can be almost considered to be a microservice or an AI/ML system that can continously provide assured results, when engaged.</p><p>So, agents are autonomous systems that possess specific skills. But what does it do with those skills? or how to go about invoking those skills? That’s where <em>agentic tasks</em> (or <em>agentic actions</em>) come into play. Agentic actions serve as an interface to utilize an agent’s skills and provide results.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*_VxT5rOsMnQ5YE1Czv-_CA.png" /><figcaption><em>Figure representing autonomous Agents </em>with <em>specific Skills</em></figcaption></figure><p>Agentic actions, in a digital system, utilize various digital assets, such as, code with desired logic, API endpoints to either acquaint data or offload actions to an external system, or utilize an AI system to derive intelligent results, such as, predictions, classifications, generations, etc.</p><p>Such an agent must be capable to perform the expected actions and produce results on it’s own without any knowledge of or reliance on other agents. For example, an agent designed to be skilled at providing weather forecast, must be able to provide results by downloading historical weather data and performing regression, or simply by utilizing an API from an external system. During the entire weather prediction process, the agent must be <em>autonomous</em>.</p><p>Thus, Agents are <strong><em>autonomous</em></strong><em> systems</em> that possess <em>specific </em><strong><em>skills</em></strong> and <em>execute </em><strong><em>actions</em></strong> to perform the <em>expected </em><strong><em>service</em></strong>.</p><h3>Working of an Agentic AI system</h3><p>There is no one way to build an agentic system, <em>albeit</em>, adding intelligence to agents elevates the complexity in building such systems (constantly validating reliability, trust, and fairness). To best understand agent-oriented software development paradigm, it is best to understand object-oriented software development paradigm.</p><p>Object-Oriented Paradigm (OOP) is aimed at bringing some kind of organization to software development by representing real-world entities / “objects” and the behaviour / “methods” they can emulate in relation to the data presented (e.g. <em>get</em>Values / <em>set</em>Values). OOP is a development “tool” to support code-reusability, for example, through inheritence. For example, an <em>Animal </em>class with behaviors like <em>walk</em>, <em>talk</em>, etc. can be easily inherited by a <em>Dog</em> class such that the <em>walk</em> function / method can be used as-is, and the <em>talk</em> function could be used partially as-is and enhanced further via techniques like method-overloading. Later, multiple <em>Dog </em>objects can be created with individuality (e.g. their own name and color). Thus, OOP is mainly an approach where the desired logic is embedded in representaional objects and the main program flow uilizes each object to drive a certain behavior without any specific cognitive sense. Also, the developer must be fully aware of all the classes and it’s functions through well-written documentation as the objects cannot publish itself to the main program flow and let the flow decide which object and which of it’s method can be invoked.</p><p>Agent-Oriented Paradigm (AOP), on the other hand, is aimed at defining personalities with skills that can produce the expected results (not necessarily just manipulate the data). For example, a <em>Translator</em> agent would be designed with it’s <em>translate</em> skill to perform gramatically and cognitively accurate translations of any given text. Here, the “text” is not an object and “translate” is not it’s method, unlike in OOP. In many ways, an AOP represents an environment that constantly sets new goals and accomplishes those goals by engaging appropriate agents. Thus, unlike an OOP where objects cannot publish their methods, agents are able to publish themselves and dynamically engage with their specific skills.</p><p>To provide a good example of how AOP can be best leveraged, let’s consider a customer service function built in a software system. “Customer service”, in this case, is an environment where customers would arrive into to get some sort of support interacting with a given business. Such an environment would ideally have agents with specific skills, for example, an agent that can work with customer orders (placing and order, cancelling, etc.). Or an agent that can work with billing aspects (processing payments, issue refunds, etc.). Or an agent that can sell (show products, describe them in an exciting manner, figure out best deal / price, etc.). Imagining that you are able to visualize this picture of different agents in a room (environment), let’s bring in a customer who has ordered a widget that he wants to gift his wife for their anniversary. He is worried that it won’t reach there in time before their anniversary and therefore calls customer-service. A frontline agent starts interacting with the customer and now has a couple of options to help him. One option is to change the shipping speed, send a notification to the warehouse agent to prioritize shipping, and send a notification to the billing agent to process the additional shipping charge. Another option is to first check if the product is on backorder via the inventory management agent; and assuming it is so, an order management agent must cancel the order and handover the customer to the selling agent to help him find another product that is in the inventory and can reach the customer before their anniversary. Point-in-case being that the environment is working with the customer and other agents, unlike a strictly designed business process flow with only limited options that the developer or a business process owner might have thought through when designing the system.</p><h3>Role of GenerativeAI in Agentic AI systems</h3><p>There is a perfect combination of dynamism and cognition is required when utilizing agentic systems, or else a systems design might turn into a borderline monilth. This is where the Generative Artificial Intelligence (GenAI) practice of computer science comes into play since it can provide both, the <em>cognition</em> to understand the problem statement at hand, and <em>dynamism</em> to develop a plan to achieve the goal based on information available at that point in time.</p><p>However, please note that we are talking about “<strong><em>Agentic AI Systems”</em></strong> here and not “<strong><em>agents”</em></strong> themselves. Agents, <em>per se</em>, don’t have to be built as intelligent entities. They could utilize standard software development techniques, such as calling APIs for taking actions, retrieving and updating database records, reading or writing to a file, etc. Now, they can be intelligent, but they could use non-generative artificial intelligence techniques like deep-learning and utilizing algorithms for predictions, classifications, etc. And finally, yes, they can also utilize Generative AI if it comes to “generating” results. So, bottomline, Agents in an Agentic AI system have a wide spectrum of capabilities to represent a digital-twin of a real-world, agent-like figure. When developing agents, its best to focus on aspects of replicating the real-world agent rather than thinking of how they will be utilized (we will come to “<em>the how</em>” as well in a bit!). Keyword is <em>modular design</em>. So, again, when developing agents, don’t keep the end in mind; keep the possible behaviors in mind.</p><p>It is the Generative AI that will utilize these agents and one or more of it’s skills when it comes to the right problem statement. The true power of Generative AI will be to “think” and “plan” the best approach to solve a given problem. And when it knows it is ready to “act”, it would engage an Agent that demonstrates the required skill to perform that action succinctly. In the previous example with the customer service environment, the frontline agent takes appropriate decisions to engage its fellow agents, specialized in various aspects of business from sales, finance, shipping, etc. The frontline agent, thus, in that example, is the most viable consumer of Generative AI while the fellow agents would rely on backend system operations using microserices or traditional monolith applications.</p><h3>How to build Agentic AI systems?</h3><p>One approach is called “<strong><em>Multi-Agent System”</em></strong> (a.k.a. <strong>MAS</strong>) that, as the name suggests, utilizes multiple agents to provide desired outcomes.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*2wJ7UzKT5Vve_aIcrdhcAg.png" /><figcaption><em>Figure representing Multi-Agent System (MAS) interacting with Agents in an Agentic AI System</em></figcaption></figure><p>The multi-agent system (MAS) functions as the command center with full knowledge of all the skills available at it’s disposal. The MAS, is also inherrently capable to take up complex tasks and come up with a step-by-step approach to solve them by using those skills.</p><blockquote>An implementation using this form of MAS with Agentic AI workflow is <strong>BroadAI</strong> (<a href="https://broad-ai.github.io/">https://broad-ai.github.io/</a>). BroadAI implements an AOP approach such that developers using this framework are shielded from all the heavy-lifting of advanced Prompt Engineering, LLM grounding, AI explainability, etc. Check-out the <a href="https://youtu.be/_lAbdhE9FaY">teaser video on YouTube</a>.</blockquote><h3>Conclusion</h3><p>There is a great sense of hightened expectations from Agentic AI workflow patterns; and rightfully so, because who doesn’t enjoy modular architecture patterns? However, many ideas of agents are currently focused on over-skilling them (<em>adds cost, complexity</em>) and unnecessary exploitation of GenAI with function calling (<em>hinders maintainability</em>). Another challenge is around how we design agents (<em>digital twins</em>) and cross-agent interaction (<em>agent-to-agent vs hierarchial</em>). If we have learnt anything from point-to-point and many-to-many integration architecture patterns, it’s that it only adds complexity to not only build a system, but also operationalize after deploying them in Production. We need to give better thought at architecting AI solutions for speed, efficiency, and cost. So, I guess more work is required in developing applications with Agentic AI patterns, and if nothing else, the one key takeaway I’d like to highlight, is that a perfect combination of <em>dynamism</em> and <em>cognition</em> is required when utilizing <em>agentic</em> systems, or else a systems design might turn into a borderline <em>monilth</em>, which will put us a couple of years behind in the software development progress!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=fd9318fd8e1a" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[What does the evolution of GenAI look like?]]></title>
            <link>https://mangeshpise.medium.com/what-does-the-evolution-of-genai-look-like-10501a5cc167?source=rss-fa36301a8416------2</link>
            <guid isPermaLink="false">https://medium.com/p/10501a5cc167</guid>
            <category><![CDATA[generative-ai-tools]]></category>
            <category><![CDATA[gen-ai-revolution]]></category>
            <category><![CDATA[application-modernization]]></category>
            <category><![CDATA[development-framework]]></category>
            <dc:creator><![CDATA[Mangesh Pise]]></dc:creator>
            <pubDate>Mon, 10 Jun 2024 23:46:04 GMT</pubDate>
            <atom:updated>2024-06-10T23:46:04.552Z</atom:updated>
            <content:encoded><![CDATA[<p>So, what does the evolution of GenAI look like? This is an essential question because when we use words like “evolution,” we naturally associate it with a timeline, which usually goes in longer increments like months, years, or decades. But the evolution in Generative AI space is at very granular increments, i.e., weeks, months, or quarters.</p><p>Evolution can also be relative depending on what matters to us as progress, viz., token window supported by models, multi-modality between text and media, speed of model response, development patterns like RAG or agentic, etc.</p><p>So, let me explain the evolution through my hands-on experience and what I consider a significant evolution in the world of Generate AI. I believe that mere GenAI model maturity is not good enough. The best tool is valid only when “effectively applied” to the best use. Thus, it is equally vital that powerful development frameworks and patterns must be available to apply GenAI to the proper use case.</p><p>After extensively using Retrieval Augmented Generation (RAG) as a development pattern with Vector Databases, I thought this was it! Finally, we could tame this new LLM animal to produce reliable results through dynamic grounding by providing reliable “context”. But then, should every use case be forced to fit into a vectorization pattern? Maybe offline context such as documents, images, videos, etc. — yes. What about relatable knowledge?</p><p>So, I started experimenting with knowledge graphs as the context source to provide richer quality context for grounding. There — that’s my aha! moment. It is not just enough to pull “semantic” context but also critical to provide “quality” context for a reliable GenAI model response. For example, in a business setting, while RAG with a vector database can pull a PDF invoice to ground LLM, imagine the quality of the context if we could pull historical delivery details from the same vendor. Think about the relation chain in this context : (Invoice)&lt;-[raised_by]-(vendor)-&gt;[ships]-&gt;(delivery)-&gt;[contains]-&gt;(items). With a knowledge graph, we could pull all “useful” context elements to make up the relevant quality context for grounding the GenAI model. Of course, this may need the necessary evolution from the token window facet first. Also, this development pattern would rely on additional data management practices (e.g., ETL/ELT, CQRS, etc.) to populate and maintain a graph database with relevant information.</p><p>However, I still felt that something needed to be added to the use of Vector and Graph databases to build GenAI applications. What about real-time data? For the past decade, we have been touting microservices and APIs to create real-time systems, <em>albeit</em> efficient, event-based systems. So, why should we miss out on this asset to enrich GenAI use cases? The only challenge here was that many APIs are often parameterized (e.g., weather API signature being constant, the city being parametrized). Can we use LLM to help determine the best API and its parameters for a given question being asked? That’s when I conceptualized a development framework (called <a href="https://aidapter.web.app/home">AI-Dapter</a>) that does all the heavy lifting of API determination, calls APIs for results, and passes on everything as a context to a well-drafted LLM prompt that finally responds to the question asked. It was an absolute satisfaction watching it work, and helplessly, I must boast a little about how much overhead it reduced for me as a developer. If I were a regular full-stack developer, I could skip the steps of learning prompt engineering. My codebase would be minimal. Yet, I could provide full-GenAI capability in my application.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*0wFG-kCjdaqtKeAZCBhOWQ.png" /><figcaption>BroadAI: A multi-agent GenAI system development framework</figcaption></figure><p>Towards the end of this night project, I realized the world around GenAI had changed again (“evolved”). There is heavy impetus on a new concept called “Agentic” workflows. This idea makes sense; in a way, AI-Dapter was just a scratch on the surface and, for all sets and purposes, was a single-agent system (plug-in). But now, I had to catch on, mainly because the Multi-Agent System (MAS) approach resonates well with how we expect AI to enact humans. There are some fundamentals to be thought through here, though! That is, to understand what these agents should be and what they must do. Agents must support one or all of the following behaviors:</p><ul><li><strong>Planning</strong>, i.e., the ability to collect some thoughts and prepare an approach to solve the problem presented.</li><li><strong>Reflection</strong>, i.e., the ability to self-critique and refine the approach or response to ensure reliability.</li><li><strong>Multi-agent system</strong>, i.e., ability to know its fellow agents, their strengths and weaknesses, and coordinate with them as a collective unit.</li><li><strong>Tool use</strong>, i.e., the ability to use external tools if required, such as calling an API, making a database call, conducting an open web search, etc.</li></ul><h3>BroadAI: multi-agent system development framework</h3><p>So, I’m excited to introduce you to the next evolution, which I call “BroadAI” (<a href="https://broad-ai.github.io/">https://broad-ai.github.io/</a>). BroadAI is a multi-agent AI system development framework built on the same principles I cherish.</p><ul><li>Low-code developer accelerator for incorporating Generative AI in applications.</li><li>Plug-and-play agentic approach. The idea is to let you develop your own BroadAI agents for your private use or publish them for broader adoption of your application/services. Remember, someone else will build another Gen AI application and may need your services!</li><li>No need to be an expert in prompt engineering. Well-designed prompts are built into the BroadAI MAS framework. This means minimal code and a reduced learning curve.</li><li>BroadAI framework effectively utilizes multiple agentic design patterns, viz. Planning, Reflection, Multi-Agent system, and Tool use.</li><li>Build stateless and stateful (chat-like) applications by enabling configuration flags.</li></ul><h4>What should you do?</h4><p>If you are up to experimenting with building Agentic GenAI systems, I am sure you will like to try out BroadAI. So, do the following:</p><ul><li>Visit <a href="https://broad-ai.github.io/demo.html">https://broad-ai.github.io/demo.html</a> and try out the demo.</li><li>Visit <a href="https://broad-ai.github.io/docu-mas.html">https://broad-ai.github.io/docu-mas.html</a> to see how easily you can incorporate the framework into your application.</li><li>Visit <a href="https://broad-ai.github.io/agent-store.html">https://broad-ai.github.io/agent-store.html</a> to see a small list of published agents that you can quickly plug and play into your application.</li><li>Visit <a href="https://broad-ai.github.io/docu-agentic.html">https://broad-ai.github.io/docu-agentic.html</a> to build an agent from scratch for your private use or publish it and list it on the Agent Store.</li><li>Last, share your feedback, experience, and ideas! I genuinely believe the evolution of application development with GenAI capabilities can also be on a faster timeline.</li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=10501a5cc167" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>