<?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 Rajesh Kumar Sahoo on Medium]]></title>
        <description><![CDATA[Stories by Rajesh Kumar Sahoo on Medium]]></description>
        <link>https://medium.com/@rajeshsahoo8100?source=rss-1df39ea28738------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*KitlFSg25GPUxBSCMoaAWA.jpeg</url>
            <title>Stories by Rajesh Kumar Sahoo on Medium</title>
            <link>https://medium.com/@rajeshsahoo8100?source=rss-1df39ea28738------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sat, 05 Dec 2026 09:35:46 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@rajeshsahoo8100/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[️ MCP Under the Hood: Architecture, Components, and How They Work Together]]></title>
            <link>https://medium.com/@rajeshsahoo8100/%EF%B8%8F-mcp-under-the-hood-architecture-components-and-how-they-work-together-b991416bcd4a?source=rss-1df39ea28738------2</link>
            <guid isPermaLink="false">https://medium.com/p/b991416bcd4a</guid>
            <category><![CDATA[json-rpc]]></category>
            <category><![CDATA[mcp-server]]></category>
            <category><![CDATA[mcp-client]]></category>
            <category><![CDATA[resources]]></category>
            <category><![CDATA[tools]]></category>
            <dc:creator><![CDATA[Rajesh Kumar Sahoo]]></dc:creator>
            <pubDate>Sun, 22 Nov 2026 13:23:06 GMT</pubDate>
            <atom:updated>2026-11-22T13:23:06.599Z</atom:updated>
            <content:encoded><![CDATA[<p>MCP provides a standardized way for AI applications to connect with external tools, data sources, and services, making integrations more structured and reusable.</p><p><strong>But what actually happens behind the scenes when an AI application uses MCP?</strong> 🤔</p><p>In this article, let’s go under the hood of MCP and break down its <strong>architecture, explore the key components such as Hosts, Clients, Servers and Data Layer</strong>, and understand how they work to enable communication between AI applications and the external world. 🔗</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*FBtnzehaMs1Il7dsTP56kg.png" /><figcaption>High-Level Architetcure of MCP</figcaption></figure><p>Below is the explanation of the Architecture:</p><p>Imaging a traveler asks an AI Assistant: “<strong>Find me flights from from BLR to NCE</strong>”</p><p>🏠 <strong>Host: The AI Application</strong> The Host is the application where the traveler interacts with the AI, such as a travel assistant. It coordinates the interaction with the LLM and MCP capabilities.</p><p>🧠 <strong>LLM: Understanding the Traveler’s Intent</strong> The LLM analyzes the traveler’s query and, when external context is required, instructs the Host to interact with the MCP Server when the information is not available in it’s trained data.</p><p>🔌 <strong>MCP Server: Connecting to Travel Capabilities</strong> The MCP Server exposes travel-related capabilities to the AI application, such as flight search, booking retrieval, fare information, or destination information, through MCP.</p><p>🔄 <strong>Host ↔ MCP Server Interaction</strong> When external travel information is required, the Host facilitates the interaction with the appropriate MCP Server.</p><p>💬 <strong>LLM: Turning Results into a Natural Response</strong> The returned travel information is provided back into the AI workflow, allowing the LLM to generate a traveler-friendly response such as: “I found three flight options to Paris.”</p><p>But there’s more under the hood. Does the Host really communicate directly with MCP Servers? 🤔</p><p>No. The Host doesn’t communicate with the MCP Server directly. Instead, it hosts and manages an <strong>MCP Client</strong>, which establishes the connection with the MCP Server. Since both the Client and Server communicate using the Model Context Protocol (MCP), they are referred to as the MCP Client and MCP Server.</p><p>So, in a nutshell, the <strong>diagram, “Complete Arch of MCP,”</strong> brings all the pieces together. The <strong>Host</strong> creates and manages <strong>MCP Clients</strong>, with each client maintaining a dedicated connection to a specific <strong>MCP Server</strong>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*IVWAr0ZwbEcBy6tcI8xH5w.jpeg" /><figcaption>HOST-CLEINT INTERACTION</figcaption></figure><p>Here’s how the interaction works:</p><p><strong>🔗 Client–Server Connection:</strong> Each MCP Client communicates with <strong>one specific MCP Server</strong>. A Host can manage multiple clients to connect with multiple servers.</p><p><strong>🧠 User Request:</strong> When a user submits a prompt, the <strong>Host and LLM determine what external context or capability is required</strong>. The Host is responsible for coordinating the LLM integration and MCP clients.</p><p><strong>📤 MCP Communication:</strong> The appropriate <strong>MCP Client communicates with the MCP Server using MCP protocol messages</strong>, allowing the Host to discover and invoke capabilities exposed by the server.</p><p><strong>🔄 Processing &amp; Response:</strong> The MCP Server processes the request and sends the result back via the MCP Client to the Host, enabling the LLM to transform the returned context into a user-friendly response.</p><p>In simple terms 👇</p><p>User → Host + LLM → MCP Client → MCP Server → External System → MCP Client → Host + LLM → User</p><p>🚀 <strong>So, Why Does MCP Client and Server Matter?</strong></p><ul><li><strong>Scalability:</strong> The Host can work with multiple MCP Clients and Servers to access different capabilities.</li><li><strong>Reusability:</strong> MCP Servers can expose capabilities that can be reused across different AI applications.</li><li><strong>Decoupling </strong>will be there which leads to safety and parallelism.</li></ul><p>Next, let’s explore the core<strong> primitives </strong>that power<strong> MCP interactions.</strong></p><p>🧩 <strong>Primitives</strong></p><p>Primitives are the core capabilities that an MCP Server exposes to the Host through the MCP Client. In simple terms, they define what the Server can provide or allow the AI application to do.</p><p>MCP Servers primarily expose three key primitives: <strong>Tools, Resources, and Prompts.</strong></p><p>🛠️ <strong>Tools</strong> <strong>Tools </strong>are executable functions that the AI can invoke to perform specific actions.</p><p>For example, a GitHub MCP Server could expose tools to:</p><ul><li>Retrieve active issues from a repository</li><li>Create or update an issue</li><li>Perform repository-related operations</li></ul><p>👉 Simply Tools =<strong> Actions the AI ask the server to perform.</strong></p><p>📚 <strong>Resources</strong></p><p><strong>Resources </strong>are structured data or content that the AI application can read and use as context.</p><p>For example, a GitHub MCP Server could expose repository content such as a <strong>README.md</strong> file as a resource and read it through one of the primitive operation(resources/read). The Host can retrieve this information through the MCP Client and provide it as context to the LLM for generating a relevant response.</p><p>👉 Simply Resources<strong> = Structured Data sources the AI can read.</strong></p><p>💬 Prompts</p><p><strong>Prompts </strong>are reusable, predefined prompt templates exposed by the MCP Server that help guide interactions with the AI model.</p><p>For example, a GitHub MCP Server could provide a prompt template for <strong>reviewing code, summarizing a repository, or analyzing an issue</strong>.</p><p>👉 Simply Prompts<strong> = Reusable instructions for the AI.</strong></p><p>💡 Easy way to remember: <strong>Tools → Act | Resources → Read | Prompts -&gt; Guide</strong></p><p><strong>List Of Primitive-Standard Operations</strong></p><p>MCP also gives couple of primitive based standard operations or functions to deal with the 3 primitives(tools, resources, prompts) so that the HOST can leverage the functions and get benefitted by the server.</p><p><strong>Operations for Tools:</strong></p><ul><li><strong>tools/list</strong>: Once the function <strong>“tools/list”</strong> is invoked it will list down all the tools present that the server have or can expose. For example we have the GitHub server and host invokes the tools/list function then the server can give a list/functions it has</li><li>t<strong>ools/call</strong>: Execute a specific tool with required arguments and parameters.</li></ul><p>✈️ Example: Calling a Flight Search Tool</p><p>Suppose the traveler asks: “<strong>Find flights from BLR to LHR.”</strong> The MCP Client can invoke a search_flights tool exposed by the MCP Server.</p><p>📤 MCP Client → Server Request</p><pre>{<br>  &quot;jsonrpc&quot;: &quot;2.0&quot;,<br>  &quot;id&quot;: 1,<br>  &quot;method&quot;: &quot;tools/call&quot;,<br>  &quot;params&quot;: {<br>    &quot;name&quot;: &quot;search_flights&quot;,<br>    &quot;arguments&quot;: {<br>      &quot;origin&quot;: &quot;BLR&quot;,<br>      &quot;destination&quot;: &quot;CDG&quot;<br>    }<br>  }<br>}</pre><p>📥 MCP Server → Client Response</p><pre>{<br>  &quot;jsonrpc&quot;: &quot;2.0&quot;,<br>  &quot;id&quot;: 1,<br>  &quot;result&quot;: {<br>    &quot;content&quot;: [<br>      {<br>        &quot;type&quot;: &quot;text&quot;,<br>        &quot;text&quot;: &quot;3 flights found from BLR to CDG.&quot;<br>      }<br>    ],<br>    &quot;isError&quot;: false<br>  }<br>}</pre><p>The “<strong>search_flights</strong>” tool is an illustrative travel example, while the tools/call, arguments, result, and content structure follows the MCP tool-calling pattern.</p><p><strong>Operations for Resources:</strong></p><ul><li><strong>resources/list</strong>: By executing the operation it lists all the static files present in the server to the MCP Client.</li><li><strong>resources/read</strong>: Executing the “resources/read” operation MCP Client can read the static files present in the server.</li><li><strong>resources/subscribe, resouces/unsubscribe</strong>: Allows the MCP Client to start or stop receiving notifications when a subscribed resource changes.</li></ul><p>🔍 Now that we know what MCP offers, let’s look under the hood at how these operations are exchanged through the <strong>MCP Data Layer</strong>.</p><p><strong>MCP Data Layer</strong></p><p>The Data layer is the language and grammar of the MCP Ecosystem that everyone agrees to communicate. In MCP <strong>JSON-RPC 2.0</strong> serves as the foundation of the data layer.</p><p>So, what powers this structured communication? This is where <strong>JSON-RPC 2.0</strong> comes into the picture. ⚙️</p><p><strong>JSON-RPC 2.0</strong></p><p>JSON-RPC 2.0 stands for Javascript Object Notation-Remote Procedure Call. It acts as the foundation of Data Layer as it provides the grammar and rules that is used to form MCP Request-Response.</p><p><strong>RPC, or Remote Procedure Call,</strong> allows an application to call a function running on another system almost as if it were available locally, abstracting the complexity of communication between the two systems.</p><p>In a nutshell, <strong>JSON-RPC 2.0 combines the concept of Remote Procedure Call (RPC)</strong> with the simplicity of JSON, enabling clients and servers to exchange structured requests and responses in JSON format. For every request sent from the MCP Client there has to be a Response from the MCP Server.</p><p>✈️ Example: <strong>Flight Search using JSON-RPC 2.0</strong></p><p><strong>Client Request:</strong> The client calls a remote searchFlights method server.</p><pre>{<br>  &quot;jsonrpc&quot;: &quot;2.0&quot;,<br>  &quot;id&quot;: 1,<br>  &quot;method&quot;: &quot;searchFlights&quot;,<br>  &quot;params&quot;: {<br>    &quot;origin&quot;: &quot;BLR&quot;,<br>    &quot;destination&quot;: &quot;CDG&quot;<br>  }<br>}</pre><p>Server Response to Client</p><pre>{<br>  &quot;jsonrpc&quot;: &quot;2.0&quot;,<br>  &quot;id&quot;: 1,<br>  &quot;result&quot;: {<br>    &quot;flightsFound&quot;: 3<br>  }<br>}</pre><p>💡 As per the above illustrated example, the client invokes searchFlights with travel parameters, and the server returns the result using the same request id, allowing the client to correlate the response with the original request where both MCP Client and MCP Server communicate using JSON-RPC 2.0.</p><p>🚀 <strong>Benefits of JSON-RPC 2.0 for Data Layer</strong></p><p>🔄 <strong>Bidirectional Communication:</strong> JSON-RPC enables both the MCP Client and MCP Server to initiate communication but as per the new version JSON-RPC also support <strong>MRTR(Multi Round-Trip Requests)</strong>.</p><p>📦 <strong>Batch Requests:</strong> JSON-RPC supports batching, allowing multiple requests to be grouped and sent together.</p><p>⚡ <strong>Lightweight:</strong> JSON-RPC uses a simple JSON-based message format, keeping communication lightweight and easy to process.</p><p>🚀 And that’s MCP under the hood! In the next article, we’ll take the journey further by exploring the MCP lifecycle and walking through the steps to build and deploy a Remote MCP Server. Stay tuned!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=b991416bcd4a" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Introduction To MCP: Connecting LLMs to the Real World]]></title>
            <link>https://medium.com/@rajeshsahoo8100/introduction-to-mcp-connecting-llms-to-the-real-world-fa7acc3574ef?source=rss-1df39ea28738------2</link>
            <guid isPermaLink="false">https://medium.com/p/fa7acc3574ef</guid>
            <category><![CDATA[fragmentation]]></category>
            <category><![CDATA[calling-function]]></category>
            <category><![CDATA[mcps]]></category>
            <category><![CDATA[benefits]]></category>
            <category><![CDATA[context-assembly]]></category>
            <dc:creator><![CDATA[Rajesh Kumar Sahoo]]></dc:creator>
            <pubDate>Sun, 30 Aug 2026 13:35:08 GMT</pubDate>
            <atom:updated>2026-08-30T13:35:08.196Z</atom:updated>
            <content:encoded><![CDATA[<p><strong>“What if your LLM could connect, communicate, and act on the real world? Meet MCP — the connector between intelligence and action.”</strong></p><p>ChatGPT was launched on November 30, 2022. Its arrival marked a major turning point in the adoption of AI, as people across the world began using AI tools to boost productivity, simplify everyday tasks, and solve problems more efficiently.</p><p>Following this rapid adoption, major technology companies started integrating AI capabilities into their products and platforms. AI was no longer limited to standalone chatbots like ChatGPT — it began appearing across productivity tools, communication platforms, search engines, coding environments, and enterprise applications. This made AI more accessible and allowed users to leverage its capabilities directly within the tools they were already using.</p><p>However, a new challenge quickly emerged.</p><p>An LLM can reason and generate responses, but to perform meaningful tasks in the real world, it needs access to the right <strong>context, data, tools, and external systems</strong>. Connecting an LLM to all these different systems often required custom integrations, APIs, authentication mechanisms, and tool-specific implementations.</p><p>This resulted in a major problem called “<strong>FRAGMENTATION”.</strong></p><h3>The Problem of Fragmentation</h3><p>The problem of fragmentation emerged as we started adopting multiple AI tools and assistants, each designed to work within its own ecosystem.</p><p>For example, consider a developer working in <strong>VS Code</strong>. The AI assistant inside VS Code can understand the codebase and perform tasks within its capabilities. But what happens when the developer needs additional context from systems outside VS Code, such as <strong>GitHub or Confluence</strong>?</p><p>The developer often has to switch between different tools, find the required information, copy the relevant data, and paste it into the AI assistant to get a meaningful or structured response.</p><p>This constant switching between applications and manually moving context from one system to another creates <strong>fragmentation</strong> — the AI may be intelligent, but it doesn’t automatically have access to all the context and tools needed to complete the task. So, what is context? 🤔</p><h3>What is Context?</h3><p>Context is everything an AI can see when it generates a response.</p><p>The most formatted definition of context is <em>“</em><strong><em>Context is everything that the LLM uses to generate a structured response to the user’s query</em></strong><em>”. </em>And most probably the conversation history or the chat response acts as the context that the LLM uses to give a response<em>.</em></p><p>Example of how Context is used to generate an response and which it lead to creation of Function calling by Open AI and MCP by Anthropic.</p><p>Imagine a developer wants to build a <strong>security feature</strong> for a particular product using ChatGPT. The developer may have to go through the following steps:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*jNNtNxeq6ClZRdSILaj2ug.png" /><figcaption>Context-gathering</figcaption></figure><p><strong>1. JIRA — Understand the requirement</strong></p><p>First, the developer visits the JIRA board to understand the feature requirements, acceptance criteria, and other relevant details. The required information is copied and pasted into ChatGPT as context.<br><strong>2. GitHub — Understand the existing implementation</strong></p><p>Next, the developer goes to GitHub to look for existing implementations, related repositories, or similar features that could be used as a reference. The relevant code and information are then copied and provided to ChatGPT.</p><p><strong>3. MySQL — Gather relevant data</strong></p><p>The developer may then need to query a MySQL database to retrieve additional information required to understand the existing system or implement the feature correctly. Again, the relevant information has to be manually extracted and provided to the LLM.</p><p><strong>4. Google Drive — Retrieve documentation and security guidelines</strong></p><p>The developer checks Google Drive for documentation, security guidelines, architectural decisions, or other internal documents that could influence how the feature should be implemented. The relevant information is once again copied and supplied as context.</p><p><strong>5. Teams/Slack — Gather additional knowledge</strong></p><p>Finally, the developer may need to communicate with teammates through Teams or Slack to clarify requirements, understand previous decisions, or gather additional domain knowledge that may not be documented anywhere else.</p><p>After going through all these systems, the developer finally provides the accumulated context to ChatGPT and asks the actual question.</p><p>This process can certainly help the LLM generate a better response — but it comes with several limitations and disadvantages. Below are the limitations:</p><ul><li>It takes so much time to manually copy-paste the context/information from multiple external sources which is painful.</li><li>Context becomes scattered as a result <strong>“Developers become Human APIs”.</strong></li><li>Context Assembly Time &gt; Development Time</li><li>Scaling becomes difficult because if the no of external sources increases then it becomes difficult and painful to copy &amp; paste the data from large no of sources which is not scalable because in real software industry scenarios context can be the entire system.</li></ul><p>This lead to the discovery of Function/Tool Calling in the mid of 2023 by Open AI</p><h3><strong>Function Calling</strong></h3><p>Function Calling is a way in which LLM can connect to the external resources to grab data and information to use them as a context by using Functions.</p><p>After the function calling now LLM was not used for chatting only but it was used to automate tasks as it was capable of executing certain tasks given by the user</p><p>Rise of Tools</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*KHCQhnTmYswBwSajeKWkHA.png" /><figcaption>Function/Tool Calling</figcaption></figure><p>With <strong>Function Calling</strong>, the LLM only needs to understand the user’s prompt and invoke the appropriate tool or function, which then executes the task requested by the user.</p><p>Now, building the security feature becomes much easier. The manual process of gathering context through copy-pasting starts to fade away. We can define functions for each external source, such as <strong>JIRA, GitHub, MySQL, Google Drive, or Slack</strong>.</p><p>The LLM can then determine which function it needs to invoke based on the user’s request, retrieve the relevant information from the appropriate source, and use that context to generate a structured response.</p><h3><strong>Limitations of Function Calling</strong></h3><p>However, <strong>Function Calling</strong> also comes with its own set of limitations. Let’s understand this with an example.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*YJDVfRuBr4qkwF0EuqF_AQ.png" /></figure><p>As shown in the image above, imagine a company where developers use <strong>three different AI assistants</strong> for development. Each AI assistant needs to have its own functions or integrations to connect with external resources such as databases, GitHub, JIRA, Slack, and other systems.</p><p>This creates a scalability problem:</p><p>If we have “<strong>N” </strong>no of <strong>AI assistants</strong> and “<strong>M” </strong>no of<strong> external resources</strong>, we potentially need <strong>N × M integrations</strong> to connect every assistant with every resource.</p><p>For example, if a company has <strong>10 AI assistants</strong> and <strong>20 external resources</strong>, it could require up to <strong>200 individual integrations</strong>.</p><p>As the number of AI assistants and external resources continues to grow, maintaining these integrations becomes increasingly complex, expensive, and difficult to scale. A company could end up spending significant development effort simply building and maintaining integrations between AI assistants and external systems.</p><p><strong>“But if every application has to implement its own functions and integrations for every external system, haven’t we simply moved the fragmentation problem somewhere else?”</strong></p><p>Problem Of Fragmentation → Problem of Context Assembly → Integration Problem</p><p><strong>What if we could reduce N × M integrations to N + M? And this is where MCP comes into the playground.</strong></p><h3><strong>MCP(Model Context Protocol)</strong></h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*t9ziuI2V8xFs5gdbGScuYg.jpeg" /><figcaption>Model Context Protocol</figcaption></figure><p><strong>MCP (Model Context Protocol)</strong> is an open protocol that standardizes how AI applications connect with external tools, data sources, and services.</p><p>At a high level, MCP has two primary components: <strong>MCP Client</strong> and <strong>MCP Server</strong>.</p><p><strong>MCP Client</strong> is the component inside an AI application or agent that establishes a connection with an MCP server. It enables the AI application to discover and use the tools, resources, and capabilities exposed by that server.</p><p><strong>MCP Server</strong> acts as a bridge between the AI application and an external system such as GitHub, JIRA, a database, Google Drive, Slack, or any other service.</p><p>The communication between the MCP client and MCP server follows the <strong>Model Context Protocol (MCP)</strong>. Instead of every AI assistant requiring a separate, custom integration with every external system, MCP provides a standardized way for AI applications to discover and interact with these capabilities.</p><p>The diagram below illustrates how <strong>MCP Clients and MCP Servers</strong> work together:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*I8z9no_eeXr52nta7vZaGQ.png" /></figure><h3>Function Calling vs MCP — A Simple Example</h3><p>Let’s take a simple example: <strong>getting the current weather for a city</strong>.</p><h4>1. Function Calling</h4><p>With Function Calling, the developer typically defines a function that knows how to interact with the weather API:</p><pre>import requests</pre><pre>def get_weather(city):<br>    response = requests.get(<br>        &quot;https://api.weather.com/current&quot;,<br>        params={&quot;city&quot;: city}<br>    )<br>    return response.json()</pre><p>The function is then provided to the LLM as an available tool. When a user asks:</p><blockquote><em>“What is the weather in Bengaluru?”</em></blockquote><p>the LLM can decide to call get_weather(&quot;Bengaluru&quot;).</p><p>The application executes the function, retrieves the weather data, and sends the result back to the LLM so it can generate the final response.</p><p>The important point here is that <strong>the application developer is responsible for defining and maintaining this function and its integration with the weather API.</strong></p><h4>2. MCP</h4><p>With MCP, the weather capability can instead be exposed through an <strong>MCP Server</strong>.</p><p>The MCP server contains the logic required to communicate with the weather API and exposes a standardized tool such as:</p><pre>@mcp.tool()<br>def get_weather(city: str):<br>    &quot;&quot;&quot;Get the current weather for a city.&quot;&quot;&quot;<br>    return weather_api.get_current_weather(city)</pre><p>The AI application acts as the <strong>MCP Client</strong> and can discover the tool exposed by the MCP Server.</p><p>When the user asks:</p><blockquote><em>“What is the weather in Bengaluru?”</em></blockquote><p>the AI application can discover and invoke the get_weather tool through MCP, receive the result, and use it to generate the response.</p><p>The key difference is that <strong>MCP standardizes the communication between the AI application and the external capability</strong>, allowing the same MCP Server to potentially be reused by different MCP-compatible AI applications.</p><h3><strong>Benefits Of using MCP</strong></h3><ul><li>No maintenance overhead required which was required in function calling as it was a repetitive task.</li><li>Reduced cost and time wastage.</li><li>Better security.</li><li>In function calling we used to have N x M integration but in MCP we will have N+M no of integrations.</li></ul><p><strong>We’ve understood the “why” behind MCP. In the next articles, let’s dive into the “how” — exploring its architecture, internal working, and practical implementation.</strong></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=fa7acc3574ef" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Vector Databases: The Backbone of Modern AI Applications]]></title>
            <link>https://medium.com/@rajeshsahoo8100/vector-databases-the-backbone-of-modern-ai-applications-14186a8b7959?source=rss-1df39ea28738------2</link>
            <guid isPermaLink="false">https://medium.com/p/14186a8b7959</guid>
            <category><![CDATA[rags]]></category>
            <category><![CDATA[chromadb]]></category>
            <category><![CDATA[vector-database]]></category>
            <category><![CDATA[pinecone]]></category>
            <category><![CDATA[artificial-intelligence]]></category>
            <dc:creator><![CDATA[Rajesh Kumar Sahoo]]></dc:creator>
            <pubDate>Wed, 15 Apr 2026 05:04:20 GMT</pubDate>
            <atom:updated>2026-04-15T05:09:53.735Z</atom:updated>
            <content:encoded><![CDATA[<h3>Introduction</h3><p>Imagine you’re searching for “a cozy mystery novel set in a small English village” on a bookstore website. A traditional search engine would hunt for those exact words in titles and descriptions. But what you <em>really</em> want is for the system to <em>understand</em> what you mean — and surface books like <em>Agatha Christie’s Miss Marple series</em>, even if none of those specific words appear in the description.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/318/1*uqsaBWPqiSpn_YkBDLxh5w.jpeg" /><figcaption>Vector DB</figcaption></figure><p>This is the gap that <strong>vector databases</strong> fill. They don’t just match keywords — they understand meaning. And in the age of large language models, recommendation engines, and AI-powered everything, they’ve become one of the most critical pieces of infrastructure in modern tech.</p><p>Let’s start from the very beginning.</p><h3>Part 1: What Is a Vector?</h3><p>Before we can understand vector databases, we need to understand vectors.</p><p>In mathematics, a vector is simply an ordered list of numbers. For example:</p><pre>[0.25, -0.81, 0.44, 0.12, ...]</pre><p>In machine learning, these numbers represent something profound: <strong>meaning encoded as coordinates in high-dimensional space</strong>.</p><p>When a neural network processes a sentence like <em>“The cat sat on the mat”</em>, it doesn’t work with words directly. It converts each word — or the entire sentence — into a dense list of floating-point numbers, often 768 or 1536 dimensions long. This is called an <strong>embedding</strong>.</p><p>The magic? Semantically similar things end up as vectors that are <em>close together</em> in this high-dimensional space. So:</p><ul><li>“dog” and “puppy” → nearby vectors</li><li>“Paris” and “France” → related vectors (just like “Berlin” and “Germany”)</li><li>“happy” and “joyful” → almost identical vectors</li></ul><p>This spatial relationship is the key to everything vector databases do.</p><h3>Part 2: What Is a Vector Database?</h3><p>A <strong>vector database</strong> is a specialized storage system built to:</p><ol><li><strong>Store</strong> high-dimensional vector embeddings efficiently</li><li><strong>Index</strong> them so similarity searches are fast, even across millions of records</li><li><strong>Query</strong> them using <em>approximate nearest neighbor (ANN)</em> search — finding vectors closest to a given query vector</li></ol><p>Unlike traditional relational databases that excel at exact lookups (WHERE id = 42), vector databases are optimized for questions like: <em>&quot;What are the 10 most similar items to this one?&quot;</em></p><p>This type of query is called a <strong>k-Nearest Neighbor (kNN)</strong> search, and it’s the foundation of everything from recommendation systems to AI chatbots with memory.</p><h3>Part 3: How Does a Vector Database Work Internally?</h3><h4>Step 1 — Generating Embeddings</h4><p>Data (text, images, audio, video) is passed through an embedding model such as:</p><ul><li><strong>OpenAI’s text-embedding-3</strong> for text</li><li><strong>CLIP</strong> for images and text together</li><li><strong>Whisper embeddings</strong> for audio</li></ul><p>The model outputs a vector — a numerical fingerprint that captures the semantic content.</p><h4>Step 2 — Indexing with ANN Algorithms</h4><p>Doing an exact nearest-neighbor search across millions of vectors is computationally expensive. Vector databases use clever indexing algorithms to approximate this at scale:</p><ul><li><strong>HNSW (Hierarchical Navigable Small World)</strong> — Builds a graph structure where each node connects to its nearest neighbors. Navigation happens in logarithmic time. Used by Weaviate, Qdrant, and pgvector.</li><li><strong>IVF (Inverted File Index)</strong> — Clusters vectors into groups; search is limited to the most relevant clusters. Used by Faiss and Pinecone.</li><li><strong>LSH (Locality-Sensitive Hashing)</strong> — Hashes similar vectors into the same bucket for fast lookups.</li></ul><p>The tradeoff is precision vs. speed. Most production systems accept ~95–99% accuracy for a 100x speedup.</p><h4>Step 3 — Similarity Metrics</h4><p>When searching, the database computes distance between vectors using:</p><ul><li><strong>Cosine Similarity</strong> — Measures angle between vectors; ideal for text (ignores magnitude)</li><li><strong>Euclidean Distance (L2)</strong> — Straight-line distance in space</li><li><strong>Dot Product</strong> — Often used when vectors are normalized</li></ul><h3>Part 4: Leading Vector Databases Today</h3><p>The ecosystem has exploded in the last few years. Here are the major players:</p><p><strong>Pinecone, Weaviate</strong>, Q<strong>drant</strong>, <strong>Chroma, Milvus, pgvector, Redis VSS etc.</strong></p><h3>Part 5: Real-World Applications</h3><p>This is where vector databases go from interesting to <em>transformative</em>.</p><h4>1. Semantic Search</h4><p>Traditional search engines match keywords. Semantic search understands <em>intent</em>.</p><p>A user typing <em>“how do I fix a leaky pipe”</em> should surface results about plumbing repairs — even if none of those words appear. By embedding both the query and the document chunks as vectors, the system finds the most semantically relevant results regardless of exact wording.</p><p><strong>Used by:</strong> Notion AI, Elastic, Algolia’s NeuralSearch</p><h4>2. Retrieval-Augmented Generation (RAG)</h4><p>This is arguably the biggest use case right now. Large language models (LLMs) have a knowledge cutoff and limited context windows. RAG solves both problems:</p><ol><li>Chunk your documents and embed them into a vector database</li><li>When a user asks a question, embed the question and retrieve the most relevant chunks</li><li>Feed those chunks + the question to an LLM to generate a grounded answer</li></ol><p>This is how <strong>ChatGPT Plugins</strong>, <strong>Perplexity AI</strong>, and countless enterprise AI assistants work. The vector database is the long-term memory of the AI.</p><h4>3. Recommendation Systems</h4><p>Netflix, Spotify, Amazon — they all represent users and items as vectors.</p><ul><li>Your listening history → user embedding</li><li>Each song → song embedding</li><li>Recommend songs whose vectors are closest to your user vector</li></ul><p>This approach captures <em>taste</em>, not just genre tags. It’s why Spotify can recommend an obscure track you’ve never heard of but instantly love.</p><h4>4. Image and Multimodal Search</h4><p>Using models like CLIP (which embeds both text and images into the same vector space), you can:</p><ul><li>Search a photo library with natural language: <em>“sunset over mountains”</em></li><li>Find visually similar products in e-commerce</li><li>Power reverse image search</li></ul><p><strong>Used by:</strong> Pinterest, Shutterstock, Google Lens</p><h4>5. Anomaly Detection</h4><p>In fraud detection and cybersecurity, normal behavior forms a cluster of vectors. Anomalous events are vectors far from that cluster.</p><p>A banking system can embed each transaction as a vector and flag those that fall outside the expected neighborhood — without needing hand-coded rules for every possible fraud pattern.</p><h4>7. Conversational AI with Long-Term Memory</h4><p>Standard LLM conversations forget everything when the session ends. By storing each conversation turn as an embedding in a vector database, AI assistants can:</p><ul><li>Recall what you told them weeks ago</li><li>Surface relevant past context automatically</li><li>Become genuinely personalized over time</li></ul><h3>Part 6: Getting Started — A Simple Example</h3><p>Here’s how you’d use <strong>Chroma</strong> (the simplest local vector DB) with Python to build a basic semantic search:</p><pre>import chromadb<br>from chromadb.utils import embedding_functions<br><br># Initialize client<br>client = chromadb.Client()<br><br># Use OpenAI embeddings<br>openai_ef = embedding_functions.OpenAIEmbeddingFunction(<br>    api_key=&quot;your-api-key&quot;,<br>    model_name=&quot;text-embedding-3-small&quot;<br>)<br><br># Create a collection<br>collection = client.create_collection(<br>    name=&quot;articles&quot;,<br>    embedding_function=openai_ef<br>)<br><br># Add documents<br>collection.add(<br>    documents=[<br>        &quot;Vector databases store high-dimensional embeddings.&quot;,<br>        &quot;Machine learning models convert text into numbers.&quot;,<br>        &quot;Recommendation systems use similarity search.&quot;<br>    ],<br>    ids=[&quot;doc1&quot;, &quot;doc2&quot;, &quot;doc3&quot;]<br>)<br><br># Query<br>results = collection.query(<br>    query_texts=[&quot;How do AI systems understand meaning?&quot;],<br>    n_results=2<br>)<br><br>print(results)</pre><h3>Part 7: Challenges and Limitations</h3><p>Vector databases aren’t a silver bullet. Key challenges include:</p><ul><li><strong>Embedding quality</strong> — Garbage in, garbage out. The quality of your embeddings determines search quality.</li><li><strong>Dimensionality curse</strong> — As dimensions increase, distance metrics become less meaningful. Careful model selection matters.</li><li><strong>Approximate results</strong> — ANN search trades perfect accuracy for speed. For some use cases (legal, medical), this may be unacceptable.</li><li><strong>Cost at scale</strong> — Storing and searching billions of high-dimensional vectors is expensive. Compression techniques like <strong>Product Quantization (PQ)</strong> help.</li><li><strong>No native ACID transactions</strong> — Vector databases aren’t designed for financial-grade transactional consistency.</li></ul><h3>Conclusion</h3><p>Vector databases represent a fundamental shift in how we think about storing and querying information. We’ve moved from asking <em>“Does this record match this pattern?”</em> to asking <em>“What does this mean, and what else is like it?”</em></p><p>As AI becomes embedded in every product and every workflow, the systems that understand meaning — not just keywords — will define the next generation of software. Vector databases are the quiet infrastructure powering that shift: the memory behind AI assistants, the engine behind recommendation systems, the index behind semantic search.</p><p>If you’re building anything AI-adjacent in 2025 and beyond, understanding vector databases isn’t optional. It’s foundational.</p><p><em>If you found this helpful, give it a clap 👏 and follow for more deep-dives into AI infrastructure, MCP etc…<br></em>Artificial Intelligence, Machine Learning, Vector Database, RAG, Data Engineering, LLM, AI Applications</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=14186a8b7959" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[HealthSage(RAG Powered AI Medical Assistant)]]></title>
            <link>https://medium.com/@rajeshsahoo8100/healthsage-rag-powered-ai-medical-assistant-7d23ee271dff?source=rss-1df39ea28738------2</link>
            <guid isPermaLink="false">https://medium.com/p/7d23ee271dff</guid>
            <dc:creator><![CDATA[Rajesh Kumar Sahoo]]></dc:creator>
            <pubDate>Mon, 09 Feb 2026 09:06:19 GMT</pubDate>
            <atom:updated>2026-02-20T15:17:28.462Z</atom:updated>
            <content:encoded><![CDATA[<p>Hey There!!!✋<br>In this article, we explore <strong>Retrieval-Augmented Generation (RAG)</strong> and its practical application by building a RAG-powered AI medical assistant chatbot that understands and responds to user queries related to health.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*myvGbGdZPDQ3fJVVJsxBnA.png" /></figure><p><strong>Retrieval-Augmented Generation (RAG)</strong> is an approach that enhances Large Language Models (LLMs) by enabling them to retrieve relevant information from an external knowledge base and generate responses grounded in that data. Instead of relying solely on pre-trained parameters, RAG-powered assistants fetch contextually similar documents at query time, allowing them to better understand user intent and produce more accurate, data-driven answers. This makes RAG particularly effective when responding to questions that depend on domain-specific or continuously evolving information.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/873/1*84m09b-zoya7uY3DWiDcMA.png" /><figcaption>VECTOR DATABASE</figcaption></figure><p>A vector database is a NoSQL database used to store embedded vectors generated by an embedding model. These vectors are created after large datasets are divided into smaller chunks (documents) and processed for embeddings.</p><p><strong>Process of converting unstructured data into vector embeddings<br></strong>The overall workflow for converting unstructured datasets into vector embeddings is outlined below:</p><p>-&gt; As illustrated in the diagram above, a vector database (such as Pinecone, ChromaDB, or FAISS) is used to store and manage vector representations of unstructured data, enabling LLMs to perform semantic and similarity search.<br>-&gt; The unstructured datasets are first split into smaller chunks (i.e., short documents) to handle large data volumes and comply with LLM context-length limitations.<br>-&gt; These chunks are then passed to an embedding model (for example, text-embedding-ada-002 or text-embedding-ada-003 or BERT or RoBERT or Sentence-BERT) to convert textual data into numerical vector embeddings.<br>-&gt; Once the conversion is complete, the unstructured text is represented as vector embeddings that can be efficiently used by LLMs for similarity-based retrieval.<br>-&gt; During semantic or similarity search, algorithms such as cosine similarity are used to measure the relevance between the user’s query embedding and the stored vector embeddings.<br>-&gt; Finally, the generated vector embeddings are stored in a vector database (FAISS, Pinecone, ChromaDB, etc.) for fast and accurate retrieval.</p><h3><strong>HealthSage</strong></h3><p>HealthSage is a RAG-powered AI Health Chatbot which acts as an AI medical assistant that answers user health-related queries in real time. It is designed to work as an intuitive chatbot for the healthcare industry.</p><p>Below is the training-flow outlined for HealthSage:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*TgjqNjJkw4FUijXbe5iYdw.png" /><figcaption>Converting into Vector Embeddings</figcaption></figure><ul><li>&gt; The process begins with the collection of a corpus comprising health-related documents and PDFs containing structured and unstructured information on diseases, symptoms, and treatments.<br>-&gt; The collected data is then segmented into smaller text chunks based on the token constraints of the embedding model (text-embedding-ada-002) to ensure efficient processing.<br>-&gt; Each chunk is passed through the text-embedding-ada-002 model to generate high-dimensional vector embeddings that numerically represent the semantic content of the unstructured text.<br> -&gt; These embeddings are extracted from an intermediate layer of the neural network rather than the final output layer, enabling the capture of rich semantic representations.<br> -&gt; As a result, the textual data is transformed into dense vector representations suitable for similarity search and retrieval.<br> -&gt; Finally, the generated embeddings are indexed and persisted in a vector database, with Pinecone used as the vector store to support efficient nearest-neighbor search during retrieval.</li></ul><p>Below is the code outlined starting from chunking to conversion of vector embeddings:</p><pre>import os<br>import time<br>from pathlib import Path<br>from dotenv import load_dotenv # type: ignore<br>from tqdm.auto import tqdm # type: ignore<br>from pinecone import Pinecone, ServerlessSpec # type: ignore<br>from langchain_community.document_loaders import PyPDFLoader # type: ignore<br>from langchain_text_splitters import RecursiveCharacterTextSplitter  # type: ignore<br>from langchain_google_genai import GoogleGenerativeAIEmbeddings # type: ignore<br><br># from google import genai<br><br># client = genai.Client(api_key=&quot;GOOGLE_API_KEY&quot;)<br><br># for model in client.models.list():<br>#     print(model.name)<br><br><br>#Below function is used to load all the environment variables<br>load_dotenv()<br><br>GOOGLE_API_KEY=os.getenv(&quot;GOOGLE_API_KEY&quot;)<br>PINECONE_API_KEY=os.getenv(&quot;PINECONE_API_KEY&quot;)<br># As we are using pinecone free tier so it will give AWS as the cloud source provider and gives the us-east region by default for the free-tiers<br>PINECONE_ENV=&quot;us-east-1&quot;<br>PINECONE_INDEX_NAME=&quot;healthsage-index-ai-assistant&quot;<br><br>os.environ[&quot;GOOGLE_API_KEY&quot;]=GOOGLE_API_KEY<br><br>UPLOAD_DIR=&quot;./uploaded_docs&quot;<br>os.makedirs(UPLOAD_DIR,exist_ok=True)<br><br>#initializing the pinecone instance for pinecone vector db<br>pc=Pinecone(api_key=PINECONE_API_KEY)<br>spec=ServerlessSpec(cloud=&quot;aws&quot;,region=PINECONE_ENV)<br>existing_indexes=[i[&quot;name&quot;]for i in pc.list_indexes()]<br><br>INDEX_DIMENSION=3072<br># Below function is to create a index<br>if PINECONE_INDEX_NAME not in existing_indexes:<br>    pc.create_index(<br>    name=PINECONE_INDEX_NAME,<br>    dimension=3072,<br>    metric=&quot;cosine&quot;,<br>    spec=spec<br>)<br>    #Below while loop is to give some rest to our embedding model so until the index is created<br>    while not pc.describe_index(PINECONE_INDEX_NAME).status[&quot;ready&quot;]:<br>        time.sleep(1)<br>    else:<br>        current_dim = pc.describe_index(PINECONE_INDEX_NAME).dimension<br>        if current_dim != INDEX_DIMENSION:<br>            raise ValueError(<br>                f&quot;Index &#39;{PINECONE_INDEX_NAME}&#39; has dimension {current_dim}, &quot;<br>                f&quot;but embedder expects {INDEX_DIMENSION}. &quot;<br>                &quot;Delete/recreate index or use matching embedding dimension.&quot;<br>            )<br>index=pc.Index(PINECONE_INDEX_NAME)<br><br>#load, split, embed the healthcare pdf docs<br>def load_vectorstore(uploaded_files):<br>    embed_model=GoogleGenerativeAIEmbeddings(model=&quot;models/gemini-embedding-001&quot;)<br>    file_paths=[]<br>    <br>    #1. upload the datasets<br>    for file in uploaded_files:<br>        save_path=Path(UPLOAD_DIR)/file.filename<br>        with open(save_path,&quot;wb&quot;) as f:<br>            f.write(file.file.read())<br>        file_paths.append(str(save_path))<br>        <br>    #2. split the datasets<br>    for file_path in file_paths:<br>        loader=PyPDFLoader(file_path)<br>        documents=loader.load()<br>        <br>        # now split th files into chunks/chunking the files into smaller documents<br>        splitter=RecursiveCharacterTextSplitter(chunk_size=550,chunk_overlap=100)<br>        chunks=splitter.split_documents(documents)<br>        <br>        texts=[chunk.page_content for chunk in chunks]<br>        metadata=[chunk.metadata for chunk in chunks]<br>        ids=[f&quot;{Path(file_path).stem}-{i}&quot; for i in range(len(chunks))]<br>        <br>        # Embedding the datasets<br>        print(f&quot;Embedding chunks/documents&quot;)<br>        #now embedding variable will contain the embedded vectors<br>        embedding=embed_model.embed_documents(texts)<br>        print(&quot;Embedding dimension:&quot;, len(embedding[0]))<br>        <br>        # Upsert the embedded vectors to the pinecone database<br>        print(f&quot;📤 Upserting the embedded vectors into the pinecone database&quot;)<br>        with tqdm(total=len(embedding), desc=&quot;Upserting to Pinecone&quot;) as progress:<br>            index.upsert(vectors=zip(ids, embedding, metadata))<br>            progress.update(len(embedding))<br>            <br>        print(f&quot;✅ Successfully upserting {len(embedding)} vectors for {file_path} into Pinecone index &#39;{PINECONE_INDEX_NAME}&#39;&quot;)</pre><p>Below are some pics of real-time chunking and retrieving the responses.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*BDJYv2dhyQj9uyyBKNwvJw.jpeg" /><figcaption>chunking and upserting to PineCone Vector DB</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ND_iXhjbbMrRNFZkKbfsqg.jpeg" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*a_N-FM2XnuIlv5CU71Jfpg.jpeg" /><figcaption>Testing of embedding through postman</figcaption></figure><p>The diagram below illustrates the operational workflow powering the HealthSage AI Assistant:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*q5RjCx3WdhpTyhaGjyXa3A.png" /><figcaption>HealthSage AI Assistant</figcaption></figure><p>&gt; As illustrated in the system architecture, a user submits a health-related query (e.g., information about diabetes and its treatment) to the HealthSage AI Assistant.<br>-&gt; The query is first received by the backend server, where it is logged for monitoring, auditing, and fault tolerance.<br>-&gt; The query is then sent to Azure OpenAI’s embedding service (text-embedding-ada-002), which converts the natural language input into a dense vector representation capturing its semantic intent.<br> -&gt; Here, once the query arrives at the embedding model the query also gets converted into vector embeddings for comparing it with the datasets we have been stored in the vector database.<br> -&gt; This query embedding is used to perform semantic retrieval against the document embeddings stored in the vector database. Azure Cognitive Search executes a similarity search using cosine similarity to identify the most relevant context chunks.<br> -&gt; The top-k retrieved documents are subsequently injected into the prompt as contextual grounding and passed to the generation model (LLaMA 3).<br> -&gt; Leveraging the retrieved context, the <strong>llama-3.1–8b-instant</strong> model generates a grounded, context-aware response, which is returned to the user in real time. This retrieval-augmented pipeline ensures improved factual accuracy, reduced hallucinations, and low-latency inference.</p><p>Following is the code outlined for connecting to <strong>llama-3.1–8b-instant LLM Model</strong> and rendering HealthSage using Streamlit</p><pre>import streamlit as st<br>from utils.api import ask_question<br><br>def render_chat():<br>    st.subheader(&quot;💬 Chat with HealthSage&quot;)<br>    <br>    # Below function is to show the previous messages to the user. Adding the session state to store the messages in the chat history and if there are no messages then it will initialize an empty list to store the messages in the chat history. This is important to maintain the context of the conversation and to show the previous messages to the user.<br>    if &quot;messages&quot; not in st.session_state:<br>        st.session_state.messages=[]<br><br>    # render existing chat history<br>    for msg in st.session_state.messages:<br>        st.chat_message(msg[&quot;role&quot;]).markdown(msg[&quot;content&quot;])<br><br>    # input and response<br>    user_input=st.chat_input(&quot;Enter you query....&quot;)<br>    if user_input:<br>        st.chat_message(&quot;user&quot;).markdown(user_input)<br>        st.session_state.messages.append({&quot;role&quot;:&quot;user&quot;,&quot;content&quot;:user_input})<br><br>        response=ask_question(user_input)<br>        if response.status_code==200:<br>            data=response.json()<br>            answer=data[&quot;response&quot;]<br>            sources=data.get(&quot;sources&quot;,[])<br>            st.chat_message(&quot;assistant&quot;).markdown(answer)<br>            # if sources:<br>            #     st.markdown(&quot;📄 **Sources: **&quot;)<br>            #     for src in sources:<br>            #         st.markdown(f&quot;- `{src}`&quot;)<br>            st.session_state.messages.append({&quot;role&quot;:&quot;assistant&quot;,&quot;content&quot;:answer})<br>        else:<br>            st.error(f&quot;Error: {response.text}&quot;)</pre><p>For the deployment &amp; rendering, we leveraged <strong>Streamlit</strong> to deploy UI and to render the web service i.e. the FastAPI used Render.com which can be used as production deployment of the apis, web-services etc</p><p>Below is the final output showcasing the complete application in action.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*t7gwHHv_7zjWr3syXyJxHQ.jpeg" /><figcaption>HealthSage rendered using Streamlit</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*IhiWsP5cc32CflKB5LMfiA.jpeg" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*UyWgfFzmUarLX--3LqPn-Q.jpeg" /></figure><p>Below are pics of capturing the logs, no of API requests going per minute to the LLm both chat model and the embedding model which shows the usage of the exposed APIs</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*aLaxZPoNFSqx3NJFRA3JqA.png" /><figcaption>API request to gemini-embedding-001 model</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ajIJI1P7NP7xzxgjvMCujg.jpeg" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*tT_j4UkUzQfxNl6lKineRw.png" /><figcaption>Request going per second to pinecone database from FastApi web webservice</figcaption></figure><p>As illustrated below, getting the backend webservice built using fastapi deployed in render and capturing the logs:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*FXof9tWIPiz8rv_Dyzil3g.png" /></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=7d23ee271dff" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>