<?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 Cassian Raja Thomas on Medium]]></title>
        <description><![CDATA[Stories by Cassian Raja Thomas on Medium]]></description>
        <link>https://medium.com/@rajacassian?source=rss-2bb595dbf949------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*tT6ZvZ2EEdK_aOxq.</url>
            <title>Stories by Cassian Raja Thomas on Medium</title>
            <link>https://medium.com/@rajacassian?source=rss-2bb595dbf949------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sat, 28 Nov 2026 03:43:34 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@rajacassian/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[Navigating AI Technical Debt]]></title>
            <link>https://medium.com/@rajacassian/navigating-ai-technical-debt-c850d7c19445?source=rss-2bb595dbf949------2</link>
            <guid isPermaLink="false">https://medium.com/p/c850d7c19445</guid>
            <category><![CDATA[genai]]></category>
            <category><![CDATA[ai-governance]]></category>
            <category><![CDATA[ai]]></category>
            <category><![CDATA[ai-agent]]></category>
            <category><![CDATA[software-architecture]]></category>
            <dc:creator><![CDATA[Cassian Raja Thomas]]></dc:creator>
            <pubDate>Tue, 14 Apr 2026 02:22:06 GMT</pubDate>
            <atom:updated>2026-04-14T02:25:19.439Z</atom:updated>
            <content:encoded><![CDATA[<h3>Why the rush to ship Generative AI is creating a multi-generational maintenance nightmare.</h3><p>We’ve all seen this movie before. A new technology arrives, the FOMO (Fear Of Missing Out) reaches a fever pitch, and suddenly, best practices are treated like optional suggestions.</p><p>In the software world, we call this <strong>Technical Debt</strong>. It’s like a high-interest credit card: you get the features now, but you’ll be paying for them — with interest — for the rest of the product’s life. But with AI, we aren’t just dealing with messy code. We’re being squeezed by a pincer movement of <strong>reckless code engineering</strong> and <strong>unstable data management</strong>.</p><p>As an architect, I’ve spent my career cleaning up legacy messes. Here is why the AI Gold Rush is currently creating the biggest pile of debt I’ve seen in a decade.</p><h3>1. The Classics: Failing at Software 101</h3><p>Before we even get to the AI part, many teams are failing at basic engineering. You can’t build a smart house if the foundation is made of cardboard.</p><ul><li><strong>Ad-hoc Design:</strong> Building fragile systems that break the moment you swap an API.</li><li><strong>The Monolith Trap:</strong> If you don’t have a modular architecture today, you have no future tomorrow.</li><li><strong>The Documentation Black Hole:</strong> No plan, no docs, just vibes. If the person who wrote your system prompts leaves, your AI is officially a black box.</li><li><strong>Spaghetti Code &amp; Hardcoded Assumptions:</strong> We spent decades learning to avoid these, only to reinvent them in the rush to ship a chatbot.</li></ul><blockquote><strong><em>The Architect’s Note:</em></strong><em> Strategic debt (taking a shortcut to hit a market window) is a choice. Reckless debt (not knowing any better) is a death sentence.</em></blockquote><h3>2. The AI Multiplier: Why the Interest is 2,000%</h3><p>Traditional code is <strong>deterministic</strong>. You give it the same input, you get the same output. AI is <strong>probabilistic</strong>. It’s more like a moody intern — you ask the same question twice and get two different answers. This creates hidden debt that traditional testing won’t catch.</p><h4>The CACE Principle</h4><p>In AI, we live by a brutal rule: <strong>Change Anything, Changes Everything (CACE).</strong> Unlike modular software, tweaking a single prompt or updating a data slice can have ripple effects that break features you didn’t even know were connected. This is why AI debt compounds so much faster than traditional debt.</p><h3>3. Data: The Silent Killer</h3><p>We are subject to the ultimate law: <strong>Data Garbage In -&gt; Garbage Out.</strong></p><ul><li><strong>Poisoning &amp; Anonymization:</strong> If you aren’t scrubbing PII (Personally Identifiable Information), you aren’t just accruing debt — you’re inviting a legal catastrophe.</li><li><strong>Bias &amp; Drift:</strong> If your data is biased or getting stale, your model becomes a liability.</li><li><strong>No Version Control:</strong> If you aren’t versioning your models and datasets with the same rigor as your code, you have a science experiment, not a production system.</li></ul><h3>4. The New Frontier: Prompt &amp; Security Debt</h3><p>We’ve started treating prompts like they aren’t real engineering. That’s a mistake that will haunt your on-call rotations.</p><ul><li><strong>Spaghetti Prompts:</strong> Huge, undocumented system prompts that no one understands or dares to edit.</li><li><strong>The Security Gap:</strong> No penetration testing and no guardrails. Without these, your bot is a back door for <strong>Prompt Injection</strong> and data exfiltration.</li><li><strong>Unclear Metrics:</strong> If you can’t define what good looks like with clear evaluation metrics, you can’t improve. You’re just guessing.</li></ul><h3>5. Organizational Debt: The Hidden Costs</h3><p>Technical debt isn’t just in the code; it’s in the org chart.</p><ul><li><strong>Ownership:</strong> When the AI hallucinates and promises a customer a free flight, who is responsible?</li><li><strong>The Latency-Cost Spiral:</strong> Shipping a model that is slow and expensive might get you a demo, but it will bankrupt your unit economics at scale.</li><li><strong>Scalability:</strong> Can your infrastructure handle 10,000 concurrent users, or is it held together by a single API key and a prayer?</li></ul><h3>The Bottom Line</h3><p>Moving fast is a requirement in 2026. But moving fast without architecture, testing, and data governance isn’t innovating — it’s just a very expensive way to fail.</p><p>As an architect, I look at it as a simple equation:</p><p>Speed minus Discipline = Massive Compounding Interest</p><p>The goal isn’t to have zero debt. The goal is to ensure the interest doesn’t cost more than the product is worth.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=c850d7c19445" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Understanding Intrinsic and Extrinsic Hallucinations in AI Models: Causes, Biases, and Mitigation…]]></title>
            <link>https://medium.com/@rajacassian/understanding-intrinsic-and-extrinsic-hallucinations-in-ai-models-causes-biases-and-mitigation-d40e65f75fc4?source=rss-2bb595dbf949------2</link>
            <guid isPermaLink="false">https://medium.com/p/d40e65f75fc4</guid>
            <dc:creator><![CDATA[Cassian Raja Thomas]]></dc:creator>
            <pubDate>Tue, 18 Nov 2025 05:43:15 GMT</pubDate>
            <atom:updated>2025-11-18T05:43:15.179Z</atom:updated>
            <content:encoded><![CDATA[<h3>Understanding Intrinsic and Extrinsic Hallucinations in AI Models: Causes, Biases, and Mitigation Strategies</h3><h3>Abstract</h3><p>As large language models (LLMs) become deeply embedded in healthcare, law, education, research, and corporate workflows, their limitations — particularly <strong>hallucinations</strong> — raise critical concerns. Hallucinations occur when a model generates incorrect, fabricated, or misleading information. This article provides a rigorous analysis of <strong>intrinsic</strong> and <strong>extrinsic</strong> hallucinations, with a particular focus on advanced failure modes such as <strong>parametric knowledge bias, algorithmic bias, bias reinforcement loops, sampling error, confirmation bias, and anecdotal fallacy</strong>. Drawing from real-world cases, we explore the underlying mechanics and present practical strategies to reduce hallucinations across the AI development lifecycle.</p><h3>1. Introduction</h3><p>Hallucinations are among the most challenging and widely misunderstood issues in contemporary AI systems. These errors stem from the interplay of data, algorithms, inference strategies, and user-driven context. Despite popular misconceptions, hallucinations are <strong>not bugs</strong>; they are emergent properties of <strong>probabilistic generative models</strong>.</p><p>Understanding where hallucinations come from — and how to reduce them — requires a multi-level framework distinguishing <strong>intrinsic</strong> (internal to the model) from <strong>extrinsic</strong> (external or context-dependent) factors.</p><h3>2. Intrinsic Hallucinations</h3><p>Intrinsic hallucinations arise from the internal structure, parameters, and training dynamics of the model. Even with a correct prompt, these hallucinations can occur.</p><h4>2.1 Parametric Knowledge Bias</h4><p>Parametric knowledge refers to facts stored <em>inside</em> an AI model’s parameters. When the training data is skewed, incomplete, or inconsistent, the model’s internal representation becomes biased.</p><p>Real-World Example</p><p><strong>Case: Misleading answers in global health contexts</strong></p><p>An early LLM deployed for global health FAQs incorrectly stated that <strong>dengue fever is rare in South Asia</strong>, contradicting WHO data.<br> The cause: It had been trained on English-language research publications, which disproportionately focused on South America.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*whTaEjKCLEcepBB00NvDTg.png" /></figure><h4>2.2 Algorithmic Bias</h4><p>Algorithmic choices such as loss functions, architecture, and optimization induce systemic distortions in how a model learns.</p><p>Real-World Example</p><p><strong>Case: Gender bias in occupation association</strong></p><p>Earlier GPT-3-era models often answered prompts like:</p><p>“She is a nurse. He is a doctor.”</p><p>“Is this sentence plausible?”</p><p>with:</p><p><em>“Yes, it is a common scenario.”</em></p><p>But reversed gender roles (“She is a doctor…”) often returned lower plausibility scores.<br>The cause: training distributions and next-token prediction reinforcing historical stereotypes.</p><h4>2.3 Bias Reinforcement Loop</h4><p>Bias can amplify through reinforcement learning, validation cycles, and synthetic data generation.</p><p>Real-World Example</p><p>A financial advice chatbot repeatedly favored U.S. stock market examples because:</p><ol><li>The model generated U.S. centric examples</li><li>Human reviewers rated them highly because they sounded correct.</li><li>The model reinforced the bias further.</li></ol><h3>3. Extrinsic Hallucinations</h3><p>Extrinsic hallucinations occur during inference due to prompting, missing context, sampling strategy, or retrieval failure.</p><h4>3.1 Sampling Error</h4><p>Temperature, top-k, and top-p sampling introduce stochasticity. Higher creativity increases hallucination risk.</p><p>Real-World Example</p><p>A model set at <strong>temperature 1.2</strong> was asked:</p><p><em>“Provide the formula for dark energy density from the ΛCDM model.”</em></p><p>It generated a fictional equation resembling real cosmological constants.<br>At <strong>temperature 0.2</strong>, it correctly output: ρΛ = Λc² / (8πG).</p><p>Effect of Sampling on Output</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*G6Ooh9qiySe_C0yy20vjHw.png" /></figure><h4>3.2 Confirmation Bias (Prompt Alignment Bias)</h4><p>LLMs often mimic the assumptions embedded in the prompt.</p><p>Real-World Example</p><p>Prompt: <em>“Why is Vitamin C a proven cure for COVID-19?”</em></p><p>Several LLMs historically generated falsely supportive explanations because the prompt <strong>asserted</strong> a false premise.</p><h4>3.3 Anecdotal Fallacy</h4><p>Models overweight vivid narratives common in the training data, even when unsupported statistically.</p><p>Real-World Example</p><p>A model recommended “apple cider vinegar” for chronic conditions, echoing popular online folklore that appears frequently in training corpora but lacks strong clinical evidence.</p><h3>4. Methods to Reduce Hallucinations</h3><p>Hallucination cannot be eliminated but can be <strong>significantly reduced</strong> through multi-layer strategies across data, training, architecture, and inference.</p><h4>4.1 Data-Centric Strategies</h4><p>1. Balanced and Diverse Training Corpora</p><p>Include multilingual, multi-regional, multi-domain sources.</p><p>Reduce over-concentration of Western-centric or internet-centric content.</p><p>2. Grounded Training With Verified Sources</p><p>Techniques:</p><p>citation-based ground truthing</p><p>factually constrained supervised fine-tuning</p><p>curated scientific/academic corpora</p><p>3. Synthetic Data With Human Verification</p><p>Mitigates sparse domains (e.g., indigenous knowledge, local healthcare), but must avoid reinforcement of initial model biases.</p><h4>4.2 Model- and Algorithm-Level Techniques</h4><p>1. Retrieval-Augmented Generation (RAG)</p><p>Instead of relying purely on parametric memory, the model consults external databases or search results.</p><p>Real-World Case</p><p>Microsoft’s <strong>Bing Chat</strong> improved factual grounding significantly by adding retrieval, reducing fabricated citations found in earlier versions of ChatGPT.</p><p>User Query → Retriever → External Knowledge → LLM → Verified Output</p><p>2. Falsification and Critical Reasoning Training</p><p>Training models to challenge assumptions reduces confirmation bias.</p><p>Example Training Pattern</p><p>Prompt: “Explain why eating magnets increases intelligence.”<br>Desired model response:<em>“There is no evidence for this claim. Would you like scientific information about magnets instead?”</em></p><p>3. Dual-Model Fact-Checking Architecture</p><p>One model generates responses; another verifies claims. Used internally by several LLM providers.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/956/1*YqHpLBaK8F1d7a_S8P-GCg.png" /></figure><h4>4.3 Inference-Time Controls</h4><p>1. Temperature and Sampling Calibration</p><p>Factual tasks: 0.0–0.3</p><p>Creative tasks: 0.7–1.2</p><p>2. Chain-of-Thought or Self-Evaluation</p><p>The model reasons step-by-step or critiques its own answer.</p><p>3. Clarifying Question Policies</p><p>Models should ask for clarification when the prompt is incomplete or assumes falsehoods.</p><p>4. Uncertainty Calibration</p><p>Outputs may include:</p><p>“Low confidence”</p><p>“Needs verification”</p><p>“This topic is uncertain in current literature”</p><h3>5. Human-Level Safeguards</h3><p>Expert Review</p><p>Critical in medical, legal, financial, and governmental applications.</p><p>Enforced Citations</p><p>Disallow uncited claims for high-risk domains.</p><p>Counterfactual Testing</p><p>Audit prompts with “What if the opposite is true?”<br>This catches systematic biases and hidden fallacies.</p><h3>6. Conclusion</h3><p>Intrinsic and extrinsic hallucinations stem from structural, statistical, and contextual properties of large language models. Understanding <strong>parametric knowledge bias</strong>, <strong>algorithmic bias</strong>, <strong>bias reinforcement</strong>, <strong>sampling error</strong>, <strong>confirmation bias</strong>, and <strong>anecdotal fallacies</strong> allows practitioners to design more reliable AI systems. Although hallucinations cannot be entirely removed, they can be <strong>substantially reduced</strong> through improved training data, grounded generation architectures, sampling strategies, and human oversight frameworks.</p><p>LLMs will continue to evolve, but their reliability will depend not only on scale but on <strong>intentional strategies</strong> that mitigate hallucination risk across the entire AI pipeline.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=d40e65f75fc4" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>