<?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 Saumitra Joshi on Medium]]></title>
        <description><![CDATA[Stories by Saumitra Joshi on Medium]]></description>
        <link>https://medium.com/@saumitra1joshi?source=rss-85b2c9173d56------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*0IrIn-F4s4ITfKPf1lenYg.jpeg</url>
            <title>Stories by Saumitra Joshi on Medium</title>
            <link>https://medium.com/@saumitra1joshi?source=rss-85b2c9173d56------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Mon, 30 Nov 2026 15:10:04 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@saumitra1joshi/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[Multi-Agent Generative AI : Business Operations, Architecture, Use Cases & Future Trends]]></title>
            <link>https://medium.com/@saumitra1joshi/multi-agent-generative-ai-business-operations-architecture-use-cases-future-trends-46b80da42260?source=rss-85b2c9173d56------2</link>
            <guid isPermaLink="false">https://medium.com/p/46b80da42260</guid>
            <category><![CDATA[agents]]></category>
            <category><![CDATA[agentic-ai]]></category>
            <category><![CDATA[ai]]></category>
            <category><![CDATA[generative-ai-solution]]></category>
            <category><![CDATA[multi-agent-systems]]></category>
            <dc:creator><![CDATA[Saumitra Joshi]]></dc:creator>
            <pubDate>Sun, 06 Apr 2025 01:30:06 GMT</pubDate>
            <atom:updated>2025-04-06T01:39:06.608Z</atom:updated>
            <content:encoded><![CDATA[<h3>Multi-Agent Generative AI : Business Operations, Architectures, Use Cases &amp; Future Trends</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/652/0*trR6lnAGPcq6o1Mi" /></figure><p><strong>Multi-Agent AI</strong> represents the most powerful form of Agentic AI. <strong>Multi-Agent Systems (MAS)</strong> in the context of generative AI involve multiple autonomous agents — typically powered by large language models (LLMs) — that interact and collaborate to achieve a shared goal. The core objective is to replicate real-world human organizations, where individuals specialize in specific tasks and communicate with others to coordinate and complete a larger mission. Each agent in the system has:</p><ul><li>A <strong>specialized role</strong> or area of expertise</li><li><strong>Autonomy</strong> to make decisions</li><li>The ability to <strong>communicate</strong> with other agents</li><li>Access to <strong>tools</strong>, memory, or external APIs</li></ul><h3><strong>Business Operations</strong></h3><p><strong>Multi-agent AI has unlocked the potential to automate complex, fluid workflows that span cross-functional departments and traditionally demand significant engineering, organizational, communicative, and technical effort.</strong> When implemented effectively, this automation drives greater efficiency and accelerates processes across an enterprise.</p><p>The dynamic nature of multi-agent systems — where agents can reason independently and adapt plans mid-task — makes them <strong>uniquely suited to automate workflows that conventional software development techniques couldn’t previously address.</strong> Unlike rigid automation tools, these systems thrive in environments where flexibility and real-time decision-making are essential.</p><p>Most organizational workflow automation relies on data sources and tools that enable agents to interact with data, process it, and generate actionable outputs. This capability powers the automation of a wide range of workflows, though the <strong>optimal level of automation depends on the workflow’s nature.</strong> Some can be fully automated with near-perfect reliability, others can be automated entirely but with a success rate below 100% (requiring human oversight), and still others necessitate a collaborative approach, with humans and agents working together at key stages.</p><p><strong>Most workflow automations within organizations today are implemented in-house rather than through SaaS-based multi-agent products.</strong> This is primarily due to the need for customization, the complexity and nuances of specific workflows, heavily guarded infrastructure, and a general reluctance to share sensitive credentials with third-party SaaS providers. <strong>Even for more generic workflows, deploying a Multi-Agent System (MAS) within the customer’s own environment often makes more sense, as it avoids the need for credential sharing and allows for tighter integration with internal systems.</strong></p><h4><strong>Advantages Over Traditional Automation</strong></h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*S3rxG8qH75unlK8COXrSag.png" /></figure><p>Some impactful examples of business operations that can potentially be automated using MAS -</p><h4><strong>Automating Data / Business Analytics Workflows</strong></h4><p><strong>Workflow</strong>: Generating insights, statistics, and reports from raw data with minimal effort, replacing manual analysis with a simple prompt to the multi-agent system (MAS).</p><p><strong>Agents Involved</strong>:</p><ul><li><strong>Agent 1: Data Connector</strong> — Integrates with data sources (e.g., databases, APIs, CSV files) to collect and clean raw data for analysis.</li><li><strong>Agent 2: Math Tools Agent</strong> — Performs statistical computations (e.g., averages, correlations, regressions) and identifies key patterns or anomalies.</li><li><strong>Agent 3: Python Playground Agent</strong> — Executes custom Python scripts for advanced analytics or machine learning tasks, tailored to the prompt’s needs.</li><li><strong>Agent 4: Chart Generator</strong> — Creates visualizations (e.g., bar charts, scatter plots, heatmaps) to represent the data and insights clearly.</li><li><strong>Agent 5: Document Writer</strong> — Compiles findings into a polished report, complete with explanations, stats, and embedded charts.</li></ul><p><strong>Outcome</strong>: Comprehensive, actionable insights delivered in minutes rather than hours or days, requiring only a prompt like “Analyze sales trends for Q1” instead of manual data wrangling and reporting.</p><h4><strong>Automating Content Marketing Campaigns</strong></h4><p><strong>Workflow</strong>: Producing a full marketing campaign, including blog posts, social media content, and visuals.</p><p><strong>Agents Involved</strong>:</p><ul><li><strong>Agent 1: Research Agent</strong> — Gathers data on trending topics, keywords, and audience preferences.</li><li><strong>Agent 2: Text Generator</strong> — Writes the blog post and drafts social media captions based on Agent 1’s insights.</li><li><strong>Agent 3: Image Generator</strong> — Creates visuals (e.g., infographics or ad banners) to match the text.</li><li><strong>Agent 4: Optimization Agent</strong> — Analyzes performance metrics and suggests tweaks (e.g., better headlines or posting times).</li></ul><p><strong>Outcome</strong>: A cohesive campaign delivered in hours instead of days, with minimal human input beyond final approval.</p><h4><strong>Automating Customer Relationship Management Workflows</strong></h4><p><strong>Workflow</strong>: Efficiently resolving customer inquiries and reacting to key events with speed and accuracy, ensuring seamless communication and timely action.</p><p><strong>Agents Involved</strong>:</p><ul><li><strong>Agent 1: Inquiry Classifier</strong> — Analyzes incoming customer messages to categorize inquiries (e.g., support, billing, feedback) and assess urgency.</li><li><strong>Agent 2: Event Monitor</strong> — Tracks real-time CRM data and external triggers (e.g., purchase completions, churn signals) to identify actionable events.</li><li><strong>Agent 3: Response Generator</strong> — Drafts tailored, context-aware replies or actions (e.g., troubleshooting steps, thank-you notes) based on inputs from Agents 1 and 2.</li><li><strong>Agent 4: Escalation Handler</strong> — Flags complex inquiries or critical events for human intervention, providing a summary to streamline handoff.</li><li><strong>Agent 5: Follow-Up Agent</strong> — Schedules and sends follow-up messages or checks in post-resolution to ensure customer satisfaction.</li></ul><p><strong>Outcome</strong>: Rapid, accurate responses to inquiries and events, delivered in real time, enhancing customer experience with minimal manual oversight.</p><h3><strong>The Technical Backbone: How Multi-Agent Architecture Works</strong></h3><p>At its core, multi-agent generative AI is about collaboration. Unlike a monolithic model, this approach involves multiple AI agents — each with its own strengths — working together toward a shared goal.</p><p><strong>Key Components</strong></p><ol><li>Agents: Specialized AI models (e.g., LLMs, image generators, or data analyzers) designed for specific tasks. One might excel at text generation, another at pattern recognition.</li><li>Coordination Layer: A system that manages communication and task delegation between agents. This could be rule-based, learned via reinforcement, or orchestrated by a central “conductor” AI.</li><li>Shared Memory or Context: Agents often share a knowledge base or context window to stay aligned, ensuring outputs are coherent and complementary.</li><li>Feedback Loops: Agents learn from each other’s outputs, refining their performance over time through iterative improvement.</li></ol><p>The architecture of an MAS defines how these agents are organized, how they communicate, and how they work together to achieve a shared or individual goal. Unlike single-agent systems, MAS architectures must account for distributed decision-making, adaptability, and interaction dynamics.</p><p>Here are some key architectural approaches to MAS —</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*DFzV2jJ3YCP6ImGT.png" /></figure><h4>1. Centralized Architecture</h4><p><strong>Description</strong>: A single “controller” agent or module oversees and directs all other agents, acting as a hub for decision-making and task delegation.</p><p><strong>How It Works</strong>: Subordinate agents report to the central controller, which processes inputs, assigns tasks, and synthesizes outputs. Communication flows top-down and bottom-up through the controller.</p><p><strong>Strengths</strong>:</p><ul><li>Simplified coordination and conflict resolution.</li><li>Clear accountability and oversight.</li></ul><p><strong>Weaknesses</strong>:</p><ul><li>Single point of failure — if the controller fails, the system collapses.</li><li>Bottlenecks as the controller handles all communication.</li></ul><p><strong>Example Use Case</strong>: A customer support MAS where a central agent triages inquiries and assigns them to specialized agents (e.g., billing, technical support).</p><p><strong>Analogy</strong>: A conductor leading an orchestra, directing each musician’s part.</p><h4>2. Decentralized Architecture</h4><p><strong>Description</strong>: Agents operate independently without a central authority, coordinating through peer-to-peer communication and local decision-making.</p><p><strong>How It Works</strong>: Each agent has its own goals and logic, negotiating or collaborating with others as needed. Coordination emerges from agent interactions rather than top-down control.</p><p><strong>Strengths</strong>:</p><ul><li>Resilience — no single point of failure.</li><li>Scalability, as agents can be added without overloading a central node.</li></ul><p><strong>Weaknesses</strong>:</p><ul><li>Risk of misalignment or conflicts without a unifying authority.</li><li>Complex communication overhead.</li></ul><p><strong>Example Use Case</strong>: A supply chain MAS where agents managing inventory, logistics, and pricing adjust dynamically based on real-time peer updates.</p><p><strong>Analogy</strong>: A flock of birds, moving in sync through local rules rather than a leader.</p><h4>3. Hierarchical Architecture</h4><p><strong>Description</strong>: Agents are organized in a tiered structure, with higher-level agents overseeing groups of lower-level agents, blending centralized and decentralized traits.</p><p><strong>How It Works</strong>: Top-tier agents set high-level goals or strategies, while lower-tier agents handle execution. Communication flows within and across levels, with some autonomy at each tier.</p><p><strong>Strengths</strong>:</p><ul><li>Balances control and flexibility.</li><li>Efficient for complex, multi-step workflows.</li></ul><p><strong>Weaknesses</strong>:</p><ul><li>Dependency on higher-level agents can slow decision-making.</li><li>More complex to design and maintain.</li></ul><p><strong>Example Use Case</strong>: A software development MAS where a project manager agent sets deadlines, mid-level agents oversee coding and testing, and worker agents execute specific tasks.</p><p><strong>Analogy</strong>: A corporate org chart, with executives, managers, and staff collaborating across levels.</p><h4>4. Hybrid Architecture</h4><p><strong>Description</strong>: Combines elements of centralized, decentralized, and hierarchical designs to suit specific needs, often adapting dynamically to the task or environment.</p><p><strong>How It Works</strong>: Some tasks might use a central coordinator, while others rely on peer-to-peer interaction. Agents can switch roles or coordination styles based on context.</p><p><strong>Strengths</strong>:</p><ul><li>Highly adaptable to diverse workflows.</li><li>Optimizes for both efficiency and resilience.</li></ul><p><strong>Weaknesses</strong>:</p><ul><li>Increased complexity in implementation and debugging.</li><li>Requires sophisticated coordination logic.</li></ul><p><strong>Example Use Case</strong>: A marketing campaign MAS where a central agent sets the strategy, but content creation agents (text, visuals) collaborate peer-to-peer, and an optimization agent reports back centrally.</p><p><strong>Analogy</strong>: A sports team with a coach (centralized strategy) but players making real-time decisions on the field (decentralized execution).</p><h4>Why It Matters</h4><p><strong>Multi-Agent System architectures play a crucial role in determining the efficiency, robustness, and applicability of agent-based solutions</strong>. A hierarchical system might shine in a report generation workflow, while a decetralized one suits more open ended worflows like marketing campaign generation. Choosing the right architecture depends on the nature of the task, system scale, and desired performance characteristics.</p><h3>Most Eminent Frameworks for Building MAS —</h3><ul><li>LangGraph</li><li>CrewAI</li><li>Autogen</li></ul><h3>Use Cases</h3><p><strong>1. Finance &amp; Accounting</strong></p><ul><li>Automating invoice validation, budget forecasting, and compliance checks.</li><li>Example agents: Invoice Parser, Policy Validator, Report Generator.</li></ul><p><strong>2. HR &amp; Recruitment</strong></p><ul><li>Resume screening, interview scheduling, onboarding documentation.</li><li>Agents can collaborate with humans via Slack or email.</li></ul><p><strong>3. Customer Support</strong></p><ul><li>Triage tickets, generate solutions, escalate when needed.</li><li>Multi-agent bots can tag, analyze, respond, and even create support wiki entries.</li></ul><p><strong>4. DevOps &amp; IT</strong></p><ul><li>Log monitoring, anomaly detection, auto-scaling infrastructure.</li><li>MAS can trigger healing actions and notify engineers with summaries.</li></ul><p><strong>5. Marketing</strong></p><ul><li>Automate A/B testing, copywriting, audience segmentation.</li><li>Coordinated agents reduce manual overhead and shorten campaign cycles.</li></ul><h3><strong>Future Trends</strong></h3><p>As underlying LLMs continue to improve in output quality, and frameworks evolve to enable more sophisticated and coordinated agent interactions, <strong>multi-agent systems (MAS) will increasingly feel more practical, reliable, and ready for real-world deployment</strong> than they do today.</p><h4>1. AI-Native Enterprises</h4><p>Workflows will be staffed not just with human employees but with <strong>AI agents that own KPIs</strong>, make decisions, and evolve their roles.</p><h4>2. Hyper-Personalization</h4><p>As agents get better at collaborating and learning, they’ll <strong>tailor solutions to individual users at scale</strong>. Think bespoke marketing campaigns or personalized learning plans generated in seconds.</p><h4>3. Agent-to-Agent Ecosystems (A2A Networks)</h4><p>Agents currently work within closed systems. With time they will interact across platforms, access marketplaces of external agents, negotiate, trade, or collaborate dynamically. This will lead to A2A networks — <strong>entire ecosystems of interoperable agents working across companies, APIs, and data silos.</strong></p><h4>4. Goal-Driven Agents with Autonomy</h4><p>Although it may seem far-fetched today, one can envision a future where multi-agent systems not only complete tasks without direct human intervention but also <strong>actively understand, strategize around, and pursue higher-level objectives and goals.</strong> Given a high-level objective (e.g., “grow sales by 20%”), agents will: Break it down, Strategize, Adapt based on results.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=46b80da42260" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Langchain (Agents, Tools, Chains & Memory) for utilizing the full potential of LLMs]]></title>
            <link>https://medium.com/@saumitra1joshi/langchain-agents-tools-chains-memory-for-utilizing-the-full-potential-of-llms-211e5dfee3fa?source=rss-85b2c9173d56------2</link>
            <guid isPermaLink="false">https://medium.com/p/211e5dfee3fa</guid>
            <category><![CDATA[genai]]></category>
            <category><![CDATA[llm]]></category>
            <category><![CDATA[langchain]]></category>
            <category><![CDATA[openai]]></category>
            <category><![CDATA[langchain-agents]]></category>
            <dc:creator><![CDATA[Saumitra Joshi]]></dc:creator>
            <pubDate>Wed, 08 Nov 2023 10:54:53 GMT</pubDate>
            <atom:updated>2023-11-10T19:31:54.381Z</atom:updated>
            <content:encoded><![CDATA[<h3><strong>Introduction</strong></h3><p>The advent of Gen AI in the zeitgeist has been one of the most disruptive entries of any new technology, with consumers of technology excited and companies eager to provide better experiences and up their business productivities. Goldman Sachs research estimates the total addressable market for generative AI software to be $150 billion, compared with $685 billion for the global software industry. To benefit from these huge business opportunities, companies can leverage Gen AI for growth in various ways -1) New production and application releases, 2) Charging premiums for AI-integrated offerings, and 3) Increasing prices over time as existing products are supplemented with AI-enabled features and prove their value to customers. This inevitably requires for Gen AI models to be used in very creative and complex ways compared to just single prompts on LLM’s. This need is fulfilled by many libraries and frameworks, the most notable and expansive of which is Langchain.</p><p>In this article we will explore — What is Langchain?, its core features, and then solidify that knowledge with a concise walkthrough of a powerful application made using Langchain.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*QId200vAxHSVGMB_v4VA2g.jpeg" /></figure><h3>What is Langchain?</h3><p>Langchain is the most comprehensive and useful library available to make Gen AI applications. It allows for the creation of really complex interaction flows with LLMs. It is a vast open source designed to help build applications powered by large language models (LLMs) like ChatGPT, and create more advanced use cases around them by chaining together different components from several modules.</p><p>This library assists in the development of applications that not only call out to a language model via an API but also connect to other sources of data (Integration), interact with their environment (Agency) and offers a plethora of tools for developing application with capabilities far superior compared to simple single prompt application developed using GPT.</p><p>Langchain offers a bunch of features in the form of pre-defined classes and functions of which custom versions can also be made to suit the needs for the application you want to build. Since all of these classes and functions are customisable you can create very complex networks leveraging these features.</p><p>In this article we will explore the most powerful features in the Langchain Library, which are -</p><h4><strong>1) Agents</strong></h4><p>Some applications will require not just a predetermined chain of calls to LLMs/other tools, but potentially an unknown chain that depends on the user’s input. In these types of chains, there is a “agent” which has access to a suite of tools. Depending on the user input, the agent can then decide which, if any, of these tools to call.</p><p>The core idea of agents is to use an LLM to choose a sequence of actions to take. In chains, a sequence of actions is hardcoded (in code). In agents, a language model is used as a reasoning engine to determine which actions to take and in which order.</p><p>Simply put, <strong>Agent = Tools + Memory</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/960/1*S7e0jWcLVxR2583BugkQuQ.png" /></figure><p>Looking at the diagram below, when receiving a request, Agents make use of a LLM to decide on which Action to take.</p><p>After an Action is completed, the Agent enters the Observation step.</p><p>From Observation step Agent shares a Thought; if a final answer is not reached, the Agent cycles back to another Action in order to move closer to a Final Answer.</p><p>There is a whole array of Action options available to the LangChain Agent.</p><p>Actions are taken by the agent via various tools. The more tools are available to an Agent, the more actions can be taken by the Agent.</p><p>There are many types of agents such as — Conversations, ReAct etc. Custom agents can be made as well.</p><h4>2) Tools</h4><p>Tools are functions that agents can use to interact with the world. They are functions that are supposed to perform specific duties. These tools can be generic utilities (e.g. google search, database lookups, mathematical opeartions etc.), other chains, or even other agents.</p><p>Tools allow for the LLM to interact with the outside world and since they are customizable they can pretty much coded to do anything you like and not just some limited pre-defined operations.</p><h4>3) Chains</h4><p>Using an LLM in isolation is fine for simple applications, but more complex applications require chaining LLMs — either with each other or with other components.</p><p>LangChain provides the Chain interface for such “chained” applications. We define a Chain very generically as a sequence of calls to components, which can include other chains.</p><p>In the sample project explained in this article, the Sequential Chain is used which will give very clear insight into how these chains work.</p><p>Langchain has 4 types of foundational chains -</p><ol><li><strong>LLM</strong> — A simple chain with a prompt template that can process multiple inputs.</li><li><strong>Router</strong> — A gateway that uses the large language model (LLM) to select the most suitable processing chain.</li><li><strong>Sequential</strong> — A family of chains which processes input in a sequential manner. This means that the output of the first node in the chain, becomes the input of the second node and the output of the second, the input of the third and so on.</li><li><strong>Transformation</strong> — A type of chain that allows Python function calls for customizable text manipulation.</li></ol><p>4) <strong>Memory</strong></p><p>You can provide attach memory to your so that it remembers the context of the conversation and responds accordingly.</p><ol><li><strong>Buffer Memory: </strong>The Buffer memory in Langchain is a simple memory buffer that stores the history of the conversation. It has a buffer property that returns the list of messages in the chat memory. The load_memory_variables function returns the history buffer. This type of memory is useful for storing and retrieving the immediate history of a conversation.</li><li><strong>Buffer Window Memory:</strong> Buffer Window Memory is a variant of Buffer Memory. It also stores the conversation history but with a twist. It has a property k which determines the number of previous interactions to be stored. The buffer property returns the last k*2 messages from the chat memory. This type of memory is useful when you want to limit the history to a certain number of previous interactions.</li><li><strong>Entity Memory:</strong> The Entity Memory in Langchain is a more complex type of memory. It not only stores the conversation history but also extracts and summarizes entities from the conversation. It uses the Langchain Language Model (LLM) to predict and extract entities from the conversation. The extracted entities are then stored in an entity store which can be either in-memory or Redis-backed. This type of memory is useful when you want to extract and store specific information from the conversation.</li></ol><p>Each of these memory types has its own use cases and trade-offs. Buffer Memory and Buffer Window Memory are simpler and faster but they only store the conversation history. Entity Memory, on the other hand, is more complex and slower but it provides more functionality by extracting and summarizing entities from the conversation.</p><p>As for the data structures and algorithms used, it seems that Langchain primarily uses lists and dictionaries to store the memory. The algorithms are mostly related to text processing and entity extraction, which involve the use of the Langchain Language Model.</p><ol><li><strong>Conversation Knowledge Graph Memory: </strong>The Conversation Knowledge Graph Memory is a sophisticated memory type that integrates with an external knowledge graph to store and retrieve information about knowledge triples in the conversation. It uses the Langchain Language Model (LLM) to predict and extract entities and knowledge triples from the conversation. The extracted entities and knowledge triples are then stored in a NetworkxEntityGraph, which is a type of graph data structure provided by the NetworkX library. This memory type is useful when you want to extract, store, and retrieve structured information from the conversation in the form of a knowledge graph.</li><li><strong>ConversationSummaryMemory:</strong> The ConversationSummaryMemory is a type of memory that summarizes the conversation history. It uses the LangChain Language Model (LLM) to generate a summary of the conversation. The summary is stored in a buffer and is updated every time a new message is added to the conversation. This memory type is useful when you want to maintain a concise summary of the conversation that can be used for reference or to provide context for future interactions.</li><li><strong>ConversationSummaryBufferMemory: </strong>ConversastionSummaryBufferMemory is similar to the ConversationSummaryMemory but with an added feature of pruning. If the conversation becomes too long (exceeds a specified token limit), the memory prunes the conversation by summarizing the pruned part and adding it to a moving summary buffer. This ensures that the memory does not exceed its capacity while still retaining the essential information from the conversation.</li><li><strong>ConversationTokenBufferMemory:</strong> ConversationTokenBufferMemory is a type of memory that stores the conversation history in a buffer. It also has a pruning feature similar to the ConversationSummaryBufferMemory. If the conversation exceeds a specified token limit, the memory prunes the earliest messages until it is within the limit. This memory type is useful when you want to maintain a fixed-size memory of the most recent conversation history.</li><li><strong>VectorStore-Backed Memory:</strong> The VectorStore-Backed Memory is a memory type that is backed by a VectorStoreRetriever. The VectorStoreRetriever is used to retrieve relevant documents based on a query. The retrieved documents are then stored in the memory. This memory type is useful when you want to store and retrieve information in the form of vectors, which is particularly useful for tasks such as semantic search or similarity computation.</li></ol><h4>Callback Handlers</h4><p>LangChain provides a callbacks system that allows you to hook into the various stages of your LLM application. This is useful for logging, monitoring, streaming, and other tasks. The BaseCallbackHandler class is used to define the actions to be performed inside the hook functions.</p><p>Some available hooks are — on_llm_start, on_agent_end, on_chain_start. The names of these hooks are self explanatory. Code can be written inside these functions which has to be performed when those functions are called.</p><p>The object of the BaseCallbackHandler class can provided to the appropriate agent, chain, tool etc.</p><h3><strong>Walkthrough — Project Utilizing Langchain</strong></h3><p>The following image displays the architecture I’ve used in a project that helps in answering questions on data available in a large SQL database, by creating SQL queries to fetch relevant data, then analyzing the fetched data and then returning a response in the form of answer.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/896/1*vDt2qXB5W7AWZAXFkjWwgA.png" /></figure><p>In the image above it can be seen that the agent has two chains available to it as tools which are -</p><ol><li>Analysis Chain (For doing analysis on data in memory)</li><li>Sequential Chain (For writing SQL queries)</li></ol><p><strong>NOTE: While there are predefined and configured agents, tools and chains are available, custom versions of all of these can be made.</strong></p><p><strong>NOTE: Chains can be provided as tools to the agent. Similarly, Tools can be made available as a chain segment in chains as well. The user has a lot of freedom to customize these agents, tools, chains and can plug, sequence them according to their needs.</strong></p><pre>tools=[<br>    Tool.from_function(func=sequentialchain._run,<br>                    name=&quot;tool1&quot;,<br>                    description=&quot;Useful when user wants information about revenue, margin, employee and projects. Input is a descriptive plain text formed using user question and chat history and output is the result.&quot;<br>    ),<br>    <br>    Tool.from_function(func=analysis._run,<br>                    name=&quot;tool2&quot;,<br>                    description=&quot;Useful when you want to do some calculations and statistical analysis using the memory. Input is a list of numbers with description of what is to be done to it or a mathematical equation of number and output is result.&quot;<br>    )<br>    ]</pre><p>The code snippet above shows a tools array in which two chains, namely — sequentialchain and analysis chain are provided as tools.</p><pre>memory = ConversationBufferWindowMemory(memory_key=&quot;chat_history&quot;,return_messages=True,k=7)<br>llm = AzureChatOpenAI(<br>    temperature=0,<br>    deployment_name=&quot;********************&quot;,<br>    model_name=&quot;gpt-35-turbo-16k&quot;,<br>    openai_api_base=&quot;***************************&quot;,<br>    openai_api_version=&quot;2023-07-01-preview&quot;,<br>    openai_api_key=&quot;**************&quot;,<br>    openai_api_type=&quot;azure&quot;<br>)<br>agent_chain=initialize_agent(<br>    tools,<br>    llm,<br>    agent=AgentType.OPENAI_FUNCTIONS,<br>    verbose=True,<br>    agent_kwargs=agent_kwargs,<br>    memory=memory,<br>    callbacks=[MyCustomHandler()]<br>)</pre><p>The initialize_agent function creates an agent object with the specifications you have entered in the function as arguments.</p><p>This agent is what manages the whole interaction with the LLM. The agent is run like this → answer=agent_chain.run(“the query put in by the user”)</p><p>The tools and memory are provided to the agent. I have used the ConversationBufferWindowMemory() which allows me to specify the value k as 7. This means that the last 7 conversations (input and output) are available to the LLM when you ask a new question.</p><pre>class sequentialchain(BaseTool):<br>     def _run(<br>        self, run_manager: Optional[CallbackManagerForToolRun] = None<br>    ) -&gt; str:<br>        tables = similarity_search(self)<br>        print(tables)<br>        sql_chain  = SQLAgent(tables)<br>        querycheckchain=querycheckfunc(tables)<br>        executorchainobj=QueryExecutorChain(user_query=self)<br>        overall_chain = SimpleSequentialChain(chains=[sql_chain, querycheckchain, executorchainobj], verbose=True)<br>        review = overall_chain.run(self)<br>        return review</pre><p>The similarity_search() function gets the appropriate table descriptions from the vector db and provides it as input variables for the chains so they can write proper SQL queries.</p><p>The SimpleSequentialChain() has 3 chains passed to it — sql_chain, querycheckchain, executorchainobj which are run in succession. The output of the first chain is passed to the second chain as an input variable and the output of the third chain is passed to the third chain as an input variable.</p><p>The <strong>sql_chain </strong>— based on a prompt on how to create SQL queries and table descriptions makes SQL queries.</p><p>The<strong> querycheckchain </strong>— Receives the SQL query from sql_chain, then corrects all the errors, syntax, adds missing elements if any and makes it compliant to the standards described in prompt.</p><p>The <strong>executorchainobj </strong>— This chain segment is actually a tool passed as a chain. It Receives the SQL query that is ready to be run on the database.</p><p>The output or fetched data after running the SQL query is then received by the agent which had called the sequentialchain. The agent would interpret the fetched in accordance to the user’s input question, format it and provide the final answer/response to the user. If the agent wants to do some analysis on the fetched data it can then send this data to the analysis chain the output of which can then be formatted into a final answer/response.</p><p>If the question asked by a user is a follow up question, the agent can look at the memory and if it can find the necessary data in it, then it can formulate the answer based on the memory alone as well, or if it thinks some analysis is to be done then it can also directly send that data to the analysis chain as well.</p><p>Agent decides when to use the memory, which tool to use or if to use any tool at all.</p><p><strong>NOTE: I have used a custom chain (analysis chain) provided as a tool to the agent. There are predefined tools for all sorts of purposes like math, SQL connections, google drive connections, AWS Lambda connections etc.</strong></p><p>The analysis chain is a normal LLM call chain and has prompt instructions to do various types of statistical analysis (mean, median, standard deviation, variance etc.), calculate growth, percentages and other mathematical operations.</p><p>Callback Handlers can also be added to perform various tasks at certain defined stages of the application run cycle.</p><pre>class MyCustomHandler(BaseCallbackHandler):<br>    def on_llm_new_token(self, token: str, **kwargs) -&gt; None:<br>        print(f&quot;My custom handler, token: {token}&quot;)<br>        for key, value in kwargs.items():<br>            print(&quot;%s == %s&quot; % (key, value))<br><br>    def on_llm_end(<br>        self,<br>        outputs,<br>        *,<br>        run_id,<br>        parent_run_id,<br>        **kwargs,<br>    ):<br>        &quot;&quot;&quot;Run when llm call ends running.&quot;&quot;&quot;<br>        print(run_id)<br><br><br>    def on_chain_end(<br>        self,<br>        outputs,<br>        *,<br>        run_id,<br>        parent_run_id,<br>        **kwargs,<br>    ):<br>        &quot;&quot;&quot;Run when chain ends running.&quot;&quot;&quot;<br>        print(run_id)</pre><p>The CallbackHandler — MyCustomHandler() has been configured with certains set of code that would run on — on_chain_end, on_llm_end. The names of these hooks are self explanatory. When the object of this class is provided to the appropriate agent, tool, chain etc., these code inside these hooks would run as their names suggest.</p><p>All sorts of hooks such as on_chain_start, on_chain_end, on_tool_start, on_tool_end are available which can be specified to do certain tasks under the BaseCallbackHandler Class.</p><pre>prompt_template = PromptTemplate(input_variables=[&quot;query&quot;], template=template)<br>query_check_chain = LLMChain(llm=llm, prompt=prompt_template, output_key=&quot;review&quot;, callbacks=[MyCustomHandler()])</pre><p>The hook in this case — MyCustomHandler(), can be provided to the appropriate agent, tool or chain in the callbacks argument.</p><p>When all of this is set up when the agent is run — (agent_chain,run(“user’s input question”)), the application can self write the sql queries, run them to fetch data from the database, analyse the data, and give proper information as output to the user. The user never has to even open the database, write sql queries, fetch the data, dig through it for analysis etc. Everything happens automatically from start to finish.</p><h3>Final Thoughts</h3><p>Far more complicated langchain architectures can also be made if necessary with more nesting of agents, tools and chains.</p><p>Hopefully on reading about the core concepts of Langchain(Agents, Tools, Memory) and following the walkthrough of a sample project provided some insight into how exactly complex applications leveraging LLM’s actually work. There is a common misconception of underestimating the potential of Gen AI solutions. A simple single LLM call can only go so far, which is the way in which most people interact with LLM’s. This leads to vastly underestimating the potential of what can be accomplished with these LLM’s. When operated on by libraries such as langchain, as demonstrated in this article, they can do some pretty spectacular things which are hard to imagine when you think of LLM’s such as GPT 3.5, 4 as something that just answers your questions like a chatbot. In reality, they can be leveraged to make very powerful applications which can perform all sorts of functions, when their full potential is unlocked by third party libraries, the most powerful of which so far is Langchain.</p><h4>Feel free to reach out to me for any queries or discussions</h4><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=211e5dfee3fa" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Azure Digital Twin for Supply Chain Simulation and Management]]></title>
            <link>https://medium.com/@saumitra1joshi/azure-digital-twin-for-supply-chain-simulation-and-management-920259e30d1e?source=rss-85b2c9173d56------2</link>
            <guid isPermaLink="false">https://medium.com/p/920259e30d1e</guid>
            <category><![CDATA[digital-twin]]></category>
            <category><![CDATA[azure-digital-twin]]></category>
            <category><![CDATA[supply-chain-optimization]]></category>
            <category><![CDATA[supply-chain-management]]></category>
            <category><![CDATA[simulation]]></category>
            <dc:creator><![CDATA[Saumitra Joshi]]></dc:creator>
            <pubDate>Wed, 12 Jul 2023 10:23:19 GMT</pubDate>
            <atom:updated>2023-07-17T06:58:28.025Z</atom:updated>
            <content:encoded><![CDATA[<h3><strong>Introduction</strong></h3><p>A digital twin is a virtual replica or model of a physical entity, such as a building, factory, device, or system. It captures both the static and dynamic aspects of the physical object, including its properties, relationships, behaviors, and interactions with other objects. By creating a digital twin, you can gain insights into the performance, behavior, and status of the physical asset in real-time.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/600/1*r65e3qyEk2fl4ArAS3Numw.jpeg" /></figure><p>Azure Digital Twins is a cloud-based platform offered by Microsoft Azure that enables the creation and management of digital representations, also known as digital twins, of physical environments, systems, and processes. It provides a comprehensive set of capabilities to model, visualize, simulate, and interact with the physical and virtual assets in real-time.</p><h3>How can Digital Twins in Simulating and Managing Supply Chains?</h3><p>Digital twins can provide significant benefits in supply chain management by enhancing visibility, improving decision-making, optimizing operations, and enabling proactive monitoring and maintenance. Here are some specific ways digital twins can help in supply chain management:</p><ol><li><strong>Enhanced Visibility: </strong>Digital twins provide real-time visibility into the physical assets and processes throughout the supply chain. By creating digital replicas of warehouses, distribution centers, transportation systems, and even individual products, you can track their locations, condition, and status in real-time. This visibility allows for better inventory management, reduced stockouts, and improved demand forecasting.</li><li><strong>Predictive Analytics:</strong> Digital twins enable the application of predictive analytics to anticipate potential issues and optimize supply chain operations. By analyzing data from digital twins and historical records, you can identify patterns, predict demand fluctuations, optimize inventory levels, and identify potential bottlenecks or disruptions. This helps in proactive decision-making and reduces operational risks.</li><li><strong>Scenario Planning and Optimization:</strong> Digital twins can simulate various scenarios and what-if analyses to optimize supply chain operations. By creating virtual models of the supply chain and testing different configurations, routing strategies, and resource allocations, you can identify the most efficient and cost-effective approaches. This can lead to better capacity planning, optimized transportation routes, and improved resource utilization.</li><li><strong>Proactive Maintenance and Risk Management:</strong> Digital twins allow for proactive monitoring and maintenance of critical assets in the supply chain. By continuously collecting data from sensors and IoT devices embedded in physical assets, you can detect anomalies, predict failures, and schedule maintenance activities before breakdowns occur. This minimizes downtime, reduces costs associated with unplanned maintenance, and enhances overall supply chain resilience.</li><li><strong>Collaboration and Coordination:</strong> Digital twins facilitate collaboration and coordination among various stakeholders in the supply chain ecosystem. By sharing the digital twin data and insights with suppliers, logistics providers, and partners, you can improve communication, streamline processes, and enhance coordination. This leads to better supply chain visibility, faster response times, and improved overall efficiency.</li><li><strong>Increased Sustainability and ESG Scores: </strong>Digital Twins can significantly contribute to enhancing the ESG (Environmental, Social, and Governance) performance and sustainability of a supply chain. By creating a virtual representation of the supply chain processes, Digital Twins enable organizations to model and simulate various aspects, identify inefficiencies, and optimize operations. With real-time data integration from connected assets, such as vehicles, warehouses, and production facilities, organizations can monitor energy consumption, emissions, and resource utilization. This allows for proactive decision-making to reduce waste, improve energy efficiency, recognize and mitigate bottlenecks to minimize carbon footprint. Furthermore, Digital Twins facilitate predictive maintenance, contingency planning, ensuring timely repairs and reducing downtime, which ultimately optimizes resource usage and enhances sustainability. All of these lead to improved supply chain efficiency, reduced environmental impact, and enhanced social responsibility.</li></ol><h4><strong>Azure Digital Twins offers several key features —</strong></h4><ol><li><strong>Modeling and Describing:</strong> It provides a modeling language and tools to define the structure and behavior of digital twins. You can define the properties, relationships, and hierarchies of the objects and their interactions.</li><li><strong>Visualization and Simulation:</strong> Digital Twins allows you to visualize the digital representations of physical assets. You can simulate the behavior of the assets and run scenarios to understand how they might perform under different conditions.</li><li><strong>Data Ingestion and Processing:</strong> It supports the ingestion of real-time and historical data from various sources, such as sensors, IoT devices, and other systems. You can analyze and process this data to derive insights and make informed decisions.</li><li><strong>Integration and Interoperability:</strong> Azure Digital Twins can integrate with other Azure services, such as Azure IoT Hub and Azure Event Grid, to connect and exchange data with IoT devices and other applications. It also supports industry standards like the Digital Twins Definition Language (DTDL) for interoperability with other systems.</li><li><strong>Monitoring and Control: </strong>You can monitor the state, health, and performance of digital twins in real-time. It enables you to detect anomalies, trigger alerts, and initiate actions based on predefined rules and policies.</li></ol><p>Overall, digital twins enable supply chain managers to gain a comprehensive understanding of their operations, optimize processes, and make data-driven decisions. By leveraging real-time data, predictive analytics, and simulation capabilities, organizations can achieve greater efficiency, resilience, and customer satisfaction in their supply chain management efforts.</p><h4><strong>The following steps can be followed to make a basic replica of a supply chain using Azure Digital Twins —</strong></h4><p><strong>Resources — </strong><br>Download the json file for models and the .glb files for 3d Scenes: <a href="https://github.com/Saumitra1Joshi/Medium-AzureDigitalTwinResources">https://github.com/Saumitra1Joshi/Medium-AzureDigitalTwinResources</a></p><ol><li><strong>Creating Digital Twin Instance</strong></li></ol><ul><li>Click and search for “digital twin” the “Search resources, services, and docs (G+/)” field.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/960/1*n5vUsqJhP_lzF7cy6C7EJg.png" /></figure><ul><li>Click “Azure Digital Twins”.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/960/1*SAsNyKIXGoRSkQLo0TmvmA.png" /></figure><ul><li>Click on “Create”.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/960/1*kQMmImeLTS9EggykyN6Z_A.png" /></figure><ul><li>Click on “Create New” in Resource Group option and type “Demo” and select OK. Write “workshopdt” in the Resource Name field.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/960/1*agfHWY8vnf9Ak2Ca5yJBvQ.png" /></figure><ul><li>Click here to assign yourself Data Owner Role to the digital twin and click on “Review+Create”.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/960/1*5kBWpqhP6V8XORpDlNj9dA.png" /></figure><ul><li>Click on “Create”.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/960/1*3OwhxBSTcgGPlHFgqafNoQ.png" /></figure><ul><li>After deployment is completed click on “Go to Resource”.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/960/1*TXYTLxi2EjnZZp3yY5DsuQ.png" /></figure><ul><li>Click on “Open Azure Digital Twins Explorer”.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/960/1*DZgU9B0vCRHG0pXfr2HdrQ.png" /></figure><p><strong>2. Creating model and twins in Digital Twins Explorer</strong></p><ul><li>Select the upload icon in the model section to upload the models.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/768/1*EvN5exYY4imdTQJiv0RuAQ.png" /></figure><ul><li>Click here and select “Create a twin” option on the list. Type “plant1” as twin name on the popup.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/768/1*cwFLGTWqmH8NMRqzELQMhQ.png" /></figure><ul><li>Do the same steps for all models.</li></ul><p><strong>Note. Use “shipment1” name for shipment twin and “supplier1” for supplier twin.</strong></p><p><strong>3. Creating Relationship between twins</strong></p><ul><li>Select “shipment1” and “plant1” twin and right click to open dropdown list. Select “Add relationships”.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/768/1*2t3DPscz-Bxep5S4e7hTQA.png" /></figure><ul><li>Select the appropriate relationship and click “Save”.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/768/1*HcogeR6ymOgMULnxtYoctA.png" /></figure><ul><li>Select “supplier1” and “shipment1” twin and right click to open dropdown list. Select “Add relationships”.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/768/1*g5A2lGNWu-1FbWkIfpvimQ.png" /></figure><ul><li>Select the appropriate relationship and click “Save”.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/768/1*NqimAna-BJ4BsQ9DbhAHuQ.png" /></figure><p><strong>4. Creating Storage Account and Container for storing 3D models</strong></p><ul><li>Go back to azure console and search for “Storage accounts”.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/960/1*lXA9QnNBbidTMq4sAzVNaw.png" /></figure><ul><li>Click on “Create”.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/960/1*D575oNmU0KYPjEFInkTn4w.png" /></figure><ul><li>Select “Demo” in the Resource Group option.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/960/1*DSTcnfuZcoe8LiE8gGkZzw.png" /></figure><ul><li>Set “demoworkshop” as Storage Account Name and click on “Review”.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/960/1*VdrD0N34sLHfChsWsFNngQ.png" /></figure><ul><li>Click on “Create” and after the deployment is complete, click on “Go to Resource”.</li><li>Select “Access Control (IAM)” option.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/960/1*otlZulFDsNNz76cwXq21Jg.png" /></figure><ul><li>Click on Add and select “Add role assignment”.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/960/1*M24peunGte2FQ6Z7xOZ0bw.png" /></figure><ul><li>Click “Next”.</li><li>Select “Storage Blob Data Owner” and click “Next”.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/960/1*6OM4Ulz5xfWeY2tsbZpNxg.png" /></figure><ul><li>In the members section click “Select Members”. Enter your mail id and confirm.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/960/1*A2bJS3_mrPh7LX1AV5g5Nw.png" /></figure><p><strong>Note. The mail Id should be the same to your Azure Id.</strong></p><ul><li>Click “Review + Assign”.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/960/1*DQxFf-anDQpYZMXCsX_boA.png" /></figure><ul><li>Select “Container” option.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/960/1*Oa-X7FVL78VjciJ73q1RFQ.png" /></figure><ul><li>Click on “+ Container” and type “3dmodel” as the name of container.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/960/1*zqd8yRjjwuvU6m3SObSFkw.png" /></figure><ul><li>In the public access level select “Container” and click “Create”.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/960/1*CdFxo0Mk6gmyVrK1-sSbXw.png" /></figure><ul><li>Click on the created container and select “Upload”. Upload the 3d model .glb file.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/960/1*crO8cq18mWmSyMQu-LPr8Q.png" /></figure><p><strong>5. Resolving CORS issue</strong></p><ul><li>Open Azure CLI.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/960/1*yXmlvj6Xcz7UMYolij02IQ.png" /></figure><ul><li>Click “Create storage”.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/960/1*GeIny3uAxDLjIr0V-_q9cQ.png" /></figure><ul><li>After the terminal is initialised type the command “az storage cors add — services b — methods GET OPTIONS POST PUT — origins <a href="https://explorer.digitaltwins.azure.net/">https://explorer.digitaltwins.azure.net</a> — allowed-headers Authorization x-ms-version x-ms-blob-type — account-name &lt;your-storage-account&gt;”. Type your storage account name in place of the placeholder.</li></ul><p><strong>6. Adding 3D model and mapping Elements</strong></p><ul><li>In the digital twin Explorer, click here.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/768/1*PDiA71ep6a-TV7vjeeNDAA.png" /></figure><ul><li>Click on edit option.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/768/1*1OChZr-sH0vImly8Rp_73Q.png" /></figure><ul><li>In the Azure storage account URL select the storage account you created.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/768/1*C8nd5kJvcXpB4p5-RmXndg.png" /></figure><ul><li>In the Azure Storage container name select the container you just created and click “Save”.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/768/1*LAwzx2nB3wkKpaFJpz8ohw.png" /></figure><ul><li>Click “Add 3D Scene”.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/768/1*Z5HajWGTpeL1L8jDN5Kxiw.png" /></figure><ul><li>Enter “plantandsupplier” as Name of the scene and choose the 3d file from the list and click “Create”.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/768/1*95lmtwep82SDNknq3AoGrg.png" /></figure><ul><li>Select the scene and wait for the model to load.</li><li>Click on “New Element”.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/768/1*EH6gYR67lW-0pujzhCkH4g.png" /></figure><ul><li>Select twin to associate with 3d model. Enter “Plant 1” as name of twin. Then select the 3d model to which twin properties should be assigned.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/768/1*1Tjw7I1qmj8BAJP2u42xUw.png" /></figure><ul><li>Click “Create Element”.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/768/1*AC5RsISg9eopEpCLPPgsrw.png" /></figure><ul><li>Do same steps for supplier model. Set “Supplier 1” as the name of twin.</li></ul><p><strong>7. Creating a Visual Rule Behavior</strong></p><ul><li>Navigate to “Behavior” section and click on “New Behavior”.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/768/1*cwW1qCnd4g094qcT9a4F0w.png" /></figure><ul><li>Enter “Efficiency Rule” the Display Name and select “Plant 1” twin from the Element section.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/768/1*xQH9QIHjHajscJDFJ08Hwg.png" /></figure><ul><li>Navigate to Visual rules and select “Add Rule”.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/768/1*h-AY_aywb0Z4-CdBuGkcpw.png" /></figure><ul><li>Enter the display name and Select the Property in the Property Expression field for visual rule. In this case select “Efficiency”.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/768/1*Kxuozrge0yhvSYYNlhghgQ.png" /></figure><ul><li>Click “Add Condition” and enter the condition label, Min and Max value.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/768/1*i8PpkAx7xiXX03irPnbnog.png" /></figure><ul><li>For visual type select either element coloring or badges and select the appropriate color or badge.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/768/1*WJgBs0YR2Ec9RB2w5QLmdg.png" /></figure><ul><li>Follow same procedure for all conditions and click “Save” and then click “Create Behavior”.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/768/1*8aHZwrWtqIe5wuaig-_UHg.png" /></figure><p><strong>8. Creating a Widget Rule Behavior</strong></p><ul><li>Click on “New Behavior”.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/768/1*cwW1qCnd4g094qcT9a4F0w.png" /></figure><ul><li>Enter “Inventory Level” as the Display Name and select “Supplier 1” twin Element from the Elements section.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/768/1*0IpyRml9PIujs-jqciP4ag.png" /></figure><ul><li>Select “Add widget” in the Widgets section.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/768/1*QqRnqigNzIBMyfoVmJ928A.png" /></figure><ul><li>Select a widget and click on “Add Widget”.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/768/1*2M910W6zUvUKPF34fA7PpQ.png" /></figure><ul><li>Enter “Inventory Level” as Display Name, “units” in Units of measure and “InventoryLevel” in the Property Expression.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/768/1*-y6v4dxYoZpX9ZRDmVMRwA.png" /></figure><ul><li>Customize the widget by adding different range and associated color and click on “Create Widget” and then click on “Create Behavior”.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/768/1*0CifmPHUDpNggGMWEzLggA.png" /></figure><p>On following these steps, you would have a basic layout of a supply chain. You can replicate these steps according to your needs to create an increasingly complicated simulation of a supply chain with an intricate web of connections between supply chain entities.</p><h4>Hopefully this article has been insightful! Feel free to reach out for any queries.</h4><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=920259e30d1e" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Moving Resources from one Azure Account to another Using Azure Resource Mover]]></title>
            <link>https://medium.com/@saumitra1joshi/moving-resources-from-one-azure-account-to-another-using-azure-resource-mover-49c52a02f6d7?source=rss-85b2c9173d56------2</link>
            <guid isPermaLink="false">https://medium.com/p/49c52a02f6d7</guid>
            <category><![CDATA[azure-resource-mover]]></category>
            <category><![CDATA[azure-resource-manager]]></category>
            <category><![CDATA[azure-devops]]></category>
            <category><![CDATA[azure]]></category>
            <category><![CDATA[azure-resource-group]]></category>
            <dc:creator><![CDATA[Saumitra Joshi]]></dc:creator>
            <pubDate>Mon, 10 Jul 2023 12:32:21 GMT</pubDate>
            <atom:updated>2023-07-17T07:32:53.080Z</atom:updated>
            <content:encoded><![CDATA[<h3><strong>Introduction</strong></h3><p>Azure Resource Mover is a service available in the Azure portal for the purposes of moving resources between — a) Resource Groups b) Subscriptions c) Regions. In this article we will explore how to move resources between subscriptions of two different accounts which cannot be simply done by using Azure Resource Mover and requires some additional steps.</p><p>Generally Azure subscriptions are linked to their own Active Directories. If the intent is to move Azure Resources across Azure Subscriptions linked to different AD tenants, it is important to note that Azure Resource Mover does not allow such a transfer. For the resource migration between subscriptions linked to different AD tenants, it is necessary that both the sending and receiving subscriptions have access to a common active directory which then enables the Azure Resource Mover to migrate the resources. You will need the necessary permissions to complete this task. Azure Devops pipelines can also be made as an alternative for the transferring of the resources.</p><p><strong>NOTE: </strong>Some resources cannot be moved using Azure Resource Mover. While moving these resources the validation status for such resources will display failed. Some configurations and permissions might have to be made manually based on the nature of the resources.</p><h4><strong>To accomplish the task, the following steps have to be followed -</strong></h4><ol><li>Add the Sending Account as a User to the Receiving Accounts Azure Active Directory</li></ol><p>a) To do this first go to Azure Active directory in the Receiving Account</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*YyLwnIHNmWs_AhxnrhI7tA.png" /></figure><p>b) Go to <strong>Users -&gt; New User -&gt; Invite an external user</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*j2OD4cOk_C3vWfjqNe9GJQ.png" /></figure><p>c) Fill out the necessary details and click <strong>“Review+Invite”</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*KY3FYI6TEyl12SI21hQsHg.png" /></figure><p>d)<em> Accept the invite</em> sent to the Sending Accounts<em> Email Address</em></p><p>2. Go to the <em>Subscription</em> of the Sending Account, Click <em>Change Directory</em>, Enter the <em>Active Directory</em> of Receiving Account in <strong>“To”</strong> and Press <strong>“Change”</strong>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/794/1*jIT_iumsDJRRNrLKY_DOlQ.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/747/1*tPRPe_PIhWI7JS_JcRRbig.png" /></figure><p>3. Go the Sending Account Console, Click <strong>Profile -&gt; Switch Directory</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*KltWp2BrRvxDwVZiCj_yQA.png" /></figure><p>4. Under Current Directory, select the Active Directory Name of the Receiving Account and press<strong> “Switch”</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*zeTa6JXHPwGBJK52ma3dnA.png" /></figure><p>5. Go to Azure Resource mover in the Sending Account’s Console, then Click<strong> Move resources -&gt; Move resources to another subscription</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*nRSdrgBmRWf2mRLIgMR66w.png" /></figure><p>6. Select the Source and Target Subscription and Resource Group, then click <strong>“Next”</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*G3NOX6pHMU1aP68QiFTe9w.png" /></figure><p>7. Select the resources in the Source Resource Group that you want to move</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/845/1*uIG_1uO7CVQxx5HWp3ez2g.png" /></figure><p>8. Review the Selection Summary, if everything is as you intended, then click <strong>“Move”</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/849/1*193mjNGWeNNGO_hjY1thRQ.png" /></figure><p>9. If everything goes well, you will get a notification like this</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/846/1*2I5EgcNGrWbV2HmV2BopFw.png" /></figure><p>Once the migration is done check whether everything has migrated properly. Note that some additional configuration and premissions might be required for proper functioning of the resources.</p><h4><strong>Hopefully following these steps works for you! Feel free to reach out if you have any queries.</strong></h4><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=49c52a02f6d7" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>