<?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 Vedant Kulkarni on Medium]]></title>
        <description><![CDATA[Stories by Vedant Kulkarni on Medium]]></description>
        <link>https://medium.com/@kulvedant24?source=rss-1f1df84045af------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*RubVRVz_YQ441RuypkbAZA.jpeg</url>
            <title>Stories by Vedant Kulkarni on Medium</title>
            <link>https://medium.com/@kulvedant24?source=rss-1f1df84045af------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sun, 06 Dec 2026 10:22:27 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@kulvedant24/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[Why Most RAG Systems Never Make It to Production — Lessons from Building One with a 0.5B Model]]></title>
            <link>https://medium.com/@kulvedant24/why-most-rag-systems-never-make-it-to-production-lessons-from-building-one-with-a-0-5b-model-90d0f9fdf808?source=rss-1f1df84045af------2</link>
            <guid isPermaLink="false">https://medium.com/p/90d0f9fdf808</guid>
            <category><![CDATA[llm]]></category>
            <category><![CDATA[rags]]></category>
            <category><![CDATA[ai]]></category>
            <dc:creator><![CDATA[Vedant Kulkarni]]></dc:creator>
            <pubDate>Tue, 31 Mar 2026 12:01:11 GMT</pubDate>
            <atom:updated>2026-03-31T12:07:05.116Z</atom:updated>
            <content:encoded><![CDATA[<p>For the past three years, I have been working as an AI engineer building <strong>production-grade AI pipelines</strong>. Most of the systems I built in industry environments relied on large hosted models, such as OpenAI, Gemini, and similar systems with tens or even hundreds of billions of parameters.</p><p>In such environments, building a RAG system often feels relatively straightforward. The model itself is powerful enough to handle large contexts, infer missing information, and rectify for minor imperfections in the pipeline.</p><p>Recently, while pursuing my MSc, I had the opportunity to build another RAG system as part of an academic assignment. At first, I assumed it would be a simple exercise because I had already built similar systems multiple times in professional settings.</p><p>However, one constraint changed everything.</p><p>The model available for this project had <strong>only 0.5 billion parameters</strong>.</p><p>That single limitation forced me to rethink almost every stage of the pipeline. What seemed trivial in production suddenly became critical. Every decision, right from data extraction to chunking strategy , began to directly affect the model’s ability to answer questions.</p><p>In this blog, I want to walk through some of the challenges I encountered while building this system and what this experience taught me about the <strong>difference between using AI tools and truly engineering AI systems</strong>.</p><h3>The Objective of the System</h3><p>The goal of the project was to build a RAG system capable of answering questions about <strong>different cuisines around the world</strong>. The knowledge base consisted of a combination of:</p><ul><li>recipes</li><li>cooking techniques</li><li>culinary traditions</li><li>historical descriptions of cuisines</li></ul><p>The information was gathered from multiple online sources such as Wikipedia cuisine pages, Wikibooks recipes, and culinary blogs.</p><p>The system needed to retrieve relevant information from these sources and answer user queries based strictly on the retrieved context.</p><p>At a high level, the pipeline consisted of five major phases:</p><ol><li>Collecting and structuring the data</li><li>Preparing the documents for retrieval</li><li>Creating embeddings</li><li>Building the vector database</li><li>Inferencing</li></ol><p>While this structure may appear simple, each stage introduced its own challenges.</p><h3>Phase 1 — Collecting the Right Data</h3><p>In most professional environments, AI engineers do not usually design the entire data ingestion pipeline. Data engineers typically decide how data is sourced, cleaned, and structured before it reaches the AI system.</p><p>In this assignment, however, I had to build the <strong>entire pipeline from scratch</strong>. The first task was to collect relevant information from different web sources that contained recipes and cuisine descriptions. Initially, I tried a straightforward approach: scrape the entire text from the webpages and store it in the dataset.</p><p>But this approach quickly created problems.</p><p>Webpages contain a large amount of content that is not useful for a RAG system. Along with the actual recipes and descriptions, the scraper was also collecting navigation elements, advertisements, sidebars, and other irrelevant information.</p><p>When this noisy data was fed into the retrieval system, it reduced the quality of the context being returned to the model. The system sometimes retrieved irrelevant sections simply because they appeared frequently in the page structure. To solve this problem, I redesigned the extraction pipeline to focus only on <strong>specific content blocks within the webpages</strong>. Instead of scraping the entire page, the system searched for the sections that contained the relevant culinary information and extracted only those sections. These sections were searched using HTML Tags. Each webpage was then converted into a structured JSON document that included the content, the source URL, and metadata such as the cuisine name. This approach created a <strong>semi-structured dataset</strong>, which significantly improved the quality of the information entering the pipeline. Once the data was structured properly, the next step was to prepare it for embedding.</p><h3>Phase 2 — Rethinking the Data Loader</h3><p>With the dataset ready, the next step was to load the documents into the retrieval pipeline. Initially, I experimented with treating each JSON file as a complete document using the Langchain JSON Loader. This meant that each webpage was embedded as a single large text block. While this might work with very large models, it became problematic in this case because the model was small.</p><p><strong>Embedding large documents reduces retrieval precision</strong>. When a query is executed, the retriever may return a large block of text that contains the answer somewhere inside it, but the model might struggle to locate the exact information within that block.</p><p>To address this issue, I modified the loading strategy so that the pipeline extracted only the <strong>core textual content from each document</strong> and treated it as plain text rather than as a full JSON structure. This allowed the pipeline to break the documents into smaller semantic segments that could be retrieved more effectively. However, this led to another important design decision.</p><h3>Phase 3 — Finding the Right Chunk Size</h3><p>Chunking turned out to be one of the most important aspects of the entire system. The documents were split into smaller chunks before generating embeddings so that the retriever could return only the relevant parts of the knowledge base. At first, I experimented with smaller chunk sizes. Smaller chunks are often recommended because they allow the retriever to match queries with very precise pieces of information. But the dataset in this project contained many <strong>recipes</strong>, which are inherently sequential and procedural.</p><p>A recipe typically includes:</p><ul><li>a list of ingredients</li><li>preparation instructions</li><li>cooking steps</li><li>sometimes additional notes or variations</li></ul><p>When the chunks were too small, the information became fragmented. The retriever might return a chunk containing the ingredients but not the cooking instructions, or vice versa.</p><p>When the model attempted to generate an answer from incomplete information, it sometimes tried to fill the gaps itself, which resulted in hallucinated responses. After several experiments, I found that using <strong>larger chunks with overlapping context</strong> worked much better for this dataset. This configuration allowed most recipes to remain intact within a chunk while still preserving surrounding context. The overlap ensured that important transitions between instructions were not lost during the splitting process. This adjustment significantly improved the retrieval quality and reduced hallucinations from the model.</p><h3>Phase 4 — Building the Vector Database</h3><p>Once the documents were properly chunked, the next step was generating embeddings and storing them in a vector database. For this project, I used a lightweight sentence transformer model to convert the chunks into embeddings. These embeddings were then stored in a locally hosted vector database. A local vector database worked well in this case because the dataset was relatively small and the goal of the assignment was experimentation rather than large-scale deployment. Using a local database also made it easier to iterate quickly while tuning the retrieval pipeline. At this stage, the ingestion pipeline was complete. The system could now retrieve relevant chunks from the dataset when a user asked a question.</p><h3>Phase 5 — Inferencing and Prompt Engineering Under Model Constraints</h3><p>Once the vector database was ready, the final step was the inferencing pipeline — retrieving the right chunks, passing them to the model, and generating the final answer.</p><p>Initially, I approached this the same way I would in a professional environment. I wrote a detailed system prompt containing all the instructions I wanted the model to follow:</p><ul><li>answer only from the context</li><li>do not make up information</li><li>say “I don’t know” if the answer is missing</li><li>maintain the right tone</li><li>follow the expected response format</li><li>mention the source properly</li></ul><p>In production settings with larger models, this is usually manageable. The model can handle long instructions while still keeping track of the user query and the retrieved context. However, in this project, the model was only <strong>0.5B parameters</strong>, and this changed the behaviour significantly.</p><p>What I observed was that the model was spending too much of its attention on the instruction block itself. The system prompt was consuming a large number of tokens, and by the time the model had to reason over the actual retrieved context, it was no longer able to reliably focus on the information that mattered. In several cases, <strong>the answer was clearly present in the retrieved chunks, but the model still failed</strong> to produce the correct response. This was one of the clearest moments in the project where I realized that <strong>prompt engineering is not just about writing better instructions</strong>. It is also about understanding how much a model can realistically handle.</p><p>To address this, I simplified the first generation step.</p><p>Instead of sending a large and heavily detailed system prompt, I reduced it to the bare essentials:</p><ul><li>answer only from the given context</li><li>if the answer is not present, say you do not know</li><li>be direct in the response</li></ul><p>This immediately improved the baseline generation quality. The model was now spending less effort interpreting instructions and more effort attending to the retrieved content. Even after this improvement, there were still some cases where the retrieved context contained the right answer, but the model’s first response was incomplete. This happened especially in queries where the answer depended on multiple facts spread across nearby chunks, or where the model missed some specific detail such as a quantity, an ingredient, or a procedural step. To solve this, I introduced an additional verification stage in the inferencing pipeline.</p><p>After the initial answer was generated, I passed three things back to the model:</p><ul><li>the retrieved context</li><li>the original user query</li><li>the draft answer produced in the first step</li></ul><p>The model was then instructed to act as a fact check. Its job was not to generate a brand-new answer from scratch, but to verify whether the draft had missed any important detail from the context and, if needed, recover the missing information. This self-checking step worked surprisingly well. The reason it helped is that the second pass had a much narrower responsibility. Instead of asking the model to both understand the context and generate the complete answer in one shot, the system split the task into two smaller steps:</p><ol><li>produce a baseline answer</li><li>verify and recover any missed facts</li></ol><p>For a small model, this was far more effective than expecting one long reasoning step to do everything correctly. Another useful part of this inferencing design was the retrieval strategy itself. Instead of depending on a single retrieval mechanism, I combined standard similarity search with MMR-based retrieval and then used a cross-encoder reranker to score the merged results. This ensured that the final context passed to the model was both relevant and diverse. Once the best chunks were selected, only the top few were passed into the final generation stage, keeping the context compact enough for the smaller model to handle.</p><p>With larger hosted models, we often rely on the model’s capability to absorb long prompts, correct imperfect retrieval, and still generate a usable response. But when the model is small, the inferencing flow has to be deliberately structured.</p><p>You need to think about:</p><ul><li>how much instruction the model can handle</li><li>how much context it can reliably attend to</li><li>whether one generation step is enough</li><li>when a second-pass verification step can improve factual accuracy</li></ul><p>This was another instance where the academic constraint pushed me to go beyond simply “using a model” and instead think more like a systems engineer designing around model limitations.</p><p>In the end, this inferencing strategy turned out to be one of the biggest improvements in the pipeline. By keeping the first prompt simple and introducing a lightweight self-reflection step, I was able to make a small model behave far more reliably than it initially did.</p><h3>What This Experience Taught Me</h3><p>Before this project, most of the RAG systems I worked on used large hosted models. Those models are incredibly capable and can compensate for weaknesses in the retrieval pipeline.</p><p>However, working with a <strong>0.5B parameter model</strong> exposed those weaknesses very quickly. When the model is small, the system cannot rely on the model to fix mistakes. Instead, the pipeline itself must be designed carefully so that the model receives exactly the information it needs. This project reinforced a lesson that is sometimes overlooked in the current AI ecosystem: Large models can make systems easier to build, but they can also hide poor engineering decisions.When constraints are introduced, the fundamentals suddenly become much more important. You start paying closer attention to:</p><ul><li>how data is collected</li><li>how documents are structured</li><li>how chunking affects retrieval</li><li>how embeddings represent information</li><li>how the retriever selects context</li></ul><p>These are the elements that truly determine whether a RAG system works reliably.</p><h3>Final Thoughts</h3><p>There is a growing trend in the AI community to rely heavily on powerful models and pre-built frameworks. While these tools are incredibly useful, they can sometimes give the illusion that building AI systems is simply about connecting APIs together. My experience with this project reminded me that real AI engineering still depends on <strong>understanding the fundamentals of the pipeline</strong>. A well-designed system will perform well regardless of model size. And sometimes, working with constraints is the best way to gain that understanding. Because in the end, the difference between someone who <em>uses AI tools</em> and someone who <em>builds AI systems</em> lies in how well they understand the pipeline behind the model.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=90d0f9fdf808" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[n8n: Workflow Automation for Rapid Prototyping and Implementation of Software Pipelines]]></title>
            <link>https://medium.com/@kulvedant24/n8n-workflow-automation-for-rapid-prototyping-and-implementation-of-software-pipelines-f380d5741460?source=rss-1f1df84045af------2</link>
            <guid isPermaLink="false">https://medium.com/p/f380d5741460</guid>
            <category><![CDATA[ai-engineering]]></category>
            <category><![CDATA[software-engineering]]></category>
            <category><![CDATA[software-management-tools]]></category>
            <dc:creator><![CDATA[Vedant Kulkarni]]></dc:creator>
            <pubDate>Mon, 02 Feb 2026 10:32:14 GMT</pubDate>
            <atom:updated>2026-02-02T10:32:14.272Z</atom:updated>
            <content:encoded><![CDATA[<p>Over the past few years working as an AI engineer, I’ve observed a subtle but important shift in where complexity actually resides in modern software systems. Increasingly, it is not the core logic that makes pipelines difficult to build or reason about. Instead, complexity has moved outward to everything surrounding the logic:</p><ul><li>loading data from heterogeneous sources</li><li>managing credentials and secrets</li><li>integrating with third-party APIs</li><li>handling retries, failures, and data formats</li><li>exposing pipelines as services for downstream consumers</li></ul><p>In many real-world projects, a significant portion of engineering effort is spent wiring systems together rather than solving the original problem the system was meant to address.</p><p>During one such project, my team introduced me to <strong>n8n</strong>. At first glance, it appeared to be another no-code or low-code tool. With closer use, however, it revealed itself as something more interesting: an abstraction layer over some of the most repetitive and failure-prone aspects of modern pipelines.</p><p><strong>This article is not a claim of superiority, nor an argument against traditional engineering practices. </strong>It is simply a reflection on how tools like n8n influence where engineers spend their cognitive effort.</p><h3><strong>Where Pipeline Complexity Actually Comes From?</strong></h3><p>Most AI or data-driven systems today follow a familiar structure:</p><ul><li>Connect to multiple data sources</li><li>Perform CRUD operations</li><li>Transform and enrich data</li><li>Invoke ML or LLM models</li><li>Trigger actions or expose results through APIs</li></ul><p>Conceptually, this workflow is straightforward. In practice, each step introduces layers of boilerplate:</p><ul><li>SDK initialization</li><li>authentication flows</li><li>request and response normalization</li><li>environment-specific configuration</li><li>versioning and long-term maintenance</li></ul><p>Over time, codebases become heavy not because the underlying ideas are complex, but because infrastructure concerns begin to dominate domain logic.</p><h3>How n8n Frames the Problem?</h3><p>At the fundamental level, n8n is built around a set of predefined modules referred to as nodes. Each node has functionality that engineers frequently re-implement:</p><p>- database connections and CRUD operations</p><p>- integrations with third-party services</p><p>- credential and secret handling</p><p>- triggers, schedulers, and webhooks</p><p>Rather than writing repeatable code, engineers compose workflows visually, focusing on data flow and intent rather than low-level plumbing.</p><h3>To start using n8n, following process can be followed:</h3><ul><li>use the managed cloud offering (with a limited free tier),</li><li>self-host using Docker for local or private deployments</li></ul><p>Importantly, the conceptual model remains the same regardless of hosting choice.</p><p><strong>Treating Credentials as a First-Class Concern:</strong></p><p>One of the more understated aspects of n8n is its approach to credentials.</p><p>Credentials are:</p><ul><li>centrally managed</li><li>decoupled from workflow logic</li><li>optionally injected via APIs or external secret vaults</li></ul><p>From an engineering perspective, this enforces a separation of concerns that many teams only arrive at after multiple security reviews. It also reduces accidental duplication and exposure of sensitive information.</p><p><strong>LLM Integration:</strong></p><p>n8n includes built-in nodes for working with multiple LLM providers. These nodes expose configuration options such as:</p><ul><li>system prompts</li><li>user prompts</li><li>hyperparameters</li><li>tools, including newer protocols like MCP</li></ul><p>What stands out is not merely the availability of these features, but the reduction of friction they introduce. Instead of repeatedly writing wrappers, schemas, and adapters, engineers can focus on how models are orchestrated rather than how requests are constructed.</p><p>This does not remove the need to understand LLM behavior — it simply removes repetitive implementation work.</p><p><strong>When Code Is Still Necessary:</strong></p><p>n8n provides a Code Node that allows engineers to implement custom logic when workflows alone are insufficient. This avoids forcing all logic into a purely visual paradigm.</p><p>In practice, this hybrid approach works well:</p><ul><li>visual workflows for integration and orchestration</li><li>custom code for edge cases and specialized transformations</li></ul><p><strong>Deployment and Usage Patterns:</strong></p><p>Once implemented, n8n workflows can be used in two primary ways:</p><ul><li>exposed as API endpoints</li><li>executed as background services triggered by events</li></ul><p>This aligns closely with modern system design, where pipelines are both reactive and service-oriented.</p><p><strong>A Personal Reflection</strong></p><p>Having spent the last three years working as an AI engineer in industry — I’ve found that the most mentally exhausting phase of many projects begins after the solution is conceptually clear.</p><p>Writing and maintaining API layers, model wrappers, authentication logic, and data connectors is essential work, but it is rarely where meaningful insight is created.</p><p>Tools like n8n do not replace engineering judgment or system design. What they do is shift effort away from repetitive infrastructure concerns toward higher-level reasoning.</p><p><strong>It should not be confused with an AI code-generation tool</strong>. Instead, it is better understood as an engineering abstraction layer — one that reflects how modern pipelines are actually built and where complexity truly lives.</p><p>In that sense, n8n feels less like a shortcut and more like a quiet acknowledgment of how software development has evolved. It can be most powerfully used for prototype generation at a faster rate.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=f380d5741460" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Layered Architecture for Agentic AI Applications]]></title>
            <link>https://medium.com/@kulvedant24/layered-architecture-for-agentic-ai-applications-eb84f5060400?source=rss-1f1df84045af------2</link>
            <guid isPermaLink="false">https://medium.com/p/eb84f5060400</guid>
            <category><![CDATA[agentic-ai-systems]]></category>
            <category><![CDATA[mcps]]></category>
            <category><![CDATA[google-a2a]]></category>
            <dc:creator><![CDATA[Vedant Kulkarni]]></dc:creator>
            <pubDate>Mon, 14 Apr 2025 11:22:35 GMT</pubDate>
            <atom:updated>2025-04-16T10:49:27.534Z</atom:updated>
            <content:encoded><![CDATA[<p>Let us start with the basics, What do we understand by Agentic AI? Referring to my last blog where I distinguished between Agents and Agentic AI, we can imply that Agentic Systems are compound AI systems capable of solving a task considering multiple tools and sub agents to reach the conclusion. <a href="https://medium.com/p/6052fca643e6"><em>You can read in detail if interested here.</em></a></p><p>Now that we’ve briefly defined Agentic AI — and I have elaborated on building such systems in my recent blog, I want to share some challenges I encountered while implementing an Agentic System to tackle a real-world problem. This blog aims to highlight a few of those blockers and walk through the strategies I used to overcome them.</p><p><strong>Challenges while building an Agentic AI System:</strong></p><p>While recently working on a transformation problem, I developed an Agentic Solution designed to transform data from diverse document types — such as PDFs, Excel sheets, Word documents, PowerPoint presentations, and even SQL files — into various structured outputs like bill receipts, records, and databases.</p><p>During this process, I encountered a few core challenges that significantly impacted the system’s efficiency:</p><p><strong>1. Feature Heaviness of the Agentic Loop</strong><br> When designing a solution that handles a wide range of inputs and outputs, the system tends to become overloaded with features. This creates redundancy, as not every use case utilizes all the available capabilities — leading to inefficiencies in performance and maintainability.</p><p><strong>2. Managing Multiple Data Sources</strong><br> While processing raw data, it’s common to deal with a variety of data sources such as SharePoint, AWS buckets, Google Cloud Storage, and local file servers. Efficiently loading data from these heterogeneous sources requires a well-thought-out strategy, otherwise it can become chaotic and error-prone.</p><p><strong>3. Inconsistency in Input and Output Formats</strong><br> This is one of the more critical challenges. When passing data as context to an LLM, consistency in formatting is essential for the prompts to be interpreted correctly and to generate accurate responses. Irregularities in input or output structures often lead to subpar results or even prompt failures.</p><p>To tackle these issues, I found that implementing a <strong>layered architecture</strong> was particularly effective.</p><p>Let’s break the transformation process down into clear phases. When converting documents from one format to another, the following stages typically occur:</p><p><strong>I. Accessing documents from the source</strong><br> This step requires various different tools or functions—where number of tools is the number of unique data sources involved.</p><p><strong>II. Converting document data into an LLM-readable format</strong><br> This involves utilities that can efficiently convert various document types into formats like plain text or images, which LLMs can process.</p><p><strong>III. Translating the LLM output into the required target format</strong><br> Again, this requires various different tools or functions to support writing data to the desired destination formats or systems.</p><p>The challenge here is that adding new features becomes increasingly complex. A small change in one part of the system can ripple across the entire solution, potentially introducing bugs or breaking existing functionality.</p><p>By adopting a layered approach, I was able to decouple responsibilities and improve both modularity and maintainability. The next section dives into how this architecture is structured.</p><p><strong>Layered Architecture:</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/917/1*zi3gHswyswTydEbajfYMtg.png" /></figure><p>The core idea behind <strong>Layered Architecture</strong> is simple yet powerful. Instead of building a monolithic application that gets increasingly difficult to manage with each new use case, we divide the solution into clearly defined, modular layers.</p><p>Here’s a breakdown of the core layers I’ve implemented:</p><h4>1. Input Layer</h4><p>This layer is responsible for delivering consistent, pre-processed input to the AI Layer. Its key tasks include:</p><ul><li>Retrieving documents from their sources (e.g., cloud storage, databases, local servers).</li><li>Converting these documents into LLM-readable formats — whether plain text, structured data, or multimodal inputs.</li><li>Storing the converted data for further use.</li></ul><p>This structure offers several benefits:</p><ul><li>The input processing can often be done offline, since data preparation for GenAI typically follows a programmatic pipeline.</li><li>It reduces the overall runtime of the AI process, as data is pre-processed and readily available.</li><li>In case of failure in downstream AI operations, the stored input data can be reused without re-running the entire pipeline.</li></ul><h4>2. AI Layer</h4><p>This is the core processing unit of the system. The focus here is solely on <strong>transforming data</strong> into its next usable form. Examples include:</p><ul><li>Converting text, images, diagrams, spreadsheets, or documents into summarized or structured outputs.</li><li>Generating domain-specific artifacts, such as transforming Excel sheets into bill receipts.</li></ul><p>The output of this layer is a refined, consolidated representation of the original input, ready to be passed to the output layer for final handling.</p><h4>3. Output Layer</h4><p>The final layer in the flow is responsible for:</p><ul><li>Parsing the AI-generated output into the desired format (e.g., a PDF, database record, or API response).</li><li>Validating the output to ensure it meets quality and structural expectations.</li><li>Storing results for future reference or downstream consumption.</li></ul><p>While these three layers formed the backbone of my recent solution, this architecture is flexible and extensible. Depending on the use case, you can introduce additional layers such as:</p><ul><li><strong>Security Layer</strong> — for access control and data protection.</li><li><strong>Validation Layer</strong> — for business rule checks.</li><li><strong>Backup Layer</strong> — to ensure recoverability.</li><li><strong>Memory Layer</strong> — for caching or context management.</li><li><strong>Human-in-the-Loop Layer</strong> — for scenarios requiring manual oversight or corrections.</li></ul><p>The beauty of this structure is that it isolates the AI layer from surrounding concerns, making the system more robust and adaptable. Moreover, it enables easier upgrades. For example, while the AI layer may remain stable, input/output connectors or auxiliary layers can evolve independently.</p><h3>Selecting Tools for Each Layer</h3><p>Now, let’s talk about tools and protocols that complement this architecture:</p><ul><li><strong>Model Context Protocol (MCP):</strong><br> A valuable addition to the Input Layer, MCP facilitates seamless access to various data sources. It can preprocess and deliver data in a ready-to-consume format for LLMs. In some cases, custom servers can also be deployed to provide LLM-ready data on demand. <a href="https://modelcontextprotocol.io/introduction">[Read more here]</a></li><li><strong>Google A2A (Agent-to-Agent):</strong><br> This framework enables unified communication between agents — an essential capability for building scalable Agentic systems. It supports the abstraction of logic across layers. For example, Input (Agentic), AI Processing (Agentic), and Output (Agentic) can all interact in a streamlined, coordinated fashion. <a href="https://github.com/google/A2A">[Read more here]</a></li></ul><p>In conclusion, a <strong>layered architecture</strong>, when combined with robust frameworks like MCP and A2A, provides a dependable pathway for making Agentic AI systems production-ready. As the demand grows to convert experimental GenAI projects into stable, real-world applications, this architectural approach could play a pivotal role in bridging that gap.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=eb84f5060400" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Agents and Agentic Systems: A Perspective from an AI Engineer]]></title>
            <link>https://medium.com/@kulvedant24/agents-and-agentic-systems-a-perspective-from-an-ai-engineer-6052fca643e6?source=rss-1f1df84045af------2</link>
            <guid isPermaLink="false">https://medium.com/p/6052fca643e6</guid>
            <dc:creator><![CDATA[Vedant Kulkarni]]></dc:creator>
            <pubDate>Sat, 11 Jan 2025 14:26:44 GMT</pubDate>
            <atom:updated>2025-01-11T14:36:06.993Z</atom:updated>
            <content:encoded><![CDATA[<p>As an AI Engineer with 2.5 years of experience working closely with large language models (LLMs), I have had the opportunity to explore their vast potential in creating intelligent systems. Today, I want to share my understanding and opinion on two fascinating concepts: <strong>LLM Agents</strong> and <strong>Agentic Systems</strong>. Please note that the perspectives shared here are my own and not intended to serve as a universal standard.</p><h3>What Are LLM Agents?</h3><p>In my opinion, an LLM Agent is essentially an instance of an LLM call that is tailored to perform a specific, dedicated task. This specialization is achieved through:</p><ul><li><strong>Specially designed prompts</strong></li><li><strong>Chaining of prompts</strong></li><li><strong>Integration with external tools</strong></li><li><strong>Leveraging specialized models</strong></li></ul><p>Unlike generic foundation models, which are designed to provide broad, open-ended responses, LLM Agents focus on precision and specificity. They operate within a defined scope and are often equipped with a set of tools or techniques to handle domain-specific tasks effectively.</p><p>I find it useful to classify agents into categories based on their functionality:</p><ol><li><strong>Worker Agents</strong>: Perform a single, well-defined task with the help of specific tools.</li><li><strong>Handler Agents</strong>: Manage a static sequence of tasks.</li><li><strong>Planner Agents</strong>: Decompose a natural language input into stepwise actions, creating a dynamic plan of execution.</li></ol><p>To illustrate, here are some examples of LLM Agents:</p><ul><li><strong>Information Summarizer Agent</strong>: Summarizes lengthy documents into concise, actionable insights.</li><li><strong>Image Generator Agent</strong>: Generates images from textual descriptions.</li><li><strong>Image Reader Agent</strong>: Extracts information from images, such as text or object details.</li><li><strong>RAG Agent: </strong>To perform RAG on documents in PDF, DOCX, PPTX etc.</li></ul><p>Domain-specific examples might include:</p><ul><li><strong>Medication Information Provider Agent </strong>: Provides medication information from vast set of information on internet as well as files.</li><li><strong>Cheque Validator Agent</strong>: Validates and processes checks for financial institutions.</li><li><strong>Transaction Recorder and Retriever Agent</strong>: Maintains and retrieves transaction logs for audit or operational purposes.</li></ul><p>A key characteristic of agents is their modularity. They can be designed to operate independently and serve as “plug-and-play” components within larger systems.</p><h3>Understanding Agentic Systems</h3><p>Agentic Systems, as I see them, are essentially <strong>compound systems</strong> composed of multiple agents working together in harmony to achieve a single goal. The strength of an agentic system lies in its ability to coordinate multiple specialized agents, each playing a unique role, to perform complex tasks efficiently.</p><h3>Components of Agentic System</h3><p>When building agentic systems, I follow a consistent pattern:</p><ol><li><strong>Create a pool of agents</strong>: Define clear descriptions for each agent’s role and functionality.</li><li><strong>Develop an output parser agent</strong>: This agent ensures that the outputs from different agents are presented in a consistent, user-friendly format. This is crucial when multiple agents contribute to the final output.</li><li><strong>Establish a landing platform for input</strong>: This is where the input to the system is first processed, and its approach can vary based on requirements. Two common strategies are:</li></ol><ul><li><strong>Planning Agent Approach</strong>: A centralized planner agent generates a workflow dynamically based on the input. While flexible, this method can sometimes lack consistency in production.</li><li><strong>Descriptive Plan/Workflow Approach</strong>: Predefined workflows govern the sequence of tasks, ensuring stability and predictability. This approach is particularly useful for batch processing and repeatable tasks. A workflow-driven agentic system offers several benefits: i)<strong>Transparency</strong>: The workflow is no longer a black box. Human operators can view and modify it as needed. ii)<strong>Consistency</strong>: Repeated tasks are executed with uniformity, which is essential for batch processing.</li></ul><p>That said, dynamic planners have their own merits, especially in scenarios where workflows are not pre-defined. For example, a planner agent is ideal for solving ad hoc problems like coding challenges, where the steps to the solution vary widely.</p><h3>The Role of Human-in-the-Loop (HITL)</h3><p>In any agentic system, I strongly advocate for incorporating a <strong>Human-in-the-Loop (HITL)</strong> mechanism. HITL serves as a safeguard, especially during batch processing of large inputs. If something goes wrong, a human can intervene to clarify or rectify the situation, ensuring the system remains functional It still may happen that HITL brings in human input that the AI may not interpret correctly hence the SME looping the AI system must have competency in the domain. Personally, I have experimented with HITL using tools like <strong>Langraph</strong>, and it has proven to be an effective approach for maintaining system reliability. I</p><h3>Applications and Future Directions</h3><p>Based on my work and exploration, here are some potential applications for agents and agentic systems:</p><h4>Agents</h4><ul><li><strong>Chatbots and Virtual Assistants</strong>: LLM Agents can provide contextual, task-specific assistance to users.</li><li><strong>Copilots</strong>: In domains like coding, writing, or design, agents can serve as copilots, augmenting human capabilities.</li></ul><h4>Agentic Systems</h4><ul><li><strong>Domain-Specific Procedure Automation</strong>: Automating processes like document verification, loan approval workflows, or medical report analysis.</li><li><strong>Workflow-Driven Automation</strong>: Managing repetitive tasks like data entry, processing invoices, or generating reports.</li><li><strong>Human-Dependent System Automation</strong>: Systems where human oversight is crucial, such as large-scale legal document analysis or multi-step financial audits.</li></ul><h3>Final Thoughts</h3><p>Agents and agentic systems represent an exciting frontier in the application of LLMs. Their modularity, flexibility, and ability to collaborate open up endless possibilities for automation and augmentation across domains. While vanilla LLM applications offer incredible versatility, agentic systems take it a step further by providing structured, coordinated solutions that are often more efficient and effective for complex tasks. However, it’s crucial to remember that every implementation is unique and must be tailored to the specific needs of the task or organization.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=6052fca643e6" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>