<?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 Diwakar Tiwari on Medium]]></title>
        <description><![CDATA[Stories by Diwakar Tiwari on Medium]]></description>
        <link>https://medium.com/@tiwaridiwakar9?source=rss-28bdb063c811------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*Sch5lX5X8AUnHzZsModv0g.jpeg</url>
            <title>Stories by Diwakar Tiwari on Medium</title>
            <link>https://medium.com/@tiwaridiwakar9?source=rss-28bdb063c811------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sat, 28 Nov 2026 11:36:31 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@tiwaridiwakar9/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[RAG, Function Calling, MCP, and Semantic Kernel for .NET Developer]]></title>
            <link>https://medium.com/@tiwaridiwakar9/rag-function-calling-mcp-and-semantic-kernel-for-net-developer-03da8aada45b?source=rss-28bdb063c811------2</link>
            <guid isPermaLink="false">https://medium.com/p/03da8aada45b</guid>
            <category><![CDATA[mcp-server]]></category>
            <category><![CDATA[semantic-kernel]]></category>
            <category><![CDATA[rags]]></category>
            <category><![CDATA[llm-function-calling]]></category>
            <category><![CDATA[mcps]]></category>
            <dc:creator><![CDATA[Diwakar Tiwari]]></dc:creator>
            <pubDate>Sun, 31 May 2026 17:12:32 GMT</pubDate>
            <atom:updated>2026-06-01T02:12:22.628Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*8Ay_tbVERxZwm7QNyYxs7A.png" /></figure><h3>RAG, Function Calling, MCP, and Semantic Kernel for .NET Developer</h3><h4>My journey from confusion to understanding when to use RAG, Function Calling, MCP and Semantic Kernel in real-world AI applications</h4><p>Over the last few months, I’ve been exploring AI development using .NET. While learning about RAG, Function Calling, Semantic Kernel, and MCP, I found myself repeatedly asking the same question:</p><p>“If all of these help AI to interact with information outside the LLM, what’s the actual difference?”</p><p>Most articles explain each concept individually, but I struggled to understand where they fit together and why I would choose one over another.</p><p>This article is my attempt to explain these concepts in the simplest way possible from a .NET developer’s perspective.</p><h3>The Initial Confusion</h3><p>When I first started learning, this was my understanding:</p><ol><li>RAG retrieves information from external sources.</li><li>Function Calling retrieves information from external sources.</li><li>MCP retrieves information from external sources.</li></ol><p>At that point, they all sounded like different names for the same thing.</p><p>The reality is that they solve different problems.</p><h3>RAG: When AI Needs Knowledge</h3><p>Let’s start with the easiest one.</p><p>Suppose your company has:</p><ol><li>PDFs</li><li>Policy documents</li><li>Wiki pages</li><li>SharePoint content</li><li>Historical records</li></ol><p>A user asks:</p><p>“What is our supplier onboarding process?”</p><p>The answer already exists somewhere in those documents.</p><p>This is where RAG comes in.</p><p>RAG searches through your knowledge sources, finds the most relevant content, and provides that information to the LLM so it can generate an answer.</p><p>A simplified flow looks like this:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/310/1*fllee9YkT6-70IfcguSi4g.png" /></figure><p>The important thing I learned is that RAG is focused on retrieval. It helps the AI to find information, but it does not perform actions.</p><p>For example:</p><p>RAG can explain the supplier onboarding process, but RAG cannot create a supplier.</p><p>RAG can explain a leave policy, but RAG cannot approve leave.</p><p>The simplest mental model is:</p><p>RAG = Read</p><h3>Function Calling: When AI Needs to Do Something</h3><p>Function Calling is different.</p><p>Instead of searching for information, the AI can execute code that we expose.</p><p>For example:</p><ol><li>GetSupplier()</li><li>CreateSupplier()</li><li>SendEmail()</li><li>CreateOrder()</li></ol><p>When the AI decides it needs one of these capabilities, it calls the function.</p><p>Behind the scenes, that function might:</p><ol><li>Call an API</li><li>Query a database</li><li>Update a record</li><li>Send an email</li></ol><p>Unlike RAG, Function Calling can do both: retrieve information and perform actions.</p><p>This is where my confusion started.</p><p>If Function Calling can call APIs, retrieve information and perform actions, why do we need MCP?</p><h3>The Question That Confused Me About MCP</h3><p>My initial reaction to MCP was:</p><p>“If I can already call APIs through Function Calling, why introduce another layer?”</p><p>Coming from a traditional .NET background, Function Calling made immediate sense to me. I could use function to call an API, retrieve data, or perform an action.</p><p>Because of that, MCP felt unnecessary at first. I kept asking myself why I would create an MCP server when I could simply call the same APIs through Function Calling.</p><p>Then I started thinking about how applications integrate with each other today.</p><p>When one application needs to interact with another system, it typically does so through APIs. For example, if I want to create a Jira ticket from my application, I can call Jira’s REST APIs. The API acts as a standard contract between applications.</p><p>MCP started making more sense to me when I looked at it through a similar lens.</p><p>Just as APIs provide a standard way for applications to communicate with each other, MCP aims to provide a standard way for AI applications to discover and use capabilities exposed by other systems.</p><p>That was the point where MCP finally clicked for me.</p><p>That doesn’t mean MCP replaces Function Calling.</p><p>In fact, for many applications, Function Calling is still the simplest and most practical approach.</p><p>Suppose I’m building a single AI assistant for my organization, and I need to retrieve supplier information or create supplier records through an existing API. In that case, exposing functions such as GetSupplier() or CreateSupplier() and calling the API directly works perfectly fine.</p><p>The value of MCP becomes more apparent when multiple AI applications need access to the same capabilities.</p><p>For example, imagine a company has:</p><ol><li>An internal AI chatbot</li><li>A Teams Copilot extension</li><li>A customer support agent</li><li>A supplier support agent</li></ol><p>All of them need access to the same Supplier API.</p><p>Without MCP, each application would need its own integration layer and function definitions.</p><p>With MCP, the company can expose a Supplier MCP Server once and allow all AI clients to discover and use the same set of tools.</p><p>That was the point where I stopped thinking of MCP as a replacement for Function Calling and started seeing it as a standard way of sharing capabilities across multiple AI applications.</p><h3>How I Think About MCP Today</h3><p>Suppose a company has a Supplier Management System.</p><p>Traditionally, they might expose:</p><ol><li>GET /supplier/{id}</li><li>POST /supplier</li><li>PUT /supplier</li></ol><p>Applications consume these APIs.</p><p>With MCP, the company could expose tools such as:</p><ol><li>get_supplier</li><li>create_supplier</li><li>update_supplier</li></ol><p>through an MCP server.</p><p>AI applications can connect to the MCP server and understand what tools are available.</p><p>The key benefit is standardization.</p><p>Just as APIs became a standard way for applications to communicate, MCP aims to become a standard way for AI applications to consume capabilities.</p><p>I don’t see MCP as a replacement for APIs.</p><p>In many cases, the MCP server is still calling those same APIs behind the scenes.</p><p>The difference is that the interface is optimized for AI systems rather than traditional applications.</p><h3>Where Semantic Kernel Fits</h3><p>One mistake I initially made was thinking Semantic Kernel competed with RAG and MCP.</p><p>It doesn’t.</p><p>Semantic Kernel is more like an orchestration framework.</p><p>Imagine a user asks:</p><p>“Create a Jira ticket for a supplier onboarding issue.”</p><p>A workflow might look like this:</p><ol><li>Search onboarding documentation using RAG.</li><li>Extract relevant details.</li><li>Create a Jira ticket using a tool.</li><li>Request user approval.</li><li>Send a notification.</li></ol><p>Semantic Kernel helps coordinate these steps.</p><p>It sits above the individual capabilities and orchestrates the workflow.</p><h3><strong>My Current Mental Model</strong></h3><p>After spending time with all four concepts, this is the simplest way I remember them:</p><p>RAG = Read</p><p>Function Calling = Do</p><p>MCP = Standardized way for AI applications to discover and use tools</p><p>Semantic Kernel = Orchestrate</p><h3>Final Thoughts</h3><p>One thing that helped me was realizing that these technologies are not competing with each other.</p><p>In fact, a real-world AI application may use all of them together.</p><ol><li>RAG to retrieve knowledge.</li><li>Function Calling or MCP to perform actions.</li><li>Semantic Kernel to coordinate the workflow.</li></ol><p>Once I stopped asking which one was better and started asking which problem each one solves, the overall architecture became much easier to understand.</p><p>If you’re a .NET developer currently learning AI, I hope this perspective helps shorten the learning curve that I went through.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=03da8aada45b" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[.NET 8 Frozen Collections]]></title>
            <description><![CDATA[<div class="medium-feed-item"><p class="medium-feed-image"><a href="https://medium.com/@tiwaridiwakar9/dotnet8-frozen-collections-20bf848be061?source=rss-28bdb063c811------2"><img src="https://cdn-images-1.medium.com/max/2560/1*61ynm6zJCXlqXd02MOANfQ.png" width="2560"></a></p><p class="medium-feed-snippet">Understanding Frozen Collections in C#: Fast and Efficient Read-Only Data Structures</p><p class="medium-feed-link"><a href="https://medium.com/@tiwaridiwakar9/dotnet8-frozen-collections-20bf848be061?source=rss-28bdb063c811------2">Continue reading on Medium »</a></p></div>]]></description>
            <link>https://medium.com/@tiwaridiwakar9/dotnet8-frozen-collections-20bf848be061?source=rss-28bdb063c811------2</link>
            <guid isPermaLink="false">https://medium.com/p/20bf848be061</guid>
            <category><![CDATA[generics]]></category>
            <category><![CDATA[frozenset]]></category>
            <category><![CDATA[frozendictionary]]></category>
            <category><![CDATA[frozen-collections]]></category>
            <category><![CDATA[collections-in-c-sharp]]></category>
            <dc:creator><![CDATA[Diwakar Tiwari]]></dc:creator>
            <pubDate>Tue, 23 Jul 2024 04:59:04 GMT</pubDate>
            <atom:updated>2024-08-12T20:25:32.819Z</atom:updated>
        </item>
        <item>
            <title><![CDATA[Keyed Dependency Injection (DI) Services in .NET 8: A Comprehensive Guide]]></title>
            <description><![CDATA[<div class="medium-feed-item"><p class="medium-feed-image"><a href="https://medium.com/swlh/keyed-dependency-injection-di-services-in-net-8-a-comprehensive-guide-ca1e55566bae?source=rss-28bdb063c811------2"><img src="https://cdn-images-1.medium.com/max/2560/1*LeX2xLJk_GAzq1NLrerU0A.png" width="2560"></a></p><p class="medium-feed-snippet">Enhance Flexibility and Simplify Service Management with Keyed DI Services</p><p class="medium-feed-link"><a href="https://medium.com/swlh/keyed-dependency-injection-di-services-in-net-8-a-comprehensive-guide-ca1e55566bae?source=rss-28bdb063c811------2">Continue reading on The Startup »</a></p></div>]]></description>
            <link>https://medium.com/swlh/keyed-dependency-injection-di-services-in-net-8-a-comprehensive-guide-ca1e55566bae?source=rss-28bdb063c811------2</link>
            <guid isPermaLink="false">https://medium.com/p/ca1e55566bae</guid>
            <category><![CDATA[asp-net-core-tutorial]]></category>
            <category><![CDATA[keyed-di]]></category>
            <category><![CDATA[net-8-features]]></category>
            <category><![CDATA[dependency-injection]]></category>
            <category><![CDATA[design-patterns]]></category>
            <dc:creator><![CDATA[Diwakar Tiwari]]></dc:creator>
            <pubDate>Mon, 22 Jul 2024 14:21:11 GMT</pubDate>
            <atom:updated>2024-08-12T20:26:52.639Z</atom:updated>
        </item>
        <item>
            <title><![CDATA[Stored Procedures Vs Functions In SQL]]></title>
            <description><![CDATA[<div class="medium-feed-item"><p class="medium-feed-image"><a href="https://medium.com/swlh/stored-procedures-vs-functions-8da5c5bf592b?source=rss-28bdb063c811------2"><img src="https://cdn-images-1.medium.com/max/2560/1*9yIZN0rQJxYud7xvGKLtFA.png" width="2560"></a></p><p class="medium-feed-snippet">Exploring the Differences Between Stored Procedures and Functions in SQL&#x200A;&#x2014;&#x200A;Types, Differences, And Best Practices</p><p class="medium-feed-link"><a href="https://medium.com/swlh/stored-procedures-vs-functions-8da5c5bf592b?source=rss-28bdb063c811------2">Continue reading on The Startup »</a></p></div>]]></description>
            <link>https://medium.com/swlh/stored-procedures-vs-functions-8da5c5bf592b?source=rss-28bdb063c811------2</link>
            <guid isPermaLink="false">https://medium.com/p/8da5c5bf592b</guid>
            <category><![CDATA[input-parameter]]></category>
            <category><![CDATA[sql-stored-procedure]]></category>
            <category><![CDATA[function]]></category>
            <category><![CDATA[stored-procedure]]></category>
            <category><![CDATA[output-parameters]]></category>
            <dc:creator><![CDATA[Diwakar Tiwari]]></dc:creator>
            <pubDate>Sun, 02 Apr 2023 15:15:48 GMT</pubDate>
            <atom:updated>2023-04-02T15:25:45.054Z</atom:updated>
        </item>
        <item>
            <title><![CDATA[Type Casting in C#: Implicit vs Explicit]]></title>
            <description><![CDATA[<div class="medium-feed-item"><p class="medium-feed-image"><a href="https://medium.com/swlh/type-casting-implicit-vs-explicit-7e6fea5ba823?source=rss-28bdb063c811------2"><img src="https://cdn-images-1.medium.com/max/2560/1*J26sSmfmbgzXOV_CCbPI_Q.png" width="2560"></a></p><p class="medium-feed-snippet">Mastering Type Casting in C#: A Guide to Implicit and Explicit Conversion with Real-World Examples</p><p class="medium-feed-link"><a href="https://medium.com/swlh/type-casting-implicit-vs-explicit-7e6fea5ba823?source=rss-28bdb063c811------2">Continue reading on The Startup »</a></p></div>]]></description>
            <link>https://medium.com/swlh/type-casting-implicit-vs-explicit-7e6fea5ba823?source=rss-28bdb063c811------2</link>
            <guid isPermaLink="false">https://medium.com/p/7e6fea5ba823</guid>
            <category><![CDATA[implicit-casting]]></category>
            <category><![CDATA[explicit-casting]]></category>
            <category><![CDATA[data-conversion]]></category>
            <category><![CDATA[type-casting]]></category>
            <dc:creator><![CDATA[Diwakar Tiwari]]></dc:creator>
            <pubDate>Sun, 02 Apr 2023 14:49:36 GMT</pubDate>
            <atom:updated>2023-04-02T14:49:36.777Z</atom:updated>
        </item>
        <item>
            <title><![CDATA[Exploring the Key Components of .NET: CLR, CTS, and CLS]]></title>
            <description><![CDATA[<div class="medium-feed-item"><p class="medium-feed-image"><a href="https://medium.com/swlh/exploring-the-key-components-of-net-clr-cts-and-cls-9aabe8fa5364?source=rss-28bdb063c811------2"><img src="https://cdn-images-1.medium.com/max/2560/1*Ke0fHo6k56Wq67VNE6TyuQ.png" width="2560"></a></p><p class="medium-feed-snippet">The article explores the three key components of the&#xA0;.NET Framework: the Common Language Runtime (CLR), Common Type System (CTS), and CLS</p><p class="medium-feed-link"><a href="https://medium.com/swlh/exploring-the-key-components-of-net-clr-cts-and-cls-9aabe8fa5364?source=rss-28bdb063c811------2">Continue reading on The Startup »</a></p></div>]]></description>
            <link>https://medium.com/swlh/exploring-the-key-components-of-net-clr-cts-and-cls-9aabe8fa5364?source=rss-28bdb063c811------2</link>
            <guid isPermaLink="false">https://medium.com/p/9aabe8fa5364</guid>
            <category><![CDATA[common-language-runtime]]></category>
            <category><![CDATA[common-type-system]]></category>
            <dc:creator><![CDATA[Diwakar Tiwari]]></dc:creator>
            <pubDate>Sat, 01 Apr 2023 12:54:54 GMT</pubDate>
            <atom:updated>2023-04-01T13:01:45.230Z</atom:updated>
        </item>
        <item>
            <title><![CDATA[Common Table Expression In SQL Server]]></title>
            <description><![CDATA[<div class="medium-feed-item"><p class="medium-feed-image"><a href="https://medium.com/swlh/common-table-expression-in-sql-server-b998bd75fc7e?source=rss-28bdb063c811------2"><img src="https://cdn-images-1.medium.com/max/2560/1*y1Qx-myawjS55jlN9-PXDQ.png" width="2560"></a></p><p class="medium-feed-snippet">Mastering Common Table Expressions: Boost Your SQL Querying Skills</p><p class="medium-feed-link"><a href="https://medium.com/swlh/common-table-expression-in-sql-server-b998bd75fc7e?source=rss-28bdb063c811------2">Continue reading on The Startup »</a></p></div>]]></description>
            <link>https://medium.com/swlh/common-table-expression-in-sql-server-b998bd75fc7e?source=rss-28bdb063c811------2</link>
            <guid isPermaLink="false">https://medium.com/p/b998bd75fc7e</guid>
            <category><![CDATA[sql-cte]]></category>
            <category><![CDATA[common-table-expressions]]></category>
            <category><![CDATA[recursive-function]]></category>
            <category><![CDATA[recursive-cte]]></category>
            <category><![CDATA[database-optimization]]></category>
            <dc:creator><![CDATA[Diwakar Tiwari]]></dc:creator>
            <pubDate>Wed, 29 Mar 2023 13:25:16 GMT</pubDate>
            <atom:updated>2023-04-01T13:06:46.774Z</atom:updated>
        </item>
        <item>
            <title><![CDATA[Design Pattern — Dependency Injection]]></title>
            <description><![CDATA[<div class="medium-feed-item"><p class="medium-feed-image"><a href="https://medium.com/swlh/dependency-injection-b2fc92afa696?source=rss-28bdb063c811------2"><img src="https://cdn-images-1.medium.com/max/600/1*abp4OW0GiwhnOCNs4O0sDw.png" width="600"></a></p><p class="medium-feed-snippet">Whenever needed, ask for it don&#x2019;t create things yourself</p><p class="medium-feed-link"><a href="https://medium.com/swlh/dependency-injection-b2fc92afa696?source=rss-28bdb063c811------2">Continue reading on The Startup »</a></p></div>]]></description>
            <link>https://medium.com/swlh/dependency-injection-b2fc92afa696?source=rss-28bdb063c811------2</link>
            <guid isPermaLink="false">https://medium.com/p/b2fc92afa696</guid>
            <category><![CDATA[software-architecture]]></category>
            <category><![CDATA[dependency-injection]]></category>
            <category><![CDATA[software-engineering]]></category>
            <category><![CDATA[software-development]]></category>
            <category><![CDATA[programming]]></category>
            <dc:creator><![CDATA[Diwakar Tiwari]]></dc:creator>
            <pubDate>Sat, 20 Jun 2020 17:01:30 GMT</pubDate>
            <atom:updated>2020-06-24T13:01:08.897Z</atom:updated>
        </item>
        <item>
            <title><![CDATA[Design Principle — The SOLID Principles]]></title>
            <description><![CDATA[<div class="medium-feed-item"><p class="medium-feed-image"><a href="https://medium.com/@tiwaridiwakar9/solid-principles-2be3bcf96f78?source=rss-28bdb063c811------2"><img src="https://cdn-images-1.medium.com/max/600/1*z9_Coy7xg5OGXHeIe1I6ww.png" width="600"></a></p><p class="medium-feed-snippet">Software development is always challenging because you should need to write the code which is flexible, readable and the most important&#x2026;</p><p class="medium-feed-link"><a href="https://medium.com/@tiwaridiwakar9/solid-principles-2be3bcf96f78?source=rss-28bdb063c811------2">Continue reading on Medium »</a></p></div>]]></description>
            <link>https://medium.com/@tiwaridiwakar9/solid-principles-2be3bcf96f78?source=rss-28bdb063c811------2</link>
            <guid isPermaLink="false">https://medium.com/p/2be3bcf96f78</guid>
            <category><![CDATA[single-responsibility]]></category>
            <category><![CDATA[interface-segregation]]></category>
            <category><![CDATA[open-closed-principle]]></category>
            <category><![CDATA[dependency-inversion]]></category>
            <category><![CDATA[solid-principles]]></category>
            <dc:creator><![CDATA[Diwakar Tiwari]]></dc:creator>
            <pubDate>Thu, 11 Jun 2020 06:02:19 GMT</pubDate>
            <atom:updated>2020-06-11T10:01:43.476Z</atom:updated>
        </item>
        <item>
            <title><![CDATA[Design Principle — Dependency Inversion Principle]]></title>
            <description><![CDATA[<div class="medium-feed-item"><p class="medium-feed-image"><a href="https://medium.com/swlh/dependency-inversion-principle-54e5af4fcc05?source=rss-28bdb063c811------2"><img src="https://cdn-images-1.medium.com/max/600/1*vgTQJjlSPhf5kN9ErW9QYg.png" width="600"></a></p><p class="medium-feed-snippet">A common problem that you&#x2019;ll need to address when designing your application is dependency.</p><p class="medium-feed-link"><a href="https://medium.com/swlh/dependency-inversion-principle-54e5af4fcc05?source=rss-28bdb063c811------2">Continue reading on The Startup »</a></p></div>]]></description>
            <link>https://medium.com/swlh/dependency-inversion-principle-54e5af4fcc05?source=rss-28bdb063c811------2</link>
            <guid isPermaLink="false">https://medium.com/p/54e5af4fcc05</guid>
            <category><![CDATA[software-development]]></category>
            <category><![CDATA[design-principles]]></category>
            <category><![CDATA[solid-principles]]></category>
            <category><![CDATA[dependency-inversion]]></category>
            <category><![CDATA[idp]]></category>
            <dc:creator><![CDATA[Diwakar Tiwari]]></dc:creator>
            <pubDate>Sun, 07 Jun 2020 09:05:37 GMT</pubDate>
            <atom:updated>2020-06-11T12:25:09.558Z</atom:updated>
        </item>
    </channel>
</rss>