<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Vansh Uttam</title>
    <description>The latest articles on DEV Community by Vansh Uttam (@vansh_uttam).</description>
    <link>https://dev.to/vansh_uttam</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F2475056%2F312108ff-9ebd-4141-b9cf-47376e11d771.jpg</url>
      <title>DEV Community: Vansh Uttam</title>
      <link>https://dev.to/vansh_uttam</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/vansh_uttam"/>
    <language>en</language>
    <item>
      <title>🎯MCP vs Direct API Calls</title>
      <dc:creator>Vansh Uttam</dc:creator>
      <pubDate>Thu, 12 Feb 2026 19:42:01 +0000</pubDate>
      <link>https://dev.to/vansh_uttam/mcp-vs-direct-api-calls-587f</link>
      <guid>https://dev.to/vansh_uttam/mcp-vs-direct-api-calls-587f</guid>
      <description>&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F8t57zabh22tzlwvbjnq6.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F8t57zabh22tzlwvbjnq6.jpg" alt=" " width="800" height="450"&gt;&lt;/a&gt;&lt;br&gt;
MCP is designed to abstract the complexity of traditional APIs (which were built for developers not for AI models).&lt;br&gt;
While in direct API Calls we have to hardcode every possible interaction. e.g we have to explicitly define every endpoint and parameter in advance. And a lot of integration burden for every individual API (e.g REST, GraphQL).&lt;/p&gt;

&lt;p&gt;🤔What is MCP used for ?&lt;/p&gt;

&lt;p&gt;We use MCP while building AI agents and applications that require dynamic, autonomous and context aware interactions with external tools and data. Like while you ask LLM "what is the weather in California?", as it does not have real time data, so it make an external tool call to a weather API to fetch the data and then it serve to us.&lt;/p&gt;

&lt;p&gt;🧩MCP can solve following problems-&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;Dynamic Tool Discovery: It allows AI agents to dynamically discover and understand available tools and their capabilities at runtime.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Standardization: It provides a single, unified protocol for AI-tool communication, it act as a universal connector like USB-C. Meaning once an AI agent understands MCP, it can potentially use any MCP-compliant service, which reduces integration burden on developer.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Context and State Management: It supports stateful sessions and bidirectional context streaming, allowing AI agents to maintain conversation history and build upon previous interactions. Meanwhile traditional APIs are stateless, requiring developers to manually manage and pass all necessary context with each independent request.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Enhanced Security: Direct API access for AI models can be risky, exposing sensitive API keys and potentially allowing models to make unintended or malicious requests. MCP acts as a controlled layer that abstracts raw credentials or network details from AI.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Simplified Workflow: MCP enables the creation of powerful, high-level tools that abstract complex, multi-step operations into a single AI command.&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;📝Important: We often user a hybrid approach for real world use cases. Although MCP is optimized for AI specific tasks, but it lacks maximum control, predictable/stable workflow (e.g payment processing or user authentication), latency due multistep workflow which include reasoning and context.&lt;/p&gt;

</description>
      <category>mcp</category>
      <category>ai</category>
      <category>llm</category>
      <category>api</category>
    </item>
    <item>
      <title>How caching helps in LLM Application?</title>
      <dc:creator>Vansh Uttam</dc:creator>
      <pubDate>Thu, 12 Feb 2026 19:37:09 +0000</pubDate>
      <link>https://dev.to/vansh_uttam/how-caching-helps-in-llm-application-1e2a</link>
      <guid>https://dev.to/vansh_uttam/how-caching-helps-in-llm-application-1e2a</guid>
      <description>&lt;p&gt;🤔What is caching?&lt;/p&gt;

&lt;p&gt;Caching is the technique of storing frequently accesed data in a temporary, high speed storage base (e.g Redis). It reduces the unintentional compute load on the server for the same request and reduces latency.&lt;/p&gt;

&lt;p&gt;🤝How it help with LLM API calls?&lt;/p&gt;

&lt;p&gt;Unlike in traditional API call which needs database fetching or maybe some computation on the server. &lt;/p&gt;

&lt;p&gt;In LLM API calls the cost is measured on the basis of “Tokens”, not only we need it while making request as a client (called “Input Token”) but also the responses which we receive from the Model are based on tokens called “Output Tokens”. &lt;/p&gt;

&lt;p&gt;And we have to pay per token. Which is really expensive in the scenario where a user request the same query again and again. So we implement “Caching” to store frequently asked query and it’s response.&lt;/p&gt;

&lt;p&gt;💭Here is an analogy:-&lt;/p&gt;

&lt;p&gt;User A - “What are some good places to visit in japan?”&lt;/p&gt;

&lt;p&gt;User B - “I want to visit japan what are some good spots.”&lt;/p&gt;

&lt;p&gt;Both of the above prompts are semantically similar. It would be great to “Cache” the response once and serve multiple time.&lt;/p&gt;

&lt;p&gt;Caching not only reduces your API bill but also reduces the latency. “Cache hit” is generally 10-20 ms while generating a fresh response could take 3-5 sec.&lt;/p&gt;

&lt;p&gt;🦾Best use cases -&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;FAQ bots&lt;/li&gt;
&lt;li&gt;RAG with repeated queries.&lt;/li&gt;
&lt;li&gt;Fixed prompt generation&lt;/li&gt;
&lt;li&gt;Educational/learning Apps.&lt;/li&gt;
&lt;li&gt;Where facts are involved.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;🫸When to avoid Caching?&lt;/p&gt;

&lt;p&gt;Although caching helps in optimization, but it is not always a great idea to cache every response. There are some situations where we strictly avoid caching.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Legal/medical context.&lt;/li&gt;
&lt;li&gt;User specific data.&lt;/li&gt;
&lt;li&gt;Personalized outputs.&lt;/li&gt;
&lt;li&gt;Response involve realtime data.(e.g stock price, currency rate conversion)&lt;/li&gt;
&lt;li&gt;Where creativeness is priority.(Temperature≠0)&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;But how do we distinguish between responses?&lt;/p&gt;

&lt;p&gt;We use hashing to do so. There are many important parameters which needs to be passed in a hash function. Some of them are temperature(measure of randomness), model, prompt.&lt;/p&gt;

&lt;p&gt;🤔What about chat involving multiple interaction? In that case we pass “full conversation history”.&lt;/p&gt;

&lt;p&gt;💲Here is a short analysis of caching vs no caching:&lt;/p&gt;

&lt;p&gt;Suppose each API call costs $0.0001&lt;/p&gt;

&lt;p&gt;Without caching-&lt;/p&gt;

&lt;p&gt;100,000 same prompt = $10 😵‍💫&lt;/p&gt;

&lt;p&gt;With caching-&lt;/p&gt;

&lt;p&gt;100,000 same prompt = $0.0001 😎&lt;/p&gt;

&lt;p&gt;📝Note: Caching comes with some tradeoffs so, a deep analysis is better to weather use it or not or use a hybrid approach instead.&lt;/p&gt;

</description>
      <category>ai</category>
      <category>llm</category>
      <category>redis</category>
    </item>
  </channel>
</rss>
