<?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 Mainak Mandal on Medium]]></title>
        <description><![CDATA[Stories by Mainak Mandal on Medium]]></description>
        <link>https://medium.com/@mainakkmandal?source=rss-aa6a7640bb5d------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*N-AXO1FCn1UVXqGi.jpg</url>
            <title>Stories by Mainak Mandal on Medium</title>
            <link>https://medium.com/@mainakkmandal?source=rss-aa6a7640bb5d------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sat, 14 Nov 2026 09:56:40 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@mainakkmandal/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[Yogic Intelligence vs Artificial Intelligence: From Data-Driven Computation to…]]></title>
            <link>https://mainakkmandal.medium.com/yogic-intelligence-vs-artificial-intelligence-from-data-driven-computation-to-2310b45fdfb0?source=rss-aa6a7640bb5d------2</link>
            <guid isPermaLink="false">https://medium.com/p/2310b45fdfb0</guid>
            <category><![CDATA[artificial-intelligence]]></category>
            <category><![CDATA[ai-agent]]></category>
            <category><![CDATA[spirituality]]></category>
            <category><![CDATA[data-science]]></category>
            <dc:creator><![CDATA[Mainak Mandal]]></dc:creator>
            <pubDate>Sat, 07 Nov 2026 13:46:35 GMT</pubDate>
            <atom:updated>2026-11-07T13:46:35.685Z</atom:updated>
            <content:encoded><![CDATA[<h3>Yogic Intelligence vs Artificial Intelligence: From Data-Driven Computation to Consciousness-Oriented Wisdom</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*xBqoyp8PkBZ_rIqZiGnStg.png" /></figure><p>1. Introduction: Two Different Dimensions of Intelligence</p><p>Artificial Intelligence and human intelligence are often compared in terms of learning, reasoning, memory, problem-solving and decision-making. Modern AI systems can process enormous volumes of information, recognise complex patterns, generate language, write code and even coordinate multiple agents to achieve a defined objective.</p><p>But there is another dimension of human intelligence that deserves a deeper examination: **Yogic Intelligence — the intelligence of a purified Buddhi (বুদ্ধি).**</p><p>In Indian philosophical traditions, particularly the Bhagavad Gita, the Upanishads and Vedanta, Buddhi is not merely an instrument for analysing information. It is the faculty of discrimination, determination and discernment through which a human being can distinguish the temporary from the permanent, the desirable from the beneficial, and ultimately the Self from the non-Self.</p><p>This raises an interesting question:</p><p>**Can we compare the intelligence developed by an artificial neural network with the intelligence cultivated through Yoga, self-discipline and spiritual inquiry?**</p><p>The two systems have some conceptual similarities, particularly in their use of experience, learning and information. However, their fundamental orientations are very different.</p><p>AI primarily processes information to accomplish objectives defined by its designers or users. Yogic Intelligence, on the other hand, seeks to transform the individual&#39;s inner life through the purification of the mind and Buddhi, ultimately leading to Self-realisation.</p><p>This article explores that distinction.</p><p>2. Understanding Buddhi: The Intelligence That Directs Human Life</p><p>The Bhagavad Gita describes the relationship between the senses, mind, Buddhi and the Self in Chapter 3, Verse 42:</p><p>ইন্দ্রিয়াণি পরাণ্যাহুরিন্দ্রিয়েভ্যঃ পরং মনঃ।<br>মনসস্তু পরা বুদ্ধির্যো বুদ্ধেঃ পরতস্তু সঃ॥</p><p>**Meaning:** The senses are superior to the physical body; the mind is superior to the senses; Buddhi is superior to the mind; and beyond Buddhi is the Self.</p><p>This verse presents a hierarchy of human faculties.</p><p>- The senses receive information from the external world.<br>- The mind processes perceptions, feelings, desires and doubts.<br>- Buddhi evaluates, discriminates and makes decisions.<br>- The Self (Atman) is beyond these changing mental faculties.</p><p>Buddhi therefore plays a critical role in directing human behaviour.</p><p>A person may experience anger, desire, fear or attraction through the mind. But Buddhi can examine these impulses and decide whether acting upon them is appropriate.</p><p>For example, when someone insults us, the mind may immediately generate anger and an urge to retaliate. A discriminating Buddhi can recognise the consequences of such a reaction and choose restraint instead.</p><p>Thus, Buddhi is not simply an information-processing faculty. It is also an instrument of discrimination and self-regulation.</p><p>### The Chariot Analogy in the Katha Upanishad</p><p>The Katha Upanishad provides an especially powerful illustration of this relationship.</p><p>**Katha Upanishad 1.3.3**</p><p>আত্মানং রথিনং বিদ্ধি শরীরং রথমেব তু।<br> বুদ্ধিং তু সারথিং বিদ্ধি মনঃ প্রগ্রহমেব চ॥</p><p>**Meaning:** Know the Self as the master of the chariot, the body as the chariot, Buddhi as the charioteer and the mind as the reins.</p><p>The analogy can be understood as follows:</p><p>| Chariot analogy | Human existence |<br>| --- | --- |<br>| Master of the chariot | Atman |<br>| Chariot | Body |<br>| Charioteer | Buddhi |<br>| Reins | Mind |<br>| Horses | Senses |<br>| Road | Objects of sensory experience |</p><p>The charioteer must guide the horses through the reins. Similarly, Buddhi must regulate the mind and senses.</p><p>An uncontrolled mind can pull an individual towards distractions, attachments and desires. A discriminating Buddhi can guide the individual towards a higher purpose.</p><p>This analogy also reveals an important philosophical distinction: Buddhi is an instrument of awareness and decision-making, but it is not itself the ultimate conscious Self.</p><p>---</p><p>3\. What Is Yogic Intelligence?</p><p>For this discussion, let us define Yogic Intelligence as:</p><p>**The capacity of a human being to use discrimination, emotional refinement, concentration, self-awareness and willpower to progressively purify the mind and Buddhi and move towards Self-realisation.**</p><p>This is a conceptual definition rather than a separate technical category established by one particular scripture.</p><p>The Bhagavad Gita describes a decisive form of Buddhi in Chapter 2, Verse 41:</p><p>&gt; ব্যবসায়াত্মিকা বুদ্ধিরেকেহ কুরুনন্দন।<br>&gt; বহুশাখা হ্যনন্তাশ্চ বুদ্ধয়োহব্যবসায়িনাম্॥</p><p>**Meaning:** O Arjuna, resolute Buddhi is one-pointed, whereas the thoughts of those who lack such determination are scattered in many directions.</p><p>This is the idea of Vyavasayatmika Buddhi — a determined and focused faculty of discrimination.</p><p>But what should this intelligence ultimately accomplish?</p><p>From the perspective of Vedanta, the highest purpose is not merely worldly success, wealth, knowledge or achievement. It is the removal of ignorance regarding one&#39;s true nature.</p><p>The Bhagavad Gita also describes Sattvic Buddhi in Chapter 18, Verse 30:</p><p>&gt; প্রবৃত্তিং চ নিবৃত্তিং চ কার্যাকার্যে ভয়াভয়ে।<br>&gt; বন্ধং মোক্ষং চ যা বেত্তি বুদ্ধিঃ সা পার্থ সাত্ত্বিকী॥</p><p>**Meaning:** That Buddhi which correctly understands action and renunciation, duty and non-duty, fear and fearlessness, bondage and liberation is Sattvic Buddhi.</p><p>This is a profound distinction.</p><p>Ordinary intelligence may help someone determine how to achieve a particular objective. Sattvic Buddhi also examines whether that objective is worth pursuing in the first place.</p><p>It questions the direction of life itself.</p><p>---</p><p>4. How Is Yogic Intelligence Developed?</p><p>Yogic Intelligence does not emerge merely by accumulating information or reading philosophical texts.</p><p>It requires transformation of the inner instrument — the Antahkarana, which is commonly explained through the functional aspects of Manas, Buddhi, Chitta and Ahamkara.</p><p>Four important processes are particularly relevant:</p><p>1. Chitta Shuddhi — purification of the mind.<br>2. Chitta Ekagrata — concentration and one-pointedness.<br>3. Shravana and Manana — listening to and reasoning about spiritual knowledge.<br>4. Nididhyasana — deep contemplation and assimilation of the truth.</p><p>Different Yogic paths contribute to these processes in complementary ways.</p><p>4.1 Karma Yoga: Purification Through Non-Attachment</p><p>Karma Yoga teaches us to perform our duties without excessive attachment to the results.</p><p>The Bhagavad Gita, Chapter 2, Verse 47, states:</p><p>&gt; কর্মণ্যেবাধিকারস্তে মা ফলেষু কদাচন।<br>&gt; মা কর্মফলহেতুর্ভূর্মা তে সঙ্গোহস্ত্বকর্মণি॥</p><p>**Meaning:** Your right is to perform your prescribed duty, but not to claim ownership over its results. Do not make the fruits of action your sole motive, nor become attached to inaction.</p><p>Why is this important for Buddhi?</p><p>Human decisions are frequently influenced by personal gain, recognition, fear of failure and expectations of reward.</p><p>These attachments distort judgement.</p><p>When a person performs actions with dedication but gradually reduces selfish attachment to the results, the mind becomes less dominated by personal expectations.</p><p>This helps develop:</p><p>- Reduced attachment to success and failure.<br>- Less ego-driven decision-making.<br>- Greater responsibility.<br>- Emotional stability.<br>- A clearer sense of duty.</p><p>Karma Yoga therefore contributes to Chitta Shuddhi by reducing selfishness and attachment.</p><p>It does not mean abandoning ambition, responsibility or excellence. It means performing actions without allowing personal attachment to dominate one&#39;s identity and judgement.</p><p>4.2 Bhakti Yoga: Transforming Ego-Centric Emotions into God-Centric Emotions</p><p>Human emotions are powerful drivers of behaviour.</p><p>Love, attachment, fear, jealousy, anger and desire can influence the way Buddhi evaluates situations.</p><p>Bhakti Yoga provides a different direction for these emotions.</p><p>Instead of allowing emotional energy to remain centred exclusively on the individual ego and worldly attachments, Bhakti gradually directs it towards God.</p><p>The Bhagavad Gita, Chapter 12, Verse 8, states:</p><p>&gt; ময্যেব মন আধৎস্ব ময়ি বুদ্ধিং নিবেশয়।<br>&gt; নিবসিষ্যসি ময্যেব অত ঊর্ধ্বং ন সংশয়ঃ॥</p><p>**Meaning:** Fix your mind on Me and place your Buddhi in Me. Thereafter, you shall dwell in Me without doubt.</p><p>This verse is particularly interesting because it explicitly refers to both Manas and Buddhi.</p><p>Bhakti is not merely an emotional practice. It can also transform the direction of thought, judgement and determination.</p><p>Gradually, the individual begins to think less in terms of:</p><p>- What do I gain?<br>- How do others perceive me?<br>- Why should everything happen according to my wishes?</p><p>And more in terms of:</p><p>- What is right?<br>- What is my duty?<br>- How can I serve?<br>- How can I surrender my ego?</p><p>In this sense, Bhakti Yoga contributes to Chitta Shuddhi by refining emotional tendencies and reducing ego-centred attachment.</p><p>4.3 Raja Yoga: Developing Chitta Ekagrata</p><p>While Karma Yoga and Bhakti Yoga contribute significantly to purification, Raja Yoga places particular emphasis on regulating the mind and developing concentration.</p><p>Patanjali&#39;s Yoga Sutras describe the eight limbs of Ashtanga Yoga:</p><p>1. Yama — ethical restraints.<br>2. Niyama — personal disciplines.<br>3. Asana — posture.<br>4. Pranayama — regulation of breath.<br>5. Pratyahara — withdrawal of the senses.<br>6. Dharana — concentration.<br>7. Dhyana — meditation.<br>8. Samadhi — deep meditative absorption.</p><p>These practices provide a progressive framework for disciplining behaviour, body, breath, senses and mind.</p><p>The progression towards Dharana, Dhyana and Samadhi is especially relevant to Chitta Ekagrata.</p><p>A distracted mind continuously moves between different thoughts, memories, desires and sensory experiences.</p><p>Through disciplined practice, the mind becomes increasingly capable of remaining focused.</p><p>However, concentration alone does not necessarily produce spiritual wisdom. A person may be highly concentrated on a selfish or harmful objective.</p><p>Therefore, Raja Yoga&#39;s concentration practices need to be understood alongside ethical discipline, emotional purification and right knowledge.</p><p>4.4 Jnana Yoga: Shravana, Manana and Nididhyasana</p><p>Jnana Yoga approaches the problem through knowledge and discrimination.</p><p>Its central question is:</p><p>**What is permanent, and what is temporary? What is the Self, and what is merely experienced by the Self?**</p><p>This inquiry is known as Nitya-Anitya Viveka or discrimination between the eternal and the transient.</p><p>Three important stages are traditionally described:</p><p>**Shravana:** Listening to the teachings of the Upanishads and Vedanta from a competent teacher.</p><p>**Manana:** Reflecting upon those teachings through reasoning and resolving doubts.</p><p>**Nididhyasana:** Deep contemplation and assimilation of the truth until the understanding becomes firmly established.</p><p>For example, the body changes throughout life. Thoughts and emotions also change. Memories, relationships, achievements and failures come and go.</p><p>Jnana Yoga encourages us to examine whether the changing body and mind can be the ultimate identity of the Self.</p><p>This process refines Buddhi through Viveka — discrimination between the real and the apparently real, the permanent and the impermanent.</p><p>It is important to note that these practices are not exclusive to one Yoga. The different paths support one another and can be integrated in spiritual life.</p><p>---</p><p>## 5\. The Final Objective: Shuddha Man, Shuddha Buddhi and Atman</p><p>What happens when the mind and Buddhi become increasingly purified?</p><p>The individual becomes less controlled by selfish desire, attachment, emotional disturbance and ego-centred thinking.</p><p>The mind becomes clearer. Buddhi becomes more discriminating. Concentration becomes deeper. Spiritual understanding becomes more firmly assimilated.</p><p>Sri Ramakrishna expressed this relationship through the famous idea:</p><p>**&quot;Shuddha Man, Shuddha Buddhi and Shuddha Atma are one.&quot;**</p><p>This statement should be understood carefully.</p><p>In Advaita Vedanta, Atman is eternally pure. It does not become pure through spiritual practice.</p><p>What becomes purified is the mind and Buddhi. When the inner instrument becomes sufficiently transparent, it no longer obscures the recognition of the Self.</p><p>The analogy of a mirror is useful.</p><p>A dusty mirror does not reflect an image clearly. Cleaning the mirror does not create the face; it removes the obstruction to seeing it.</p><p>Similarly, Chitta Shuddhi does not create Atman. It prepares the inner instrument for the recognition of the ever-present Self.</p><p>The ultimate goal of Yogic Intelligence is therefore not to make the mind infinitely powerful, but to overcome the ignorance that causes us to identify ourselves exclusively with the mind and body.</p><p>This is the transition from Kshetra to Kshetrajna — from the field of experience to the Knower of the field.</p><p>---</p><p>6. Understanding Artificial Intelligence: Intelligence Derived from Data and Mathematical Models</p><p>Now let us examine Artificial Intelligence.</p><p>As explained in my article, *Evolution of AI: From Rule-Based Systems to Machine Learning, Deep Learning, Transformers and Agentic AI*, modern AI has evolved through several important technological stages.</p><p>[Read: Evolution of AI](&lt;https://mainakkmandal.medium.com/evolution-of-ai-3c1122adf513&gt;)</p><p>The development can be broadly understood as:</p><p>Rule-Based Systems → Machine Learning → Deep Learning → Neural Networks → Transformers → Large Language Models → Generative AI → Agentic AI.</p><p>Modern Deep Learning uses artificial neural networks containing multiple computational layers.</p><p>These networks learn mathematical representations from training data.</p><p>A simplified neural network contains:</p><p>- An input layer.<br>- Multiple hidden layers.<br>- An output layer.</p><p>The input data is transformed through mathematical operations involving weights, biases and activation functions.</p><p>During training, the network adjusts its parameters to minimise a loss function.</p><p>A Transformer-based Large Language Model adds mechanisms such as self-attention, which help it determine how different tokens in a sequence relate to one another.</p><p>The attention mechanism uses Query, Key and Value representations to calculate relationships between tokens and combine relevant information.</p><p>When a user submits a question, the model processes the input through its learned representations and generates an output based on the learned parameters and the current context.</p><p>Thus, modern AI intelligence is computationally realised through:</p><p>- Training data.<br>- Mathematical optimisation.<br>- Learned parameters.<br>- Neural network architecture.<br>- Attention mechanisms.<br>- Inference and token generation.</p><p>It is important to clarify that an AI model does not simply store every training example and retrieve it when asked a question. It learns statistical and structural representations from data.</p><p>The resulting model can generalise to inputs it has never encountered before.</p><p>Nevertheless, its operation remains grounded in computational processes rather than an established subjective experience of the world.</p><p>---</p><p>7. From Artificial Intelligence to Agentic AI: Who Defines the Goal?</p><p>The emergence of Agentic AI introduces another important dimension.</p><p>An AI Agent can interpret a request, break it into smaller tasks, select tools, retrieve information, execute actions and evaluate the results.</p><p>A Planner Agent may decompose a complex objective into smaller tasks, while an Orchestrator coordinates multiple agents and tools.</p><p>For example, consider an AI-powered banking agent.</p><p>A user requests assistance with opening a bank account.</p><p>The agent may:</p><p>1. Understand the customer&#39;s request.<br>2. Identify the required account type.<br>3. Retrieve relevant product information.<br>4. Collect necessary information.<br>5. Invoke identity-verification tools.<br>6. Validate the information.<br>7. Coordinate with backend services.<br>8. Report the result.</p><p>This is goal-oriented intelligence in an engineering sense.</p><p>However, an important distinction remains.</p><p>The system&#39;s goal originates from an external source — a user request, developer instruction, business requirement, organisational policy or system configuration.</p><p>The agent can generate subgoals, select a plan and adapt its actions. It does not follow that it independently develops an existential purpose or possesses an intrinsic desire to pursue that purpose.</p><p>In other words:</p><p>**Agentic AI can determine how to pursue a goal, but this does not establish that it independently determines why that goal should matter.**</p><p>This distinction becomes particularly important when comparing Agentic AI with Yogic Intelligence.</p><p>---</p><p>8. Yogic Intelligence vs Artificial Intelligence: A Fundamental Comparison</p><p>The two forms of intelligence can now be compared across several dimensions.</p><p>| Dimension | Yogic Intelligence | Artificial Intelligence |<br>| --- | --- | --- |<br>| Foundation | Human mind, Buddhi and consciousness as understood in Yoga and Vedanta | Computational architecture and learned mathematical representations |<br>| Source of learning | Life experience, reflection, observation, scriptures and guidance | Training data, feedback, context and computational interaction |<br>| Processing mechanism | Discrimination, introspection, reasoning, concentration and contemplation | Neural networks, mathematical optimisation and inference |<br>| Role of experience | Experience becomes material for self-examination and wisdom | Data and interaction provide information for learning or inference |<br>| Emotional dimension | Emotions can be refined through Bhakti and self-discipline | Emotional language and patterns can be modelled without establishing subjective emotion |<br>| Ego | Ego-centred identification is examined and progressively reduced | No established human-like ego or subjective self |<br>| Willpower | Discipline and deliberate self-regulation are cultivated | Actions follow programmed objectives, instructions and computational policies |<br>| Goal | In Advaita, Self-knowledge and liberation from ignorance | Objectives defined by users, developers or system design |<br>| Purification | Chitta Shuddhi and refinement of Buddhi | Training, fine-tuning, optimisation, filtering and system updates |<br>| Ultimate orientation | Kshetrajna — recognition of the Knower | Kshetra — processing information about the field of experience |</p><p>The table highlights a fundamental difference.</p><p>Yogic Intelligence is concerned with the transformation of the experiencer.</p><p>Artificial Intelligence is concerned with the computational processing of information and the accomplishment of defined tasks.</p><p>---</p><p>9. Kshetra and Kshetrajna: The Most Interesting Philosophical Distinction</p><p>Perhaps the deepest connection between these two subjects emerges from Chapter 13 of the Bhagavad Gita.</p><p>The Gita distinguishes between:</p><p>- **Kshetra:** The field — the body, mind and the wider domain of experience.<br>- **Kshetrajna:** The Knower of the field.</p><p>Artificial Intelligence primarily operates within the domain of Kshetra.</p><p>It processes information about the world: language, images, transactions, documents, behaviour, events and other forms of data.</p><p>Even when an AI system analyses human emotions, it processes representations of emotional behaviour. This does not establish that it experiences those emotions.</p><p>Yogic inquiry, however, goes beyond the processing of the field.</p><p>It asks:</p><p>Who is experiencing these thoughts?</p><p>Who observes the changing emotions?</p><p>Who knows the functioning of the mind and Buddhi?</p><p>Can the changing body and mind be the ultimate identity of the Knower?</p><p>These questions take the inquiry towards Kshetrajna.</p><p>In Advaita Vedanta, the ultimate realisation is that Atman is not merely another object within the field of experience. It is the witnessing consciousness through which the field is known.</p><p>This is why Yogic Intelligence, when directed towards Self-realisation, becomes fundamentally subjective in orientation.</p><p>It is not simply trying to understand more objects. It is investigating the very nature of the subject.</p><p>This does not mean that AI can never process information about consciousness or philosophical questions. It can analyse theories, compare arguments and generate explanations. But processing descriptions of consciousness is not the same as establishing subjective awareness.</p><p>---</p><p>10. Do Yogic Intelligence and AI Have Anything in Common?</p><p>Despite their fundamental differences, some interesting conceptual similarities exist.</p><p>10.1 Both Learn from Experience</p><p>Human beings develop understanding through interactions with the world.</p><p>They observe, remember, compare, make mistakes and learn.</p><p>AI systems also learn patterns from training data and can use feedback or interaction to improve their performance, depending on their design.</p><p>However, human experience includes subjective awareness, emotions, bodily sensations and personal meaning. Training data does not automatically provide an AI system with such lived experience.</p><p>### 10.2 Both Use Information to Make Decisions</p><p>Human Buddhi evaluates information and determines a course of action.</p><p>AI models process input representations and generate predictions, recommendations or decisions.</p><p>Both can therefore be discussed in terms of information processing and decision-making, although their underlying mechanisms are fundamentally different.</p><p>10.3 Both Can Be Improved Through Disciplined Processes</p><p>Human Buddhi can be refined through ethical discipline, meditation, reasoning and spiritual practice.</p><p>AI systems can be improved through better data, architecture, training methods, evaluation, fine-tuning and governance.</p><p>But these improvements have different meanings.</p><p>AI optimisation improves computational performance against defined objectives.</p><p>Yogic purification changes the individual&#39;s relationship with desire, attachment, ego and the perceived nature of reality.</p><p>The two should not be treated as equivalent processes.</p><p>---</p><p>11. The Most Important Difference: Optimising Performance vs Transforming Purpose</p><p>Consider two individuals.</p><p>The first wants to become extremely successful in business. The second wants to understand the meaning of life and discover the true nature of the Self.</p><p>An AI system can help both individuals.</p><p>It can analyse markets, prepare business strategies, create financial forecasts and organise complex workflows.</p><p>It can also explain Vedanta, compare philosophical arguments, summarise the Upanishads and support meditation-related learning.</p><p>But the AI system does not thereby become a spiritual seeker.</p><p>It can help someone investigate the question &quot;Who am I?&quot; without itself establishing that it possesses the subjective experience of asking that question.</p><p>Yogic Intelligence involves a different kind of transformation.</p><p>The individual begins by examining personal desires and attachments. Gradually, the individual questions the assumptions upon which the ego-centred identity is built.</p><p>The purpose is not merely to achieve a better result within the existing framework of worldly objectives.</p><p>It is to examine the framework itself.</p><p>**AI can help optimise the journey towards a defined destination. Yogic Intelligence also questions whether the destination itself is worth pursuing.**</p><p>That is perhaps the most powerful conceptual distinction between them.</p><p>---</p><p>12. Can AI Support the Development of Yogic Intelligence?</p><p>There is no reason to treat Artificial Intelligence and spiritual development as mutually exclusive.</p><p>In fact, AI can become a useful supporting instrument for a spiritual seeker.</p><p>For example, AI can:</p><p>- Compare different interpretations of Bhagavad Gita verses.<br>- Explain concepts such as Buddhi, Manas, Chitta and Ahamkara.<br>- Help organise the study of Upanishads and Vedanta.<br>- Support structured Shravana and Manana through explanations and discussion.<br>- Generate reflective questions for self-inquiry.<br>- Help maintain a study journal.<br>- Compare the philosophical approaches of Shankara, Ramakrishna and Vivekananda.<br>- Explain the eight limbs of Raja Yoga.</p><p>However, the seeker must still undertake the actual inner work.</p><p>AI can explain what non-attachment means, but the individual must practise non-attachment.</p><p>AI can describe meditation, but the individual must meditate.</p><p>AI can explain the distinction between Atman and Anatman, but intellectual understanding alone does not amount to Self-realisation.</p><p>AI can be a teacher&#39;s assistant, a study companion or an intellectual instrument. It cannot replace the lived process of spiritual discipline and direct realisation.</p><p>---</p><p>13. Conclusion: Two Different Directions of Intelligence</p><p>The evolution of Artificial Intelligence represents one of the most remarkable technological developments in human history.</p><p>From rule-based systems to Machine Learning, Deep Learning, Transformers and Agentic AI, we have progressively developed systems capable of processing information, learning patterns, generating knowledge-like outputs and coordinating complex tasks.</p><p>But Indian philosophical traditions invite us to examine another dimension of intelligence.</p><p>The Bhagavad Gita and Upanishads describe Buddhi as an essential instrument through which a human being can regulate the mind, discriminate between right and wrong, overcome attachment and investigate the nature of the Self.</p><p>Karma Yoga contributes to non-attachment.</p><p>Bhakti Yoga refines emotional life and reduces ego-centred tendencies.</p><p>Raja Yoga cultivates discipline and concentration.</p><p>Jnana Yoga develops discrimination through Shravana, Manana and Nididhyasana.</p><p>Together, these practices can prepare the inner instrument for Self-knowledge.</p><p>The final objective, from the Advaita perspective, is not the acquisition of more information or the optimisation of worldly performance. It is the removal of ignorance and the recognition of the ever-present Atman.</p><p>This gives us two distinct directions:</p><p>**Artificial Intelligence:**</p><p>Data → Learning → Mathematical Representations → Reasoning and Generation → Goal-Oriented Actions.</p><p>**Yogic Intelligence:**</p><p>Experience → Viveka → Chitta Shuddhi → Chitta Ekagrata → Self-Inquiry → Atma Jnana.</p><p>The first develops increasingly capable computational systems.</p><p>The second seeks the transformation of the human being through the purification of the mind and Buddhi.</p><p>Perhaps the greatest lesson is that intelligence should not be judged only by how much information it can process or how efficiently it can accomplish a task.</p><p>We must also ask:</p><p>**Does intelligence help us understand what is truly worth pursuing? Does it help us overcome the limitations of our own ego? Does it bring us closer to understanding the very nature of the one who knows?**</p><p>Artificial Intelligence may continue to expand the capabilities of machines.</p><p>Yogic Intelligence reminds us to explore the depths of human consciousness.</p><p>And while AI can become an extraordinarily powerful instrument in that exploration, the responsibility for inner transformation remains with the human seeker.</p><p>---</p><p>References and Further Reading</p><p>1. Bhagavad Gita — Chapters 2, 3, 6, 12, 13 and 18.<br>2. Katha Upanishad — 1.3.3–1.3.9, the chariot analogy.<br>3. Patanjali — Yoga Sutras, particularly the Ashtanga Yoga framework.<br>4. Shankaracharya — Vivekachudamani and Drg-Drsya Viveka.<br>5. Sri Ramakrishna — The Gospel of Sri Ramakrishna.<br>6. Swami Vivekananda — Raja Yoga, Jnana Yoga and Karma Yoga.<br>7. Mainak Mandal — [Evolution of AI: From Rule-Based Systems to Machine Learning, Deep Learning, Transformers and Agentic AI](&lt;https://mainakkmandal.medium.com/evolution-of-ai-3c1122adf513&gt;).</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=2310b45fdfb0" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Goal-Oriented Agentic Workflow versus Multi-Agent Orchestration System]]></title>
            <link>https://mainakkmandal.medium.com/goal-oriented-agentic-workflow-versus-multi-agent-orchestration-system-031c72407cad?source=rss-aa6a7640bb5d------2</link>
            <guid isPermaLink="false">https://medium.com/p/031c72407cad</guid>
            <dc:creator><![CDATA[Mainak Mandal]]></dc:creator>
            <pubDate>Wed, 04 Nov 2026 18:56:54 GMT</pubDate>
            <atom:updated>2026-11-04T18:56:54.808Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*sFU778mFoeeVDU-BLgXRCQ.png" /></figure><p>A Goal-Oriented Agentic Workflow and a Multi-Agent Orchestration System are closely related concepts in Agentic AI, but they represent two different ways of designing intelligent autonomous systems.</p><p>The most important distinction is:</p><ul><li>Goal-Oriented Agentic Workflow: The system is designed around what needs to be achieved.</li><li>Multi-Agent Orchestration: The system is designed around how multiple specialised agents collaborate to accomplish a task.</li></ul><p>In other words, one is primarily a goal-driven execution approach, while the other is an architectural approach for coordinating multiple agents.</p><p>Let’s understand this from an enterprise architecture perspective.</p><h3>1. What is a Goal-Oriented Agentic Workflow?</h3><p>A Goal-Oriented Agentic Workflow is an autonomous workflow in which an AI agent receives a high-level goal, understands the desired outcome, plans the necessary steps, executes them, evaluates the results, and dynamically changes its approach until the goal is achieved or a stopping condition is reached.</p><p>Unlike traditional workflows, where the sequence of steps is predefined, the agent can decide what to do next based on the current state and intermediate results.</p><p>Typical execution lifecycle:</p><ol><li>Goal Definition: Understand the desired outcome.</li><li>Planning: Break the goal into achievable sub-goals.</li><li>Action Selection: Decide which tools, APIs or capabilities are required.</li><li>Execution: Execute the selected actions.</li><li>Observation: Examine the results of the actions.</li><li>Evaluation: Determine whether the goal has been achieved.</li><li>Replanning: If the goal is not achieved, revise the plan and continue.</li></ol><p>The important characteristic is the feedback loop between execution and evaluation.</p><p>The workflow is not necessarily restricted to a predefined sequence of steps.</p><h3>2. What is a Multi-Agent Orchestration System?</h3><p>A Multi-Agent Orchestration System is an architecture in which multiple specialised AI agents collaborate under a coordination mechanism to solve a complex business problem.</p><p>Each agent has a defined responsibility, knowledge base, tools and capabilities.</p><p>A central orchestrator, supervisor or a decentralised coordination mechanism manages their interactions.</p><p>Example of specialised agents:</p><p>Suppose an enterprise wants to automate customer onboarding.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/808/1*rc8AqEc2rQx_0HNf_kthxQ.png" /></figure><p>An orchestrator coordinates these agents, manages dependencies, collects their outputs and determines the next action.</p><p>There are several ways to orchestrate them:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*iwW0VP96azW2BSexYUK0_g.png" /></figure><ul><li>Sequential: Agents execute one after another.</li><li>Parallel / Concurrent: Multiple agents work simultaneously.</li><li>Hierarchical: A supervisor delegates work to subordinate agents.</li><li>Handoff: One agent transfers control to another.</li><li>Collaborative / Swarm: Agents communicate and collaborate more dynamically.</li></ul><p>These are established multi-agent orchestration patterns.</p><h3>3. Key differences</h3><p>Here is the architectural comparison:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*2LyZ15n_8TBhC9PHXHvnLA.png" /></figure><p>One important distinction: these concepts are not mutually exclusive. A multi-agent orchestration system can itself implement a goal-oriented agentic workflow.</p><h3>4. Let’s understand with an enterprise example</h3><p>Consider an intelligent Connected Car solution.</p><p>Business goal:</p><p>“Ensure that a vehicle reaches the nearest authorised service centre before a critical engine failure occurs.”</p><h3>Approach A: Goal-Oriented Agentic Workflow</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*wPrfW-eW3zgbMgbTgNLwSA.png" /></figure><p>The goal-oriented agent receives the objective and dynamically determines what needs to happen.</p><ol><li>Analyse vehicle telemetry and engine sensor data.</li><li>Identify potential engine failure using predictive ML models.</li><li>Determine the severity and urgency.</li><li>Identify suitable authorised service centres.</li><li>Check service centre availability.</li><li>Determine whether the vehicle can safely reach the service centre.</li><li>Recommend a route and schedule a service appointment.</li><li>Monitor vehicle health until the problem is resolved.</li></ol><p>If the nearest service centre is unavailable, the agent can reconsider its plan and select another centre.</p><p>Notice: The workflow is driven by the desired outcome, not by a fixed sequence of activities.</p><h3>Approach B: Multi-Agent Orchestration System</h3><p>Here, we create multiple specialised agents:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/905/1*8P_5H8gDoHeH1DFldDGYoA.png" /></figure><p>A central orchestrator coordinates the agents.</p><p>For example:</p><ul><li>Vehicle Health Agent detects abnormal engine temperature.</li><li>Predictive Maintenance Agent predicts potential engine failure.</li><li>Diagnostic Agent identifies the likely problem.</li><li>Service Centre Agent finds available service centres.</li><li>Navigation Agent calculates the best route.</li><li>Scheduling Agent books an appointment.</li></ul><p>The orchestrator collects and coordinates the outputs.</p><h3>5. Can we combine both approaches?</h3><p>Absolutely! In fact, this is often the most powerful enterprise architecture.</p><p>We can combine goal-oriented execution with multi-agent orchestration.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*AqmG_VXNy-_FA2PjxwulGQ.png" /></figure><p>A possible architecture would look like this:</p><ol><li>Goal Manager Agent: Understands the business objective and defines success criteria.</li><li>Planning Agent: Breaks the objective into sub-goals.</li><li>Multi-Agent Orchestrator: Delegates sub-goals to specialised agents.</li><li>Specialised Agents: Execute individual tasks using ML models, LLMs, APIs and enterprise systems.</li><li>Evaluation Agent: Evaluates intermediate results and overall goal achievement.</li><li>Goal Manager: Decides whether to continue, replan, request human intervention or terminate.</li></ol><p>This architecture resembles the Magentic orchestration pattern, where a manager dynamically develops and tracks a task plan and coordinates specialist agents.</p><h3>6. Architectural recommendation</h3><p>I would distinguish these concepts at three different levels:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*3FD6cWkw-3rnTSBPZwfe6g.png" /></figure><p>Level 1 — Business objective</p><p>Goal-Oriented Design</p><p>What business outcome are we trying to achieve?</p><p>Level 2 — Agent architecture</p><p>Multi-Agent Architecture</p><p>Which specialised agents and capabilities are required?</p><p>Level 3 — Execution strategy</p><p>Agent Orchestration</p><p>How do agents collaborate, delegate, communicate and execute?</p><p>There is also an important distinction between traditional workflow orchestration and agentic orchestration: traditional workflows generally follow predefined paths, whereas agentic orchestration can dynamically determine the next action.</p><p>Final takeaway:</p><ul><li>Goal-oriented agentic workflow answers: What are we trying to achieve, and how do we adapt until we achieve it?</li><li>Multi-agent orchestration answers: Which agents should collaborate, and how should their work be coordinated?</li><li>Goal-oriented multi-agent architecture combines both to deliver autonomous, outcome-driven enterprise solutions.</li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=031c72407cad" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Evolution of AI]]></title>
            <link>https://mainakkmandal.medium.com/evolution-of-ai-3c1122adf513?source=rss-aa6a7640bb5d------2</link>
            <guid isPermaLink="false">https://medium.com/p/3c1122adf513</guid>
            <dc:creator><![CDATA[Mainak Mandal]]></dc:creator>
            <pubDate>Sat, 31 Oct 2026 12:53:53 GMT</pubDate>
            <atom:updated>2026-10-31T12:53:53.526Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Ct3omWVssFgzpKXa4gUInQ.png" /></figure><h3>From Rule-Based Systems to Machine Learning, Deep Learning, Transformers and Agentic AI</h3><h3>PART 1: UNDERSTANDING ARTIFICIAL INTELLIGENCE</h3><h3>Q1. What is Artificial Intelligence (AI)?</h3><p>Artificial Intelligence is a branch of computer science concerned with building systems that can perform tasks that normally require human intelligence.</p><p>These tasks may include:</p><ul><li>Learning from experience.</li><li>Recognising patterns.</li><li>Understanding language.</li><li>Solving problems.</li><li>Making predictions.</li><li>Planning and decision-making.</li><li>Generating text, images, audio and code.</li></ul><p>AI is a broad field that includes several approaches, such as rule-based systems, machine learning, deep learning and generative AI.</p><h3>Q2. How did traditional AI systems work before Machine Learning became popular?</h3><p>Early AI systems often relied on explicitly programmed rules, logic and knowledge representations.</p><p>For example, consider a simple banking loan eligibility system:</p><pre>IF applicant_age &gt;= 21<br>   AND monthly_income &gt;= 30000<br>   AND credit_score &gt;= 700<br>THEN<br>   loan_eligible = TRUE<br>ELSE<br>   loan_eligible = FALSE</pre><p>The system does not learn from historical loan applications. It simply executes the rules programmed by developers or domain experts.</p><p>Traditional AI approaches included:</p><ul><li>Rule-based expert systems.</li><li>Knowledge representation.</li><li>Search algorithms.</li><li>Logic-based reasoning.</li><li>Planning systems.</li><li>Decision trees and symbolic approaches.</li></ul><p>These systems can be effective when the rules are known and the problem is well-defined.</p><p>However, they become difficult to maintain when the number of rules grows substantially or when the problem involves complex patterns that are difficult to express explicitly.</p><h3>Q3. What are the limitations of traditional rule-based AI?</h3><p>Some important limitations are:</p><ol><li><strong>Dependence on manually defined rules:</strong> Developers must explicitly define the conditions and actions.</li><li><strong>Difficulty handling exceptions:</strong> Unexpected situations may not be covered by existing rules.</li><li><strong>Limited adaptability:</strong> The system does not automatically learn from new data.</li><li><strong>Rule maintenance:</strong> As business requirements change, rules must be updated.</li><li><strong>Difficulty processing unstructured information:</strong> Natural language, images and audio are difficult to handle using simple rules.</li></ol><p>This led to the development and widespread adoption of Machine Learning, where systems learn patterns from data rather than depending entirely on manually written rules.</p><h3>PART 2: UNDERSTANDING MACHINE LEARNING</h3><h3>Q4. What is Machine Learning (ML)?</h3><p>Machine Learning is a subset of Artificial Intelligence in which algorithms learn patterns from data and use those patterns to make predictions, classifications or decisions.</p><p>Instead of explicitly programming every rule, developers provide data and select an appropriate learning algorithm.</p><p>The algorithm uses the data to construct a mathematical model.</p><p>For example, instead of manually defining all the conditions for loan default, a bank can train a model using historical loan information.</p><p>The model may learn relationships between:</p><ul><li>Customer income.</li><li>Existing debt.</li><li>Repayment history.</li><li>Credit score.</li><li>Loan amount.</li><li>Employment history.</li></ul><p>It can then estimate the probability of default for a new applicant.</p><h3>Q5. What is an ML Algorithm?</h3><p>An ML algorithm is the mathematical procedure or learning technique used to identify patterns in data and construct a model.</p><p>Examples include:</p><ul><li>Linear Regression.</li><li>Logistic Regression.</li><li>Decision Trees.</li><li>Random Forest.</li><li>Support Vector Machines.</li><li>K-Nearest Neighbours.</li><li>K-Means Clustering.</li><li>Gradient Boosting.</li><li>Neural Networks.</li></ul><p>An algorithm defines <em>how learning takes place</em>.</p><p>For example, Linear Regression learns a relationship between input variables and a numerical output by estimating coefficients.</p><h3>Q6. What is an ML Model?</h3><p>An ML model is the learned mathematical representation produced after an algorithm is trained using data.</p><p>For example:</p><pre>Historical Loan Data<br>        |<br>        v<br>Linear Regression Algorithm<br>        |<br>        v<br>Training Process<br>        |<br>        v<br>Learned Model<br>        |<br>        v<br>New Applicant Information<br>        |<br>        v<br>Predicted Loan Default Risk</pre><p>The algorithm is the learning procedure; the model is the resulting learned representation.</p><p>A trained model contains parameters or structures derived from the training data.</p><h3>Q7. What is the difference between an ML Algorithm and an ML Model?</h3><p>AspectML AlgorithmML ModelMeaningLearning procedureResult of the learning processPurposeLearns patterns from dataUses learned patterns to make predictionsExampleLinear Regression algorithmA trained regression modelAnalogyRecipePrepared dishChangesAlgorithm may remain the sameModel parameters change through training</p><p>For example, Linear Regression is an algorithm. Once it learns the coefficients from historical data, the resulting equation is a trained model.</p><h3>Q8. What are the major categories of Machine Learning?</h3><p>Machine Learning is commonly divided into four broad categories.</p><p><strong>1. Supervised Learning</strong></p><p>The model learns from labelled data, where the expected output is already known.</p><p>Examples:</p><ul><li>Predicting house prices.</li><li>Classifying emails as spam or non-spam.</li><li>Predicting loan defaults.</li></ul><p><strong>2. Unsupervised Learning</strong></p><p>The model identifies patterns or structures in data without predefined output labels.</p><p>Examples:</p><ul><li>Customer segmentation.</li><li>Grouping similar transactions.</li><li>Finding patterns in customer behaviour.</li></ul><p><strong>3. Semi-Supervised Learning</strong></p><p>The model learns from a combination of labelled and unlabelled data.</p><p>This is useful when obtaining labelled data is expensive or difficult.</p><p><strong>4. Reinforcement Learning</strong></p><p>An agent learns by interacting with an environment and receiving rewards or penalties.</p><p>Examples:</p><ul><li>Game-playing systems.</li><li>Robotics.</li><li>Dynamic resource optimisation.</li></ul><h3>PART 3: TRADITIONAL MACHINE LEARNING ALGORITHMS</h3><h3>Q9. What are some important traditional ML algorithms?</h3><p>AlgorithmTypeTypical use caseLinear RegressionSupervisedPredicting house pricesLogistic RegressionSupervisedPredicting loan default probabilityDecision TreeSupervisedRule-like classification and regressionRandom ForestSupervisedFraud detection and risk predictionSupport Vector MachineSupervisedClassificationK-Nearest NeighboursSupervisedSimilarity-based classificationK-MeansUnsupervisedCustomer segmentationGradient BoostingSupervisedCredit-risk predictionXGBoostSupervisedStructured-data prediction</p><p>These algorithms remain highly useful in modern AI systems.</p><h3>Q10. Why can traditional ML algorithms struggle with complex problems?</h3><p>Traditional ML algorithms are not inherently incapable of solving complex problems. Some, such as Gradient Boosting and Support Vector Machines, can model sophisticated relationships.</p><p>However, many traditional ML approaches require developers to carefully prepare and represent the input data.</p><p>For example, consider an image classification problem.</p><p>A traditional ML approach may require developers to extract useful image characteristics manually, such as:</p><ul><li>Edges.</li><li>Corners.</li><li>Textures.</li><li>Shapes.</li><li>Colour distributions.</li></ul><p>This process is called feature engineering.</p><p>The algorithm then learns from these engineered features.</p><p>For complex unstructured data, designing the right features can become difficult.</p><p>Other challenges include:</p><ul><li>Complex relationships between input variables.</li><li>High-dimensional unstructured data.</li><li>Large variations in images, speech and language.</li><li>Difficulty capturing hierarchical representations.</li><li>Dependence on domain-specific feature extraction.</li></ul><p>Deep Learning addressed many of these challenges by allowing neural networks to learn useful representations automatically from data.</p><h3>Q11. What is Feature Engineering?</h3><p>Feature Engineering is the process of selecting, transforming or creating useful input variables for a Machine Learning model.</p><p>Consider a customer loan-default prediction problem.</p><p>Raw data may contain:</p><pre>Customer ID<br>Monthly Salary<br>Monthly Expenses<br>Existing Loan Amount<br>Number of Late Payments<br>Employment Type</pre><p>An engineer may derive additional features:</p><pre>Debt-to-Income Ratio<br>Monthly Savings<br>Average Payment Delay<br>Loan-to-Income Ratio<br>Employment Stability</pre><p>These engineered features may help the model identify relationships that are difficult to learn from raw data alone.</p><p>Feature engineering remains important in traditional ML and can also be useful in modern deep-learning pipelines.</p><h3>Q12. What is the difference between Gradient Boosting and Gradient Descent?</h3><p>These two concepts are related to optimisation but are not the same.</p><p><strong>Gradient Boosting</strong></p><p>Gradient Boosting is an ensemble learning technique. It builds a sequence of weak predictive models, usually decision trees, where each new model attempts to improve the errors of the existing ensemble.</p><p>Examples:</p><ul><li>XGBoost.</li><li>LightGBM.</li><li>CatBoost.</li></ul><p><strong>Gradient Descent</strong></p><p>Gradient Descent is an optimisation algorithm used to minimise a loss function by updating model parameters in the direction that reduces the loss.</p><p>It is widely used to train neural networks.</p><p>Therefore:</p><ul><li>Gradient Boosting is an ensemble learning method.</li><li>Gradient Descent is an optimisation technique.</li></ul><h3>PART 4: DEEP LEARNING AND NEURAL NETWORKS</h3><h3>Q13. What is Deep Learning?</h3><p>Deep Learning is a subset of Machine Learning that uses neural networks containing multiple layers to learn complex representations from data.</p><p>The word <em>deep</em> refers to the multiple processing layers through which information passes.</p><p>Deep Learning has been particularly successful in:</p><ul><li>Image recognition.</li><li>Speech recognition.</li><li>Natural language processing.</li><li>Object detection.</li><li>Video analysis.</li><li>Generative AI.</li></ul><p>The relationship can be represented as:</p><pre>Artificial Intelligence<br>        |<br>        v<br>Machine Learning<br>        |<br>        v<br>Deep Learning<br>        |<br>        v<br>Neural Network Architectures<br>        |<br>        +------------------+<br>        |                  |<br>        v                  v<br>       CNN                RNN<br>                           |<br>                           v<br>                          LSTM</pre><pre>        Transformers are another major neural<br>        network architecture used in Deep Learning.</pre><h3>Q14. What is a Neural Network?</h3><p>A Neural Network is a computational model inspired loosely by the interconnected structure of biological neurons.</p><p>It consists of interconnected processing units called artificial neurons.</p><p>A simple neural network contains:</p><ol><li>Input Layer.</li><li>One or more Hidden Layers.</li><li>Output Layer.</li></ol><pre>INPUT LAYER<br>                   |<br>                   v<br>              HIDDEN LAYER 1<br>                   |<br>                   v<br>              HIDDEN LAYER 2<br>                   |<br>                   v<br>              OUTPUT LAYER</pre><p>Each neuron receives numerical inputs, applies weights and biases, performs a mathematical transformation and passes the result through an activation function.</p><h3>Q15. What is an artificial neuron?</h3><p>An artificial neuron receives inputs, multiplies them by corresponding weights, adds a bias and applies an activation function.</p><p>A simplified mathematical representation is:</p><p>[<br>z = \sum_{i=1}^{n} w_i x_i + b<br>]</p><p>The output is:</p><p>[<br>a=f(z)<br>]</p><p>Where:</p><ul><li>(x_i) = input values.</li><li>(w_i) = weights.</li><li>(b) = bias.</li><li>(f) = activation function.</li><li>(a) = neuron output.</li></ul><p>The weights and biases are learned during training.</p><h3>Q16. What is a Fully Connected Neural Network (FCNN)?</h3><p>A Fully Connected Neural Network is a network in which every neuron in one layer is connected to every neuron in the next layer.</p><p>It is also commonly called a Dense Neural Network.</p><p>Example:</p><pre>Input Layer       Hidden Layer       Output Layer</pre><pre>   X1  ----------&gt;   N1<br>      \            /  | \<br>       \          /   |  \<br>        --------&gt; N2  |   ----&gt; Y<br>       /          \   |<br>      /            \  |<br>   X2  ----------&gt;   N3</pre><p>Fully connected networks are commonly used for structured numerical data and as components of larger neural architectures.</p><h3>Q17. What is an activation function?</h3><p>An activation function introduces non-linearity into a neural network.</p><p>Without non-linear activation functions, multiple linear layers would effectively behave like a single linear transformation.</p><p>Common activation functions include:</p><p><strong>ReLU</strong></p><p>[<br>ReLU(x)=\max(0,x)<br>]</p><p><strong>Sigmoid</strong></p><p>[<br>\sigma(x)=\frac{1}{1+e^{-x}}<br>]</p><p><strong>Tanh</strong></p><p>[<br>\tanh(x)<br>]</p><p><strong>GELU</strong></p><p>Often used in Transformer architectures.</p><p>Activation functions allow neural networks to learn complex non-linear relationships.</p><h3>PART 5: CNN, RNN AND OTHER DEEP-LEARNING ARCHITECTURES</h3><h3>Q18. What is a Convolutional Neural Network (CNN)?</h3><p>A Convolutional Neural Network is a specialised neural network architecture designed particularly for data with spatial structure, such as images.</p><p>CNNs use convolution operations to identify local patterns.</p><p>For example, an image contains pixels. A CNN applies learnable filters to identify features such as:</p><ul><li>Edges.</li><li>Lines.</li><li>Corners.</li><li>Textures.</li><li>Shapes.</li><li>Object parts.</li></ul><p>As information passes through deeper layers, the network can learn increasingly complex visual representations.</p><p>A simplified CNN architecture:</p><pre>INPUT IMAGE<br>                   |<br>                   v<br>             CONVOLUTION<br>                   |<br>                   v<br>              ACTIVATION<br>                   |<br>                   v<br>               POOLING<br>                   |<br>                   v<br>             CONVOLUTION<br>                   |<br>                   v<br>              ACTIVATION<br>                   |<br>                   v<br>               POOLING<br>                   |<br>                   v<br>              FLATTENING<br>                   |<br>                   v<br>            FULLY CONNECTED<br>                   |<br>                   v<br>                OUTPUT</pre><h3>Q19. What is the role of a convolution layer?</h3><p>A convolution layer applies filters or kernels to the input data.</p><p>A filter moves across the image and performs mathematical operations on local groups of pixels.</p><p>The result is a feature map.</p><p>For example:</p><ul><li>An early filter may identify horizontal edges.</li><li>Another may identify vertical edges.</li><li>Deeper layers may identify shapes or object parts.</li></ul><p>The filter weights are learned during training.</p><h3>Q20. What is pooling in CNN?</h3><p>Pooling reduces the spatial dimensions of feature maps.</p><p>For example, Max Pooling selects the maximum value from a small region.</p><p>This can reduce computation and provide some robustness to small changes in feature position.</p><h3>Q21. What is the difference between Deep Learning and CNN?</h3><p>Deep Learning is a broader field and CNN is one type of neural network architecture within it.</p><p>Deep LearningCNNBroad ML subfieldSpecific neural-network architectureUses multiple types of neural networksUses convolution operationsCovers images, language, speech and moreParticularly effective for spatial dataIncludes CNN, RNN, LSTM and TransformersOne member of the Deep Learning family</p><h3>Q22. Can a CNN perform both classification and regression?</h3><p>Yes.</p><p>The task performed by a CNN depends not only on its convolution layers but also on the design of its output layer or output head.</p><p><strong>Classification example</strong></p><p>A CNN may identify whether an image contains a cat, dog or bird.</p><p>Its output layer may use Softmax to produce class probabilities.</p><pre>Image<br>  |<br>  v<br>CNN Feature Extraction<br>  |<br>  v<br>Classification Head<br>  |<br>  v<br>Cat: 0.80<br>Dog: 0.15<br>Bird: 0.05</pre><p><strong>Regression example</strong></p><p>A CNN may estimate the age of a person from an image.</p><p>The convolution layers extract visual features, and a regression head produces a numerical output.</p><pre>Image<br>  |<br>  v<br>CNN Feature Extraction<br>  |<br>  v<br>Regression Head<br>  |<br>  v<br>Predicted Age: 32.5</pre><p>A regression output often uses a linear output layer, although other transformations may be appropriate when the output has constraints.</p><p><strong>Multi-task learning</strong></p><p>A single CNN can also contain multiple output heads.</p><pre>INPUT IMAGE<br>                      |<br>                      v<br>                CNN BACKBONE<br>                      |<br>             FEATURE REPRESENTATION<br>                      |<br>              +-------+-------+<br>              |               |<br>              v               v<br>        CLASSIFICATION     REGRESSION<br>             HEAD              HEAD<br>              |                 |<br>              v                 v<br>         Object Class       Object Size</pre><p>For example, a self-driving car system may use a shared CNN backbone to identify objects and estimate their dimensions.</p><h3>Q23. What is an RNN?</h3><p>A Recurrent Neural Network is a neural-network architecture designed to process sequential data.</p><p>Unlike a basic feed-forward network, an RNN maintains a hidden state that carries information from previous time steps.</p><p>This makes it useful for:</p><ul><li>Text processing.</li><li>Speech recognition.</li><li>Time-series forecasting.</li><li>Sequential pattern recognition.</li></ul><p>Simplified architecture:</p><pre>Input X1 ---&gt; RNN ---&gt; Hidden State H1<br>                         |<br>                         v<br>Input X2 ---&gt; RNN ---&gt; Hidden State H2<br>                         |<br>                         v<br>Input X3 ---&gt; RNN ---&gt; Hidden State H3<br>                         |<br>                         v<br>                       Output</pre><p>The hidden state carries information from earlier inputs.</p><h3>Q24. What are the limitations of a traditional RNN?</h3><p>Traditional RNNs can struggle to learn long-term dependencies.</p><p>Two important problems are:</p><ul><li>Vanishing gradients.</li><li>Exploding gradients.</li></ul><p>During backpropagation through many time steps, gradients may become extremely small or large.</p><p>As a result, the network may struggle to learn relationships between events that are far apart in a sequence.</p><h3>Q25. What is LSTM?</h3><p>Long Short-Term Memory (LSTM) is a specialised type of RNN designed to capture longer-term dependencies.</p><p>It uses a memory cell and gates that control information flow.</p><p>Important gates include:</p><ol><li>Forget Gate.</li><li>Input Gate.</li><li>Output Gate.</li></ol><p>The gates help the network decide:</p><ul><li>What information to retain.</li><li>What information to discard.</li><li>What new information to store.</li><li>What information to expose as output.</li></ul><p>LSTM architectures improved the ability of recurrent networks to process longer sequences.</p><h3>PART 6: TRAINING NEURAL NETWORKS</h3><h3>Q26. What is a Loss Function?</h3><p>A Loss Function measures the difference between a model’s prediction and the expected output.</p><p>For example, suppose a model predicts a house price of ₹50 lakh, while the actual price is ₹55 lakh.</p><p>The loss function calculates a numerical measure of the prediction error.</p><p>Common loss functions include:</p><ul><li>Mean Squared Error (MSE).</li><li>Mean Absolute Error (MAE).</li><li>Binary Cross-Entropy.</li><li>Categorical Cross-Entropy.</li></ul><p>The choice depends on the task.</p><h3>Q27. What is a Gradient?</h3><p>A gradient indicates how a mathematical function changes with respect to its parameters.</p><p>In neural-network training, gradients indicate how changing a model parameter affects the loss.</p><p>For a parameter (w):</p><p>[<br>\frac{\partial L}{\partial w}<br>]</p><p>Where (L) represents the loss function.</p><p>The gradient helps determine how the parameter should be updated to reduce the loss.</p><h3>Q28. What is Backpropagation?</h3><p>Backpropagation is the algorithm used to calculate gradients of the loss with respect to the parameters of a neural network.</p><p>It applies the chain rule of calculus to propagate error information backward through the network.</p><p>Simplified training process:</p><pre>INPUT DATA<br>                  |<br>                  v<br>           FORWARD PASS<br>                  |<br>                  v<br>           MODEL PREDICTION<br>                  |<br>                  v<br>             LOSS FUNCTION<br>                  |<br>                  v<br>             LOSS VALUE<br>                  |<br>                  v<br>          BACKPROPAGATION<br>                  |<br>                  v<br>          CALCULATE GRADIENTS<br>                  |<br>                  v<br>             OPTIMISER<br>                  |<br>                  v<br>         UPDATE MODEL WEIGHTS<br>                  |<br>                  v<br>             NEXT ITERATION</pre><h3>Q29. What is the difference between Backpropagation and Gradient Descent?</h3><p>They are related but perform different roles.</p><p>BackpropagationGradient DescentCalculates gradientsUses gradients to update parametersApplies the chain rulePerforms optimisationDetermines how loss changes with parametersMoves parameters towards lower lossPart of the training processAn optimisation method</p><p>Other optimisers include Adam, AdamW and RMSprop.</p><p>Not all ML algorithms use backpropagation. For example, KNN, Decision Trees and Random Forests use different learning procedures.</p><h3>PART 7: TRANSFORMERS — THE FOUNDATION OF MODERN LLMS</h3><h3>Q30. Why did the AI industry move towards Transformer architectures?</h3><p>RNNs and LSTMs process sequences step by step.</p><p>This sequential processing can limit parallelisation during training.</p><p>Transformers introduced an architecture based on attention mechanisms, allowing the model to process relationships between tokens more efficiently.</p><p>The Transformer architecture was introduced in the 2017 research paper:</p><p><strong>Attention Is All You Need</strong> by Vaswani and colleagues.</p><p>Transformers became the foundation for many modern language models.</p><h3>Q31. What is Attention in a Transformer?</h3><p>Attention is a mechanism that allows a model to determine which parts of the input sequence are relevant when processing a particular token.</p><p>Consider:</p><p>“The animal didn’t cross the road because it was tired.”</p><p>To interpret the word “it”, the model needs to consider other words in the sentence.</p><p>Attention helps the model assign different importance to different tokens based on their relationships.</p><p>The attention weights are dynamically computed from the current input. They are not simply fixed importance values assigned permanently to individual words.</p><h3>Q32. What are Query, Key and Value in Attention?</h3><p>The attention mechanism uses three representations:</p><ul><li>Query (Q).</li><li>Key (K).</li><li>Value (V).</li></ul><p>They are generated by applying learned linear transformations to input representations.</p><p>[<br>Q=XW_Q<br>]</p><p>[<br>K=XW_K<br>]</p><p>[<br>V=XW_V<br>]</p><p>The attention calculation is:</p><p>[<br>Attention(Q,K,V)=<br>softmax\left(\frac{QK^T}{\sqrt{d_k}}\right)V<br>]</p><p>In a decoder-only model, a causal mask is also applied to prevent a token from attending to future tokens.</p><p>Conceptually:</p><ul><li>Query asks what information is relevant.</li><li>Key represents what information is available for matching.</li><li>Value carries the information to be aggregated.</li></ul><h3>Q33. What is Multi-Head Attention?</h3><p>Multi-Head Attention performs multiple attention calculations in parallel.</p><p>Each attention head can learn different relationships between tokens.</p><p>For example, different heads may learn to focus on:</p><ul><li>Nearby words.</li><li>Grammatical relationships.</li><li>Long-distance dependencies.</li><li>Semantic relationships.</li></ul><p>The results are combined through concatenation and an output projection.</p><h3>Q34. What are the major components of a Transformer?</h3><p>A simplified Transformer block contains:</p><ol><li>Attention mechanism.</li><li>Feed-Forward Network.</li><li>Residual Connections.</li><li>Layer Normalisation.</li></ol><p>Modern Transformer architectures may use different variations of these components.</p><p>The original Transformer used an encoder-decoder architecture, while many GPT-style LLMs use decoder-only architectures.</p><h3>PART 8: INTERNAL ARCHITECTURE OF A LARGE LANGUAGE MODEL (LLM)</h3><h3>Q35. What is the overall architecture of a GPT-style LLM?</h3><p>A GPT-style LLM is generally based on a decoder-only Transformer architecture.</p><p>Its simplified processing pipeline is:</p><pre>INPUT TEXT<br>                     |<br>                     v<br>                TOKENISATION<br>                     |<br>                     v<br>                 TOKEN IDs<br>                     |<br>                     v<br>              TOKEN EMBEDDING<br>                     |<br>                     v<br>           POSITIONAL INFORMATION<br>                     |<br>                     v<br>             TRANSFORMER BLOCK 1<br>                     |<br>          +----------+----------+<br>          |                     |<br>          v                     v<br>    MASKED SELF-ATTENTION   FEED-FORWARD<br>          |                     |<br>          +----------+----------+<br>                     |<br>             RESIDUAL CONNECTIONS<br>             AND NORMALISATION<br>                     |<br>                     v<br>             TRANSFORMER BLOCK 2<br>                     |<br>                    ...<br>                     |<br>                     v<br>             TRANSFORMER BLOCK N<br>                     |<br>                     v<br>              FINAL NORMALISATION<br>                     |<br>                     v<br>                OUTPUT LINEAR<br>                     |<br>                     v<br>               LOGIT SCORES<br>                     |<br>                     v<br>              SOFTMAX / SAMPLING<br>                     |<br>                     v<br>              NEXT TOKEN OUTPUT<br>                     |<br>                     v<br>           APPEND TOKEN TO SEQUENCE<br>                     |<br>                     v<br>              GENERATE NEXT TOKEN</pre><p>This is a simplified representation. Actual architectures differ in their attention mechanisms, normalisation, positional methods, feed-forward layers and other implementation details.</p><h3>Q36. What is Tokenisation?</h3><p>Tokenisation is the process of converting input text into smaller units called tokens.</p><p>A token may represent:</p><ul><li>A complete word.</li><li>Part of a word.</li><li>A punctuation mark.</li><li>A number.</li><li>A special symbol.</li></ul><p>For example:</p><pre>Input:<br>&quot;Artificial Intelligence is powerful&quot;</pre><pre>Possible tokens:<br>[&quot;Artificial&quot;, &quot; Intelligence&quot;, &quot; is&quot;, &quot; powerful&quot;]</pre><p>The actual token boundaries depend on the model’s tokenizer.</p><p>Tokenisation converts text into units that can be processed by the model.</p><h3>Q37. What are Token IDs?</h3><p>After tokenisation, each token is mapped to a numerical identifier from the model’s vocabulary.</p><p>For example:</p><pre>Token          Token ID<br>-----------------------<br>Artificial       1052<br>Intelligence     8721<br>is                318<br>powerful        12345</pre><p>These are illustrative IDs, not actual universal token IDs.</p><p>Token IDs are indices in the model’s vocabulary. They are not semantic vectors.</p><h3>Q38. What is the Token Embedding Layer?</h3><p>The embedding layer converts token IDs into dense numerical vectors.</p><p>For example:</p><pre>Token ID: 1052<br>       |<br>       v<br>Embedding Lookup<br>       |<br>       v<br>[0.21, -0.43, 0.17, 0.82, ...]</pre><p>Each token has a learned vector representation.</p><p>The embedding dimension may contain hundreds or thousands of numerical values, depending on the model.</p><p>These vectors are learned during training and help the model represent relationships between tokens.</p><h3>Q39. Why does an LLM need positional information?</h3><p>A Transformer needs information about token positions because attention alone does not inherently encode the order in which tokens appear.</p><p>Consider:</p><ul><li>“The dog chased the cat.”</li><li>“The cat chased the dog.”</li></ul><p>The same words appear, but their order changes the meaning.</p><p>Positional information helps the model distinguish these sequences.</p><p>Common approaches include:</p><ul><li>Sinusoidal positional encoding.</li><li>Learned positional embeddings.</li><li>Rotary Position Embedding (RoPE).</li><li>Other relative-position techniques.</li></ul><p>A simplified conceptual representation is:</p><p>[<br>Input\ Representation =<br>Token\ Embedding + Positional\ Information<br>]</p><p>This addition describes some approaches. RoPE, for example, applies position-dependent rotations within attention rather than simply adding a positional vector to the token embedding.</p><h3>Q40. What is a Transformer Block?</h3><p>A Transformer Block is a repeated computational unit that processes the token representations.</p><p>A simplified decoder block contains:</p><pre>INPUT REPRESENTATION<br>                   |<br>                   v<br>          MASKED SELF-ATTENTION<br>                   |<br>                   v<br>          RESIDUAL CONNECTION<br>                   |<br>                   v<br>          LAYER NORMALISATION<br>                   |<br>                   v<br>           FEED-FORWARD NETWORK<br>                   |<br>                   v<br>          RESIDUAL CONNECTION<br>                   |<br>                   v<br>          LAYER NORMALISATION<br>                   |<br>                   v<br>                 OUTPUT</pre><p>Actual implementations may use Pre-LayerNorm or other normalisation arrangements.</p><p>An LLM typically contains many such Transformer blocks stacked together.</p><h3>Q41. What is Masked Self-Attention?</h3><p>Masked Self-Attention allows each token to attend to permitted tokens in the same sequence.</p><p>In a GPT-style decoder-only architecture, a causal mask prevents a token from accessing future tokens.</p><p>For example:</p><pre>Token 1: I<br>Token 2: love<br>Token 3: AI</pre><p>The attention visibility is conceptually:</p><pre>I     love    AI<br>I            Yes    No      No<br>love         Yes    Yes     No<br>AI           Yes    Yes     Yes</pre><p>This ensures that the model predicts the next token without looking ahead at future tokens.</p><h3>Q42. What is the Feed-Forward Network (FFN) in a Transformer?</h3><p>The Feed-Forward Network is another important component of a Transformer block.</p><p>It processes the representations produced by the attention mechanism.</p><p>A simplified representation is:</p><p>[<br>FFN(x)=W_2f(W_1x+b_1)+b_2<br>]</p><p>Where:</p><ul><li>(W_1) and (W_2) are learned weight matrices.</li><li>(b_1) and (b_2) are biases.</li><li>(f) is an activation function.</li></ul><p>Common activation functions include GELU and variants such as SwiGLU.</p><p>The attention mechanism helps combine information across tokens, while the FFN transforms the representation at each token position.</p><h3>Q43. What are Residual Connections?</h3><p>Residual Connections allow the original input of a sublayer to be added to its output.</p><p>A simplified representation is:</p><p>[<br>Output=x+F(x)<br>]</p><p>They help information and gradients flow through deep neural networks.</p><p>This makes it easier to train models containing many layers.</p><h3>Q44. What is Layer Normalisation?</h3><p>Layer Normalisation helps stabilise the numerical values of activations within a neural network.</p><p>It improves training stability and can help the network learn effectively.</p><p>Transformer architectures may use:</p><ul><li>Pre-LayerNorm.</li><li>Post-LayerNorm.</li><li>RMSNorm.</li></ul><p>The exact arrangement depends on the model design.</p><h3>Q45. What happens after the final Transformer Block?</h3><p>After the final Transformer block, the model generally applies a final normalisation operation.</p><p>The resulting hidden representation is passed to the language-model output head.</p><p>The output head maps the hidden representation into a vector of scores corresponding to possible vocabulary tokens.</p><p>These scores are called logits.</p><h3>Q46. What are Logits and Softmax in an LLM?</h3><p>Logits are raw numerical scores assigned to possible next tokens.</p><p>For example:</p><pre>Possible next tokens:</pre><pre>&quot;AI&quot;          4.2<br>&quot;machine&quot;     2.7<br>&quot;computer&quot;    1.8<br>&quot;banana&quot;     -1.2</pre><p>Softmax converts these scores into a probability distribution.</p><p>[<br>P_i=\frac{e^{z_i}}{\sum_j e^{z_j}}<br>]</p><p>Where (z_i) is the logit for a particular token.</p><p>The model can then select a next token using a decoding strategy.</p><h3>Q47. How does an LLM generate the next token?</h3><p>The model calculates scores for possible next tokens and selects one according to its decoding strategy.</p><p>Common decoding approaches include:</p><ul><li>Greedy decoding.</li><li>Temperature-based sampling.</li><li>Top-k sampling.</li><li>Top-p sampling.</li></ul><p>For example:</p><pre>Input:<br>&quot;Artificial Intelligence is&quot;</pre><pre>Possible next tokens:<br>&quot;powerful&quot;<br>&quot;important&quot;<br>&quot;transforming&quot;</pre><p>The model selects one token and appends it to the sequence.</p><p>It then performs another prediction step.</p><h3>Q48. What is Autoregressive Generation?</h3><p>Autoregressive generation is the process of generating a sequence one token at a time, using previously available tokens as context.</p><pre>Prompt<br>  |<br>  v<br>Predict Token 1<br>  |<br>  v<br>Append Token 1<br>  |<br>  v<br>Predict Token 2<br>  |<br>  v<br>Append Token 2<br>  |<br>  v<br>Predict Token 3<br>  |<br>  v<br>Continue Until Stopping Condition</pre><p>This is how many GPT-style models generate text.</p><h3>Q49. What is the difference between LLM training and inference?</h3><p>AspectTrainingInferenceObjectiveLearn model parametersGenerate predictions and responsesForward propagationYesYesLoss calculationYesNot normally required for ordinary generationBackpropagationYesNoParameter updatesYesNo, in ordinary inferenceMain activityLearning from training dataProcessing prompts and generating tokensComputational demandVery high for large-scale trainingDepends on model size and request volume</p><h3>Q50. Are all LLMs based on the same Transformer architecture?</h3><p>No.</p><p>There are several major Transformer architecture families.</p><p><strong>1. Encoder-only models</strong></p><p>These process input representations using bidirectional attention.</p><p>They are useful for tasks such as language understanding and classification.</p><p>Example: BERT.</p><p><strong>2. Decoder-only models</strong></p><p>These use causal attention and generate tokens autoregressively.</p><p>They are commonly used for generative language models.</p><p>Example: GPT-style models.</p><p><strong>3. Encoder-decoder models</strong></p><p>These contain an encoder that processes input and a decoder that generates output.</p><p>They are useful for sequence-to-sequence tasks such as translation.</p><p>Example: T5.</p><p>Other architectural differences include:</p><ul><li>Different positional encoding methods.</li><li>Different attention mechanisms.</li><li>Different normalisation techniques.</li><li>Dense versus Mixture-of-Experts feed-forward layers.</li><li>Different vocabulary sizes and embedding dimensions.</li></ul><h3>Q51. Which parameters are learned during LLM training?</h3><p>An LLM learns many numerical parameters, including:</p><ul><li>Token embedding parameters.</li><li>Query projection weights.</li><li>Key projection weights.</li><li>Value projection weights.</li><li>Attention output projection weights.</li><li>Feed-forward network weights.</li><li>Normalisation parameters.</li><li>Language-model output projection parameters.</li></ul><p>Training adjusts these parameters using a loss function, backpropagation and an optimiser.</p><p>During ordinary inference, these learned parameters remain fixed.</p><h3>PART 9: WHY DO LARGE LANGUAGE MODELS REQUIRE SO MUCH HARDWARE AND ELECTRICITY?</h3><h3>Q52. Why does an LLM require so much computational power?</h3><p>A Large Language Model may contain billions or even trillions of learned parameters.</p><p>Each parameter is a numerical value used by the model to represent patterns and relationships learned during training.</p><p>When an LLM processes a prompt, it performs enormous numbers of mathematical operations involving these parameters.</p><p>For example, it must:</p><ul><li>Convert input tokens into numerical vectors.</li><li>Perform matrix multiplications in attention layers.</li><li>Process information through multiple Transformer blocks.</li><li>Calculate probabilities for possible next tokens.</li><li>Repeat the process to generate a response token by token.</li></ul><p>These operations require substantial computational power, especially when the model is very large or processes long sequences.</p><p><strong>The key reason:</strong> An LLM is not simply retrieving a stored answer. It performs extensive numerical computations to generate each response.</p><h3>Q53. What kind of hardware is required to train and operate an LLM?</h3><p>LLMs typically rely on specialised hardware and high-performance data-centre infrastructure.</p><p>Hardware componentPurposeGPUPerforms large numbers of parallel mathematical operations, especially matrix multiplicationsTPUSpecialised processor designed to accelerate machine-learning computationsCPUCoordinates processes, manages system operations and handles general-purpose computingHigh-Bandwidth Memory (HBM)Stores model parameters, intermediate calculations and other data close to the processorRAMSupports data loading, preprocessing and other system operationsHigh-speed networkingAllows multiple GPUs and servers to exchange data during distributed trainingStorage systemsStore training datasets, model checkpoints and supporting data</p><p>GPUs and TPUs are particularly important because neural networks perform many mathematical operations that can be executed in parallel.</p><h3>Q54. Why can’t we train a very large LLM using an ordinary computer?</h3><p>An ordinary computer generally does not have enough processing capacity or memory to train a very large LLM efficiently.</p><p>Consider a model with 70 billion parameters.</p><p>If each parameter is stored using 16 bits (2 bytes), the parameter weights alone require approximately:</p><p>70 billion × 2 bytes = 140 billion bytes.</p><p>That is approximately 140 GB in decimal units, or around 130 GiB.</p><p>However, training requires considerably more memory than simply storing the model weights.</p><p>Additional memory is needed for:</p><ul><li>Gradients calculated during backpropagation.</li><li>Optimiser states used to update parameters.</li><li>Intermediate activations generated by the neural network.</li><li>Input batches and other temporary data.</li></ul><p>Therefore, training such a model may require multiple high-memory GPUs distributed across several servers.</p><p>The exact memory requirement depends on numerical precision, architecture, batch size, optimiser and training techniques.</p><h3>Q55. Why does LLM training consume so much electricity?</h3><p>Training an LLM involves repeatedly processing enormous amounts of training data and updating billions of model parameters.</p><p>The process can be understood as follows:</p><ol><li><strong>Forward propagation:</strong> Training data passes through Transformer layers to generate predictions.</li><li><strong>Loss calculation:</strong> The predicted output is compared with the expected output using a loss function.</li><li><strong>Backpropagation:</strong> Gradients are calculated to determine how model parameters should change.</li><li><strong>Parameter updates:</strong> An optimiser updates the model parameters using those gradients.</li><li><strong>Repeated training:</strong> These operations are performed over many batches and training iterations.</li></ol><p>This process may run continuously across hundreds or thousands of processors for an extended period.</p><p>Every processor consumes electricity while performing computations. Servers also require electricity for memory, networking and storage.</p><p>Furthermore, data centres consume additional energy for:</p><ul><li>Cooling systems.</li><li>Power distribution and conversion.</li><li>Networking equipment.</li><li>Storage infrastructure.</li><li>Other supporting facilities.</li></ul><p>Therefore, the total electricity consumption of an AI data centre is greater than the electricity consumed by its GPUs alone.</p><h3>Q56. Why do LLMs need multiple GPUs instead of one powerful GPU?</h3><p>A large LLM may be too large to fit into the memory of a single GPU.</p><p>To solve this problem, the model and its computations can be distributed across multiple GPUs.</p><p>This is known as distributed computing or distributed training.</p><p>Important techniques include:</p><p><strong>1. Data Parallelism</strong></p><p>Each GPU receives a copy of the model and processes a different portion of the training data. The GPUs exchange gradients so that their model updates remain coordinated.</p><p><strong>2. Tensor Parallelism</strong></p><p>The mathematical operations inside a layer are divided across multiple GPUs. Each GPU performs part of the computation.</p><p><strong>3. Pipeline Parallelism</strong></p><p>Different groups of Transformer layers are placed on different GPUs. Data flows through these groups like a processing pipeline.</p><p>Simplified architecture:</p><pre>TRAINING DATA<br>                       |<br>                       v<br>                DATA DISTRIBUTION<br>                       |<br>          +------------+------------+<br>          |            |            |<br>          v            v            v<br>       GPU 1         GPU 2         GPU 3<br>          |            |            |<br>          v            v            v<br>      Transformer   Transformer   Transformer<br>        Layers        Layers        Layers<br>          |            |            |<br>          +------------+------------+<br>                       |<br>                       v<br>               GRADIENT SYNCHRONISATION<br>                       |<br>                       v<br>                MODEL PARAMETER UPDATE<br>                       |<br>                       v<br>                 NEXT TRAINING STEP</pre><p>Actual architectures can be more complex, with different parallelism techniques operating together.</p><h3>Q57. Does an LLM consume electricity only during training?</h3><p>No. An LLM consumes electricity both during training and when it is used to answer questions.</p><p>There are two important stages:</p><p><strong>A. Training</strong></p><p>The model learns from large datasets. Its parameters are repeatedly updated using forward propagation, loss calculation, backpropagation and optimisation.</p><p>Training is generally extremely computationally expensive.</p><p><strong>B. Inference</strong></p><p>After training, the model is deployed to answer user requests.</p><p>When a user submits a prompt, the model performs computations through its Transformer layers and generates output tokens.</p><p>The model generally does not update its learned parameters during ordinary inference.</p><p>However, inference still consumes electricity because the model must perform substantial mathematical computations every time it processes a request.</p><h3>Q58. Why does generating a long answer consume more computational resources?</h3><p>Most GPT-style LLMs generate text autoregressively, meaning they predict one token at a time.</p><p>For example:</p><pre>Input: Explain artificial intelligence.</pre><pre>Step 1: Predict &quot;Artificial&quot;<br>Step 2: Predict &quot;intelligence&quot;<br>Step 3: Predict &quot;is&quot;<br>Step 4: Predict &quot;a&quot;<br>Step 5: Predict &quot;field&quot;<br>...</pre><p>Each newly generated token requires another prediction step.</p><p>Consequently:</p><ul><li>Longer input prompts require more processing.</li><li>Longer responses require more token-generation steps.</li><li>Larger models generally require more computation per token.</li><li>More simultaneous users require more total processing capacity.</li></ul><p>Modern LLM systems use techniques such as KV caching to avoid recomputing certain attention-related information for previously processed tokens. This improves inference efficiency, although it does not eliminate the computational cost.</p><h3>Q59. Why is memory so important when running an LLM?</h3><p>Memory is one of the major limitations when deploying large language models.</p><p>The system needs memory for:</p><ol><li><strong>Model weights:</strong> The learned parameters of the LLM.</li><li><strong>Activations:</strong> Intermediate numerical representations produced while processing input.</li><li><strong>KV Cache:</strong> Previously calculated keys and values retained to accelerate autoregressive generation.</li><li><strong>Batch processing:</strong> Data from multiple user requests being processed together.</li></ol><p>The KV cache becomes particularly important when handling long conversations or large numbers of simultaneous requests.</p><p>A model may fit into a GPU’s memory, but the system may still struggle to serve many users or process long contexts because of additional memory requirements.</p><h3>Q60. Why does an AI data centre need such extensive cooling infrastructure?</h3><p>Processors consume electrical energy, and a significant portion of that energy is converted into heat.</p><p>High-performance GPUs operating continuously can generate substantial amounts of heat.</p><p>If the heat is not removed:</p><ul><li>Processor temperatures can rise.</li><li>Hardware may reduce its operating speed to protect itself.</li><li>System stability and hardware reliability can be affected.</li></ul><p>Data centres therefore use specialised cooling technologies, such as:</p><ul><li>Air cooling.</li><li>Liquid cooling.</li><li>Direct-to-chip liquid cooling.</li><li>Immersion cooling in some deployments.</li></ul><p>Cooling itself requires energy, adding to the overall electricity consumption of the data centre.</p><h3>Q61. Is inference always cheaper than training?</h3><p>Inference is generally less computationally expensive than training for an individual operation because the model’s parameters are not being updated.</p><p>However, inference can become a substantial source of total energy consumption when millions of users continuously access a model.</p><p>A model may be trained once and then serve an enormous number of requests over its lifetime.</p><p>Therefore, cumulative energy consumed during inference can also be significant.</p><h3>Q62. What factors determine the electricity consumption of an LLM?</h3><p>There is no single fixed electricity requirement for an LLM. It depends on several factors.</p><p>FactorEffect on energy consumptionNumber of parametersLarger models generally require more computation and memoryModel architectureAttention mechanisms, dense layers and MoE designs affect computational requirementsTraining dataset sizeMore training tokens generally require more processingNumber of training iterationsMore iterations mean more computationNumerical precisionLower-precision computation can reduce memory use and improve efficiencyInput context lengthLonger prompts generally require more processing and memoryOutput lengthMore generated tokens require more inference stepsNumber of concurrent usersMore simultaneous requests require more serving capacityHardware efficiencyNewer, more efficient processors can perform more work per unit of electricityData-centre coolingCooling design affects total facility energy consumption</p><p>The overall energy consumption is also influenced by software efficiency, scheduling, hardware utilisation and data-centre infrastructure.</p><h3>Q63. How can we reduce the hardware and energy requirements of LLMs?</h3><p>Researchers and engineers use several techniques to make LLMs more efficient.</p><p><strong>1. Quantisation</strong></p><p>Quantisation reduces the numerical precision used to represent model weights and sometimes activations.</p><p>For example, a model may use 8-bit or 4-bit weights instead of 16-bit or 32-bit representations.</p><p>This can reduce memory requirements and improve inference efficiency, although some accuracy trade-offs may occur.</p><p><strong>2. Pruning</strong></p><p>Pruning removes less important parameters or connections from a model, reducing its size and computational requirements.</p><p><strong>3. Knowledge Distillation</strong></p><p>A smaller model, called the student model, is trained to reproduce useful behaviour of a larger teacher model.</p><p>The resulting model can be smaller and cheaper to operate.</p><p><strong>4. Parameter-Efficient Fine-Tuning (PEFT)</strong></p><p>Instead of updating every parameter of a large pretrained model, techniques such as LoRA train a much smaller set of additional parameters.</p><p>This reduces the memory and computational requirements of fine-tuning.</p><p><strong>5. Mixture of Experts (MoE)</strong></p><p>Instead of activating every feed-forward expert for every token, an MoE model activates only selected experts.</p><p>This can reduce the computation required per token, although the overall model may still contain a very large number of parameters and require substantial memory.</p><p><strong>6. Efficient Attention and KV Caching</strong></p><p>Optimised attention implementations and KV caching reduce unnecessary computation and improve inference performance.</p><p><strong>7. Smaller, Task-Specific Models</strong></p><p>Not every problem requires a massive LLM.</p><p>A smaller model can often perform a specific task with lower hardware and energy requirements.</p><p><strong>8. Efficient Data Centres</strong></p><p>Better cooling, efficient power distribution, improved processor utilisation and suitable energy sources can reduce the environmental impact of AI infrastructure.</p><h3>Q64. Does a larger LLM always mean a better LLM?</h3><p>Not necessarily.</p><p>A larger model may have greater capacity to learn complex patterns, but size alone does not guarantee better performance.</p><p>Other important factors include:</p><ul><li>Quality and diversity of training data.</li><li>Model architecture.</li><li>Training methodology.</li><li>Optimisation techniques.</li><li>Fine-tuning and alignment.</li><li>Inference-time techniques.</li><li>The nature of the task being performed.</li></ul><p>A smaller, well-trained model may outperform a much larger model on a specialised task while requiring significantly fewer computational resources.</p><h3>Q65. What is the relationship between LLMs, electricity consumption and environmental impact?</h3><p>The rapid growth of AI increases demand for data-centre computing infrastructure.</p><p>The environmental impact depends on:</p><ul><li>Total electricity consumed.</li><li>Whether electricity comes from renewable or fossil-fuel sources.</li><li>Cooling and water-management requirements.</li><li>Hardware manufacturing and supply chains.</li><li>The useful work achieved per unit of energy.</li></ul><p>Building sustainable AI systems requires efficient algorithms, energy-efficient hardware, responsible data-centre design and cleaner electricity.</p><h3>Q66. What is the overall takeaway?</h3><p>The computational cost of LLMs comes from their enormous number of learned parameters, repeated mathematical operations, memory requirements and the scale at which they are deployed.</p><p>Training requires extensive computation to learn model parameters. Inference requires computation every time the model processes a request and generates tokens.</p><p>Powerful GPUs and TPUs accelerate these operations, while high-bandwidth memory and networking allow large models to operate across multiple processors. Cooling and other data-centre infrastructure add to the total energy requirement.</p><p><strong>The next generation of AI innovation will be driven not just by increasing model intelligence, but also by achieving more intelligence per unit of computation and energy.</strong></p><h3>PART 10: HOW ARE LARGE LANGUAGE MODELS TRAINED?</h3><h3>Q67. How is an LLM trained?</h3><p>An LLM is trained using enormous collections of text and other data, depending on the model’s capabilities.</p><p>A simplified training pipeline is:</p><pre>TRAINING DATA<br>                   |<br>                   v<br>          DATA COLLECTION<br>                   |<br>                   v<br>          DATA CLEANING<br>                   |<br>                   v<br>             TOKENISATION<br>                   |<br>                   v<br>         TOKEN ID SEQUENCES<br>                   |<br>                   v<br>         TRANSFORMER MODEL<br>                   |<br>                   v<br>          NEXT-TOKEN PREDICTION<br>                   |<br>                   v<br>           LOSS CALCULATION<br>                   |<br>                   v<br>            BACKPROPAGATION<br>                   |<br>                   v<br>         PARAMETER OPTIMISATION<br>                   |<br>                   v<br>             REPEAT TRAINING<br>                   |<br>                   v<br>           PRETRAINED MODEL</pre><p>During training, the model learns to predict tokens based on the context provided.</p><h3>Q68. What is Next-Token Prediction?</h3><p>Next-token prediction is a common training objective for autoregressive language models.</p><p>Consider:</p><pre>Input:<br>&quot;The capital of France is&quot;</pre><pre>Expected next token:<br>&quot;Paris&quot;</pre><p>The model predicts a probability distribution over possible next tokens.</p><p>The training objective is to increase the probability assigned to the correct next token.</p><p>This process is repeated over a large training dataset.</p><h3>Q69. What is the Loss Function used in LLM training?</h3><p>Many autoregressive LLMs use a cross-entropy-based objective.</p><p>The loss measures how well the model predicts the expected next token.</p><p>A simplified expression is:</p><p>[<br>L=-\sum_i y_i\log(p_i)<br>]</p><p>Where:</p><ul><li>(y_i) represents the target distribution.</li><li>(p_i) represents the model’s predicted probability.</li></ul><p>The training process attempts to minimise this loss.</p><h3>Q70. What is Pretraining?</h3><p>Pretraining is the initial large-scale training stage in which the model learns general patterns from a broad dataset.</p><p>The model learns statistical and structural relationships involving:</p><ul><li>Language.</li><li>Grammar.</li><li>Facts and associations.</li><li>Writing styles.</li><li>Patterns in code.</li><li>Relationships between concepts.</li></ul><p>Pretraining produces a general-purpose foundation model.</p><h3>Q71. What is Fine-Tuning?</h3><p>Fine-tuning is the process of further training a pretrained model using a more specific dataset or objective.</p><p>For example, a general-purpose model can be fine-tuned for:</p><ul><li>Banking.</li><li>Healthcare.</li><li>Legal document analysis.</li><li>Customer support.</li><li>Software development.</li></ul><p>Fine-tuning adapts the model to a particular task or domain.</p><p>Yes. Large Language Models (LLMs) use Transfer Learning extensively. In fact, transfer learning is one of the fundamental techniques that makes it practical to develop powerful LLMs.</p><p>Let’s understand how it works.</p><h3>1. What is Transfer Learning?</h3><p>Transfer Learning is a machine learning technique in which a model first learns knowledge from one task or dataset and then reuses that learned knowledge for another, usually related, task.</p><p>Instead of training a model from scratch for every new task, we transfer the knowledge learned during the initial training.</p><p>Example:</p><p>Imagine training a model on a huge collection of books, articles, websites and other text.</p><p>It learns:</p><ul><li>Grammar and sentence structure.</li><li>Relationships between words.</li><li>Language patterns.</li><li>Context and semantic relationships.</li><li>General knowledge represented in its training data.</li></ul><p>We can then adapt this pretrained model to perform specific tasks such as:</p><ul><li>Answering banking-related questions.</li><li>Generating Python code.</li><li>Summarising legal documents.</li><li>Analysing customer queries.</li><li>Providing medical information.</li></ul><p>The knowledge learned during initial training becomes the foundation for these specialised tasks.</p><h3>2. How does Transfer Learning work in an LLM?</h3><p>LLM development typically involves several stages.</p><p>Stage 1: Pretraining</p><p>The model is trained on a very large text corpus.</p><p>For a typical decoder-only LLM, it learns to predict the next token in a sequence.</p><p>For example:</p><p>Input: The capital of India is</p><p>Expected next token: New</p><p>The model learns language patterns by repeatedly predicting tokens and adjusting its parameters to reduce prediction errors.</p><p>The result is a Pretrained Foundation Model.</p><p>Stage 2: Fine-tuning</p><p>The pretrained model is further trained using a smaller, more specialised dataset.</p><p>For example:</p><p>Pretrained model</p><p>Fine-tuning dataset</p><p>Specialised capability</p><p>General LLM</p><p>Banking documents and Q&amp;A</p><p>Banking assistant</p><p>General LLM</p><p>Python code examples</p><p>Code-generation assistant</p><p>General LLM</p><p>Legal documents</p><p>Legal-domain assistant</p><p>General LLM</p><p>Medical literature</p><p>Medical-domain assistant</p><p>The model reuses its previously learned knowledge while adapting its parameters to the new task.</p><p>Stage 3: Instruction tuning and alignment</p><p>The model can be trained further using instruction-response examples and preference feedback so that it follows user instructions more effectively and produces more useful responses.</p><p>Methods may include supervised fine-tuning (SFT) and reinforcement learning from human feedback (RLHF).</p><h3>3. What happens to the model parameters during Transfer Learning?</h3><p>Consider a pretrained Transformer model:</p><p>Pretrained LLM</p><p>Learned embeddings, attention weights, feed-forward network parameters and other model weights</p><p>Transfer learning / adaptation</p><p>Full fine-tuning</p><p>Updates many or all model parameters</p><p>PEFT / LoRA</p><p>Updates a small number of additional parameters</p><p>Specialised LLM</p><p>Retains general capabilities while adapting to a specific task or domain</p><p>There are two important approaches:</p><ul><li>Full fine-tuning: The pretrained model’s existing parameters are updated using the new training data.</li><li>Parameter-Efficient Fine-Tuning (PEFT): Most original parameters are kept frozen, while a relatively small number of additional parameters are trained. LoRA is a popular examplete.</li></ul><h3>4. Is RAG also Transfer Learning?</h3><p>No. This is an important distinction.</p><p>Transfer Learning</p><p>Retrieval-Augmented Generation (RAG)</p><p>Reuses knowledge learned during model training.</p><p>Supplies relevant external information at inference time.</p><p>May update model parameters.</p><p>Does not normally update model parameters.</p><p>Fine-tuning is a common approach.</p><p>Retrieval and context injection are key mechanisms.</p><p>Changes the model’s learned behaviour or capabilities.</p><p>Enriches the context available to the model.</p><p>For example, a banking LLM can be fine-tuned using banking-related question-and-answer datasets. Separately, it can use RAG to retrieve the latest banking policies from an enterprise knowledge base.</p><p>These approaches can complement each other.</p><h3>5. The overall evolution</h3><p>The relationship can be summarised as:</p><pre>Large Training Dataset<br>        |<br>        v<br>   PRETRAINING<br>        |<br>        v<br> Pretrained Foundation LLM<br>        |<br>        v<br>  TRANSFER LEARNING<br>        |<br>        +-------------------+<br>        |                   |<br>        v                   v<br>  Full Fine-tuning     PEFT / LoRA<br>        |                   |<br>        +-------------------+<br>                |<br>                v<br>       Specialised LLM<br>                |<br>                v<br>       Instruction Tuning<br>                |<br>                v<br>       Aligned LLM<br>                |<br>                v<br>       AI Applications</pre><h3>Q72. What is PEFT?</h3><p>Parameter-Efficient Fine-Tuning (PEFT) refers to techniques that adapt a large pretrained model without updating all of its parameters.</p><p>One well-known technique is LoRA (Low-Rank Adaptation).</p><p>LoRA introduces smaller trainable matrices into selected model layers, allowing adaptation with fewer trainable parameters.</p><p>Benefits include:</p><ul><li>Lower memory requirements.</li><li>Reduced fine-tuning cost.</li><li>Smaller trainable parameter sets.</li><li>Easier management of multiple task-specific adaptations.</li></ul><p>PEFT is particularly useful when adapting large models for enterprise use cases.</p><h3>Q73. What is the difference between Pretraining and Fine-Tuning?</h3><p>PretrainingFine-TuningInitial large-scale trainingFurther adaptation of a pretrained modelUsually broad datasetsUsually task- or domain-specific datasetsLearns general language and other patternsAdapts behaviour to a particular taskComputationally expensiveOften less expensive, especially with PEFT</p><h3>PART 11: HOW DOES AN LLM GENERATE PYTHON CODE?</h3><h3>Q74. How can an LLM generate Python code if it has only learned from tokens?</h3><p>An LLM does not need to execute a programming language in order to generate code.</p><p>During training, it learns patterns from large collections of text and code.</p><p>For example, it may learn relationships between:</p><ul><li>Python keywords.</li><li>Variables.</li><li>Functions.</li><li>Classes.</li><li>Libraries.</li><li>Syntax.</li><li>Programming patterns.</li><li>Common algorithms.</li></ul><p>When a user asks:</p><p>“Write a Python program to calculate factorial.”</p><p>The LLM processes the request and generates a sequence of tokens that form Python code.</p><p>Example:</p><pre>def factorial(n):<br>    if n == 0:<br>        return 1</pre><pre>    return n * factorial(n - 1)<br></pre><pre>print(factorial(5))</pre><p>The LLM generates the code based on learned patterns and the current context.</p><h3>Q75. Does an LLM execute the Python code it generates?</h3><p>Not necessarily.</p><p>There is an important distinction between generating code and executing code.</p><p><strong>Code generation</strong></p><p>The LLM predicts tokens that form a program.</p><p><strong>Code execution</strong></p><p>A Python interpreter executes the generated program.</p><p>A tool-enabled AI system may connect the LLM to a Python execution environment.</p><p>The workflow becomes:</p><pre>USER REQUEST<br>                    |<br>                    v<br>                 LLM<br>                    |<br>                    v<br>             GENERATE CODE<br>                    |<br>                    v<br>            PYTHON EXECUTION TOOL<br>                    |<br>                    v<br>             EXECUTE PROGRAM<br>                    |<br>                    v<br>              EXECUTION RESULT<br>                    |<br>                    v<br>                 LLM<br>                    |<br>                    v<br>             EXPLAIN RESULT</pre><p>The LLM can inspect the execution result and generate a corrected program if necessary.</p><p>Importantly, executing code through a tool does not automatically fine-tune or update the LLM’s learned parameters.</p><h3>PART 12: FROM LLMS TO GENERATIVE AI</h3><h3>Q76. What is Generative AI?</h3><p>Generative AI refers to AI systems that create new content based on patterns learned from training data and the information supplied at inference time.</p><p>It can generate:</p><ul><li>Text.</li><li>Images.</li><li>Audio.</li><li>Video.</li><li>Music.</li><li>Computer code.</li><li>Structured data.</li></ul><p>LLMs are a major category of Generative AI focused primarily on language and related multimodal capabilities.</p><h3>Q77. What is the difference between traditional ML and Generative AI?</h3><p>Traditional MLGenerative AIOften predicts or classifiesGenerates new contentCommonly produces labels, scores or numerical valuesProduces text, images, audio or codeOften uses task-specific modelsOften uses large foundation modelsExample: Fraud predictionExample: Generating a fraud investigation summary</p><p>The two are complementary rather than mutually exclusive.</p><h3>PART 13: FROM LLMS TO AI AGENTS</h3><h3>Q78. What is an AI Agent?</h3><p>An AI Agent is a system that uses an AI model to pursue a goal by interpreting context, deciding what to do and potentially taking actions through tools.</p><p>An agent may:</p><ul><li>Understand a user request.</li><li>Break a goal into smaller tasks.</li><li>Select appropriate tools.</li><li>Retrieve information.</li><li>Execute actions.</li><li>Observe the results.</li><li>Adjust its next steps.</li><li>Produce a final response.</li></ul><p>An LLM can be the reasoning engine of an agent, but an LLM by itself is not necessarily an agent.</p><h3>Q79. What is the difference between an LLM and an AI Agent?</h3><p>LLMAI AgentPrimarily a model that processes and generates informationA system that uses a model to pursue goalsGenerates responsesCan plan and take actionsMay have no external toolsMay use multiple toolsUsually processes a prompt and returns outputCan perform multi-step workflowsDoes not necessarily maintain workflow stateMay maintain state and context</p><p>For example:</p><p><strong>LLM-only system</strong></p><p>User: “What is the balance in my bank account?”</p><p>The LLM can explain how to check a balance, but without access to banking data it cannot retrieve the actual account balance.</p><p><strong>Agentic system</strong></p><p>The agent can:</p><ol><li>Understand the request.</li><li>Identify the customer.</li><li>Invoke an authorised account-information tool.</li><li>Retrieve the balance.</li><li>Format the result.</li><li>Respond to the customer.</li></ol><h3>Q80. What are the main components of an AI Agent?</h3><p>A useful conceptual architecture contains:</p><ol><li>Model.</li><li>Instructions.</li><li>Tools.</li><li>Resources and Context.</li><li>Skills.</li><li>Orchestration.</li><li>State and Memory.</li><li>Guardrails and Governance.</li></ol><p>A simplified architecture:</p><pre>USER GOAL<br>                       |<br>                       v<br>                AGENT INTERFACE<br>                       |<br>                       v<br>               AGENT ORCHESTRATOR<br>                       |<br>          +------------+------------+<br>          |            |            |<br>          v            v            v<br>        MODEL       INSTRUCTIONS   MEMORY<br>          |            |            |<br>          +------------+------------+<br>                       |<br>                       v<br>                 DECISION / PLAN<br>                       |<br>          +------------+------------+<br>          |            |            |<br>          v            v            v<br>        TOOLS       RESOURCES      SKILLS<br>          |            |            |<br>          +------------+------------+<br>                       |<br>                       v<br>                EXECUTE ACTIONS<br>                       |<br>                       v<br>                OBSERVE RESULTS<br>                       |<br>                       v<br>                NEXT DECISION<br>                       |<br>                       v<br>                 FINAL RESPONSE</pre><p>This is a conceptual architecture. Real implementations vary.</p><h3>Q81. What is the role of the Model in an Agent?</h3><p>The model provides the intelligence used to interpret information and generate decisions or actions.</p><p>An agent may use:</p><ul><li>An LLM for natural-language understanding and reasoning.</li><li>A traditional ML model for risk scoring.</li><li>A specialised vision model for image analysis.</li><li>A speech model for audio processing.</li></ul><p>The model is the intelligence component, but the complete agent also needs instructions, tools, context and orchestration.</p><h3>Q82. What is the role of Tools in an Agent?</h3><p>Tools are executable capabilities that allow an agent to interact with external systems.</p><p>Examples:</p><ul><li>Search the web.</li><li>Retrieve customer information.</li><li>Query a database.</li><li>Execute Python code.</li><li>Create a ticket.</li><li>Send an email.</li><li>Initiate a payment through an authorised service.</li></ul><p>A tool extends an agent beyond generating text.</p><p>For example, an agent may call a banking API to retrieve a transaction history.</p><p>The actual API operation should be protected by authentication, authorisation and appropriate business controls.</p><h3>Q83. What is the role of Resources in an Agent?</h3><p>Resources provide information or context that an agent can use.</p><p>Examples include:</p><ul><li>Documents.</li><li>Customer profiles.</li><li>Product catalogues.</li><li>Policy documents.</li><li>Database records.</li><li>Knowledge-base articles</li><li>Transaction history.</li></ul><p>Resources are primarily information sources, whereas tools perform actions.</p><h3>Q84. What is the role of Skills in an Agent?</h3><p>A Skill is a reusable package of instructions, domain knowledge and workflow guidance that helps an agent perform a particular task.</p><p>For example, a Banking Loan Processing Skill might describe:</p><ol><li>How to collect loan information.</li><li>Which documents are required.</li><li>How to validate the information.</li><li>Which systems must be consulted.</li><li>When a human approval is necessary.</li><li>How to communicate the result.</li></ol><p>A Skill is more than an individual API call. It can guide an agent through a repeatable process involving multiple tools and resources.</p><p>The exact definition and implementation of Skills vary across agent platforms.</p><h3>PART 14: THE EVOLUTION FROM TOOLS TO SKILLS</h3><h3>Q85. Why did AI systems evolve from individual tools towards Skills?</h3><p>Initially, an LLM-based application might expose individual tools such as:</p><ul><li>SearchCustomer.</li><li>GetAccountBalance.</li><li>RetrieveStatement.</li><li>CalculateEMI.</li><li>CreateServiceRequest.</li></ul><p>These tools provide individual capabilities.</p><p>However, a real business process usually requires multiple capabilities to work together.</p><p>Consider a loan application.</p><p>The agent may need to:</p><ol><li>Collect customer information.</li><li>Retrieve the customer’s credit profile.</li><li>Check required documents.</li><li>Validate income.</li><li>Calculate affordability.</li><li>Initiate a loan application.</li></ol><p>A reusable Skill can provide the workflow instructions that guide the agent through these steps.</p><h3>Q86. What is the difference between a Tool and a Skill?</h3><p>ToolSkillProvides an executable capabilityProvides reusable task knowledge and workflow guidanceUsually performs a specific operationMay coordinate multiple operationsExample: GetAccountBalanceExample: Account Servicing SkillInvoked to execute an actionUsed to guide an agent through a taskOften exposed through an API or tool interfaceOften represented as instructions, references and supporting resources</p><p>A Skill may use multiple tools, but it does not necessarily execute every operation itself.</p><h3>PART 15: HTTP/REST APIs, MCP AND MCP GATEWAYS</h3><h3>Q87. What is an HTTP/REST API?</h3><p>An HTTP API allows one software system to communicate with another through standard HTTP methods and defined interfaces.</p><p>Common methods include:</p><ul><li>GET.</li><li>POST.</li><li>PUT.</li><li>PATCH.</li><li>DELETE.</li></ul><p>For example:</p><pre>GET /customers/12345/accounts</pre><p>A banking service may return the customer’s account information in JSON format.</p><p>REST APIs are widely used for communication between applications, microservices and enterprise systems.</p><h3>Q88. Why is MCP required if REST APIs already exist?</h3><p>MCP stands for <strong>Model Context Protocol</strong>.</p><p>REST APIs provide a way for software systems to communicate.</p><p>However, AI applications also need a consistent way to discover and interact with external tools and resources.</p><p>MCP provides a standardised protocol for connecting AI applications with external capabilities and context.</p><p>It helps reduce the need for every AI application to implement a completely different integration approach for every tool provider.</p><h3>Q89. What is Model Context Protocol (MCP)?</h3><p>MCP is an open protocol designed to standardise how AI applications connect to external tools, resources and reusable prompts.</p><p>Its important concepts include:</p><p><strong>1. Tools</strong></p><p>Executable functions that an AI application can invoke.</p><p>Example:</p><pre>get_customer_profile(customer_id)</pre><pre>2. Resources</pre><p>Information that an AI application can retrieve or access as context.</p><p>Example:</p><pre>customer://12345/profile</pre><p><strong>3. Prompts</strong></p><p>Reusable prompt templates that help standardise interactions or workflows.</p><p>MCP defines standard communication mechanisms for these capabilities.</p><h3>Q90. What is the difference between REST APIs and MCP?</h3><p>REST APIMCPGeneral-purpose application integrationStandardised AI application integrationExposes HTTP endpointsExposes tools, resources and prompts through MCPClient must understand API contractsMCP provides a common protocol for capability discovery and interactionCommonly used between enterprise applicationsCommonly used between AI applications and external capability providersDoes not inherently define AI-specific tool discoverySupports AI-oriented tool and context integration</p><p>MCP does not replace REST APIs.</p><p>An MCP server may internally call REST APIs, databases or other services.</p><h3>Q91. How does an MCP-based integration work?</h3><p>A simplified architecture:</p><pre>AI APPLICATION<br>                       |<br>                       v<br>                  MCP CLIENT<br>                       |<br>                       v<br>                 MCP PROTOCOL<br>                       |<br>                       v<br>                  MCP SERVER<br>                       |<br>          +------------+------------+<br>          |            |            |<br>          v            v            v<br>        TOOLS       RESOURCES     PROMPTS<br>          |            |            |<br>          +------------+------------+<br>                       |<br>                       v<br>              ENTERPRISE SERVICES<br>                       |<br>                       v<br>                REST APIs / DBs</pre><p>The MCP server exposes capabilities through the protocol. It may use existing enterprise APIs internally.</p><h3>Q92. What is an MCP Gateway?</h3><p>An MCP Gateway is an enterprise architecture component that can provide a centralised entry point for accessing MCP servers and their capabilities.</p><p>It may provide:</p><ul><li>Authentication.</li><li>Authorisation.</li><li>Routing.</li><li>Tool discovery.</li><li>Policy enforcement.</li><li>Logging.</li><li>Rate limiting.</li><li>Monitoring.</li><li>Audit trails.</li></ul><p>An MCP Gateway is an architectural pattern or implementation choice, not a mandatory component of the MCP protocol itself.</p><h3>Q93. What is a Tool Registry?</h3><p>A Tool Registry is a catalogue of available tools and their descriptions, schemas, permissions and associated providers.</p><p>For example:</p><p>ToolDescriptionAccessGetCustomerProfileRetrieve customer detailsCustomer AgentGetAccountBalanceRetrieve account balanceAccount AgentCalculateEMICalculate loan EMILoan AgentCreateServiceRequestCreate service requestSupport Agent</p><p>An enterprise registry helps manage tool discovery and governance.</p><p>A Tool Registry is a useful enterprise architecture component, but it is not a mandatory core MCP protocol component.</p><h3>Q94. Does MCP replace HTTP/REST communication between all agents and models?</h3><p>No.</p><p>MCP is not a universal model-to-model or agent-to-agent communication protocol.</p><p>It standardises interactions between AI applications and external tools, resources and prompts.</p><p>Agents may still communicate through:</p><ul><li>REST APIs.</li><li>Messaging systems.</li><li>Event-driven architecture.</li><li>Agent orchestration frameworks.</li><li>Other application-specific protocols.</li></ul><p>MCP can be part of an agent architecture without replacing the rest of the enterprise integration landscape.</p><h3>PART 16: MULTI-AGENT ARCHITECTURE AND ORCHESTRATION</h3><h3>Q95. What is a Multi-Agent System?</h3><p>A Multi-Agent System contains multiple specialised agents that collaborate to achieve a common goal.</p><p>Instead of using one agent for every task, different agents can be assigned specialised responsibilities.</p><p>For example, in a banking system:</p><ul><li>Customer Agent.</li><li>Account Agent.</li><li>Payment Agent.</li><li>Loan Agent.</li><li>Fraud Agent.</li><li>Compliance Agent.</li></ul><p>A supervisor or orchestrator can coordinate these agents.</p><h3>Q96. What is a Supervisor Agent?</h3><p>A Supervisor Agent acts as the central coordination component.</p><p>It may:</p><ul><li>Receive user requests.</li><li>Identify intent.</li><li>Select specialist agents.</li><li>Delegate tasks.</li><li>Monitor execution.</li><li>Aggregate results.</li><li>Generate the final response.</li></ul><h3>Q97. What is a Planner Agent?</h3><p>A Planner Agent decomposes a complex goal into smaller tasks.</p><p>For example:</p><p>User request:</p><p>“Help me apply for a home loan.”</p><p>The Planner Agent may create the following tasks:</p><pre>1. Collect applicant information.<br>2. Retrieve credit information.<br>3. Collect income documents.<br>4. Validate documents.<br>5. Calculate affordability.<br>6. Check loan eligibility.<br>7. Present available offers.<br>8. Request customer approval.<br>9. Initiate the application.</pre><p>The tasks can then be assigned to specialised agents and tools.</p><h3>Q98. What are common Agent Orchestration Patterns?</h3><p>Several useful patterns are:</p><p><strong>1. Sequential Pattern</strong></p><p>Tasks execute one after another.</p><pre>Agent A<br>   |<br>   v<br>Agent B<br>   |<br>   v<br>Agent C<br>   |<br>   v<br>Final Result</pre><p>Example: Document collection followed by validation and loan assessment.</p><p><strong>2. Concurrent Pattern</strong></p><p>Multiple agents work in parallel.</p><pre>ORCHESTRATOR<br>                  |<br>          +-------+-------+<br>          |       |       |<br>          v       v       v<br>        Agent A Agent B Agent C<br>          |       |       |<br>          +-------+-------+<br>                  |<br>                  v<br>             AGGREGATION</pre><p>Example: Fraud, credit-risk and identity checks.</p><p><strong>3. Handoff Pattern</strong></p><p>One agent transfers responsibility to another specialised agent.</p><p>Example: A customer-service agent transfers a loan-related request to a loan agent.</p><p><strong>4. Group Chat or Collaborative Pattern</strong></p><p>Multiple agents exchange information and contribute to a shared decision or analysis.</p><p>Example: Risk, compliance and customer-experience agents collaborate on a complex case.</p><p><strong>5. Supervisor Pattern</strong></p><p>A central agent coordinates multiple specialist agents.</p><p>These patterns can be combined in a single enterprise workflow.</p><h3>PART 17: EVOLUTION OF SOFTWARE ENGINEERING INTO PROMPT, CONTEXT AND AGENT ENGINEERING</h3><h3>Q99. How does traditional Software Engineering relate to the development of AI systems?</h3><p>Traditional Software Engineering focuses on building software using explicitly defined logic, algorithms, interfaces, data structures and workflows.</p><p>In conventional systems:</p><pre>INPUT<br>  |<br>  v<br>PROGRAMMED LOGIC<br>  |<br>  v<br>DATABASE / SERVICES<br>  |<br>  v<br>OUTPUT</pre><p>Developers define how the system should behave.</p><p>In LLM-based applications, the model introduces a probabilistic component.</p><p>The output may depend on:</p><ul><li>User instructions.</li><li>System instructions.</li><li>Conversation history.</li><li>Retrieved information.</li><li>Tool descriptions.</li><li>Model parameters.</li></ul><p>Therefore, engineering an LLM-based application requires additional disciplines beyond conventional coding.</p><h3>Q100. What is Prompt Engineering?</h3><p>Prompt Engineering is the practice of designing instructions and prompts to guide an LLM towards a desired response.</p><p>A good prompt may specify:</p><ul><li>Role.</li><li>Task.</li><li>Context.</li><li>Constraints.</li><li>Output format.</li><li>Examples.</li><li>Expected behaviour.</li></ul><p>Example:</p><pre>You are a banking customer-service assistant.</pre><pre>Explain the difference between a savings<br>account and a current account.</pre><pre>Use simple language.</pre><pre>Return the answer as a comparison table.</pre><p>Prompt Engineering improves the clarity and consistency of model instructions.</p><h3>Q101. What is Context Engineering?</h3><p>Context Engineering is the discipline of designing and managing the information supplied to an LLM so that it can perform a task effectively.</p><p>Context may include:</p><ul><li>System instructions.</li><li>User prompts.</li><li>Conversation history.</li><li>Retrieved documents.</li><li>Customer information.</li><li>Tool outputs.</li><li>Business policies.</li><li>Relevant application state.</li></ul><p>A useful conceptual representation is:</p><pre>USER REQUEST<br>                    |<br>                    v<br>            CONTEXT ASSEMBLY<br>                    |<br>          +---------+---------+<br>          |         |         |<br>          v         v         v<br>      INSTRUCTIONS DATA     HISTORY<br>          |         |         |<br>          +---------+---------+<br>                    |<br>                    v<br>                   LLM<br>                    |<br>                    v<br>              MODEL OUTPUT</pre><p>Context Engineering is important because even a capable model can produce poor results when it receives incomplete, irrelevant or misleading information.</p><h3>Q102. What is Retrieval-Augmented Generation (RAG)?</h3><p>RAG combines information retrieval with generative AI.</p><p>Instead of relying only on information encoded in the model’s parameters, the system retrieves relevant external information and supplies it as context.</p><p>A simplified RAG workflow:</p><pre>USER QUESTION<br>                    |<br>                    v<br>             QUERY PROCESSING<br>                    |<br>                    v<br>            RETRIEVAL SYSTEM<br>                    |<br>                    v<br>         RELEVANT DOCUMENTS<br>                    |<br>                    v<br>          CONTEXT CONSTRUCTION<br>                    |<br>                    v<br>                   LLM<br>                    |<br>                    v<br>            GROUNDED RESPONSE</pre><p>RAG is useful for:</p><ul><li>Enterprise knowledge search.</li><li>Policy question answering.</li><li>Product information.</li><li>Internal documentation.</li><li>Frequently changing information.</li></ul><p>RAG does not guarantee correctness, but it can improve grounding when retrieval and source quality are properly managed.</p><h3>Q103. What is Agent Engineering?</h3><p>Agent Engineering involves designing, building, testing and governing AI agents that can use models, tools, resources, skills and orchestration to accomplish goals.</p><p>It includes:</p><ul><li>Agent architecture.</li><li>Goal decomposition.</li><li>Tool integration.</li><li>Context management.</li><li>Memory and state.</li><li>Multi-agent orchestration.</li><li>Security and permissions.</li><li>Guardrails.</li><li>Evaluation.</li><li>Observability.</li><li>Human approval workflows.</li></ul><p>Agent Engineering extends beyond prompt design because it concerns the entire system that allows an agent to act.</p><h3>Q104. What is the difference between Software Engineering, Prompt Engineering, Context Engineering and Agent Engineering?</h3><p>DisciplinePrimary focusKey questionSoftware EngineeringCode, logic and system architectureHow do we build the software?Prompt EngineeringInstructions to the modelHow should we instruct the model?Context EngineeringInformation supplied to the modelWhat information should the model receive?Agent EngineeringGoal-oriented systems, tools and workflowsHow should the AI system plan and act?</p><p>These disciplines are complementary.</p><p>A successful enterprise AI system usually requires all of them.</p><h3>PART 18: ENTERPRISE EXAMPLE — AN AI-POWERED BANKING AGENT</h3><h3>Q105. How can the concepts discussed above be applied to an enterprise banking application?</h3><p>Consider a customer who asks:</p><p>“I need a personal loan to pay for my child’s education. Can you help me?”</p><p>A traditional banking application may require the customer to navigate several screens and complete a fixed application form.</p><p>An AI-powered banking system can interpret the customer’s request and coordinate multiple services.</p><h3>Q106. What would the proposed architecture look like?</h3><pre>CUSTOMER CHANNELS<br>                         |<br>          +--------------+--------------+<br>          |              |              |<br>          v              v              v<br>       MOBILE APP      WEBSITE       CONTACT CENTRE<br>          |              |              |<br>          +--------------+--------------+<br>                         |<br>                         v<br>                 API / CHANNEL LAYER<br>                         |<br>                         v<br>                 AGENT ORCHESTRATION<br>                         |<br>             +-----------+-----------+<br>             |                       |<br>             v                       v<br>       SUPERVISOR AGENT          PLANNER AGENT<br>             |                       |<br>             +-----------+-----------+<br>                         |<br>                         v<br>                SPECIALIST AGENTS<br>                         |<br>       +-----------------+------------------+<br>       |                 |                  |<br>       v                 v                  v<br> CUSTOMER AGENT      LOAN AGENT         DOCUMENT AGENT<br>       |                 |                  |<br>       +-----------------+------------------+<br>                         |<br>                         v<br>                FRAUD / RISK AGENT<br>                         |<br>                         v<br>                COMPLIANCE CONTROLS<br>                         |<br>                         v<br>                MCP / TOOL GATEWAY<br>                         |<br>          +--------------+--------------+<br>          |              |              |<br>          v              v              v<br>      CUSTOMER API     LOAN API     DOCUMENT API<br>          |              |              |<br>          +--------------+--------------+<br>                         |<br>                         v<br>                BANKING SYSTEMS</pre><p>This architecture is illustrative. A production system would also require identity management, authorisation, audit, observability, data protection, resilience and human approval controls.</p><h3>Q107. What is the role of different agents in the banking example?</h3><p>AgentResponsibilitySupervisor AgentCoordinates the overall customer journeyPlanner AgentDecomposes the loan application into tasksCustomer AgentRetrieves customer profile informationLoan AgentManages loan application and product informationDocument AgentCollects and validates documentsFraud AgentCoordinates fraud checksRisk AgentUses approved risk models and decision servicesCompliance AgentChecks relevant compliance requirementsCommunication AgentExplains progress and communicates with the customer</p><h3>Q108. Where do traditional ML and LLMs work together?</h3><p>A banking solution should not use an LLM for every task.</p><p>Different forms of intelligence are appropriate for different responsibilities.</p><p><strong>Traditional ML</strong></p><p>Useful for:</p><ul><li>Credit-risk scoring.</li><li>Fraud detection.</li><li>Customer segmentation.</li><li>Default prediction.</li><li>Anomaly detection.</li></ul><p><strong>LLM</strong></p><p>Useful for:</p><ul><li>Understanding customer intent.</li><li>Extracting information from documents.</li><li>Summarising customer information.</li><li>Explaining product features.</li><li>Coordinating workflows.</li><li>Conversational interactions.</li></ul><p><strong>Deterministic business systems</strong></p><p>Useful for:</p><ul><li>Calculating interest.</li><li>Validating account status.</li><li>Executing payments.</li><li>Applying regulatory rules.</li><li>Performing authoritative financial transactions.</li></ul><p>The architecture should combine these capabilities rather than replace all existing systems with an LLM.</p><h3>PART 19: CONCLUSION — THE EVOLUTION OF ARTIFICIAL INTELLIGENCE</h3><h3>Q109. How has AI evolved from traditional systems to Agentic AI?</h3><p>The evolution can be summarised as follows:</p><pre>TRADITIONAL RULE-BASED AI<br>        Explicit rules and logic<br>                   |<br>                   v<br>             MACHINE LEARNING<br>          Learning patterns from data<br>                   |<br>                   v<br>              DEEP LEARNING<br>         Learning complex representations<br>                   |<br>                   v<br>               TRANSFORMERS<br>           Attention-based architecture<br>                   |<br>                   v<br>          LARGE LANGUAGE MODELS<br>        Language understanding and generation<br>                   |<br>                   v<br>             GENERATIVE AI<br>       Creating text, images, audio and code<br>                   |<br>                   v<br>               AI AGENTS<br>       Planning, tools, context and actions<br>                   |<br>                   v<br>             MULTI-AGENT AI<br>       Collaboration and orchestration<br>                   |<br>                   v<br>             AGENTIC SYSTEMS<br>       Goal-oriented enterprise workflows</pre><p>This is a conceptual evolution rather than a strict replacement sequence. Traditional AI, Machine Learning, Deep Learning and LLMs continue to coexist and serve different purposes.</p><h3>Q110. What is the most important architectural lesson from this evolution?</h3><p>The most important lesson is that AI systems should not be designed around a single model or technology.</p><p>An effective enterprise AI architecture combines:</p><ul><li>Deterministic business logic for trusted operations.</li><li>Traditional ML for prediction and classification.</li><li>Deep Learning for complex representation learning.</li><li>LLMs for language and generative capabilities.</li><li>RAG for retrieving relevant external knowledge.</li><li>Tools and APIs for executing actions.</li><li>Skills for reusable task workflows.</li><li>MCP for standardised AI-tool integration.</li><li>Agent orchestration for coordinating complex tasks.</li><li>Governance and human oversight for safety and accountability.</li></ul><p>The evolution is not simply from rules to models, or from models to agents.</p><p>It is the evolution from systems that execute predefined instructions, to systems that learn patterns, to systems that generate and interpret information, and finally to systems that can coordinate intelligence and external capabilities to accomplish defined goals.</p><p><strong>The future of AI will not be determined only by how powerful individual models become, but also by how effectively we engineer the complete ecosystem around them.</strong></p><h3>REFERENCES AND FURTHER READING</h3><p>The following foundational publications and technical resources provide further reading on the concepts discussed in this article.</p><h3>Artificial Intelligence and Machine Learning</h3><ol><li>Stuart Russell and Peter Norvig — <em>Artificial Intelligence: A Modern Approach</em>.</li><li>Christopher M. Bishop — <em>Pattern Recognition and Machine Learning</em>.</li><li>Aurélien Géron — <em>Hands-On Machine Learning with Scikit-Learn, Keras, and TensorFlow</em>.</li></ol><h3>Deep Learning and Neural Networks</h3><ol><li>Ian Goodfellow, Yoshua Bengio and Aaron Courville — <em>Deep Learning</em>.</li><li>Yann LeCun, Yoshua Bengio and Geoffrey Hinton — “Deep Learning”, Nature, 2015.</li><li>Sepp Hochreiter and Jürgen Schmidhuber — “Long Short-Term Memory”, Neural Computation, 1997.</li></ol><h3>Transformers and Large Language Models</h3><ol><li>Vaswani et al. — “Attention Is All You Need”, 2017.</li><li>Devlin et al. — “BERT: Pre-training of Deep Bidirectional Transformers for Language Understanding”, 2018.</li><li>Radford et al. — “Improving Language Understanding by Generative Pre-Training”, 2018.</li><li>Raffel et al. — “Exploring the Limits of Transfer Learning with a Unified Text-to-Text Transformer”, 2020.</li></ol><h3>Fine-Tuning and Efficient LLMs</h3><ol><li>Hu et al. — “LoRA: Low-Rank Adaptation of Large Language Models”, 2021.</li><li>Dettmers et al. — “QLoRA: Efficient Finetuning of Quantized LLMs”, 2023.</li></ol><h3>Retrieval and Agentic AI</h3><ol><li>Lewis et al. — “Retrieval-Augmented Generation for Knowledge-Intensive NLP Tasks”, 2020.</li><li>Yao et al. — “ReAct: Synergizing Reasoning and Acting in Language Models”, 2022.</li><li>Model Context Protocol — Official documentation: <a href="https://modelcontextprotocol.io/">https://modelcontextprotocol.io/</a></li></ol><h3>Additional Technical Resources</h3><ol><li>PyTorch documentation: <a href="https://pytorch.org/docs/">https://pytorch.org/docs/</a></li><li>TensorFlow documentation: <a href="https://www.tensorflow.org/">https://www.tensorflow.org/</a></li><li>Hugging Face documentation: <a href="https://huggingface.co/docs">https://huggingface.co/docs</a></li><li>Microsoft Azure Architecture Center: <a href="https://learn.microsoft.com/en-us/azure/architecture/">https://learn.microsoft.com/en-us/azure/architecture/</a></li></ol><p><strong>Final perspective</strong></p><p>Artificial Intelligence is moving beyond systems that merely execute instructions or predict outcomes. Modern AI architectures combine learned models, language capabilities, external knowledge, executable tools and orchestrated workflows.</p><p>The real engineering challenge is to combine these capabilities into systems that are accurate, secure, explainable, efficient and genuinely useful.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=3c1122adf513" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Extending SOLID Principles from Software Design to Cloud Architecture]]></title>
            <link>https://mainakkmandal.medium.com/extending-solid-principles-from-software-design-to-cloud-architecture-75a75358b11f?source=rss-aa6a7640bb5d------2</link>
            <guid isPermaLink="false">https://medium.com/p/75a75358b11f</guid>
            <dc:creator><![CDATA[Mainak Mandal]]></dc:creator>
            <pubDate>Wed, 28 Oct 2026 19:20:23 GMT</pubDate>
            <atom:updated>2026-10-28T19:20:23.968Z</atom:updated>
            <content:encoded><![CDATA[<p>Extending SOLID Principles from Software Design to Cloud Architecture</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*dFlyrSw9HctoyPmDHlv63w.png" /></figure><p>1. Introduction: From Code-Level Design to Cloud-Level Architecture</p><p>The SOLID principles were introduced to improve object-oriented software design. They help developers build software components that are maintainable, extensible, loosely coupled, and easier to test.</p><p>Traditionally, SOLID is applied at the class, module, and application-code levels. However, the fundamental ideas behind SOLID—separation of responsibilities, abstraction, substitutability, and dependency management—can also guide the design of distributed cloud systems.</p><p>The key is to translate each principle from the level of software components to the level of cloud services, architectural boundaries, APIs, infrastructure, and operational responsibilities.</p><p>For example, consider a cloud-native banking application consisting of:</p><p>- A mobile application.<br>- An API gateway.<br>- Customer, account, and payment microservices.<br>- An event streaming platform.<br>- A database layer.<br>- An identity and access management platform.<br>- Monitoring, logging, and security services.</p><p>Although each microservice might follow SOLID internally, the overall architecture could still violate the same principles.</p><p>For example:</p><p>- A single microservice might handle customer registration, payment processing, notifications, and reporting.<br>- Multiple services might be tightly coupled to a particular cloud provider.<br>- A service might depend directly on the internal implementation of another service.<br>- Replacing a database or message broker might require changes across dozens of services.</p><p>These are architectural problems that can be addressed by extending SOLID thinking beyond code.</p><p>The central idea is to treat SOLID as a set of architectural design principles, not merely as coding rules.</p><p>One important qualification: SOLID is not itself a formally standardized cloud architecture pattern. What follows is a proposed architectural interpretation of SOLID, drawing on its original principles and applying them to distributed systems.</p><p>---</p><p>2. Mapping the Five SOLID Principles to Cloud Architecture</p><p>The five SOLID principles can be extended to cloud architecture as follows.</p><p>SOLID principle	Original software design concept	Proposed cloud architecture interpretation</p><p>S — Single Responsibility Principle	A class should have one reason to change.	A cloud service or architectural component should have a clearly defined responsibility and a coherent reason to change.<br>O — Open/Closed Principle	Software entities should be open for extension but closed for modification.	The architecture should support new capabilities through extension points, adapters, events, and configuration without requiring widespread changes to existing components.<br>L — Liskov Substitution Principle	A subtype should be substitutable for its base type without breaking correctness.	An alternative implementation of a cloud capability should be replaceable without violating the agreed service contract or required operational behavior.<br>I — Interface Segregation Principle	Clients should not depend on interfaces they do not use.	Cloud consumers should depend on focused APIs and contracts rather than large, multipurpose interfaces exposing unrelated capabilities.<br>D — Dependency Inversion Principle	High-level modules should not depend directly on low-level modules; both should depend on abstractions.	Business capabilities should depend on stable contracts rather than being tightly coupled to particular cloud services, infrastructure products, or implementation details.</p><p>These interpretations are architectural extensions, not official replacements for the original SOLID definitions.</p><p>Let&#39;s explore each principle through a practical cloud architecture example.</p><p>---</p><p>3. S — Single Responsibility Principle (SRP)</p><p>3.1 Original principle</p><p>A software component should have one responsibility and one primary reason to change.</p><p>Consider a Java class that performs all the following operations:</p><p>- Registers customers.<br>- Validates identity documents.<br>- Processes payments.<br>- Sends email notifications.<br>- Generates regulatory reports.</p><p>Changes to any one of these responsibilities could require modifying the same class.</p><p>The solution is to separate responsibilities into cohesive components.</p><p>3.2 Extending SRP to cloud architecture</p><p>At the architectural level, the equivalent problem occurs when a cloud service or platform component assumes too many unrelated responsibilities.</p><p>Example use case: Digital banking customer registration</p><p>Suppose a banking application implements customer onboarding through a single Customer Onboarding Service.</p><p>This service handles:</p><p>1. Customer registration.<br>2. Identity verification.<br>3. Credit checks.<br>4. Document storage.<br>5. Customer notifications.<br>6. Regulatory reporting.</p><p>Initially, this design might be convenient. As the system grows, however, each responsibility introduces different requirements.</p><p>For example:</p><p>- Identity verification requires integration with external verification providers.<br>- Document storage requires encryption, retention, and access controls.<br>- Notifications require asynchronous processing and delivery retries.<br>- Regulatory reporting requires auditability and historical data.</p><p>Combining everything in one service makes independent scaling, deployment, and maintenance more difficult.</p><p>Proposed architectural solution</p><p>Decompose the solution into business capabilities.</p><p>Cloud component	Primary responsibility	Typical implementation</p><p>Customer Registration Service	Manage registration workflows	Containerized service or serverless application<br>Identity Verification Service	Verify customer identity	Independently deployable service<br>Document Service	Store and retrieve customer documents	Service backed by object storage<br>Notification Service	Deliver email or SMS notifications	Event-driven worker<br>Compliance Reporting Service	Generate regulatory reports	Batch or event-driven processing</p><p>An API gateway can provide controlled access to these capabilities, while an event broker can support asynchronous communication.</p><p>For example, after registration succeeds, the Registration Service publishes a CustomerRegistered event. The Notification Service and Compliance Reporting Service can consume that event independently.</p><p>This reduces direct dependencies between the services.</p><p>Architecture illustration</p><p>Mobile Application<br> |<br> v<br> API Gateway<br> |<br> v<br> Customer Registration<br> |<br> v<br> Event Broker<br> / | \<br> v v v<br> Identity Notification Compliance<br> Verification Service Reporting<br> |<br> v<br> Email / SMS Provider</p><p>Conceptual illustration: production designs may route identity verification through a separate API, workflow engine, or event-driven process.</p><p>How SRP improves cloud architecture</p><p>- Independent scalability: Scale notification processing without scaling registration.<br>- Independent deployment: Update compliance reporting without redeploying the registration service.<br>- Fault isolation: A notification outage need not invalidate an otherwise successful registration.<br>- Organizational autonomy: Teams can own well-defined business capabilities.<br>- Cost efficiency: Allocate compute resources according to each capability&#39;s workload.</p><p>Important architectural consideration</p><p>SRP does not mean that every operation deserves a separate microservice.</p><p>Creating too many small services increases network communication, operational overhead, and distributed failure modes. Responsibilities that change together and belong to the same business capability may be better kept together.</p><p>The architectural goal is high cohesion and appropriately low coupling, not maximum service count.</p><p>---</p><p>4. O — Open/Closed Principle (OCP)</p><p>4.1 Original principle</p><p>A software entity should be open for extension but closed for modification.</p><p>This means new behavior should ideally be introduced through well-designed extension mechanisms rather than repeatedly modifying stable, existing logic.</p><p>4.2 Extending OCP to cloud architecture</p><p>A cloud architecture should allow new business capabilities, providers, integrations, and processing strategies to be introduced without forcing changes throughout the existing system.</p><p>Example use case: Adding identity verification providers</p><p>Suppose a banking application initially uses a single identity verification provider.</p><p>Later, the bank wants to support:</p><p>- Provider A for domestic customers.<br>- Provider B for international customers.<br>- Provider C as a fallback when Provider A is unavailable.</p><p>A tightly coupled architecture might embed provider-specific API calls directly into the Customer Registration Service.</p><p>Every new provider would require modifying that service.</p><p>Over time, this creates a growing collection of conditional branches, provider-specific dependencies, and regression risks.</p><p>Proposed architectural solution: Extension through adapters</p><p>Introduce an Identity Verification abstraction.</p><p>Customer Registration<br> |<br> v<br> Identity Verification API<br> |<br> v<br> Provider Selection<br> / | \<br> v v v<br> Adapter A Adapter B Adapter C<br> | | |<br> v v v<br> Provider A Provider B Provider C</p><p>The registration service interacts with the stable verification API. Each provider has its own adapter, which translates the common contract into the provider&#39;s specific API.</p><p>A new provider can then be added by implementing an adapter and updating the routing configuration.</p><p>The registration service does not need to understand each provider&#39;s internal API.</p><p>Cloud technologies that can support OCP</p><p>Architectural capability	Potential implementation</p><p>API-based extension	API gateway and versioned service contracts<br>Provider abstraction	Adapter or anti-corruption layer<br>Event-based extension	Publish-subscribe messaging<br>Configurable routing	External configuration and routing policies<br>Pluggable processing	Serverless handlers or independently deployable workers<br>Infrastructure extension	Infrastructure as Code modules</p><p>These are implementation options, not mandatory components of the principle.</p><p>A more powerful example: Event-driven extension</p><p>Suppose the Customer Registration Service publishes:</p><p>CustomerRegistered</p><p>Initially, the event is consumed by the Notification Service.</p><p>Later, the bank introduces a customer analytics capability. It can subscribe to the same event without requiring the registration service to call the analytics service directly.</p><p>A fraud-monitoring capability could also subscribe to suitable events.</p><p>This is a useful architectural application of OCP because new consumers can be introduced without adding corresponding dependencies to the event producer.</p><p>However, the event schema must be versioned and managed carefully. A breaking change to the event contract can still force existing consumers to change.</p><p>How OCP improves cloud architecture</p><p>- Reduces the need to modify stable core services.<br>- Makes new integrations easier to introduce.<br>- Enables new event consumers to be added independently.<br>- Supports gradual adoption of new cloud technologies.<br>- Reduces regression risks when adding business capabilities.</p><p>Key architectural principle: Design explicit extension points around areas expected to change, rather than attempting to make every component infinitely configurable.</p><p>---</p><p>5. L — Liskov Substitution Principle (LSP)</p><p>5.1 Original principle</p><p>A subtype should be usable wherever its base type is expected without violating the correctness of the application.</p><p>In object-oriented programming, this means that an implementation must honor the behavioral contract established by its abstraction.</p><p>5.2 Extending LSP to cloud architecture</p><p>At the cloud architecture level, the analogous principle is:</p><p>An alternative implementation of a cloud capability should be replaceable without breaking its consumers or violating the capability&#39;s agreed contract.</p><p>This is broader than simply having matching API endpoints.</p><p>A replacement must also preserve relevant behavior, including error handling, data semantics, security guarantees, and required performance characteristics.</p><p>Example use case: Replacing a cloud messaging service</p><p>Suppose a banking application uses a managed message broker to process customer registration events.</p><p>Several services depend on the messaging capability:</p><p>- Notification Service.<br>- Compliance Service.<br>- Customer Analytics Service.</p><p>The application must migrate to another messaging platform because of cost, organizational strategy, or regulatory requirements.</p><p>If every service uses provider-specific SDKs, proprietary message formats, and provider-specific administrative operations, the migration may require extensive code changes.</p><p>Proposed architectural solution: A messaging abstraction</p><p>Define a stable messaging contract.</p><p>For example:</p><p>Messaging Capability<br> |<br> +-- Publish Event<br> |<br> +-- Subscribe to Event<br> |<br> +-- Acknowledge Message<br> |<br> +-- Handle Delivery Failure</p><p>Implement the capability using adapters for the different messaging platforms.</p><p>Business Services<br> |<br> v<br> Messaging Contract<br> |<br> +-----+-----+<br> | |<br> v v<br> Adapter A Adapter B<br> | |<br> v v<br> Broker A Broker B</p><p>The business services depend on the contract rather than the broker&#39;s proprietary implementation.</p><p>But there is an important limitation</p><p>A common API does not automatically guarantee substitutability.</p><p>Consider two brokers:</p><p>- Broker A provides at-least-once message delivery.<br>- Broker B provides different delivery guarantees or ordering behavior.</p><p>If a consumer assumes exactly-once processing, simply replacing Broker A with Broker B could introduce duplicate transactions or incorrect processing.</p><p>Similarly, differences in message retention, ordering, throughput, authentication, and failure recovery can affect correctness.</p><p>Therefore, the architecture must define and test behavioral requirements.</p><p>For example:</p><p>Contract requirement	What must remain consistent</p><p>Message schema	Consumers receive compatible event structures<br>Delivery semantics	Duplicate and lost-message behavior is understood and handled<br>Ordering	Required ordering guarantees are preserved<br>Failure handling	Retry, dead-letter, and recovery behavior remains correct<br>Security	Authentication, authorization, and encryption requirements are maintained<br>Performance	Required throughput and latency objectives are met</p><p>Where two providers cannot offer identical capabilities, the architecture must explicitly account for the difference rather than hiding it behind a misleading abstraction.</p><p>Another example: Database substitution</p><p>Suppose a service accesses customer data through a repository or data-access API.</p><p>Replacing one relational database with another may be relatively straightforward if the application depends only on compatible behavior.</p><p>Replacing a relational database with a document database is more complex because transaction semantics, queries, indexing, and consistency models may differ.</p><p>A database abstraction can reduce coupling, but it cannot eliminate fundamental differences between data models.</p><p>How LSP improves cloud architecture</p><p>- Supports cloud-provider migration.<br>- Enables alternative implementations of infrastructure capabilities.<br>- Improves portability between deployment environments.<br>- Encourages explicit behavioral contracts.<br>- Makes failover and disaster-recovery designs more predictable when alternatives are genuinely compatible.</p><p>Key architectural principle: Replaceability requires behavioral compatibility, not just a common interface.</p><p>---</p><p>6. I — Interface Segregation Principle (ISP)</p><p>6.1 Original principle</p><p>Clients should not be forced to depend on interfaces they do not use.</p><p>Instead of creating one large interface containing unrelated operations, provide smaller, focused interfaces.</p><p>6.2 Extending ISP to cloud architecture</p><p>At the cloud architecture level, this means designing focused APIs and service contracts for distinct consumers and business capabilities.</p><p>Consumers should not have to understand, access, or depend on an unnecessarily broad collection of operations.</p><p>Example use case: A banking Customer API</p><p>Suppose a single Customer Management API exposes these operations:</p><p>Customer API<br> |<br> +-- Create Customer<br> +-- Update Profile<br> +-- Verify Identity<br> +-- Initiate Payment<br> +-- Manage Cards<br> +-- Generate Statements<br> +-- Close Account<br> +-- Access Compliance Reports</p><p>Different consumers need different subsets of these capabilities.</p><p>For example:</p><p>- A mobile application needs profile management.<br>- An identity verification workflow needs identity verification operations.<br>- A payment application needs payment operations.<br>- A reporting application needs authorized reporting access.</p><p>Exposing every operation through one large interface can increase coupling, complicate authorization, and make API evolution harder.</p><p>Proposed architectural solution: Focused APIs</p><p>Separate the interfaces according to business capabilities and consumer needs.</p><p>API Gateway<br> |<br> +------------+------------+<br> | | |<br> v v v<br> Customer API Identity API Payments API<br> | | |<br> v v v<br> Customer Identity Payment<br> Service Service Service</p><p>A Reporting API could be added separately if the business requires it.</p><p>Each API exposes the operations relevant to its consumers.</p><p>This is an architectural interpretation of ISP, but it does not require a separate microservice for every API.</p><p>Several focused APIs can be implemented by one service when that better reflects the business boundaries and operational requirements.</p><p>Example: Different consumers, different contracts</p><p>Consider a customer-facing application and a compliance reporting system.</p><p>The mobile application might need:</p><p>GET /customers/{customerId}/profile<br>PATCH /customers/{customerId}/profile</p><p>The compliance system might need a restricted interface for accessing audit records and regulatory reporting data.</p><p>These consumers should not automatically receive access to the same operations merely because the operations concern customers.</p><p>Their APIs should reflect their different purposes, permissions, and data requirements.</p><p>How ISP improves cloud architecture</p><p>- Reduces unnecessary dependencies between consumers and providers.<br>- Allows API capabilities to evolve independently.<br>- Supports more precise authorization boundaries.<br>- Reduces the impact of unrelated API changes.<br>- Helps teams maintain clear service ownership.</p><p>Important distinction: ISP is not simply API fragmentation</p><p>Creating hundreds of tiny APIs can make an architecture difficult to understand and operate.</p><p>The objective is to provide focused, cohesive contracts, not to create an API for every individual operation.</p><p>---</p><p>7. D — Dependency Inversion Principle (DIP)</p><p>7.1 Original principle</p><p>High-level modules should not depend directly on low-level modules. Both should depend on abstractions.</p><p>For example, business logic should depend on a payment-processing contract rather than directly instantiating a specific payment provider&#39;s implementation.</p><p>7.2 Extending DIP to cloud architecture</p><p>DIP is particularly valuable at the cloud architecture level because cloud applications depend on many infrastructure capabilities:</p><p>- Compute.<br>- Databases.<br>- Messaging platforms.<br>- Object storage.<br>- Identity providers.<br>- Payment gateways.<br>- Observability platforms.<br>- External enterprise systems.</p><p>If business logic directly depends on provider-specific implementations, the application can become tightly coupled to its infrastructure.</p><p>Example use case: Payment processing in a cloud-native banking application</p><p>Suppose a Payment Service directly invokes a particular payment gateway&#39;s SDK and uses its proprietary response format throughout the business logic.</p><p>The architecture might look like this:</p><p>Payment Business Logic<br> |<br> v<br>Specific Payment SDK<br> |<br> v<br>External Payment Provider</p><p>If the bank changes payment providers, the business logic may require substantial modification.</p><p>The problem is not that the payment provider is a concrete implementation. The problem is that the high-level business capability is unnecessarily dependent on its implementation details.</p><p>Proposed architectural solution: Inversion through contracts</p><p>Introduce a payment-processing abstraction.</p><p>Payment Service<br> |<br> v<br> Payment Contract<br> ^<br> |<br> +---------+---------+<br> | |<br> v v<br> Provider A Adapter Provider B Adapter<br> | |<br> v v<br> Payment Provider A Payment Provider B</p><p>The Payment Service depends on the contract.</p><p>The provider-specific adapters implement that contract and translate between the application&#39;s payment model and each provider&#39;s API.</p><p>The direction of the source-code dependency is now different from the direction of the runtime request.</p><p>At runtime: The Payment Service invokes the selected adapter.</p><p>At design time: The Payment Service depends on an abstraction rather than on a particular provider implementation.</p><p>Extending DIP to infrastructure architecture</p><p>The same concept can be applied to cloud platforms.</p><p>For example, an application might depend on an object-storage capability rather than directly coupling all business components to one provider&#39;s storage SDK.</p><p>However, cloud abstraction is not always desirable.</p><p>A provider&#39;s native service might offer important advantages in security, reliability, cost, or performance. A generic abstraction could conceal valuable capabilities or introduce unnecessary complexity.</p><p>Therefore, apply DIP selectively where implementation independence is valuable.</p><p>What about Infrastructure as Code?</p><p>DIP-inspired thinking can also guide infrastructure design.</p><p>For example, an application platform may define standard deployment contracts for:</p><p>- Networking.<br>- Identity.<br>- Secrets management.<br>- Logging.<br>- Monitoring.<br>- Compute provisioning.</p><p>Different environments can implement those contracts using their available infrastructure.</p><p>This does not mean that Terraform modules, cloud resources, and APIs are literally interchangeable interfaces in the object-oriented sense. Rather, the principle encourages architects to separate workload requirements from environment-specific implementations.</p><p>How DIP improves cloud architecture</p><p>- Reduces direct dependencies on vendor-specific SDKs and APIs.<br>- Makes integrations easier to replace.<br>- Supports testable business logic.<br>- Encourages explicit contracts between architectural layers.<br>- Can improve portability across cloud and hybrid environments.</p><p>Key architectural principle: Business policies should determine what capabilities are needed; infrastructure implementations should satisfy those requirements through well-defined contracts.</p><p>---</p><p>8. Putting All Five Principles Together: A Cloud Architecture Example</p><p>Consider a cloud-native banking application supporting customer registration, identity verification, document submission, and account creation.</p><p>The following conceptual architecture combines the five SOLID principles.</p><p>8.1 Proposed architecture</p><p>Mobile / Web Clients<br> |<br> v<br> API Gateway<br> |<br> +-----------+-----------+<br> | |<br> v v<br> Customer Registration Document API<br> | |<br> v v<br> Registration Database Object Storage<br> |<br> v<br> Event Publisher<br> |<br> v<br> Event Broker<br> / | \<br> v v v<br> Identity Notification Compliance<br> Service Service Service<br> | | |<br> v v v<br> Verification Email/SMS Audit/Reports<br> Provider Provider Storage</p><p>Shared Platform Capabilities<br> ----------------------------<br> Identity and Access Management<br> Secrets Management<br> Observability and Monitoring<br> CI/CD and Infrastructure as Code</p><p>This diagram is illustrative rather than a complete production design. For example, identity verification might also be invoked synchronously, depending on the registration workflow.</p><p>8.2 Where each principle applies</p><p>SOLID principle	Architectural decision	Expected benefit</p><p>SRP	Separate registration, identity verification, notification, and compliance responsibilities.	Cohesive services and independent scaling.<br>OCP	Introduce new event consumers and verification-provider adapters through stable extension points.	Easier functional expansion.<br>LSP	Require alternative provider implementations to meet agreed behavioral contracts.	Safer provider substitution.<br>ISP	Expose focused Customer, Document, and Identity APIs.	Reduced coupling between consumers and unrelated operations.<br>DIP	Make business services depend on contracts for external providers and infrastructure capabilities where appropriate.	Reduced implementation coupling and improved testability.</p><p>The value comes from applying these principles consistently across service boundaries, API contracts, data ownership, and infrastructure dependencies.</p><p>---</p><p>9. Mapping SOLID to Established Cloud Architecture Patterns</p><p>An important distinction is that SOLID provides general design principles, whereas cloud architecture patterns are reusable approaches to solving specific architectural problems.</p><p>The following established patterns can help implement SOLID-inspired decisions.</p><p>SOLID principle	Related cloud architecture patterns	How the patterns help</p><p>SRP	Microservices, bounded contexts, event-driven architecture	Separate cohesive business capabilities and reduce unrelated responsibilities.<br>OCP	Publish-subscribe, plugin architecture, adapter pattern	Add capabilities without requiring changes to every existing component.<br>LSP	Adapter, anti-corruption layer, contract testing	Standardize integration boundaries and verify compatibility between implementations.<br>ISP	API gateway, Backend for Frontends, domain-specific APIs	Present focused interfaces to different consumers.<br>DIP	Hexagonal architecture, ports and adapters, dependency injection	Separate business logic from external infrastructure and implementation details.</p><p>These are relationships, not one-to-one mappings. A pattern can support multiple SOLID principles, and none of these patterns automatically guarantees compliance.</p><p>The [Azure Architecture Center cloud design patterns catalog](https://github.com/microsoftdocs/architecture-center/blob/main/docs/patterns/index.md?utm_source=chatgpt.com) provides additional examples of established approaches for reliability, security, scalability, and distributed-system integration. Its guidance also emphasizes that patterns involve trade-offs and should be selected according to the problem being solved.</p><p>---</p><p>10. An Additional Architectural Extension: SOLID for Cloud Platforms</p><p>So far, we have extended SOLID from classes to services and APIs. We can take the idea further by applying it to the cloud platform itself.</p><p>This is particularly relevant to enterprise organizations that operate multiple applications, cloud accounts, environments, and delivery teams.</p><p>Consider a cloud platform that provides reusable capabilities for application teams.</p><p>SOLID principle	Platform-level interpretation	Example</p><p>SRP	Each platform capability has a clear ownership and responsibility boundary.	Separate identity management, observability, and deployment services.<br>OCP	The platform supports new workload types and capabilities through controlled extensions.	Add a new deployment template without redesigning the entire platform.<br>LSP	Platform implementations satisfy their documented service-level and behavioral contracts.	An alternative secrets-management implementation preserves required access-control behavior.<br>ISP	Teams consume only the platform capabilities and interfaces they need.	A reporting workload does not need access to deployment administration APIs.<br>DIP	Workloads depend on stable platform contracts instead of unnecessary implementation details.	Applications consume a standard logging interface rather than embedding a particular logging vendor&#39;s SDK everywhere.</p><p>This approach can be particularly useful in a cloud platform engineering model, where a central platform team provides reusable capabilities through self-service interfaces.</p><p>However, platform-level abstractions should not hide operational differences that application teams must understand.</p><p>For example, two databases may expose similar interfaces but have substantially different recovery objectives, consistency guarantees, and cost characteristics.</p><p>---</p><p>11. A Practical Framework for Applying SOLID to Cloud Architecture</p><p>An architect can turn these ideas into a repeatable design process.</p><p>Step 1: Identify the architectural components</p><p>List the major components:</p><p>- Business services.<br>- APIs and integration interfaces.<br>- Databases and storage.<br>- Messaging services.<br>- Security and identity capabilities.<br>- Observability and platform services.</p><p>Step 2: Identify the reasons each component changes</p><p>Ask:</p><p>- Does this component contain unrelated business responsibilities?<br>- Are different parts changing for different business reasons?<br>- Does one team&#39;s change repeatedly affect another team&#39;s component?</p><p>If so, investigate an SRP violation.</p><p>Step 3: Identify likely areas of extension</p><p>Ask:</p><p>- Will new external providers be introduced?<br>- Will additional event consumers be required?<br>- Will business rules change frequently?<br>- Will new capabilities need to be added without disrupting existing services?</p><p>Design appropriate extension points where there is a credible need.</p><p>This applies OCP.</p><p>Step 4: Identify substitutability requirements</p><p>Ask:</p><p>- Could the database, messaging platform, or external provider change?<br>- Could the application run in another environment?<br>- What behavioral guarantees must remain unchanged?<br>- What differences would prevent a safe replacement?</p><p>Define explicit compatibility requirements and contract tests.</p><p>This applies LSP.</p><p>Step 5: Review API boundaries</p><p>Ask:</p><p>- Are consumers exposed to operations they do not need?<br>- Are unrelated business capabilities bundled into a single contract?<br>- Are permissions and data-access requirements unnecessarily broad?</p><p>Create focused interfaces where justified.</p><p>This applies ISP.</p><p>Step 6: Review dependency direction</p><p>Ask:</p><p>- Does business logic directly depend on vendor-specific implementations?<br>- Are infrastructure details leaking into domain logic?<br>- Could an adapter or port isolate a frequently changing external dependency?</p><p>Introduce abstractions where they provide meaningful flexibility.</p><p>This applies DIP.</p><p>Step 7: Validate the architecture against operational requirements</p><p>SOLID alone is insufficient to establish whether a cloud architecture is production-ready.</p><p>Also evaluate:</p><p>- Reliability and fault isolation.<br>- Security and identity boundaries.<br>- Performance and latency.<br>- Scalability.<br>- Cost.<br>- Observability.<br>- Disaster recovery.<br>- Deployment and rollback.<br>- Data consistency.<br>- Operational ownership.</p><p>These considerations align with the broader approach used by cloud architecture frameworks, including the five pillars of the Azure Well-Architected Framework.</p><p>---</p><p>12. How to Measure Whether the Architecture Follows SOLID</p><p>To make this extension practical, an enterprise could define a set of architectural review questions and measurable indicators.</p><p>Principle	Review question	Possible indicator</p><p>SRP	Does a service have a cohesive business responsibility?	Number of unrelated capabilities sharing a deployment and change lifecycle.<br>OCP	Can a new integration be added without modifying stable core services?	Number of existing services requiring code changes for a new provider or consumer.<br>LSP	Can an alternative implementation satisfy the required contract?	Contract-test results and compatibility-test coverage.<br>ISP	Are consumers dependent only on relevant operations?	Unnecessary API dependencies and permissions granted to consumers.<br>DIP	Are business services coupled to infrastructure implementations?	Number of direct provider-specific dependencies in business logic.</p><p>These are suggested indicators, not universal industry-standard metrics.</p><p>For example, the number of services changed during an extension is useful evidence, but it should not be interpreted mechanically. A legitimate business requirement may require coordinated changes to multiple components.</p><p>The objective is to identify unnecessary coupling and architectural fragility, not to eliminate all dependencies.</p><p>---</p><p>13. Important Limitations: Why SOLID Alone Is Not Enough for Cloud Architecture</p><p>SOLID can improve the internal structure and dependency boundaries of cloud systems, but it does not address every challenge of distributed computing.</p><p>1. Distributed failures</p><p>A service can fail after another service has sent a request but before it has returned a response.</p><p>SOLID does not directly solve this problem. Timeouts, retries, circuit breakers, bulkheads, and idempotency are examples of additional techniques that may be required.</p><p>2. Distributed transactions</p><p>Separating business capabilities into services can introduce consistency challenges.</p><p>Patterns such as Saga and transactional outbox may be needed to coordinate business operations across multiple services.</p><p>3. Network latency</p><p>A design with excessive service boundaries can increase network calls and reduce performance.</p><p>SRP should not be interpreted as a mandate to split every responsibility into a separate service.</p><p>4. Security</p><p>Focused APIs and explicit contracts can support stronger security boundaries, but SOLID does not replace authentication, authorization, encryption, threat modeling, or security monitoring.</p><p>5. Cloud economics</p><p>Additional abstractions and independently deployed components may improve flexibility but also increase infrastructure and operational costs.</p><p>Architects should evaluate whether the benefits justify the complexity.</p><p>These limitations reflect a broader principle of cloud design: patterns must be combined to address the actual requirements and failure modes of the system.</p><p>---</p><p>14. Final Perspective: SOLID as a Cloud Architecture Design Philosophy</p><p>The most useful way to extend SOLID is not to rename each principle and claim that a new cloud architecture pattern has been invented.</p><p>Instead, use SOLID as a consistent design philosophy across several levels:</p><p>1. Code level: Classes, modules, and internal application components.<br>2. Service level: Microservices, business capabilities, and data ownership.<br>3. Integration level: APIs, events, adapters, and service contracts.<br>4. Infrastructure level: Cloud providers, databases, messaging platforms, and managed services.<br>5. Platform level: Shared enterprise capabilities, deployment interfaces, and self-service platform services.</p><p>The same underlying ideas apply at each level, although their implementations and trade-offs differ.</p><p>The result is an architecture that is easier to evolve, test, operate, and adapt to changing requirements—provided SOLID is combined with the principles needed to address distributed systems and cloud operations.</p><p>A concise architectural summary</p><p>S — Single Responsibility: Keep cloud components cohesive.</p><p>O — Open/Closed: Make new capabilities possible through controlled extension.</p><p>L — Liskov Substitution: Ensure alternative implementations honor their contracts.</p><p>I — Interface Segregation: Expose focused interfaces to consumers.</p><p>D — Dependency Inversion: Depend on stable contracts rather than unnecessary implementation details.</p><p>In one sentence: SOLID can be extended from designing maintainable software components to designing maintainable cloud systems by applying its principles to service boundaries, contracts, dependencies, and infrastructure capabilities.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=75a75358b11f" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Cloud Architecture Patterns — Quick Reference]]></title>
            <description><![CDATA[<div class="medium-feed-item"><p class="medium-feed-image"><a href="https://mainakkmandal.medium.com/cloud-architecture-patterns-quick-reference-05ebd9d49b81?source=rss-aa6a7640bb5d------2"><img src="https://cdn-images-1.medium.com/max/2600/0*fVNWYTRGEY5KXOAg" width="7322"></a></p><p class="medium-feed-snippet">Find the reusable cloud design patterns for addressing recurring problems in distributed systems as mentioned below. These patterns are&#x2026;</p><p class="medium-feed-link"><a href="https://mainakkmandal.medium.com/cloud-architecture-patterns-quick-reference-05ebd9d49b81?source=rss-aa6a7640bb5d------2">Continue reading on Medium »</a></p></div>]]></description>
            <link>https://mainakkmandal.medium.com/cloud-architecture-patterns-quick-reference-05ebd9d49b81?source=rss-aa6a7640bb5d------2</link>
            <guid isPermaLink="false">https://medium.com/p/05ebd9d49b81</guid>
            <dc:creator><![CDATA[Mainak Mandal]]></dc:creator>
            <pubDate>Mon, 26 Oct 2026 16:21:15 GMT</pubDate>
            <atom:updated>2026-10-26T17:12:53.262Z</atom:updated>
        </item>
        <item>
            <title><![CDATA[Designing a Scalable Connected-Car Platform Using AWS IoT Core and MQTT]]></title>
            <description><![CDATA[<div class="medium-feed-item"><p class="medium-feed-image"><a href="https://mainakkmandal.medium.com/designing-a-scalable-connected-car-platform-using-aws-iot-core-and-mqtt-99cc6bb30000?source=rss-aa6a7640bb5d------2"><img src="https://cdn-images-1.medium.com/max/1715/1*ltUCupONWKGeSu81bLLu8g.png" width="1715"></a></p><p class="medium-feed-snippet">A reference architecture for mobile apps, Alexa voice commands, vehicle telemetry, remote operations, and OEM platform integration</p><p class="medium-feed-link"><a href="https://mainakkmandal.medium.com/designing-a-scalable-connected-car-platform-using-aws-iot-core-and-mqtt-99cc6bb30000?source=rss-aa6a7640bb5d------2">Continue reading on Medium »</a></p></div>]]></description>
            <link>https://mainakkmandal.medium.com/designing-a-scalable-connected-car-platform-using-aws-iot-core-and-mqtt-99cc6bb30000?source=rss-aa6a7640bb5d------2</link>
            <guid isPermaLink="false">https://medium.com/p/99cc6bb30000</guid>
            <dc:creator><![CDATA[Mainak Mandal]]></dc:creator>
            <pubDate>Sat, 24 Oct 2026 16:41:12 GMT</pubDate>
            <atom:updated>2026-10-24T16:41:12.837Z</atom:updated>
        </item>
        <item>
            <title><![CDATA[Event-Driven Architecture Patterns Explained Through an End-to-End Banking Use Case]]></title>
            <description><![CDATA[<div class="medium-feed-item"><p class="medium-feed-image"><a href="https://mainakkmandal.medium.com/event-driven-architecture-patterns-explained-through-an-end-to-end-banking-use-case-8adee7511dc7?source=rss-aa6a7640bb5d------2"><img src="https://cdn-images-1.medium.com/max/2600/1*ya4vaLzdlF8MCND8xoZhYA.png" width="2600"></a></p><p class="medium-feed-snippet">How publish-subscribe, fan-out, fan-in, Saga, CDC, transactional outbox and other EDA patterns work together in a modern digital bank</p><p class="medium-feed-link"><a href="https://mainakkmandal.medium.com/event-driven-architecture-patterns-explained-through-an-end-to-end-banking-use-case-8adee7511dc7?source=rss-aa6a7640bb5d------2">Continue reading on Medium »</a></p></div>]]></description>
            <link>https://mainakkmandal.medium.com/event-driven-architecture-patterns-explained-through-an-end-to-end-banking-use-case-8adee7511dc7?source=rss-aa6a7640bb5d------2</link>
            <guid isPermaLink="false">https://medium.com/p/8adee7511dc7</guid>
            <dc:creator><![CDATA[Mainak Mandal]]></dc:creator>
            <pubDate>Wed, 21 Oct 2026 16:55:58 GMT</pubDate>
            <atom:updated>2026-10-21T16:55:58.324Z</atom:updated>
        </item>
        <item>
            <title><![CDATA[Building an AI-Native Bank: The Symphony of Deterministic and Probabilistic Intelligence]]></title>
            <link>https://mainakkmandal.medium.com/building-an-ai-native-bank-the-symphony-of-deterministic-and-probabilistic-intelligence-046a90ea1f6f?source=rss-aa6a7640bb5d------2</link>
            <guid isPermaLink="false">https://medium.com/p/046a90ea1f6f</guid>
            <category><![CDATA[ai-agent]]></category>
            <category><![CDATA[agentic-ai-architecture]]></category>
            <category><![CDATA[ai-agents-in-action]]></category>
            <dc:creator><![CDATA[Mainak Mandal]]></dc:creator>
            <pubDate>Sat, 28 Mar 2026 17:06:10 GMT</pubDate>
            <atom:updated>2026-03-28T17:09:57.733Z</atom:updated>
            <content:encoded><![CDATA[<p><strong><em>How Agent Orchestration Patterns + ML + LLMs are redefining banking beyond API-led architectures</em></strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*7HcAxB44u7QDDGUSC6_21Q.png" /></figure><p><strong>🌍 Introduction: The Shift from APIs to Intelligence</strong></p><p>Modern banking is no longer just about APIs and workflows. It is a deeper architectural shift:</p><p>From <strong>Process Execution</strong> → to <strong>Intelligence Orchestration</strong></p><p>Traditional systems:</p><ul><li>Follow predefined paths</li><li>Fail on edge cases</li><li>Depend on rigid rules</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/929/1*YAIx5QvJEEf2I3Ajlvpcxg.png" /></figure><p>AI-native systems:</p><ul><li>Interpret context</li><li>Adapt dynamically</li><li>Orchestrate multiple intelligences</li></ul><p><strong>⚔️ The Core Conflict: Rules vs Reasoning</strong></p><p>In banking, you cannot hallucinate an interest rate.<br> But you also cannot use an if/else rule to understand a customer’s life situation.</p><p>This leads to a <strong>dual-engine architecture</strong>.</p><p><strong>🧠 The Dual-Engine Framework</strong></p><p><strong>🟢 Deterministic Engine (Classical ML &amp; Systems)</strong></p><ul><li>Models: XGBoost, LightGBM, LSTM</li><li>Output: Scores, probabilities, decisions</li><li>Strength: Accuracy, consistency, compliance</li></ul><p>👉 This is your <strong>“Truth Layer”</strong></p><p><strong>🟣 Probabilistic Engine (LLMs)</strong></p><ul><li>Models: Natural language models</li><li>Output: Reasoning, explanations, intent understanding</li><li>Strength: Context, flexibility, human-like thinking</li></ul><p>👉 This is your <strong>“Context Layer”</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/957/1*QbXoGSyhJy836GxZDD8h9w.png" /></figure><p><strong>🎯 The Real Breakthrough</strong></p><p>AI-native systems don’t replace one with the other<br> They orchestrate both using agent patterns</p><p><strong>🧩 Orchestration Patterns</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*rfVhh1fcqVwWbjSGgJ0YqQ.png" /></figure><p><strong>🧭 End-to-End Loan Journey</strong></p><p>Customer:</p><ol><li>Requests loan</li><li>Gets evaluated</li><li>Receives funds</li><li>Is monitored</li><li>Gets advisory</li></ol><p><strong>🏗️ Architecture Overview</strong></p><h4>Dual Engine Approach</h4><h4>Various Classic ML Models as proposed</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*FKiKRwzCYPn9CwLPtoJQ1A.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*H0ymHYMDsSEyfVXz2oGXng.png" /></figure><h4><strong>LLM Role at various steps</strong></h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/337/1*pXlP76Wdr7vF2MvQJsg6IA.png" /></figure><h4>LLM ML Colaboration</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/412/1*8N2x2c3S0b1Splfvk49B1Q.png" /></figure><p><strong>🟢 Step 1: Intent Recognition → Handoff Pattern</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/690/1*KgQN0-nyQBupg6sPkRCgWA.png" /></figure><p><strong>🧩 Pattern</strong></p><p>The <strong>Handoff Pattern</strong> enables dynamic delegation of responsibility between agents based on context and intent. Instead of a centralized system handling all logic, specialized agents take over when their expertise is required.</p><p>In LLM-based systems, this pattern is critical because LLMs are excellent at interpreting intent but should not directly execute domain-specific actions. The handoff ensures a clean separation between <em>understanding</em> and <em>execution</em>.</p><p><strong>🧠 Intelligence Split</strong></p><ul><li>🟣 LLM → Intent + urgency detection</li><li>🟢 ML → Optional prioritization (e.g., churn risk)</li></ul><p><strong>📌 Example</strong></p><p>User says:</p><p>“I’m struggling with my bills”</p><p>👉 LLM detects:</p><ul><li>Financial distress</li><li>Potential loan need</li></ul><p><strong>🆚 Traditional Limitation</strong></p><ul><li>Requires dropdown selection</li><li>Cannot infer emotional context</li></ul><p><strong>✨ Differentiation</strong></p><p>👉 Traditional systems rely on <strong>explicit user input via forms or menus</strong>, forcing users to translate their needs into predefined categories. This creates friction and often loses critical context (e.g., urgency, emotional state).</p><p>👉 AI-agent systems enable <strong>semantic routing</strong>, where intent is inferred from natural language, including implicit signals like urgency or distress.</p><p>👉 The key shift:</p><p>From <em>user adapting to system</em> → to <em>system adapting to user intent</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*xikEiIceCeWtHLneftpy9g.png" /></figure><p><strong>🔵 Step 2: Document Processing → Sequential Pattern</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/669/1*utm_DXzAnv2Xu6oB6z87-Q.png" /></figure><p><strong>🧩 Pattern</strong></p><p>The <strong>Sequential Pattern</strong> enforces a controlled, ordered execution where each step depends on the output of the previous one. This is essential in regulated domains like banking, where processes must be auditable, repeatable, and compliant.</p><p>In AI systems, this pattern acts as the <strong>control backbone</strong>, ensuring that probabilistic LLM outputs do not break the deterministic flow required for compliance. Each stage becomes a checkpoint that validates and enriches the data before passing it forward.</p><p><strong>🧠 Intelligence Split</strong></p><p><strong>🟣 LLM</strong></p><ul><li>Visual + semantic understanding</li><li>Detect inconsistencies</li><li>Guide user</li></ul><p><strong>🟢 ML</strong></p><ul><li>Extract structured numeric values</li><li>Feed scoring models</li></ul><p><strong>📌 Example</strong></p><p>LLM:</p><p>“Employer name mismatch detected”</p><p>ML:</p><p>Extract salary = ₹75,000</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*qzDOfrt_5Qe4lvwTtJY87Q.png" /></figure><p><strong>✨ Differentiation</strong></p><p>👉 Traditional workflows are <strong>rigid and fail-fast</strong> — any deviation (blurred image, missing field) results in rejection or manual intervention.</p><p>👉 AI-agent systems introduce <strong>adaptive recovery</strong>, where the system understands partial data, identifies gaps, and guides the user to complete the process.</p><p>👉 The key shift:</p><p>From <em>validation-driven rejection</em> → to <em>intelligence-driven completion</em></p><p><strong>🎯 Insight</strong></p><p>Sequential ensures compliance<br> AI makes it adaptive</p><p><strong>⚡ Step 3: Fraud &amp; Risk → Concurrent Pattern</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/796/1*hHLgim2VpBN3Zl4HRs27Cg.png" /></figure><p><strong>🧩 Pattern</strong></p><p>The <strong>Concurrent Pattern</strong> allows multiple agents or models to operate simultaneously, each analyzing a different dimension of the same problem. Instead of waiting for one step to finish before starting another, all relevant signals are processed in parallel and later aggregated.</p><p>In AI-native systems, this pattern is essential because real-world decisions — like fraud detection — depend on multiple independent signals. Parallel execution ensures both <strong>speed (low latency)</strong> and <strong>coverage (multi-signal intelligence)</strong>.</p><p><strong>🧠 Intelligence Split</strong></p><p><strong>🟢 ML (PRIMARY)</strong></p><ul><li>Fraud detection model</li><li>Behavior model</li><li>Device intelligence</li><li>Geo anomaly</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*gpi6j39LFXR4325W5TjitQ.png" /></figure><p><strong>🟣 LLM (CONTEXT LAYER)</strong></p><ul><li>Synthesizes signals</li><li>Uses user context</li><li>Explains decisions</li></ul><p><strong>🔄 Real Example</strong></p><p>User:</p><ul><li>Normally in Kolkata</li><li>Suddenly transacts in Mumbai</li></ul><p><strong>Parallel Outputs</strong></p><ul><li>Geo ML → High risk</li><li>Fraud ML → High risk</li><li>Behavior ML → Medium risk</li></ul><p><strong>LLM Insight</strong></p><p>“Transaction appears risky due to location change, but user recently searched for Mumbai travel.”</p><p><strong>🆚 Traditional System</strong></p><ul><li>Blocks transaction</li></ul><p>✨ Differentiation</p><p><strong>👉 Traditional systems rely on isolated rule engines or single-model decisions, often leading to false positives because they lack holistic context.</strong></p><p><strong>👉 AI-agent systems combine multiple ML signals in parallel and enrich them with contextual reasoning, enabling nuanced decisions (e.g., distinguishing fraud from legitimate travel behavior).</strong></p><p><strong>👉 The key shift:</strong></p><p><strong>From <em>binary rule enforcement</em> → to <em>multi-signal contextual intelligence</em></strong></p><p><strong>🎯 Insight</strong></p><p>ML detects anomalies<br> LLM understands intent</p><p><strong>💬 Step 4: Decisioning → Group Chat Pattern</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/818/1*k_NsPunEVQXXlJggmIv77w.png" /></figure><p><strong>🧩 Pattern</strong></p><p>The <strong>Group Chat Pattern</strong> simulates a collaborative decision-making environment where multiple agents contribute perspectives and collectively arrive at a conclusion. Each agent represents a specialized viewpoint, such as risk, compliance, or financial analysis.</p><p>In LLM systems, this pattern leverages the model’s strength in reasoning and dialogue, allowing it to weigh conflicting inputs and generate a balanced decision. It effectively mirrors how human committees operate in high-stakes environments.</p><p><strong>🧠 Intelligence Split</strong></p><p><strong>🟢 ML</strong></p><ul><li>Credit score</li><li>Risk score</li><li>Income metrics</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*_5C6dWV-9sZT451xMbLOHQ.png" /></figure><p><strong>🟣 LLM (MODERATOR)</strong></p><ul><li>Synthesizes arguments</li><li>Balances trade-offs</li><li>Explains decision</li></ul><p><strong>🔄 Example</strong></p><p>Conflict:</p><ul><li>Low credit score</li><li>High income</li></ul><p><strong>LLM Decision</strong></p><p>“Approved due to stable income, but with adjusted interest rate.”</p><p><strong>🆚 Traditional</strong></p><ul><li>Reject</li></ul><p><strong>✨ Differentiation</strong></p><p><strong>👉 Traditional systems depend on static scorecards and threshold-based logic, which cannot handle conflicting signals or explain decisions beyond basic metrics.</strong></p><p><strong>👉 AI-agent systems simulate multi-agent deliberation, enabling reasoning across competing factors and producing transparent, human-like justifications.</strong></p><p><strong>👉 The key shift:</strong></p><p><strong>From <em>opaque scoring models</em> → to <em>explainable, collaborative reasoning systems</em></strong></p><p><strong>🎯 Insight</strong></p><p>ML provides facts<br> LLM provides judgment</p><p><strong>🧲 Step 5: Offer Optimization → Magentic Pattern</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/620/1*yMd6vrOAm_sNmowT1AjrkQ.png" /></figure><p><strong>🧩 Pattern</strong></p><p>The <strong>Magentic Pattern</strong> represents dynamic, context-driven orchestration where workflows are not predefined but emerge based on the situation. Agents are selected and coordinated at runtime depending on user context, preferences, and constraints.</p><p>This pattern is particularly powerful in LLM-based systems because it allows for <strong>adaptive problem-solving</strong>. Instead of rigid pipelines, the system behaves like a strategist, assembling the right combination of capabilities to generate the best outcome.</p><p><strong>🧠 Intelligence Split</strong></p><p><strong>🟢 ML</strong></p><ul><li>EMI calculation</li><li>Pricing models</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*M4jNz-ECKOROibnIkhaVTw.png" /></figure><p><strong>🟣 LLM</strong></p><ul><li>Personalization</li><li>Financial storytelling</li><li>Context-based recommendations</li></ul><p><strong>🔄 Example</strong></p><p>User spends ₹10K/month on rides.</p><p><strong>LLM Suggestion</strong></p><p>“Buying a car loan reduces your monthly cost compared to ride-sharing.”</p><p><strong>🆚 Traditional</strong></p><ul><li>Static offers</li></ul><p><strong>✨ Differentiation</strong></p><p><strong>👉 Traditional systems offer predefined financial products, with limited personalization based on broad customer segments.</strong></p><p><strong>👉 AI-agent systems dynamically generate context-aware financial strategies, tailoring offers to individual behavior, goals, and constraints in real time.</strong></p><p><strong>👉 The key shift:</strong></p><p><strong>From <em>product-centric banking</em> → to <em>customer-centric financial intelligence</em></strong></p><p><strong>🎯 Insight</strong></p><p>ML optimizes numbers<br> LLM optimizes meaning</p><p><strong>💰 Step 6: Disbursement → Sequential + Handoff</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/757/1*r67UUAeMRpUiKD4yJuCtow.png" /></figure><p><strong>🧩 Pattern</strong></p><p>This step combines the <strong>Sequential Pattern</strong> (to ensure correctness and order) with the <strong>Handoff Pattern</strong> (to delegate execution to specialized systems). It represents the transition from decision-making to actual execution.</p><p>In AI-native systems, this boundary is critical: intelligence systems must not directly execute financial transactions. Instead, they pass control to trusted, deterministic systems that ensure safety and compliance.</p><p><strong>🧠 Intelligence Split</strong></p><p><strong>🟢 Systems</strong></p><ul><li>Core banking</li><li>Payment APIs</li></ul><p><strong>🟣 LLM</strong></p><ul><li>Communication</li></ul><p><strong>🔄 Example</strong></p><p>“₹5,00,000 credited. EMI starts next month.”</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*id8EjExixrFUEOjNeiB4FQ.png" /></figure><p><strong>🎯 Insight</strong></p><p>Execution must remain deterministic<br> Intelligence enhances experience</p><p><strong>✨ Differentiation for Step 6</strong></p><p>👉 Traditional systems execute transactions correctly but provide <strong>minimal context or communication</strong>, leaving users uncertain about next steps or implications.</p><p>👉 AI-agent systems enhance this stage with <strong>intelligent communication and contextual awareness</strong>, ensuring users understand what happened, why, and what comes next.</p><p>👉 The key shift:</p><p>From <em>silent execution</em> → to <em>transparent, guided experience</em></p><p><strong>🛡️ Step 7–9 (Brief)</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*qfNGGlm6rEuTPXzKmjAp_Q.png" /></figure><p><strong>✨ Differentiation for Steps 7 to 9</strong></p><p>👉 Traditional systems treat monitoring, support, and advisory as <strong>separate, disconnected functions</strong>, often requiring manual intervention and fragmented user experiences.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*1c7tqqcCQ0-_hc5UYAEIzw.png" /></figure><p>👉 AI-agent systems unify these into a <strong>continuous intelligence loop</strong>, where insights from one stage inform the next, enabling proactive support and personalized financial guidance.</p><p>👉 The key shift:</p><p>From <em>fragmented services</em> → to <em>continuous intelligent engagement</em></p><h3>🧠 🤝 Combining 3rd Party Models + In-House Data</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*IndcpiG2oAzRl_18VeGqdw.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/460/1*OPcFOhr0Z49maplmThAd2Q.png" /></figure><p><strong>🎯 Final Thought</strong></p><p>The future of banking is not AI replacing systems<br> It is AI orchestrating multiple intelligences</p><p><strong>🔥 The Real Differentiator</strong></p><p>👉 Deterministic Accuracy + Probabilistic Understanding</p><p><strong>🧠 Final Insight</strong></p><p>ML detects<br>LLM reasons<br>APIs execute<br>Agents orchestrate</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=046a90ea1f6f" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Designing a Global E-Commerce Platform Using Cloud Architecture Patterns]]></title>
            <description><![CDATA[<div class="medium-feed-item"><p class="medium-feed-image"><a href="https://mainakkmandal.medium.com/designing-a-global-e-commerce-platform-using-cloud-architecture-patterns-c7c8af78d40a?source=rss-aa6a7640bb5d------2"><img src="https://cdn-images-1.medium.com/max/2600/1*2Ta-CPRKAWjAT74ttrDMiQ.jpeg" width="4000"></a></p><p class="medium-feed-link"><a href="https://mainakkmandal.medium.com/designing-a-global-e-commerce-platform-using-cloud-architecture-patterns-c7c8af78d40a?source=rss-aa6a7640bb5d------2">Continue reading on Medium »</a></p></div>]]></description>
            <link>https://mainakkmandal.medium.com/designing-a-global-e-commerce-platform-using-cloud-architecture-patterns-c7c8af78d40a?source=rss-aa6a7640bb5d------2</link>
            <guid isPermaLink="false">https://medium.com/p/c7c8af78d40a</guid>
            <dc:creator><![CDATA[Mainak Mandal]]></dc:creator>
            <pubDate>Sat, 14 Mar 2026 18:50:30 GMT</pubDate>
            <atom:updated>2026-03-14T18:50:30.310Z</atom:updated>
        </item>
        <item>
            <title><![CDATA[Architect-to-Architect: How We Restrict Access to a Web IDE Using Reverse Proxy in Kubernetes]]></title>
            <link>https://mainakkmandal.medium.com/u-architect-to-architect-how-we-restrict-access-to-a-web-ide-using-reverse-proxy-in-kubernetes-739f005fd7fa?source=rss-aa6a7640bb5d------2</link>
            <guid isPermaLink="false">https://medium.com/p/739f005fd7fa</guid>
            <dc:creator><![CDATA[Mainak Mandal]]></dc:creator>
            <pubDate>Sun, 22 Feb 2026 14:56:50 GMT</pubDate>
            <atom:updated>2026-02-22T14:59:46.286Z</atom:updated>
            <content:encoded><![CDATA[<p>It was a lazy cup of tea at office cafeteria on a Friday afternoon when I happened to meet my architect friend Ravi on the other side of the table who is engaged in a product development team where they need to integrate a 3rd party web IDE from the product web page and he came straight to the point</p><p><strong>🧑‍💻 Ravi:</strong><br> We need to integrate that third-party web IDE into our product page — you know, web2 — but I don’t want it publicly accessible. Only available when someone is logged in and accessing it <em>through</em> our main app, web1.</p><p><strong>👩‍💻 Neha:</strong><br> Totally. You’re thinking iframe?</p><p><strong>🧑‍💻 Ravi:</strong><br> Exactly. The main app (web1) will embed the IDE (web2) via an &lt;iframe&gt;. But here’s the catch — I <strong>don’t want users to be able to open </strong><strong>web2 directly</strong> in a browser. It should only load <em>within</em> web1.</p><p><strong>👩‍💻 Neha:</strong><br> That screams <strong>reverse proxy</strong>! Put both apps inside Kubernetes and use <strong>NGINX Ingress</strong> to route requests. Only expose web1 to the outside, and let web2 hide behind it.</p><p><strong>🧑‍💻 Ravi:</strong><br> Hmm. So web2 becomes internal-only?</p><p><strong>👩‍💻 Neha:</strong><br> Exactly. Here’s the plan:</p><h3>✅ Step-by-Step Architecture</h3><p><strong>1. Deploy both web apps inside Kubernetes</strong></p><pre># web1 - public frontend<br>image: web1:latest<br>ports:<br>  - containerPort: 80</pre><pre># web2 - 3rd party IDE<br>image: web2:latest<br>ports:<br>  - containerPort: 5000</pre><p><strong>Service Type:</strong> Use ClusterIP for both — they stay inside the cluster.</p><p><strong>2. Use NGINX Ingress as the reverse proxy</strong></p><pre>apiVersion: networking.k8s.io/v1<br>kind: Ingress<br>metadata:<br>  name: web1-ingress<br>  annotations:<br>    nginx.ingress.kubernetes.io/rewrite-target: /<br>spec:<br>  ingressClassName: nginx<br>  rules:<br>    - host: web1.example.com<br>      http:<br>        paths:<br>          - path: /<br>            pathType: Prefix<br>            backend:<br>              service:<br>                name: web1<br>                port:<br>                  number: 80<br>          - path: /web2<br>            pathType: Prefix<br>            backend:<br>              service:<br>                name: web2<br>                port:<br>                  number: 5000</pre><p><strong>🧑‍💻 Ravi:</strong><br> So now /web2 is reverse-proxied through the same domain as web1?</p><p><strong>👩‍💻 Neha:</strong><br> Yup. It’ll be accessible only at web1.example.com/web2 — and that’s the exact URL you embed in your iframe.</p><pre>&lt;iframe src=&quot;/web2&quot; width=&quot;100%&quot; height=&quot;600px&quot;&gt;&lt;/iframe&gt;</pre><p><strong>🧑‍💻 Ravi:</strong><br> Love it. That means web2 isn’t exposed at all. No public ingress, no direct port.</p><p><strong>👩‍💻 Neha:</strong><br> Even better — try curl http://192.168.49.2:5000 from your host. It fails. Only the Ingress knows how to talk to web2.</p><p><strong>🧑‍💻 Ravi:</strong><br> So technically, NGINX is the reverse proxy here?</p><p><strong>👩‍💻 Neha:</strong><br> Exactly! It’s sitting at the edge of the cluster, forwarding external requests <em>into</em> the internal cluster. That’s what makes it a <strong>reverse</strong> proxy — the flow goes from client → proxy → internal service.</p><h3>🔒 Bonus: What This Secures</h3><ul><li>✅ web1 is exposed publicly.</li><li>✅ web2 only loads inside iframe via web1.example.com/web2.</li><li>🚫 No one can access web2 directly via IP or port.</li></ul><p><strong>🧑‍💻 Ravi:</strong><br> This is clean. Users feel like they’re using a seamless IDE, but under the hood it’s safe, scoped, and locked down.</p><p><strong>👩‍💻 Neha:</strong><br> Exactly. And since it’s a reverse proxy path, you don’t deal with CORS or cookie issues either — it’s all on the same domain.</p><p><strong>🧑‍💻 Ravi:</strong><br> Let’s ship it!</p><p>Want to replicate this setup? Let me know, and I’ll share the full yaml bundle.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=739f005fd7fa" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>