<?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 sandeep gupta on Medium]]></title>
        <description><![CDATA[Stories by sandeep gupta on Medium]]></description>
        <link>https://medium.com/@sandeepakgupta?source=rss-70d7db4443e0------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*kuNk3BlzLoTcOS6K</url>
            <title>Stories by sandeep gupta on Medium</title>
            <link>https://medium.com/@sandeepakgupta?source=rss-70d7db4443e0------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Wed, 18 Nov 2026 17:39:00 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@sandeepakgupta/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[A Tryst with Agentic AI]]></title>
            <link>https://medium.com/@sandeepakgupta/tryst-with-agentic-ai-ff2ce3712606?source=rss-70d7db4443e0------2</link>
            <guid isPermaLink="false">https://medium.com/p/ff2ce3712606</guid>
            <category><![CDATA[algorithmic-trading]]></category>
            <category><![CDATA[artificial-intelligence]]></category>
            <category><![CDATA[product-management]]></category>
            <category><![CDATA[agentic-ai]]></category>
            <category><![CDATA[executive-learning]]></category>
            <dc:creator><![CDATA[sandeep gupta]]></dc:creator>
            <pubDate>Wed, 20 May 2026 17:02:02 GMT</pubDate>
            <atom:updated>2026-05-20T17:17:03.712Z</atom:updated>
            <content:encoded><![CDATA[<h3>Secretariat Ran. Turcotte Won.</h3><p>In 1973, Secretariat stunned the racing world by winning the Triple Crown with a speed and dominance that seemed almost superhuman. But Secretariat did not race alone. In the saddle was Ron Turcotte, the jockey who understood that raw power, no matter how extraordinary, still needed judgment, timing, restraint and direction if it was to become victory.</p><p>Building agentic AI, I discovered, felt strangely similar.</p><h3>A Tech Novice</h3><p>My background is not in software engineering. I have spent nearly two decades in risk management, analytics, product management and banking, working in environments where systems, incentives and human behavior interact in complicated ways, and where mistakes often carry very real consequences.</p><p>So when I decided to build a self-running autonomous intraday trading system powered by AI, I stepped into a world completely outside my formal training.</p><p>The noise around generative AI was deafening. Every conversation seemed filled with intimidating terminology: agentic AI, orchestration, RAG, reinforcement learning, context windows, fine-tuning, guardrails, multi-agent systems and MLOps. To an outsider, it almost sounded like a secret language spoken by people who had access to some modern technological sorcery.</p><p>But after building a live autonomous system from the ground up, through 32 pair-programming sessions, 162 architectural changes and the processing of over 38 million signal events, the magic disappeared.</p><p>Instead of being mystical, AI turned out to be fast, tireless, occasionally brilliant, frequently erratic, deeply literal and in constant need of disciplined governance.</p><p>And perhaps most surprisingly, the intellectual framework that helped me make sense of it did not come from software engineering textbooks alone. It came from something much older.</p><h3>Old Principles, New Machines</h3><p>Long before AI, cloud computing and machine learning, traditions of structured logic had already distilled some brutal truths about reasoning.</p><p>At its core, the discipline was simple: <strong>pratijñā</strong> demanded a clear proposition, <strong>hetu</strong> demanded valid reasoning, <strong>pramāṇa</strong> demanded evidence before acceptance, and <strong>siddhānta</strong> allowed conclusions only after proof.</p><p>Strip away the Sanskrit terminology, and what remains feels startlingly modern: clarity before action, reasoning before confidence, evidence before trust, and authority only after validation.</p><p>In hindsight, managing AI turned out to be remarkably similar to managing ambitious human systems, because raw capability was never the problem. Governance was.</p><h3>The Brilliant, Erratic Campus Graduate</h3><p>Like many first-time builders, I began with the temptation to see the Large Language Model as an oracle.</p><p>In practice, however, it behaved much more like a fresh, highly credentialed campus graduate: bright, fast, eager, articulate, and occasionally capable of saying something catastrophically wrong with complete confidence.</p><p>That was my first real lesson.</p><p>A senior leader does not hand over the company’s capital to a smart graduate simply because they sound intelligent, and AI demanded exactly the same discipline.</p><p>One of the earliest things I learned was that trust is a human concept, but in systems engineering trust must be replaced by structural accountability.</p><p>That distinction shaped everything that followed.</p><h3>The Machine That Runs Itself</h3><p>Today, this system wakes up and operates every market day without me pressing a button.</p><p>Before markets open, it synchronizes broker state, ingests market signals, validates positions, initializes its operating cycle and prepares itself for live execution.</p><p>Once the market begins, it continuously processes incoming events, generates probabilistic trade decisions, executes positions, monitors exposures, tracks model drift, reconciles broker states, learns from realized outcomes, updates its internal logic, logs lineage, contains failures and prepares for the next cycle.</p><p>In simple terms, it runs. Not as a chatbot, not as a demo, and not as a co-pilot waiting for human confirmation, but as a self-running autonomous system operating live every single day, making decisions in real markets inside boundaries designed to keep speed from becoming recklessness.</p><p>That sentence sounds magical until you build one. Then you realize it is mostly architecture, discipline and relentless debugging.</p><h3>Where AI Learns and Risk Still Rules</h3><p>One technical distinction matters.</p><p>This was not a deterministic rule engine pretending to be AI.</p><p>Live trading decisions eventually shifted to XGBoost-based probabilistic models topped with a reinforcement learning layer that continuously adapted to realized outcomes and PnL feedback.</p><p>In simple language, the machine was allowed to learn, it was allowed to change, and it was allowed to improve probabilistically over time.</p><p>But autonomy did not mean sovereignty.</p><p>Hard deterministic controls still governed risk through position limits, duplicate guards, broker reconciliation, state integrity checks, circuit breakers, capital protection gates, structural kill-switches and deployment approvals.</p><p>The trading intelligence could evolve, but the risk boundaries could not.</p><p>That distinction made all the difference.</p><h3>Clarity Before Intelligence</h3><p>Another humbling realization arrived early.</p><p>The problem was often not AI intelligence. It was human ambiguity.</p><p>Weak instructions produced unstable reasoning. Loose prompts created hallucinated assumptions. Incomplete workflows generated partial logic that looked intelligent but collapsed under stress.</p><p>I learned that plain English, when structured properly, was often more important than syntactic cleverness, because AI was not a magical creator so much as an extraordinarily fast translator of intent.</p><p>When intent was transparent, structured and testable, output improved dramatically. When intent was vague, the machine filled the gaps with dangerous invention.</p><p>Organizations fail when leadership communication lacks clarity, and AI systems fail for much the same reason.</p><h3>Evidence Before Acceptance</h3><p>One of the most dangerous characteristics of generative AI is not that it makes mistakes. It is that it makes mistakes politely.</p><p>When bugs surfaced, the AI would often respond with statements like:</p><blockquote><em>“This is likely the issue. Let me fix it.”</em></blockquote><p>Early on, I accepted those guesses at face value, and that was expensive.</p><p>One particularly painful exit-order glitch created an orphan position and doubled losses, reminding me that confidence without proof is operationally worthless.</p><p>That failure forced a complete shift in engineering discipline.</p><p>Plausibility was no longer enough. The machine had to prove itself.</p><p>Words like <em>likely</em>, <em>probably</em> and <em>maybe</em> were effectively banned. Instead, the AI had to state the exact symptom, trace path, timestamped evidence, divergence points, causal chain and proof of root cause.</p><p>No fix was ever accepted because it sounded convincing. It had to earn acceptance through evidence.</p><p>The AI could hypothesize all it wanted, but authority to act was earned only after proof.</p><p>That lesson alone changed the quality of the system.</p><h3>Building an Immune System</h3><p>A good organization does not merely punish mistakes. It evolves systems that prevent them from recurring.</p><p>AI needed the same treatment.</p><p>Repeated regressions led to the creation of a TechLead meta-agent, a supervisory middle-management layer that subjected every proposed code change to 13 validation gates before production.</p><p>It demanded structured Root Cause Analysis, confidence scoring, dependency checks, rollback logic, validation against historical behavior and deployment integrity tests.</p><p>The AI was effectively subjected to its own immune system.</p><p>Its intelligence stopped being the deciding factor. Its adherence to process became the deciding factor.</p><p>Paradoxically, this did not reduce its usefulness. It made it dramatically more reliable.</p><h3>The Buzzword Map: Don’t Be Scared of the Words</h3><p>One of the most amusing reflections from this journey was discovering that the AI industry’s favorite jargon often sounds far more exotic than the underlying principle actually is.</p><p>That became one of my biggest confidence-builders as a non-engineer, because once you strip away the labels, much of AI engineering becomes surprisingly intuitive.</p><p>Retrieval-Augmented Generation, or RAG, sounds futuristic until you realize that it solves a very human problem: memory. AI forgets, so you build structured retrieval systems to remind it what matters.</p><p>Context Window Management sounds intimidating until you realize that it solves another very human problem: attention is finite. Humans cannot think about everything at once, and neither can AI, so relevance must be curated.</p><p>Multi-Agent Systems sounds like science fiction until you realize that it simply means one entity should not safely do everything. Trading, monitoring, QA, broker synchronization, model supervision and validation all require isolation of responsibility. That is not futuristic. That is organizational design.</p><p>Human-in-the-Loop and Guardrails are fancy names for a simple truth: unconstrained autonomy destroys capital.</p><p>Prompt Engineering often turns out to be nothing more than clear instructions and structured workflows.</p><p>Fine-Tuning and In-Context Learning sound highly technical, but conceptually one changes the machine while the other changes what the machine sees. Different methods, same first-principles objective: specialization.</p><p>Online Learning, Continual Learning and Reinforcement Learning all sound mathematically intimidating, but at their heart they solve a basic operational reality: the world changes, so yesterday’s model must keep learning.</p><p>Shadow Mode and Ensemble Methods are big words for a simple principle: do not risk capital on something unproven. Let competing models prove themselves before granting authority.</p><p>Event-Driven Architecture and Circuit Breakers sound like software jargon, but they are really survival engineering: when something happens, respond; when something fails, contain it before it spreads.</p><p>MLOps sounds terrifying until you realize that it is simply the discipline of making sure machine learning behaves like a reliable operational system rather than a one-time science experiment.</p><p>The more I built, the more I realized that the jargon is often intimidating, but the principles usually are not.</p><p>That realization was liberating.</p><h3>The Minimalist Stack: Control Over Fashion</h3><p>Modern AI engineering often suffers from complexity masquerading as sophistication.</p><p>Massive frameworks, layered abstractions, dependency sprawl and enterprise tooling often create more complexity than control.</p><p>But in live systems where latency, traceability and accountability matter, complexity can quickly become the enemy.</p><p>This platform rejected that instinct.</p><p>A frontier LLM, Claude Sonnet via Windsurf Cascade, served as reasoning infrastructure.</p><p>Python 3.13 powered execution logic.</p><p>SQLite managed persistence with isolated live and ML databases.</p><p>Flask handled monitoring.</p><p>The frontend stayed on vanilla HTML, JS and CSS.</p><p>The objective was simple: every component should be understandable, traceable and accountable.</p><h3>What This Really Taught Me</h3><p>Looking back, the biggest surprise was not that AI could learn.</p><p>It was that AI made old leadership principles feel technologically relevant in an entirely new way.</p><p>The practices that initially felt restrictive turned out to be the system’s greatest leverage points: clarity of instruction, disciplined reasoning, bounded autonomy, evidence-based debugging, structural accountability, controlled experimentation and authority earned only after validation.</p><p>That is where the Secretariat metaphor suddenly made sense to me.</p><p>Secretariat had raw speed.</p><p>Secretariat had extraordinary capability.</p><p>Secretariat was fully capable of winning.</p><p>But speed alone was not victory, power alone was not judgment, and autonomy alone was not wisdom. The horse still needed guidance, and that perhaps is the real lesson of agentic AI.</p><p>We do not need to become the horse; we need to understand where it runs, why it runs, when to hold it back and when to let it fly, because in the end, no matter how fast the machine gets, the principles remain unchanged: clarity before action, reasoning before confidence, evidence before trust, and authority only after proof.</p><p><strong>Secretariat had speed.</strong><br><strong>Turcotte had judgment.</strong><br><strong>Victory needed both.</strong></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=ff2ce3712606" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>