<?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 Shashikanta Parida on Medium]]></title>
        <description><![CDATA[Stories by Shashikanta Parida on Medium]]></description>
        <link>https://medium.com/@shashikanta.p?source=rss-172722232f06------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*MS6QPV30GCu5AXCSvaao4g.jpeg</url>
            <title>Stories by Shashikanta Parida on Medium</title>
            <link>https://medium.com/@shashikanta.p?source=rss-172722232f06------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sat, 21 Nov 2026 14:25:18 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@shashikanta.p/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[The Evolution of Hackers in the AI Era: Threat Models, Attacks, and Defences]]></title>
            <link>https://medium.com/@shashikanta.p/the-evolution-of-hackers-in-the-ai-era-threat-models-attacks-and-defences-642c8dc4bc7d?source=rss-172722232f06------2</link>
            <guid isPermaLink="false">https://medium.com/p/642c8dc4bc7d</guid>
            <category><![CDATA[artificial-intelligence]]></category>
            <category><![CDATA[cyber-security-awareness]]></category>
            <category><![CDATA[security-machine-learning]]></category>
            <category><![CDATA[unethical-hackers]]></category>
            <category><![CDATA[information-security]]></category>
            <dc:creator><![CDATA[Shashikanta Parida]]></dc:creator>
            <pubDate>Thu, 26 Mar 2026 10:58:51 GMT</pubDate>
            <atom:updated>2026-03-26T10:58:51.928Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*xmWFmWgBsDUd5s0YV5Ydlw.png" /></figure><p><em>A sci‑fi thriller is becoming operational reality — and it’s happening quietly inside our browsers, clouds, and co-pilots.</em></p><p>The World Wide Web democratized information — and also democratized abuse: phishing, malware, spam, fraud, and large-scale exploitation. Now AI is democratizing <em>capability</em>: automation, persuasion, coding, reconnaissance, and decision-making. With this new innovation comes a new threat model: <strong>attackers don’t just “use tools” anymore — they can deploy adaptive systems</strong>. Think of it as <strong>AI-on-AI conflict</strong>: autonomous assistants trying to do good work, manipulated by adversarial assistants trying to hijack them.</p><p>Security leaders are already warning that AI is accelerating the speed and scale of cyberattacks — from highly personalized phishing to synthetic identities and “agentic” patterns where automated systems attempt to carry out multi-step attack sequences.</p><p>This post is an <strong>extensive technical guide</strong> to:</p><ol><li>the <strong>classification</strong> of AI-era threats,</li><li><strong>how AI systems are attacked</strong> (including training data corruption),</li><li><strong>preventions/guardrails</strong> (technical + governance),</li><li><strong>safe use patterns</strong>, and</li><li>the <strong>regulations and frameworks</strong> shaping the next decade.</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*WNqlraC1jH-7xMini8GirQ.png" /></figure><p><strong>1) Why “AI-era threats” are different from Internet-era threats</strong></p><p>Classic internet threats were constrained by human attacker time: writing malware, crafting emails, performing recon, and iterating. AI compresses those timelines. Reports in 2026 describe a growing “speed gap” where attackers move from initial access to broader compromise in under ~30 minutes — sometimes seconds — while defenders remain bound to human approvals and manual processes.</p><p>AI also creates a new category of targets: <strong>the AI systems themselves</strong> — their training data, prompts, retrieval sources, tool connectors, and action policies across design/deploy/maintenance stages. Government research has explicitly mapped vulnerabilities across the AI lifecycle (design → development → deployment → maintenance), emphasizing that AI has AI-specific failure modes beyond traditional software vulnerabilities.</p><p><strong>2) Threat classification: the “AI-on-AI” attack taxonomy</strong></p><p>A helpful way to classify AI threats is by <strong>what is being attacked</strong>:</p><p><strong>A) AI-augmented cyberattacks (AI as the attacker’s tool)</strong></p><p>These are traditional attacks made faster/cheaper:</p><ul><li><strong>Hyper-personalized phishing</strong> and multilingual social engineering at scale.</li><li><strong>Deepfake impersonation</strong> (voice/video) for financial fraud and access.</li><li><strong>Automated recon + exploit iteration</strong>, lowering the barrier to entry for sophisticated attacks.</li></ul><p><strong>B) Attacks on AI systems (AI as the target)</strong></p><p>These exploit AI-specific mechanisms:</p><ul><li><strong>Data poisoning</strong>: injecting malicious / biased / mislabeled training data.</li><li><strong>Backdoors / trojans</strong>: model behaves normally, except on a trigger (rare pattern/phrase/image).</li><li><strong>Prompt injection</strong>: hidden instructions in text/docs/webpages that manipulate AI assistants to leak data or take wrong actions.</li><li><strong>RAG poisoning</strong>: corrupting retrieval sources so answers are “grounded” on malicious documents.</li><li><strong>Model inversion / data leakage</strong>: extracting sensitive info memorized from training or fine‑tuning data.</li></ul><p><strong>C) Misleading AI outputs (AI as a failure mode / amplifier)</strong></p><ul><li><strong>Hallucinations</strong> (confident wrong outputs) become security risks when systems act on them.</li><li><strong>Misinformation vulnerability</strong> is explicitly recognized as an LLM application risk by OWASP GenAI.</li></ul><p>This “AI-on-AI” framing matters because many enterprises now deploy agents that <strong>read emails, summarize incidents, write code, query databases, and trigger actions</strong> — meaning bad outputs can become <strong>bad operations</strong>.</p><p><strong>3) The big question: Can hackers feed wrong training data and corrupt the model?</strong></p><p>Yes — this is the core idea behind <strong>data poisoning</strong> and <strong>training-time manipulation</strong>, and it’s recognized in major risk analyses and public frameworks.</p><p><strong>Where poisoning can occur:</strong></p><ol><li><strong>Foundation-data contamination (pretraining stage)</strong>: attackers manipulate public sources likely to be scraped later — harder but high impact.</li><li><strong>Fine-tuning / domain training</strong>: the most practical enterprise risk — attackers sneak corrupted examples into internal datasets (logs, tickets, chat history, knowledge bases).</li><li><strong>Post-training “effective poisoning” via RAG</strong>: you don’t alter weights — just poison what the model retrieves, causing persistent wrong behavior until data is cleaned.</li></ol><p><strong>Why it’s scary:</strong> poisoning and backdoors create <em>silent</em> failures. The model can appear normal while reliably failing under specific triggers.</p><p><strong>4) The new villain archetype: Agentic attackers &amp; “AI swarms”</strong></p><p>Recent reporting highlights a trend toward “agentic AI” — systems that can act semi-autonomously, chaining steps like recon → phishing → privilege escalation → persistence. Even if full autonomy isn’t universal yet, defenders are already seeing increased automation and scale.</p><p>The implication: defenders must assume attackers can run <strong>continuous, automated campaigns</strong> — not occasional manual probes.</p><p><strong>5) Prevention: how to secure AI systems (practical controls)</strong></p><p>Below are <strong>engineering-grade mitigations</strong>, grouped by layer.</p><p><strong>Layer 1 — Data supply chain security</strong></p><ul><li><strong>Provenance &amp; integrity</strong>: track dataset origin, ownership, change history; use immutable storage + signing for high-value datasets.</li><li><strong>Poisoning detection</strong>: anomaly checks, outlier filtering, label audits, adversarial testing sets, and dataset “diff” reviews before training.</li><li><strong>Least privilege for training pipelines</strong>: restrict who can inject data into fine-tuning corpora; isolate training environments.</li></ul><p><strong>Layer 2 — Model &amp; application guardrails</strong></p><ul><li><strong>Prompt-injection defenses</strong>: treat all external content as untrusted; apply instruction hierarchy (system &gt; developer &gt; user); sanitize/strip hidden directives from documents.</li><li><strong>RAG hardening</strong>: whitelist sources, rank by trust, use signed/internal docs, enforce retrieval ACLs, and log citations used in answers.</li><li><strong>Output verification</strong>: require citations; use cross-checking against authoritative sources; apply “refuse/uncertain” patterns for high-stakes queries.</li></ul><p><strong>Layer 3 — Tool access &amp; agent safety</strong></p><p>If your AI can call tools (email, tickets, code repos, cloud APIs), treat it like a privileged identity:</p><ul><li><strong>Scoped permissions</strong> (least privilege, time-boxed tokens) and policy-enforced actions.</li><li><strong>Human-in-the-loop</strong> approvals for destructive actions (delete, transfer funds, change RBAC, publish secrets).</li><li><strong>Auditability</strong>: log prompts, tools invoked, retrieved sources, and action outcomes to enable incident response.</li></ul><p><strong>Layer 4 — Operational security &amp; monitoring</strong></p><ul><li><strong>Red teaming AI systems</strong> (adversarial prompts, data poisoning tests, jailbreak testing).</li><li><strong>Continuous evaluation</strong> for hallucination, misinformation, and security regressions in production.</li></ul><p><strong>6) Safe use: “How to use AI without getting burned”</strong></p><p>For individuals and teams:</p><ol><li><strong>Never treat AI output as a source of truth</strong> — treat it as a hypothesis generator.</li><li><strong>Don’t paste secrets</strong> into unapproved tools (API keys, customer data, internal code). Shadow AI is a common enterprise risk pattern.</li><li><strong>Assume inputs are hostile</strong> if they come from email attachments, web pages, shared docs, or external tickets — prompt injection can hide in any of these.</li></ol><p><strong>7) Regulation &amp; governance: what companies and governments are doing (and must do)</strong></p><p><strong>A) Government / public-sector direction</strong></p><p>Public bodies are now publishing AI cybersecurity assessments and mapping AI lifecycle vulnerabilities, explicitly recognizing AI-specific risks and exploitation paths. Example: UK DSIT’s “Cyber security risks to artificial intelligence” research emphasizes lifecycle vulnerabilities and case studies of AI-linked cyberattacks.</p><p><strong>B) Enterprise governance frameworks</strong></p><p>Organizations are increasingly aligning to risk-management frameworks and repositories that classify AI risks and mitigations:</p><ul><li>MIT’s AI Risk Repository (a “living” database of risks across domains).</li><li>World Economic Forum guidance on balancing AI rewards with cyber risk management across the lifecycle.</li></ul><p><strong>C) Security-specific standards</strong></p><ul><li>OWASP Gen AI risks include misinformation risks and other application-level vulnerabilities relevant to real deployments.</li></ul><p><strong>D) Industry threat reporting</strong></p><ul><li>Microsoft’s Digital Defence Report (MDDR) describes the scale of signals and emphasizes understanding AI risk/benefit and building resilience.</li></ul><p><strong>What regulation should focus on (pragmatically):</strong></p><ul><li>Mandatory <strong>model risk assessments</strong> for high-impact systems</li><li><strong>Audit trails</strong> and transparency for model inputs/outputs/actions</li><li>Controls for <strong>data provenance</strong>, privacy, and secure fine‑tuning</li><li>Requirements for <strong>security testing</strong> (red teams, prompt-injection testing, eval benchmarks)<br> These are consistent with the lifecycle risk framing in public reports and governance papers.</li></ul><p><strong>8) Threat model: securing AI systems against intelligent attackers</strong></p><p>The above sections 2–7 described <em>what</em> can go wrong (taxonomy, poisoning, agentic attackers) and <em>how</em> to respond (controls, safe use, governance). A threat model turns that into an engineering artifact: it defines <strong>assets</strong>, <strong>trust boundaries</strong>, <strong>adversaries</strong>, and <strong>abuse cases</strong> so you can design defences that are testable and auditable.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Jpnp6gmDn4zRfLoVTi4ndw.png" /></figure><p><strong>A) System view and trust boundaries (where trust changes)</strong></p><ul><li><strong>User input boundary</strong>: prompts, uploads, chat history, and anything copied into the assistant.</li><li><strong>Retrieval boundary (RAG)</strong>: knowledge bases, documents, web pages, tickets, and vector stores the model is allowed to fetch from.</li><li><strong>Tool/action boundary</strong>: connectors that can take actions (email, issue trackers, CI/CD, cloud APIs, finance systems).</li><li><strong>Model boundary</strong>: the hosted model/provider and any fine-tuned variants, including inference endpoints and rate limits.</li><li><strong>Data pipeline boundary</strong>: training/fine-tuning datasets, labelling workflows, and auto-retraining/feedback loops.</li></ul><p><strong>B) Assets to protect (what you can lose)</strong></p><ul><li><strong>Confidential data</strong>: customer data, employee data, internal documents, source code, credentials, and secrets.</li><li><strong>Integrity of decisions</strong>: recommendations, classifications, summaries, and generated code that can drive real operations.</li><li><strong>Action authority</strong>: the permissions and tokens that let an agent do things in other systems.</li><li><strong>Model and prompts</strong>: system prompts, policies, fine-tuned weights, and proprietary workflows.</li><li><strong>Availability and cost</strong>: inference uptime, rate limits, and unexpected spend from abusive usage.</li></ul><p><strong>C) Adversaries and capabilities (what you should assume)</strong></p><ul><li><strong>External attackers</strong> using automation to probe prompts, endpoints, and connectors at high volume.</li><li><strong>Social engineers</strong> crafting persuasive inputs (phishing, deepfakes, synthetic identities) that target both humans and assistants.</li><li><strong>Supply-chain adversaries</strong> manipulating data sources, packages, plugins, or shared documents that feed RAG and training corpora.</li><li><strong>Insiders</strong> with legitimate access to datasets, prompts, vector stores, or deployment settings.</li><li><strong>Agentic adversaries</strong> that iterate: they test, learn, and retry until they find a bypass.</li></ul><p><strong>D) Core abuse cases (what to design and test for)</strong></p><ol><li><strong>Prompt injection → data exfiltration</strong>: untrusted content attempts to override instructions and extract secrets or restricted context.</li><li><strong>RAG poisoning → confident misinformation</strong>: corrupted sources steer answers and decisions while appearing well-grounded.</li><li><strong>Tool hijacking → unauthorized actions</strong>: the model is tricked into calling connectors to send emails, change tickets, modify IAM/RBAC, or move data.</li><li><strong>Training/fine-tuning poisoning → long-term behaviour drift</strong>: malicious examples shift outputs subtly, or embed backdoors that activate under triggers.</li><li><strong>Model extraction / IP theft</strong>: structured queries (or compromised logs) reconstruct proprietary behaviour, prompts, or fine-tuning data.</li><li><strong>Denial of wallet / availability attacks</strong>: token flooding, expensive queries, or tool loops drive outages or cost spikes.</li></ol><p><strong>E) Security objectives (what “secure” means for an AI assistant)</strong></p><ul><li><strong>Confidentiality</strong>: the assistant cannot reveal data it is not authorized to access.</li><li><strong>Integrity</strong>: the assistant’s outputs and actions remain correct, policy-compliant, and resistant to manipulation.</li><li><strong>Availability</strong>: the system remains usable under abuse and fails safely under load.</li><li><strong>Least privilege</strong>: tools/actions are narrowly scoped, time-boxed, and require approvals for high-impact operations.</li><li><strong>Non-repudiation and traceability</strong>: you can reconstruct what the model saw, retrieved, and did (for incident response).</li></ul><p><strong>F) Build-and-test checklist (make it real)</strong></p><ul><li><strong>List your tools and rank impact</strong>: read-only vs. write actions; define which ones require human approval.</li><li><strong>Define retrieval allow lists</strong>: which repos/sites/SharePoint libraries are trusted; enforce ACL-aware retrieval.</li><li><strong>Harden the prompt stack</strong>: separate system/developer/user instructions; explicitly treat retrieved text as untrusted data, not instructions.</li><li><strong>Add output constraints</strong>: require citations for claims, refuse when uncertain in high-stakes workflows, and validate structured outputs (schemas).</li><li><strong>Instrument everything</strong>: log prompts, retrieved documents, tool calls, and outcomes; monitor for drift and suspicious tool usage.</li><li><strong>Red-team the top abuse cases</strong>: prompt injection suites, RAG poisoning drills, data poisoning simulations, and “agent loop” failure tests.</li></ul><p>If you do this work upfront, the controls in Section 5 stop being a checklist and become <strong>requirements traced to specific threats</strong>. That’s the difference between “we added guardrails” and “we can prove the agent stays inside its lane.”</p><p><strong>9) Closing: the “sci‑fi” moment is a design decision</strong></p><p>The most important mindset shift is this:</p><p>In the AI era, security isn’t just about protecting systems from being <em>broken</em>.<br> It’s about protecting systems from being <em>convinced</em>.</p><p>AI systems can be manipulated through data, prompts, and retrieval — turning helpful assistants into confident liars, leaky insiders, or automated saboteurs.</p><p>That’s why the winning strategy is not “AI vs humans.” It’s <strong>secure AI + strong identity + governed data + human oversight</strong>.</p><p><strong>References (Includes personal learning and AI referred)</strong></p><ol><li>McKinsey — AI is the greatest threat and defence in cybersecurity today: <a href="https://www.mckinsey.com/about-us/new-at-mckinsey-blog/ai-is-the-greatest-threat-and-defense-in-cybersecurity-today">https://www.mckinsey.com/about-us/new-at-mckinsey-blog/ai-is-the-greatest-threat-and-defense-in-cybersecurity-today</a></li><li>Microsoft — Microsoft Digital Défense Report 2025: <a href="https://www.microsoft.com/en-us/corporate-responsibility/cybersecurity/microsoft-digital-defense-report-2025/">https://www.microsoft.com/en-us/corporate-responsibility/cybersecurity/microsoft-digital-defense-report-2025/</a></li><li>UK Government (DSIT) — Cyber security risks to artificial intelligence: <a href="https://www.gov.uk/government/publications/research-on-the-cyber-security-of-ai/cyber-security-risks-to-artificial-intelligence">https://www.gov.uk/government/publications/research-on-the-cyber-security-of-ai/cyber-security-risks-to-artificial-intelligence</a></li><li>Tech Xplore — AI could make cyber attacks costlier and more effective (Munich Re): <a href="https://techxplore.com/news/2026-03-ai-cyber-costlier-effective-munich.html">https://techxplore.com/news/2026-03-ai-cyber-costlier-effective-munich.html</a></li><li>GovTech — Report: AI drives cyber attacks that unfold in minutes: <a href="https://www.govtech.com/security/report-ai-drives-cyber-attacks-that-unfold-in-minutes">https://www.govtech.com/security/report-ai-drives-cyber-attacks-that-unfold-in-minutes</a></li><li>SecurityWeek — AI speeds attacks but identity remains cybersecurity’s weakest link: <a href="https://www.securityweek.com/ai-speeds-attacks-but-identity-remains-cybersecuritys-weakest-link/">https://www.securityweek.com/ai-speeds-attacks-but-identity-remains-cybersecuritys-weakest-link/</a></li><li>TechNewsWorld — AI-powered cyberattacks raise alarm among IT leaders: <a href="https://www.technewsworld.com/story/ai-powered-cyberattacks-raise-alarm-among-it-leaders-180239.html">https://www.technewsworld.com/story/ai-powered-cyberattacks-raise-alarm-among-it-leaders-180239.html</a></li><li>World Economic Forum — Artificial Intelligence and Cybersecurity: Balancing Risks and Rewards (PDF): <a href="https://reports.weforum.org/docs/WEF_Artificial_Intelligence_and_Cybersecurity_Balancing_Risks_and_Rewards_2025.pdf">https://reports.weforum.org/docs/WEF_Artificial_Intelligence_and_Cybersecurity_Balancing_Risks_and_Rewards_2025.pdf</a></li><li>MIT AI Risk Repository: <a href="https://airisk.mit.edu/">https://airisk.mit.edu/</a></li><li>arXiv — (source cited in draft): <a href="https://arxiv.org/html/2601.03304">https://arxiv.org/html/2601.03304</a></li><li>Wiz Academy — AI security risks: <a href="https://www.wiz.io/academy/ai-security/ai-security-risks">https://www.wiz.io/academy/ai-security/ai-security-risks</a></li><li>Frontiers — (source cited in draft): <a href="https://www.frontiersin.org/journals/communications-and-networks/articles/10.3389/frcmn.2025.1727425/full">https://www.frontiersin.org/journals/communications-and-networks/articles/10.3389/frcmn.2025.1727425/full</a></li><li>SentinelOne — AI security risks: <a href="https://www.sentinelone.com/cybersecurity-101/data-and-ai/ai-security-risks/">https://www.sentinelone.com/cybersecurity-101/data-and-ai/ai-security-risks/</a></li><li>Giskard — Hallucination analysis in leading LLMs: <a href="https://www.giskard.ai/knowledge/good-answers-are-not-necessarily-factual-answers-an-analysis-of-hallucination-in-leading-llms">https://www.giskard.ai/knowledge/good-answers-are-not-necessarily-factual-answers-an-analysis-of-hallucination-in-leading-llms</a></li><li>IOSentrix — LLM hallucinations and security risks: <a href="https://www.iosentrix.com/blog/llm-hallucinations-security-risks">https://www.iosentrix.com/blog/llm-hallucinations-security-risks</a></li><li>Startup House — LLM hallucinations explained: <a href="https://startup-house.com/blog/llm-hallucinations-explained">https://startup-house.com/blog/llm-hallucinations-explained</a></li><li>OWASP GenAI — Misinformation risk: <a href="https://genai.owasp.org/llmrisk/llm092025-misinformation/">https://genai.owasp.org/llmrisk/llm092025-misinformation/</a></li><li>MIT Sloan — AI cyberattacks: three pillars of defense: <a href="https://mitsloan.mit.edu/ideas-made-to-matter/ai-cyberattacks-three-pillars-defense">https://mitsloan.mit.edu/ideas-made-to-matter/ai-cyberattacks-three-pillars-defense</a></li></ol><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=642c8dc4bc7d" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Inside GPT: How Large Language Models Really Work, Step by Step]]></title>
            <link>https://medium.com/@shashikanta.p/inside-gpt-how-large-language-models-really-work-step-by-step-c1a306c6c118?source=rss-172722232f06------2</link>
            <guid isPermaLink="false">https://medium.com/p/c1a306c6c118</guid>
            <dc:creator><![CDATA[Shashikanta Parida]]></dc:creator>
            <pubDate>Sun, 15 Mar 2026 08:08:02 GMT</pubDate>
            <atom:updated>2026-03-15T08:08:02.378Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*otJRhOwh7Q47C8Qce7Su3Q.png" /></figure><p>How an LLM Processes a Prompt (Step by Step)</p><p>Have you ever paused for a moment and wondered how an AI like GPT answers your questions so effortlessly? How a few words you type turn into a fluent, confident response in seconds? If that curiosity has crossed your mind, you’re in the right place — this article walks you through how large language models work, in a simple, human, and step‑by‑step way, peeling back the layers without jargon or mystery.</p><p>Before diving into theory, let’s <em>walk through an example</em> of how a large language model (LLM) like GPT processes a question. Consider the simple prompt: <strong>“What is 5 + 6?”</strong> Here’s how the LLM handles it, step by step:</p><p>Note: The reason for choosing a simple math equation is that, A math question makes it easier to see that an LLM is not consciously “understanding” or deciding an answer, but statistically predicting the most likely outcome from learned patterns — even in math — revealing it as an advanced probabilistic model rather than a thinking mind.</p><p><strong>So, our prompt: “What is 5 + 6?”</strong></p><p>I’ll keep it <strong>concrete</strong>, <strong>numerical</strong>, and <strong>layer‑by‑layer</strong>, so you can mentally trace the data flow from <strong>text → math → answer</strong>.</p><p><strong>0️⃣ High‑level overview (before details)</strong></p><p>An LLM <strong>does not actually “do math” like a calculator</strong>. <br>Instead, it:</p><ol><li>Converts text → numbers (<strong>tokens</strong>)</li><li>Converts tokens → vectors (<strong>embeddings</strong>)</li><li>Uses <strong>attention layers</strong> to understand relationships</li><li>Uses <strong>learned patterns</strong> to predict the most likely next tokens</li><li>Converts predicted tokens → text</li></ol><p>Now let’s go <strong>inside</strong>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*REnYHtN7ZdzHbv0H5hY0MA.png" /></figure><p><strong>1️⃣ Raw input text (human level)</strong></p><p>“What is 5 + 6 ?”</p><p>At this point, the model <strong>cannot see text</strong>. This is just characters.</p><p><strong>2️⃣ Tokenization (text → token IDs)</strong></p><p>The tokenizer breaks text into <strong>tokens</strong> (sub‑words / symbols).</p><p>A typical tokenization might look like:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/567/1*o472-VrPp8BubnZFVAcbGw.png" /></figure><p>So the prompt becomes something like:</p><p>[18423, 318, 12, 9, 13, 30]</p><p>✅ <strong>Important</strong></p><ul><li>Tokenization is <strong>language‑specific</strong></li><li>After this step, <strong>language is gone</strong></li><li>Everything is now <strong>integers</strong></li></ul><p><strong>3️⃣ Embedding layer (token IDs → vectors)</strong></p><p>Each token ID is mapped to a <strong>dense vector</strong>, e.g. 4096 numbers.</p><p>Example (simplified):</p><p>12 (“5”) → [0.21, -0.87, 1.33, …] <br>9 (“+”) → [-0.44, 0.02, 0.91, …] <br>13 (“6”) → [0.19, -0.81, 1.41, …]</p><p>Now the input is a <strong>matrix</strong>:</p><p>Sequence length = 6 tokens <br>Embedding size = 4096 <br> <br>→ 6 × 4096 matrix</p><p>✅ Still <strong>no math yet</strong> <br>✅ Just vector representations</p><p><strong>4️⃣ Positional encoding (order awareness)</strong></p><p>The model adds information about <strong>position</strong>:</p><ul><li>Token 0 = “What”</li><li>Token 1 = “is”</li><li>Token 2 = “5”</li><li>Token 3 = “+”</li><li>Token 4 = “6”</li><li>Token 5 = “?”</li></ul><p>This allows the model to know:</p><p>“5 comes before +, which comes before 6”</p><p><strong>5️⃣ Attention layers (this is where “understanding” happens)</strong></p><p>This is the <strong>most important part</strong>.</p><p>Each attention layer does:</p><p><strong>5.1 Create Q, K, V matrices</strong></p><p>For every token vector:</p><ul><li><strong>Query (Q)</strong>: what am I looking for?</li><li><strong>Key (K)</strong>: what do I offer?</li><li><strong>Value (V)</strong>: what information I carry?</li></ul><p><strong>5.2 Attention scores (who looks at whom?)</strong></p><p>The model computes attention scores between <strong>every pair of tokens</strong>.</p><p>Key interactions for this prompt:</p><ul><li>“+” strongly attends to “5” and “6”</li><li>“5” attends to “+”</li><li>“6” attends to “+”</li><li>“What is” attends weakly</li></ul><p>So internally the model learns a pattern like:</p><p>5 → + <br>+ → 5, 6 <br>6 → +</p><p>✅ This is <strong>pattern recognition</strong>, not arithmetic <br>✅ Learned from training data (millions of examples)</p><p><strong>6️⃣ Multiple attention layers (pattern refinement)</strong></p><p>This process repeats <strong>dozens of times</strong> (e.g. 32, 48, 96 layers).</p><p>Across layers:</p><ul><li>Early layers detect <strong>syntax</strong></li><li>Middle layers detect <strong>relationships</strong></li><li>Later layers detect <strong>task intent</strong></li></ul><p>By later layers, the model has a strong internal signal:</p><p>“This is a simple addition question.”</p><p><strong>7️⃣ Feed‑Forward (MLP) layers (feature transformation)</strong></p><p>After attention, each token goes through an MLP:</p><p>Vector → Non‑linear transformation → Vector</p><p>This:</p><ul><li>Strengthens relevant features</li><li>Suppresses irrelevant ones</li><li>Reinforces learned math patterns</li></ul><p><strong>8️⃣ End of prompt processing (internal state ready)</strong></p><p>At this point:</p><ul><li>The model has <strong>no output yet</strong></li><li>It has a <strong>context representation</strong> saying:</li></ul><p>“User wants the result of 5 + 6”</p><p><strong>9️⃣ Output decoding begins (autoregressive generation)</strong></p><p>Now the model starts predicting <strong>one token at a time</strong>.</p><p><strong>9.1 First output token</strong></p><p>The model predicts:</p><p>“11”</p><p>Why?</p><p>Because during training it has seen:</p><ul><li>“What is 2+3?” → “5”</li><li>“What is 7+4?” → “11”</li><li>“What is 5+6?” → “11”</li></ul><p>✅ This is <strong>statistical learning</strong> ✅ Not symbolic calculation</p><p><strong>9.2 Decoding mechanics</strong></p><p>Internally:</p><ul><li>The model computes logits for <strong>all possible tokens</strong></li><li>Applies softmax</li><li>Chooses highest probability token (e.g. 11)</li></ul><p>That token is appended to context.</p><p><strong>🔟 Stop condition</strong></p><p>Once the model predicts:</p><ul><li>“11”</li><li>Possibly followed by an end token</li></ul><p>Generation stops.</p><p><strong>1️⃣1️⃣ Detokenization (tokens → text)</strong></p><p>Final tokens are converted back to text:</p><p>“11”</p><p>✅ This is the <strong>first time English reappears</strong></p><p><strong>✅ Final answer returned to user</strong></p><p>11</p><p><strong>🔍 Key takeaways (important)</strong></p><p><strong>❌ The model does NOT:</strong></p><ul><li>Run arithmetic logic</li><li>Use a calculator</li><li>Execute symbolic math</li></ul><p><strong>✅ The model DOES:</strong></p><ul><li>Recognize <strong>patterns</strong></li><li>Use <strong>attention</strong> to relate numbers</li><li>Predict the <strong>most likely continuation</strong></li></ul><p><strong>⚡ Why math sometimes fails</strong></p><p>If you ask:</p><p>What is 58743 × 98217? (For an example, For the model to fail we need to think of a much bigger number)</p><p>The model may fail because:</p><ul><li>Pattern memory is weaker</li><li>Numbers exceed learned examples</li><li>No true arithmetic engine is used</li></ul><p>(That’s why tools like <strong>function calling / calculators</strong> are added.)</p><p><strong>At this point, you’ve seen — step by step — how an LLM processes a question at a mechanical level; if you’re curious about why these steps work and the theory behind them, the rest of this article dives deeper into the underlying principles.</strong></p><p>1. What is an LLM (in plain terms)</p><p>A <strong>Large Language Model (LLM)</strong> is essentially a very large neural network that has been trained on massive amounts of text to <strong>predict what word (or piece of a word) comes next</strong> in a sequence. In practical terms, you can think of an LLM as an extremely advanced version of a text auto-completion tool. Just like your phone suggests the next word as you type, an LLM like GPT takes a given text prompt and tries to continue it with the most likely next words, based on patterns it learned from training billions of sentences. For example, if it sees the prompt “Once upon a”, it might predict the next word “time” because that phrase frequently occurs in its training data.</p><p><strong>LLMs do not “think” or reason the way humans do.</strong> They don’t have awareness or true understanding of what the text means; they simply generate statistically likely continuations of the input. In other words, an LLM is <strong>not actually intelligent in the human sense</strong> — it doesn’t form opinions or have intentions — it just uses math to produce plausible text. As one researcher famously described, these models are “<strong>stochastic parrots</strong>” that can sound like they understand language, but in reality, they are imitating the patterns of language without grasping the underlying meaning1. Likewise, LLMs do not perform step-by-step logical reasoning or factual lookup in a database; they have <strong>no built-in calculator or internet search</strong> when generating a basic response (unless augmented with external tools). They operate purely by considering your prompt and picking the most statistically suitable continuation based on what they learned during training.</p><p>It’s also important to highlight that <strong>LLMs do not “calculate” information like a human would</strong>. For example, when asked a math question, a person might work out the solution step by step. An LLM has <em>no innate arithmetic skills</em> — it won’t actually add or subtract numbers like we do. Instead, it generates what looks like the answer by drawing on patterns (e.g. it may have seen many questions like “What is 5 + 6?” answered in text with “11”). This can make the model <em>seem</em> smart, but it’s really doing something closer to a sophisticated <strong>form of pattern matching</strong> rather than performing mental math or logical deduction2.</p><p>In summary, an LLM is a <strong>text-prediction machine</strong>: it was created by feeding a neural network an enormous amount of written language and adjusting it so that it gets really good at guessing what words tend to come next. With enough training, the model can produce entire paragraphs or pages of text that often read as if a human wrote them. However, it doesn’t truly <strong>know</strong> things — it doesn’t have beliefs or a worldview — it’s simply learned to mimic the patterns of human language extremely well.</p><p>2. High-Level Architecture Overview</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*otJRhOwh7Q47C8Qce7Su3Q.png" /></figure><p>How do LLMs turn raw text into those coherent answers? Under the hood, everything the model does is based on <em>numbers and mathematical operations</em>. Here’s a high-level overview of the main components and processes inside a GPT-style LLM:</p><ul><li><strong>Tokenization:</strong> The first step is to break input text into tokens (words or sub word pieces). For example, a phrase like “GPT is great!” might be tokenized into something like [“GP”, “T”, “ is”, “ great”, “!”]. The model has a fixed vocabulary of tokens; each token is mapped to a unique numerical ID. <em>(This step is necessary because the model can’t directly deal with raw text — it needs to work with numbers.)</em></li><li><strong>Embedding Layer:</strong> Each token ID is then converted into a vector of numbers known as a <strong>token embedding</strong>. An embedding is essentially a numerical representation of a token’s meaning or context. Think of it as placing each token in a high-dimensional space of numbers where similar tokens (like synonyms, or related words) end up closer together. This allows the model to do math on words — literally, it can “add” and “multiply” these word vectors as it processes language3. After this step, the input text has been transformed into a series of numeric vectors. <strong>Everything from here on is happening in the realm of numbers, not English words.</strong></li><li><strong>Positional Encoding:</strong> Alongside the embeddings, the model adds <em>positional encoding</em> to each vector to encode the order of the tokens. This is basically a way of tagging each word vector with information about its position (1st word, 2nd word, etc.) in the sequence. Position matters in language (“dog bites man” vs. “man bites dog” are very different statements), so the model must have a sense of word order. Positional encoding injects numerical patterns into the embeddings to indicate each token’s position in the sequence4.</li><li><strong>Transformer (Self-Attention Mechanism):</strong> The core of modern LLMs is the Transformer architecture, which is built around the <strong>self-attention mechanism</strong>. Self-attention allows the model to weigh the relevance of each token in the input relative to the other tokens when forming its understanding of the sequence. In practice, the model computes a set of <em>attention scores</em> for each pair of tokens to decide how much one token should pay attention to another. For example, in the sentence “The cat sat on the mat,” the word “cat” might strongly attend to “sat” (to understand what the cat did), and “mat” might get less attention from “cat.” Through self-attention, the model can handle context very effectively, considering all words simultaneously rather than one by one5. Modern Transformers use <em>multi-head attention</em>, meaning they have multiple attention mechanisms focusing on different aspects of the sentence in parallel (e.g., one might focus on grammatical structure, another on semantic meaning, etc.). This parallel attention is one reason that LLMs can capture complex relationships in text.</li><li><strong>Feed-Forward Layers:</strong> After the attention step, the Transformer uses <strong>feed-forward neural network layers</strong> (also called MLP layers) to further process and refine the information for each token6. These are standard neural network layers that take the attention output and transform it in various ways, allowing the model to detect even more complex patterns or features (like idiomatic expressions, syntax, or factual associations) from the data. The Transformer architecture typically consists of many alternating layers of self-attention and feed-forward networks. With each layer, the representation of the text (which is all numeric) becomes richer and more tuned to what the model needs to decide on a response. By the end of these layers, the model has an internal numerical summary of the input’s meaning and context.</li><li><strong>Decoding (Generating the Output):</strong> Once the input text has been processed through all the Transformer layers, the model needs to produce an output. It does this in a probabilistic, step-by-step manner known as <strong>decoding</strong>. Using the final numerical representation of the input (often called the “hidden state”), the model’s output layer computes a probability distribution across all the words (tokens) in its vocabulary for what the next token should be7. It then selects a token (for example, by choosing the highest-probability one). This token is the first word of the model’s output. The model can then take the updated context (original input + newly generated word) and repeat the process to find a next word, continuing this loop until it decides to stop (perhaps when it outputs an end-of-sentence token or a maximum length is reached). This method of generating text one piece at a time is called <strong>autoregressive generation</strong>8. Finally, the sequence of output token IDs is converted back into text (a step called <em>detokenization</em>), producing a fluent answer in English (or whatever the target language is).</li></ul><p>It’s worth emphasizing again that throughout this entire pipeline, the model is manipulating numeric vectors and probabilities. There is no <strong>literal understanding</strong> of words as human-readable concepts inside the model — our language has been converted into sequences of numbers, and all the “thinking” the model does is numerical computation on those vectors. Yet, this process can yield remarkably coherent and relevant text because those vectors and computations encode the vast amount of language patterns the model learned during training.</p><p>3. Important Clarifications about LLMs</p><p>Even with a basic understanding of how LLMs work, some aspects can be counter intuitive. Here are a few <strong>key clarifications</strong> to avoid common misconceptions:</p><ul><li><strong>LLMs rely on pattern prediction, not true understanding.</strong> Large language models generate text via statistical pattern-matching on their training data, not by <strong>truly understanding</strong> or reasoning about meaning. One researcher famously dubbed them “stochastic parrots” — they echo patterns in human language without grasping the actual <em>meaning</em> behind the words9. This is why an LLM can produce a very coherent answer that <em>sounds</em> knowledgeable, even if it has no real-world understanding or factual grounding of the topic.</li><li><strong>They aren’t performing real math or logical reasoning.</strong> When you ask an LLM a math problem or a logical question, it doesn’t internally <em>calculate</em> the answer like a person or a calculator would. The model has no dedicated module for arithmetic or symbolic logic. Instead, it generates what seems to be a solution by using the patterns it learned from text data10. For instance, it might know that “5 + 6 = 11” because it has seen lots of trivial addition facts written out in its training texts — but it won’t reliably multiply 347 × 892, since it never learned to <em>actually do multiplication</em>. It’s guessing the answer based on examples, not computing it by rules.</li><li><strong>Token IDs are not the same as numeric values.</strong> Inside the model, a token like “5” is treated as a word token, not the number five itself. The token gets converted into an arbitrary numeric ID and then into a vector of features; the model doesn’t intrinsically know that this token represents a quantity of <strong>five</strong>. In other words, the model doesn’t have built-in knowledge that the symbol “6” refers to a value one greater than “5” — it only learns from how those symbols are used in text. Thus, it lacks a true understanding of mathematical operations and has to rely purely on learned textual patterns to answer math questions11.</li></ul><p>4. Why LLMs Solve <em>Small</em> Math but Fail on <em>Big</em> Math</p><p>If LLMs aren’t really doing math, why do they <em>sometimes</em> get math questions right at all? The answer lies in the data and patterns:</p><ul><li><strong>Frequent simple patterns:</strong> For <strong>simple arithmetic or common facts</strong>, LLMs often succeed because those exact patterns were present in their training data. For example, the model likely saw many instances of basic additions like “5 + 6 = 11” or “2 + 2 = 4” in its training corpus. So when asked a straightforward question like “What is 5 + 6?”, the LLM recalls the familiar pattern “5 + 6 = 11” and outputs “11” as the answer12. It’s not “doing” addition; it’s reproducing the pattern of a question followed by its answer, as learned from examples.</li><li><strong>Rare or complex calculations:</strong> For more complicated or larger math problems, however, the required patterns either appear very infrequently in the training data or not at all. The LLM hasn’t memorized the answers to something like “7395 + 2811” or “What’s the square root of 847?” because such specific combinations are uncommon. Without a memorized pattern to fall back on, the model is essentially <strong>guessing</strong> based on whatever related data it has seen. Often, its guess will be wrong or inconsistent, because there’s no simple, frequent pattern for it to mimic in these cases. In short, <strong>LLMs lack the reliable, step-by-step problem-solving ability that math requires</strong>, so their performance on mathematics deteriorates as the problems stray from familiar examples13. (Researchers are exploring solutions to help models with math, like integrating separate calculator tools or teaching the model to follow step-by-step reasoning, but pure LLMs still struggle with complex or large-scale arithmetic.)</li></ul><p>5. Summary</p><p>Large language models like GPT operate by converting language into math (numbers) and then using those numbers to generate language again. They break down input text into tokens and turn those tokens into numerical vectors, which are processed through many layers of a Transformer neural network. The Transformer’s self-attention and feed-forward layers allow the model to spot patterns and relationships in the text and build up a useful representation of the input. Finally, the model produces output by <em>predicting one token at a time</em> — essentially, choosing the most probable next word based on what it has seen in training14. This approach lets LLMs generate impressively fluent and contextually relevant responses <strong>without any genuine understanding or calculation</strong> in the human sense15. They are powerful tools for generating text and answering questions based on patterns in data, but it’s important to remember that under the hood they are manipulating probabilities and vectors, not actually contemplating meanings or doing step-by-step reasoning like a person would.</p><p>LLM Mental Model: Pattern Prediction, Not Calculation</p><p>To visualize this concept, imagine the LLM’s workflow as an <strong>assembly line or conveyor belt of language processing</strong>. The model moves your input through a series of stages that transform it and produce an output, much like parts moving through a factory. At each stage, different operations are applied, but none of these operations involve human-style thinking — it’s all pattern processing. The illustration below outlines this mental model:</p><p>In short, an LLM like GPT is <strong>not actually “thinking” or doing math</strong> — it’s relentlessly <em>predicting what comes next</em> based on patterns of language. This process, powered by huge amounts of data and sophisticated neural network architecture, is what enables large language models to generate human-like text step by step.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=c1a306c6c118" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[The 6 Rules to Survive and Shine in the AI Era]]></title>
            <link>https://medium.com/@shashikanta.p/the-6-rules-to-survive-and-shine-in-the-ai-era-58273f3dd65f?source=rss-172722232f06------2</link>
            <guid isPermaLink="false">https://medium.com/p/58273f3dd65f</guid>
            <dc:creator><![CDATA[Shashikanta Parida]]></dc:creator>
            <pubDate>Sat, 31 Jan 2026 06:18:17 GMT</pubDate>
            <atom:updated>2026-01-31T06:52:03.695Z</atom:updated>
            <content:encoded><![CDATA[<p>“<strong><em>AI is going to replace you</em></strong>”</p><p>You’ve heard this everywhere.</p><p>At conferences.<br> On LinkedIn.<br> In team meetings.</p><p>This has become a defining fear of our times. Scroll through social media or attend any professional event and you’ll hear it repeated with certainty. But fear rarely survives contact with facts.</p><p>Every few decades, a technology arrives that doesn’t just change jobs — it changes <strong>how work itself is valued</strong>.</p><p>Artificial Intelligence is one such moment. So, The more accurate statement should be:</p><blockquote><strong><em>“</em>AI will replace the version of you that refuses to evolve.</strong><br> It will not replace someone who upgrades intentionally<em>.”</em></blockquote><h3>Is AI Really Killing Jobs? The Data Tells a Different Story</h3><p>If AI were truly creating a jobless future, we would see a widespread collapse in hiring across major companies. That hasn’t happened.</p><p>Instead, hiring has <strong>shifted away from repetitive execution and toward high‑leverage roles</strong>.</p><p>Below is a consolidated snapshot of <strong>net workforce additions</strong> across major technology and consulting organizations.</p><blockquote>Note: Companies don’t publish real‑time hiring counts. These figures are realistic estimates based on annual reports, earnings calls, and workforce analytics.</blockquote><h3>Net Job Additions (2024 → 2025 → Early 2026)</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*X7UQIHRIylUmpMcaSTQwRA.png" /><figcaption>Net Jobs added by companies</figcaption></figure><p><strong>The conclusion is unavoidable:</strong><br> Hiring continues — but not for the same roles as before.</p><h3>Why It Feels Like Jobs Are Disappearing</h3><p>The fear comes from a mix of <strong>layoffs, automation headlines, and role obsolescence</strong>. But these are not signs of work disappearing — they are signs of <strong>work moving up the value chain</strong>.</p><h3>Roles AI Is Most Likely to Replace</h3><p>Jobs centered on <strong>pure execution</strong>, where success means following instructions precisely, are increasingly vulnerable:</p><ul><li>Manual data entry</li><li>Basic quality assurance and repetitive testing</li><li>Tier‑1 customer support</li><li>Generic content production</li><li>Task-only roles with no ownership or judgment</li></ul><p>If a role can be:</p><ul><li>Clearly specified</li><li>Repeated endlessly</li><li>Automatically verified</li></ul><p>Then AI will eventually perform it faster and cheaper.</p><h3>Roles AI Struggles to Replace</h3><p>In contrast, demand is growing for work that requires <strong>context, judgment, and accountability</strong>:</p><ul><li>AI and data engineers</li><li>Cloud and platform architects</li><li>Cybersecurity professionals</li><li>Product managers with technical depth</li><li>Consultants who translate business problems into technical solutions</li><li>Leaders, mentors, and decision-makers</li></ul><p>AI doesn’t reduce the need for these professionals — it <strong>increases their leverage</strong>.</p><h4>Putting it together:</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*1sLtwBWjyaEtPZ5Dzfe4Hw.png" /></figure><h3>Where Job Demand Is Headed</h3><p>Over the next decade, demand will concentrate around:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1000/1*hte49ibgg8IA-AZSQXKozg.png" /></figure><ul><li>AI integration (not just AI research)</li><li>Cloud, data, and platform engineering</li><li>Security, compliance, and governance</li><li>Business transformation and consulting</li><li>Human‑AI collaboration roles</li><li>Ownership-heavy positions near decision-making</li></ul><p>The implication is clear:<br> <strong>Work is not disappearing; low‑leverage work is.</strong></p><h3>The Reality (First, Accept This)</h3><p>We are moving into a world where:</p><ul><li>Knowledge is abundant</li><li>Tools are accessible</li><li>Average performance is automated</li></ul><p>The economy is no longer built to reward “doing exactly what you’re told.” It rewards people who <strong>frame problems, exercise judgment, and take ownership of results</strong>.</p><p>Once you accept this reality, the path forward becomes clearer.</p><h3>The 6 Rules to Survive and Shine in the AI Era</h3><h3>1. Stop Defining Yourself by a Job Title</h3><p>Job titles are temporary abstractions. Problems are permanent.</p><p>“I’m a Java developer” is fragile.<br> “I help build systems that scale reliably” is resilient.</p><p>People who last are known not for what they <em>are</em>, but for what they <strong>solve</strong>.</p><h3>2. Become AI‑Augmented, Not AI‑Dependent</h3><p>Successful professionals don’t outsource thinking to AI.</p><p>They use AI to:</p><ul><li>Draft</li><li>Analyze</li><li>Accelerate learning</li></ul><p>But they retain ownership of:</p><ul><li>Judgment</li><li>Decisions</li><li>Accountability</li></ul><p>AI provides speed. Humans provide wisdom.</p><h3>3. Stack Skills — Single Skills Are a Risk</h3><p>This era rewards <strong>rare combinations</strong>, not isolated excellence.</p><p>Technology plus business understanding.<br> Data plus decision-making capacity.<br> Engineering plus communication.</p><p>The future belongs to professionals who are <strong>useful in more than one dimension</strong>.</p><h3>4. Move Closer to Decision-Making</h3><p>People far from decisions are interchangeable.<br> People close to decisions are indispensable.</p><p>Survival means moving toward:</p><ul><li>Problem framing</li><li>Client conversations</li><li>Architecture and planning</li><li>Responsibility for outcomes</li></ul><p>The closer you are to <em>why</em> decisions are made, the safer you are.</p><h3>5. Make Your Value Visible</h3><p>Excellence without visibility no longer protects you.</p><p>Visibility isn’t self-promotion. It’s <strong>clarity of impact</strong>.</p><p>Share insights.<br> Document learning.<br> Help others think better.</p><p>Be known for creating understanding — not just completing tasks.</p><h3>6. Play the Long Game</h3><p>Most people optimize for:</p><ul><li>Quick promotions</li><li>Immediate comfort</li><li>Title inflation</li></ul><p>People who thrive think in <strong>five‑ to ten‑year arcs</strong>.</p><p>They care about:</p><ul><li>Compounding knowledge</li><li>Depth of understanding</li><li>Skills that age well</li></ul><p>Critical thinking, systems thinking, communication, leadership, and ethics outlast tools and trends.</p><h3>A quick self‑check (be honest)</h3><h4><em>Answer YES to at least 4:</em></h4><ul><li>I use AI weekly in my work</li><li>I understand <em>why</em> my work matters</li><li>I can explain business impact, not just tasks</li><li>I am learning faster than my peers</li><li>I can switch tools without fear</li><li>People come to me for help or clarity</li></ul><p><strong>If not — that’s your starting point.</strong></p><h3>The Final Truth</h3><p>AI is not ending careers.</p><blockquote><strong><em>It is ending average careers.</em></strong></blockquote><p>For those willing to adapt, learn, and take ownership, this era is not a threat — it is one of the <strong>most opportunity‑rich periods in modern professional history</strong>.</p><p>The future belongs not to humans or AI — <br> but to humans working intelligently with AI.</p><p>💬 <strong>Curious — which rule resonated most with you?<br> Drop the number in comments</strong> 👇</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=58273f3dd65f" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[ When AI said “meh” to my pencil sketch but “wow” to my watercolor fantasy]]></title>
            <link>https://medium.com/@shashikanta.p/when-ai-said-meh-to-my-pencil-sketch-but-wow-to-my-watercolor-fantasy-a08f634213c7?source=rss-172722232f06------2</link>
            <guid isPermaLink="false">https://medium.com/p/a08f634213c7</guid>
            <dc:creator><![CDATA[Shashikanta Parida]]></dc:creator>
            <pubDate>Sat, 06 Sep 2025 08:38:46 GMT</pubDate>
            <atom:updated>2025-09-06T08:38:46.378Z</atom:updated>
            <content:encoded><![CDATA[<p>From Scribbles to Splendor: How My Imaginary Watercolor Outsmarted My Sketch</p><h3>🏔️ The Quest Begins: Sketch vs. Reality</h3><p>It all started with a humble pencil sketch — a jagged mountain range, a cascading stream, a few trees clinging to rocky slopes, and some misty clouds for drama. I handed it over to Bing’s image generation tool, hoping it would conjure a photorealistic masterpiece.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*nwPVeUO3slUgLYJk" /><figcaption>The Sketch</figcaption></figure><p>Instead, what I got was… well, let’s call it “interpretive minimalism.” The sketch, though rich in imagination, lacked the visual cues Bing needed to build a realistic scene. It was like giving a chef a shopping list that just says “food.”</p><p>What did Bing copilot transformed it into:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/959/1*ZmCiYuo2mOaeeHk8QdbiWA.png" /><figcaption>Bing Created this from my sketch :-o</figcaption></figure><p>So I pivoted.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*0J_U5jtQHciqASiE" /><figcaption>The Watercolor painting of the sketch i shared</figcaption></figure><p>I pulled out a watercolor painting I’d done — same concept, but this time with color, depth, and mood. Snow-capped peaks, lush valleys, a winding stream, and wildflowers dancing in the breeze. I uploaded it, crossed my fingers …</p><p>… and boom 💥 — Bing delivered a stunningly realistic image that looked like it belonged on a travel brochure.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/997/1*ZWbGOOS2Nwv8GgVZdlfpyQ.png" /><figcaption>Stunning Image that Bing copilot created</figcaption></figure><p>Full view of the picture … (Flawless)</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*zxkMvDIRdmR6llnl.png" /><figcaption>Can you find a Flaw ???</figcaption></figure><p>Though the direction of light and shadow changed, But I assume it’s the creativity. (May be When I sketched it was morning but by the time Bing imagined it was evening ;) )</p><h3>🧠 Why the Sketch Flopped (and the Painting Floated)</h3><p>Let’s break it down:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*WVB57OzP8E6-JhmwMrADmg.png" /></figure><p><strong>In short:</strong> The sketch was a blueprint. The painting was a story.</p><p>AI tools like Bing rely on visual signals — color gradients, spatial relationships, and texture — to infer realism. A sketch, especially one without shading or clear perspective, leaves too much to guesswork. But a watercolor, even if imaginary, provides enough context for the AI to build a believable world.</p><h3>🌊 The Grand Finale: Mountains Meet the Sea</h3><p>Inspired by the success of the watercolor, I kept going. I asked Bing to extend the scene — add a river, a waterfall, and finally, a sea where the stream merges into the horizon. Each step added more realism, more emotion, and more awe.</p><p>Though it failed to add a Sea but, Hey …. This is just a beginning …</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/941/1*sg9xLen2eIZvm7PqMLOklw.png" /></figure><p>What began as a pencil sketch became a full-blown visual journey: from alpine peaks to coastal serenity. And all it took was a splash of color and a little imagination.</p><h3>✨ Moral of the Story?</h3><p>Sometimes, the most “realistic” things are born from fantasy. And sometimes, AI just needs a little watercolor to see the bigger picture.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=a08f634213c7" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Modernizing the SDLC process with Agentic AI]]></title>
            <link>https://medium.com/data-science-at-microsoft/modernizing-the-sdlc-process-with-agentic-ai-8330163bca29?source=rss-172722232f06------2</link>
            <guid isPermaLink="false">https://medium.com/p/8330163bca29</guid>
            <category><![CDATA[ai]]></category>
            <category><![CDATA[sdlc]]></category>
            <category><![CDATA[microsoft]]></category>
            <category><![CDATA[agentic-ai]]></category>
            <category><![CDATA[genai]]></category>
            <dc:creator><![CDATA[Shashikanta Parida]]></dc:creator>
            <pubDate>Tue, 12 Aug 2025 07:17:05 GMT</pubDate>
            <atom:updated>2025-08-12T07:17:05.062Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Yi3eeCFX38bieOXIKZUi8w.png" /><figcaption>Illustration created with Microsoft 365 Visual Image Creator.</figcaption></figure><p>This article introduces a groundbreaking framework aimed at transforming the Software Development Life Cycle (SDLC) through the integration of Agentic AI. As an architectural concept, it seeks validation and refinement, emphasizing how SDLC processes can gradually evolve to leverage autonomous AI systems effectively. The article explores how this proposed architecture prioritizes collaboration between humans and AI while fostering innovation, efficiency, and agility in software development practices.</p><h3>Expectations for progress</h3><p>Implementing Agentic AI within the SDLC is not a rapid undertaking; it is a meticulous process that demands vision, patience, and investment. Over time, this framework promises to revolutionize product delivery, unlocking new levels of efficiency and precision without compromising creativity or quality. By redefining how collaborative workflows and autonomous operations are balanced, the model addresses the challenges of modern development environments while inspiring future innovation.</p><h4>Inspirational insights</h4><p>In the words of Leo Tolstoy:</p><p><em>“The two most powerful warriors are patience and time.”</em></p><p>Investing time and effort into this transformative approach ensures not just progress but the enduring impact of a revolutionized development cycle.</p><h4>A revolutionary vision</h4><p>This article is meant to be more than a technical brief; it aims to be a testament to how organizations can embrace cutting-edge AI technologies to redefine traditional processes. By investing in an Agentic approach, development teams can shape the future of SDLC, yielding both immediate improvements and long-term benefits.</p><h3>SDLC process architecture with AI integration</h3><h4>High-level architecture</h4><p>The proposed SDLC optimization framework incorporates three distinct actor types:</p><ul><li><strong>Human activities</strong> (purple components): Tasks requiring human judgment, creativity, and final decision-making.</li><li><strong>Human-AI interactions</strong> (black components): Collaborative touchpoints among development teams and AI systems.</li><li><strong>AI agent operations</strong> (blue components): Autonomous AI-driven processes that execute specific SDLC tasks.</li></ul><p>Additionally,<strong> exploratory capabilities</strong> (orange components) are shown, which are future-oriented AI capabilities being researched and developed.</p><h4>Detailed flow diagram</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*pOhV34AddL20uFWEKGn8EA.png" /><figcaption>Figure 1: Detailed SDLC design diagram.</figcaption></figure><h3>Key AI agents in the SDLC ecosystem</h3><p>The architecture leverages specialized AI agents for each phase that operate throughout the development lifecycle and the framework that governs them.</p><p>Throughout each phase of the SDLC, specialized AI agents are developed to automate tasks such as requirement extraction, system design, code generation, testing, deployment, and monitoring. Each agent leverages advanced Azure AI services tailored to its role, ensuring efficiency and accuracy in its domain. Ultimately, a Core Orchestrator Agent is established to oversee and coordinate the entire workflow, integrating all agents, maintaining project consistency, and ensuring seamless collaboration across every stage of the development lifecycle.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*diRK06yT-3-mVmWH61dWLw.png" /><figcaption>Figure 2: SDLC Workflow orchestration. This image was created using Microsoft <a href="https://appsource.microsoft.com/en-us/product/office/wa200008387?tab=overview">Visual Creator</a>, and contains a minor misspelling.</figcaption></figure><h4><strong>SDLC Agentic AI framework: A comprehensive agent and model matrix</strong></h4><p><strong>Note</strong>: In the fast-paced AI development arena, the models listed below might feature upgrades and other changes.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*YIB_dyUG3wumxAJGne_a0w.png" /></figure><p>We’ll discuss individual Agents and at last the Core Agent in detail but in this section, I wanted to call out the importance of the <strong>central orchestrator,</strong> which acts as the brain and CPU driving the end-to-end process. The Core SDLC Agent acts as the central orchestrator for the entire AI-driven SDLC framework. It is responsible for coordinating all specialized agents across each phase — requirements, design, implementation, testing, deployment, and monitoring.</p><h3>SDLC workflow with AI integration deep dive</h3><p>This section outlines four phases: Requirements gathering and analysis, technical specification development, development and testing, and deployment and monitoring.</p><h4>Phase 1: Requirements gathering and analysis</h4><p>Note: This phase talks about a single AI agent</p><p><strong>Human-led processes:</strong></p><ul><li>Review and enrichment of requirements</li><li>Prioritization of features</li><li>Final requirements approval</li></ul><p><strong>AI agent operations:</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*x6FVUY4ppLO8JClQJ6rWyw.png" /><figcaption><strong>Table: Requirement analysis</strong></figcaption></figure><p>During the requirements analysis phase, specialized AI agents — such as Information Extraction Agents and Natural Language Understanding Agents — utilize advanced models like Azure OpenAI GPT-4, Azure AI Language, and Azure Cognitive Services to process documents, meeting recordings, and stakeholder feedback. Their primary role is to extract, structure, and organize requirements, transforming unstructured data into well-defined business requirements documents (BRDs) that provide a strong foundation for subsequent phases of technical specification and implementation.</p><p>The Document AI/PM Assistant automatically transforms meeting transcripts into structured requirements, significantly reducing documentation time while maintaining consistency in requirement formatting.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*v8uCeSleIImxtUJUKhP1og.png" /><figcaption>Figure 3: PM Assistant flow diagram</figcaption></figure><p><strong>Sequence diagram: PM Assistant</strong></p><p>To provide an idea of the control flow, here is the sequence diagram:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*tKbesZcDi4-_eFcBok6PBA.png" /></figure><h4>Phase 2: Technical specification development (Tech Lead Assistant)</h4><p>The Engineering Assistant creates detailed technical specifications directly from approved requirements, ensuring complete traceability between business needs and technical implementation.</p><p><strong>Design AI Agent</strong></p><p>The AI Agent is responsible for <strong>generating content</strong> — in this case, the <strong>initial draft of the technical specification</strong> based on the BRD.</p><p><strong>Azure AI model used:</strong></p><ul><li><strong>Azure OpenAI (GPT-4 or GPT-4 Turbo)</strong></li></ul><p><strong>Engineering Assistant</strong></p><p><strong>Role:</strong><br>The Engineering Assistant is focused on <strong>analyzing and validating</strong> the content generated by the AI Agent. It ensures <strong>alignment with business requirements</strong> and <strong>technical accuracy</strong>.</p><p><strong>Azure AI model used:</strong></p><ul><li><strong>Azure AI Language (Text Analytics + Custom NER)</strong></li></ul><p><strong>AI Models and their role:</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*009pyFsz-Z6_IdhZpVRSoQ.png" /></figure><p><strong>Sequence diagram Technical Designer</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/969/1*8gAWsopph-LlvgWAK5ew_Q.png" /><figcaption>Sequence diagram Technical Designer</figcaption></figure><h4>Phase 3: Development and testing (Developer Assistant)</h4><p><strong>Human-led processes:</strong></p><ul><li>Definition of scope for code modification</li><li>Creation of a new branch for AI edits</li><li>Code review and modification requests</li><li>Testing validation and acceptance</li></ul><p><strong>AI agent operations:</strong></p><ul><li>Inputting technical specifications document or Change document</li><li>Identifying changes</li><li>Making changes</li><li>Compiling and fixing errors and issues</li><li>Generation or modification of code base from technical specifications</li><li>Writing unit test cases</li><li>Deployment and test in Lower Environment</li><li>Pulling request creation on success</li><li>Testing results analysis and improvement recommendations</li></ul><p>The Engineering Assistant manages two phases, and it not only generates implementation code but also provides feedback loops that highlight potential issues before human review begins.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*WPQwcnMpzLKp8KHKBCUO6Q.png" /></figure><p>During the Implementation phase, code generation and optimization agents such as GitHub Copilot, Azure OpenAI Codex, Azure DevOps AI, IntelliCode, and Azure Machine Learning assist in generating code, promoting code reuse, and optimizing resource efficiency based on technical specifications. In the Testing phase, test generation and QA automation agents like Azure OpenAI GPT-4, Azure DevTest Labs AI, Azure Load Testing AI, Azure Application Insights, and Azure Monitor automate the creation and execution of various tests, ensuring quality assurance and performance through test generation, execution, and results analysis.</p><p><strong>Developer Assistant</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/831/1*7scA0_k4GyMtvd0fwUkYaQ.png" /><figcaption>Sequence diagram: Developer Assistant</figcaption></figure><h4>Phase 4: Deployment and monitoring</h4><p><strong>Human-led processes:</strong></p><ul><li>Deployment plan finalization</li><li>Production validation</li></ul><p><strong>AI Agent operations:</strong></p><ul><li>Feature deployment in controlled environments</li><li>Performance monitoring</li><li>Log analysis and issue identification</li><li>Improvement of opportunity generation</li></ul><p>The DRI/Support Assistant monitors deployed applications, identifies issues through telemetry analysis, and provides actionable insights for continuous improvement.</p><p><strong>Note</strong>: In fast-paced AI development arena, the models given might get upgrades.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*EY1uuR3jYzOuj3z5n0vPGg.png" /></figure><p>In the Deployment and Monitoring stages, AI-powered agents automate and streamline the deployment of features in controlled environments, ensuring production readiness and operational consistency. Key activities include finalizing deployment plans, validating production systems, and conducting performance monitoring. The stage leverages advanced tools such as Azure DevOps AI Pipelines, Application Insights AI, and Azure Monitor to track application health, detect anomalies, and optimize resources. Through continuous log analysis and feedback aggregation, the system identifies improvement opportunities, maintains high-quality releases, and lays a strong foundation for the subsequent development of the core agent architecture.</p><h3>Building the Core Agent</h3><p>This is the main backbone of this concept, in which we build a powerful orchestrator to manage each phase and agents. The focus shifts to constructing the Core Agent, the essential part that empowers all specialized agents within the Agentic SDLC framework. This phase is pivotal: It establishes the standardized infrastructure that enables consistency, scalability, and security across the entire AI-driven development lifecycle.</p><h4><strong>Core SDLC Agent</strong></h4><p>Orchestration Agent, Workflow Management Agent, Integration Agent</p><ul><li>Azure OpenAI GPT-4 (workflow reasoning)</li><li>Azure Logic Apps AI</li><li>Azure Service Bus (intelligent routing)</li><li>Azure Functions (AI-triggered)</li><li>Azure API Management (AI policies)</li></ul><p><strong>How to build the Orchestrator:</strong></p><ul><li>Start with a robust base class that all domain-specific agents inherit from. This ensures shared services like logging, error handling, and performance monitoring are consistent across the ecosystem.</li><li>Integrate with Azure cloud services for secure authentication (using Managed Identity), secret management (via Key Vault), and comprehensive monitoring (using Application Insights).</li><li>Define standardized communication protocols for inter-agent messaging, ensuring reliable message queuing, audit trails, and seamless agent interoperability.</li><li>Embed performance and reliability features such as structured logging, automatic failover, and retry logic to ensure robust, resilient operation.</li></ul><p><strong>How to assign and operate:</strong></p><ul><li>The orchestrator manages workflow state, assigns tasks to the appropriate specialized agents, and tracks progress across all SDLC phases.</li><li>It maintains project context, ensures data consistency, and provides unified reporting and analytics.</li><li>The orchestrator can escalate issues or require human intervention when necessary, ensuring both automation and oversight.</li><li>As new agents or phases are added, the orchestrator’s protocols and base services allow for easy integration and scaling.</li></ul><h3>Designing the Base Agent foundation</h3><p>The Core Agent begins as a robust base class from which all domain-specific AI agents inherit their characteristics. This foundation offers shared services such as logging, error handling, and performance monitoring, ensuring a unified operational standard across the ecosystem. By centralizing these crucial features, the framework not only eliminates code duplication but also streamlines long-term maintenance.</p><ul><li><strong>Consistency:</strong> All agents adhere to the same protocols for monitoring, exceptions, and reporting.</li><li><strong>Maintainability:</strong> Updates or improvements to foundational services propagate automatically to all agents.</li></ul><h3>Integrating with the Cloud</h3><p>A cornerstone of the Core Agent’s architecture is its seamless integration with cloud services, specifically, Microsoft Azure. This integration leverages cloud-native features for authentication, security, monitoring, and secret management.</p><ul><li><strong>Secure Authentication:</strong> The Core Agent utilizes Azure Managed Identity, eliminating the need for embedded credentials and simplifying access control.</li><li><strong>Secret Management:</strong> Sensitive information is managed via Azure Key Vault, ensuring enterprise-grade confidentiality.</li><li><strong>Comprehensive Monitoring:</strong> Azure Application Insights provides deep telemetry, making it easy to track agent health, usage, and performance in real time.</li></ul><h3>Establishing communication protocols</h3><p>To enable effective orchestration, the Core Agent defines the protocols for inter-agent communication. This standardization is vital for maintaining data consistency, traceability, and reliability throughout the SDLC.</p><ul><li><strong>Message queuing:</strong> Reliable message delivery and queueing mechanisms prevent data loss, even under heavy load.</li><li><strong>Audit and compliance:</strong> All communications are logged, providing a detailed audit trail for debugging and regulatory requirements.</li><li><strong>Interoperability:</strong> Clearly defined protocols allow new agents to be introduced seamlessly, fostering flexibility as the system evolves.</li></ul><h3>Ensuring performance and reliability</h3><p>At its core, the agent framework incorporates mechanisms for monitoring and enhancing performance. Features such as structured logging, automatic failover, and retry logic are embedded to ensure robust operation and minimize downtime.</p><ul><li><strong>Performance tracking:</strong> Built-in tools highlight inefficiencies and bottlenecks, guiding continuous optimization.</li><li><strong>Resilience:</strong> The system gracefully handles errors and recovers from failures without manual intervention.</li></ul><h3>Business value delivered</h3><p>The construction of the Core Agent translates into tangible benefits for organizations:</p><ul><li><strong>Operational efficiency:</strong> Pre-built infrastructure accelerates agent development and deployment, while centralized services reduce overhead.</li><li><strong>Security and compliance:</strong> Uniform security practices fortify the environment and support regulatory adherence.</li><li><strong>Scalability:</strong> The architecture supports horizontal scaling and easy integration of new agents as needs evolve.</li><li><strong>Cost optimization:</strong> Resource efficiency and code reuse drive down both development and operational expenditures.</li></ul><h4><strong>Other value adds</strong></h4><ul><li>Accelerates development and deployment by automating coordination and reducing manual overhead.</li><li>Ensures security, compliance, and operational consistency across the SDLC.</li><li>Supports scalability and cost optimization through efficient resource management and code reuse.</li></ul><p><strong>Sample data model using Cosmos collection</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*74ifKqpOPE_x4QelH-oXoA.png" /><figcaption>Figure 4: Data model for SDLC Core Agent (sample). Believe it or not this data model image was created by Microsoft 365 Visual Creator!!!</figcaption></figure><h3>A “Hello World” of Agentic SDLC</h3><p>As part of the application of Agentic AI in real-world scenarios, I recently developed a simple HTML report from a meeting transcript. This exercise served as a demonstration of how AI can streamline tasks like summarizing discussions and converting them into structured formats. By leveraging AI Agents, I was able to efficiently extract key points and translate them into actionable, visually organized reports.</p><p>In my next article, I’ll dive deeper into this demo, showcasing the methodology used to generate the HTML code step by step and the benefits of adopting AI in transforming raw information into polished outputs.</p><p><strong>Note:</strong> It took multiple Iterations to arrive at the final output.</p><p>Meeting transcript:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*2-wN8CqOfBG0Q-0Hu7hlZw.png" /></figure><p><strong>AI-generated report:</strong></p><p>This is the output I got by using only AI Agents prompt and zero coding.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*nHfaUT_LQnCAlDeoko4JgQ.png" /></figure><h3>Conclusion</h3><p>Agentic AI represents a paradigm shift in software development methodologies. By strategically implementing AI agents throughout the SDLC, organizations can achieve significant efficiency gains while improving quality and consistency. The framework presented here provides a roadmap for integrating AI into existing development processes while maintaining appropriate human oversight for critical decisions.</p><p><em>Shashikanta Parida is on </em><a href="http://www.linkedin.com/in/shashikanta-parida-04a51953"><em>LinkedIn</em></a>.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=8330163bca29" width="1" height="1" alt=""><hr><p><a href="https://medium.com/data-science-at-microsoft/modernizing-the-sdlc-process-with-agentic-ai-8330163bca29">Modernizing the SDLC process with Agentic AI</a> was originally published in <a href="https://medium.com/data-science-at-microsoft">Data Science + AI at Microsoft</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Solving the DFS Algorithm Using SQL: Three Approaches]]></title>
            <link>https://medium.com/@shashikanta.p/solving-the-dfs-algorithm-using-sql-three-approaches-275c671fb640?source=rss-172722232f06------2</link>
            <guid isPermaLink="false">https://medium.com/p/275c671fb640</guid>
            <category><![CDATA[algorithms]]></category>
            <category><![CDATA[depth-first-search]]></category>
            <category><![CDATA[sql]]></category>
            <category><![CDATA[sql-tips]]></category>
            <dc:creator><![CDATA[Shashikanta Parida]]></dc:creator>
            <pubDate>Mon, 12 Aug 2024 08:38:36 GMT</pubDate>
            <atom:updated>2024-08-12T08:38:36.706Z</atom:updated>
            <content:encoded><![CDATA[<p>In this blog post, we will explore how to implement the Depth First Search (DFS) algorithm using SQL. Sound unusual?</p><p>We will cover three approaches: one using recursion and the other without recursion.<br>Let’s take a look at sample dataset :</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1002/0*plo6ZvUtvwnF7l2G" /></figure><p><strong>Approach 1: Using Recursion</strong><br>The first method leverages SQL’s recursive Common Table Expressions (CTEs) to perform DFS. Here’s how to achieve that:<br>Step 1: Create a Table to Hold Nodes and Their Connections</p><p>CREATE TABLE Tree ( ParentNode INT,ChildNode INT );</p><p>This table represents the hierarchical structure or the graph.<br>Step 2: Insert Sample Data into the Graph</p><p>INSERT INTO Tree (ParentNode, ChildNode)</p><p>VALUES (null, 1),(1, 2),(1, 3),(2, 4),(2, 5),(3, 6),(3, 7),(4, 8),(4,9),6, 10),(6, 11),(7, 12);</p><p>We populate the table with nodes and their respective children.<br>Step 3: Implementing DFS Using Recursive CTE</p><p>WITH DFS AS (</p><p>SELECT ParentNode, ChildNode, CAST(ChildNode AS VARCHAR(MAX)) AS Path</p><p>FROM Tree</p><p>WHERE ParentNode IS NULL -- Starting node</p><p>UNION ALL</p><p>SELECT g.ParentNode, g.ChildNode, CAST(d.Path + &#39;|&#39; + CAST(g.ChildNode AS VARCHAR(MAX)) AS VARCHAR(MAX))</p><p>FROM Tree g</p><p>INNER JOIN DFS d ON g.ParentNode = d.ChildNode</p><p>)</p><p>SELECT * FROM DFS ORDER BY Path;</p><p><strong>Result:</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/759/0*sk4yRv90RUcANB0k" /></figure><p>Here, we define a recursive CTE named DFS. The base part of the CTE selects the starting node, which has no parent. The recursive part joins the Tree table to itself, traversing the nodes and building the path.</p><p><strong>Approach 2: Without Using Recursion</strong><br>The second method avoids recursion by utilizing a temporary stack table to implement DFS iteratively.<br><strong>Step 1:</strong> Create a Temporary Table to Act as a Stack</p><p>CREATE TABLE #Stack (Node INT,ParentNode INT,Path VARCHAR(MAX));</p><p>This table simulates the stack used in DFS.</p><p><strong>Step 2: </strong>Insert the Root Node into the Stack</p><p>INSERT INTO #Stack (Node, ParentNode, Path)</p><p>SELECT ChildNode, ParentNode, CAST(ChildNode AS VARCHAR(MAX))</p><p>FROM Tree</p><p>WHERE ParentNode IS NULL;</p><p>We initiate the stack with the root node.<br><strong>Step 3:</strong> Create a Table to Store the Result</p><p>CREATE TABLE #Result (Node INT,ParentNode INT,Path VARCHAR(MAX));</p><p>This table will store the traversal result.<br><strong>Step 4: </strong>Implement the DFS Loop</p><p>WHILE EXISTS (SELECT 1 FROM #Stack)</p><p>BEGIN</p><p>-- Pop the top node from the stack</p><p>DECLARE @Node INT;</p><p>DECLARE @ParentNode INT;</p><p>DECLARE @Path VARCHAR(MAX);</p><p>SELECT TOP 1 @Node = Node, @ParentNode = ParentNode, @Path = Path</p><p>FROM #Stack</p><p>ORDER BY Node DESC;</p><p>DELETE FROM #Stack</p><p>WHERE Node = @Node;</p><p>-- Insert the node into the result table</p><p>INSERT INTO #Result (Node, ParentNode, Path)</p><p>VALUES (@Node, @ParentNode, @Path);</p><p>-- Push all children of the node onto the stack</p><p>INSERT INTO #Stack (Node, ParentNode, Path)</p><p>SELECT ChildNode, ParentNode, @Path + &#39;|&#39; + CAST(ChildNode AS VARCHAR(MAX))</p><p>FROM Tree</p><p>WHERE ParentNode = @Node;</p><p>END</p><p>We use a loop to simulate DFS, popping nodes from the stack, inserting them into the result table, and pushing their children back onto the stack.<br><strong>Step 5:</strong> Select the Result</p><p>SELECT Node, Path</p><p>FROM #Result;</p><p>Finally, we select the traversal result.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/680/0*z-fOqPU-EEZr-ck0" /></figure><p><strong>Step 6:</strong> Clean Up</p><p><strong>Approach 3: Using new datatype hierarchyid</strong></p><p>DROP TABLE #Stack;</p><p>DROP TABLE #Result;</p><pre>CREATE TABLE Tree_H (<br>NodeID INT PRIMARY KEY,<br>ParentNode INT,<br>NodeHierarchy HIERARCHYID<br>);</pre><pre>-- Insert data<br>INSERT INTO Tree_H (NodeID, ParentNode, NodeHierarchy) VALUES<br>(1, NULL, hierarchyid::GetRoot()),<br>(2, 1, hierarchyid::GetRoot().GetDescendant(NULL, NULL)),<br>(3, 1, hierarchyid::GetRoot().GetDescendant(NULL, NULL)),<br>(4, 2, hierarchyid::GetRoot().GetDescendant(NULL, NULL).GetDescendant(NULL, NULL)),<br>(5, 2, hierarchyid::GetRoot().GetDescendant(NULL, NULL).GetDescendant(NULL, NULL)),<br>(6, 3, hierarchyid::GetRoot().GetDescendant(NULL, NULL).GetDescendant(NULL, NULL)),<br>(7, 3, hierarchyid::GetRoot().GetDescendant(NULL, NULL).GetDescendant(NULL, NULL)),<br>(8, 4, hierarchyid::GetRoot().GetDescendant(NULL, NULL).GetDescendant(NULL, NULL).GetDescendant(NULL, NULL)),<br>(9, 4, hierarchyid::GetRoot().GetDescendant(NULL, NULL).GetDescendant(NULL, NULL).GetDescendant(NULL, NULL)),<br>(10, 6, hierarchyid::GetRoot().GetDescendant(NULL, NULL).GetDescendant(NULL, NULL).GetDescendant(NULL, NULL)),<br>(11, 6, hierarchyid::GetRoot().GetDescendant(NULL, NULL).GetDescendant(NULL, NULL).GetDescendant(NULL, NULL)),<br>(12, 7, hierarchyid::GetRoot().GetDescendant(NULL, NULL).GetDescendant(NULL, NULL).GetDescendant(NULL, NULL));</pre><p>WITH RecursiveCTE AS (-- Anchor member: start with the root node</p><p>SELECT NodeID,ParentNode,NodeHierarchy,</p><p>CAST(NodeID AS VARCHAR(MAX)) AS Path</p><p>FROM Tree_H WHERE ParentNode IS NULL</p><p>UNION ALL</p><p>-- Recursive member: join the CTE with the Tree_H table</p><p>SELECT t.NodeID,t.ParentNode,t.NodeHierarchy,CAST(r.Path + &#39;-&gt;&#39; + CAST(t.NodeID AS VARCHAR(MAX)) AS VARCHAR(MAX)) AS Path</p><p>FROM Tree_H t</p><p>INNER JOIN RecursiveCTE r</p><p>ON t.ParentNode = r.NodeID</p><p>Result:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/975/0*FrKCI4dHh-bRhauY" /></figure><p>By following these steps, you can implement the DFS algorithm in SQL using both recursive and non-recursive approaches and using HierarchyId. Each method has its own benefits and can be applied according to the specific requirements of your project.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=275c671fb640" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>