<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/">
    <channel>
        <title>Dheeraj Inampudi — Blog</title>
        <link>https://dheerajinampudi.com/blog</link>
        <description>Essays and notes on applied AI, products, engineering leadership, and building companies.</description>
        <lastBuildDate>Thu, 29 Jan 2026 00:00:00 GMT</lastBuildDate>
        <docs>https://validator.w3.org/feed/docs/rss2.html</docs>
        <generator>https://github.com/jpmonette/feed</generator>
        <language>en</language>
        <copyright>Copyright © 2026 Dheeraj Inampudi</copyright>
        <item>
            <title><![CDATA[When to use machine learning]]></title>
            <link>https://dheerajinampudi.com/blog/when-to-use-machine-learning</link>
            <guid>https://dheerajinampudi.com/blog/when-to-use-machine-learning</guid>
            <pubDate>Thu, 29 Jan 2026 00:00:00 GMT</pubDate>
            <description><![CDATA[A practical decision sequence for choosing rules, pretrained models, or custom machine learning.]]></description>
            <content:encoded><![CDATA[<p>Machine learning is one of the most expensive ways to express a rule. It introduces uncertain output, evaluation work, data dependencies, and a system that changes when its inputs change. Those costs are justified when the problem contains patterns that ordinary software cannot express well.</p>
<p>I use three questions before a team commits to ML. The order matters because each question rules out a cheaper and more controllable approach.</p>
<h2 class="anchor anchorTargetHideOnScrollNavbar_vjPI" id="can-the-team-write-the-rules">Can the team write the rules?<a href="https://dheerajinampudi.com/blog/when-to-use-machine-learning#can-the-team-write-the-rules" class="hash-link" aria-label="Direct link to Can the team write the rules?" title="Direct link to Can the team write the rules?" translate="no">​</a></h2>
<p>If the logic can be stated, write it in software.</p>
<p>Tax calculations, eligibility checks, workflow states, thresholds, and deterministic validations usually belong in code. A rules-based implementation is easier to test, explain, and change. It also tells an operator exactly why the system acted.</p>
<p>This choice can feel less ambitious than an ML project. That is irrelevant. The job is to produce a dependable outcome with the least unnecessary machinery.</p>
<p>A useful test is to ask the domain expert to work through several cases. If the expert can name the inputs, decision steps, and exceptions with consistency, the first version should probably be deterministic.</p>
<h2 class="anchor anchorTargetHideOnScrollNavbar_vjPI" id="can-a-pretrained-model-recognize-the-pattern">Can a pretrained model recognize the pattern?<a href="https://dheerajinampudi.com/blog/when-to-use-machine-learning#can-a-pretrained-model-recognize-the-pattern" class="hash-link" aria-label="Direct link to Can a pretrained model recognize the pattern?" title="Direct link to Can a pretrained model recognize the pattern?" translate="no">​</a></h2>
<p>Some rules are hard to enumerate because they live in language, images, or a large number of small variations. A pretrained model may already handle the pattern well enough.</p>
<p>Common examples include:</p>
<ul>
<li class="">classifying the intent of a message</li>
<li class="">extracting fields from familiar documents</li>
<li class="">summarizing text for a person to review</li>
<li class="">answering a bounded question from supplied context</li>
<li class="">producing a draft that a person owns</li>
</ul>
<p>The model still needs evaluation. "The model can do this" is not an acceptance criterion. Build a set of representative inputs, define correct behavior, and inspect the failure cases that could cause harm.</p>
<p>Retrieval and tool calls do not increase a model's judgment. Retrieval supplies information. Tools give the model a way to act. The surrounding system still needs to decide what the model may do, which result is acceptable, and when to ask a person.</p>
<h2 class="anchor anchorTargetHideOnScrollNavbar_vjPI" id="is-the-useful-pattern-specific-to-your-data">Is the useful pattern specific to your data?<a href="https://dheerajinampudi.com/blog/when-to-use-machine-learning#is-the-useful-pattern-specific-to-your-data" class="hash-link" aria-label="Direct link to Is the useful pattern specific to your data?" title="Direct link to Is the useful pattern specific to your data?" translate="no">​</a></h2>
<p>Custom machine learning becomes a serious option when the rules are unknown, the pattern is absent from general training data, and the organization owns enough relevant examples.</p>
<p>Fraud detection, demand forecasting, equipment failure prediction, recommendation systems, and domain-specific risk scoring often fit this shape. The signal appears across many examples and is difficult to encode by hand.</p>
<p>Before training, check whether the data describes the decision you need to make. Volume cannot repair the wrong label, a biased collection process, or a target that arrives after the decision point. A smaller dataset with a sound definition can be more useful than a large historical dump.</p>
<p>Custom ML also creates an operating commitment. Someone must monitor drift, retrain when the environment changes, investigate regressions, and decide when the model should stop acting.</p>
<h2 class="anchor anchorTargetHideOnScrollNavbar_vjPI" id="the-decision-in-one-sequence">The decision in one sequence<a href="https://dheerajinampudi.com/blog/when-to-use-machine-learning#the-decision-in-one-sequence" class="hash-link" aria-label="Direct link to The decision in one sequence" title="Direct link to The decision in one sequence" translate="no">​</a></h2>
<p>Use this order:</p>
<ol>
<li class="">Write deterministic rules when the decision can be specified.</li>
<li class="">Evaluate a pretrained model when the pattern is common but difficult to enumerate.</li>
<li class="">Train a custom model when the useful signal is specific to your data and simpler approaches fail.</li>
</ol>
<p>Hybrid systems are common. A model may extract intent while deterministic code applies policy. A custom score may prioritize work while a person makes the final decision. The boundaries matter more than the label attached to the system.</p>
<h2 class="anchor anchorTargetHideOnScrollNavbar_vjPI" id="what-engineers-still-own">What engineers still own<a href="https://dheerajinampudi.com/blog/when-to-use-machine-learning#what-engineers-still-own" class="hash-link" aria-label="Direct link to What engineers still own" title="Direct link to What engineers still own" translate="no">​</a></h2>
<p>AI can produce a large share of implementation code. Engineers still own the choice of method, the test set, the failure policy, and the result in production.</p>
<p>Good applied AI work begins by refusing unnecessary uncertainty. Add a model after the system has earned the complexity.</p>]]></content:encoded>
            <category>AI Systems</category>
            <category>Product Decisions</category>
        </item>
        <item>
            <title><![CDATA[Leadership principles I practice]]></title>
            <link>https://dheerajinampudi.com/blog/leadership-principles</link>
            <guid>https://dheerajinampudi.com/blog/leadership-principles</guid>
            <pubDate>Wed, 28 Jan 2026 00:00:00 GMT</pubDate>
            <description><![CDATA[Notes on clarity, ownership, and leading engineering teams when code is cheap and judgment is not.]]></description>
            <content:encoded><![CDATA[<p>Leadership became more concrete for me as my responsibility moved beyond the code. A technical decision changes a system. A leadership decision changes who can make the next hundred decisions, and how well they make them.</p>
<p>These are the principles I return to while building products and teams.</p>
<h2 class="anchor anchorTargetHideOnScrollNavbar_vjPI" id="plan-while-the-direction-is-uncertain">Plan while the direction is uncertain<a href="https://dheerajinampudi.com/blog/leadership-principles#plan-while-the-direction-is-uncertain" class="hash-link" aria-label="Direct link to Plan while the direction is uncertain" title="Direct link to Plan while the direction is uncertain" translate="no">​</a></h2>
<p>Planning should reduce uncertainty. Once the direction is clear, another planning cycle often delays the evidence the team needs.</p>
<p>I plan when the team disagrees about the goal, the cost of reversal is high, or an untested assumption sits under the work. I push for delivery when the decision is reversible and customer use will teach us more than another meeting.</p>
<p>The leader's job is to tell those conditions apart and make the change of pace explicit.</p>
<h2 class="anchor anchorTargetHideOnScrollNavbar_vjPI" id="adapt-to-the-person-and-hold-the-outcome-steady">Adapt to the person and hold the outcome steady<a href="https://dheerajinampudi.com/blog/leadership-principles#adapt-to-the-person-and-hold-the-outcome-steady" class="hash-link" aria-label="Direct link to Adapt to the person and hold the outcome steady" title="Direct link to Adapt to the person and hold the outcome steady" translate="no">​</a></h2>
<p>People need different kinds of support. One engineer may need a clear boundary and room to work. Another may need faster feedback or help turning a broad problem into a first step.</p>
<p>Adapting the support does not require lowering the standard. The expected outcome, owner, and review point should remain clear. Fair leadership gives people what they need to meet a shared bar.</p>
<h2 class="anchor anchorTargetHideOnScrollNavbar_vjPI" id="ai-can-produce-code-people-own-the-result">AI can produce code; people own the result<a href="https://dheerajinampudi.com/blog/leadership-principles#ai-can-produce-code-people-own-the-result" class="hash-link" aria-label="Direct link to AI can produce code; people own the result" title="Direct link to AI can produce code; people own the result" translate="no">​</a></h2>
<p>Generated code makes implementation faster. It does not own intent, judgment, coordination, or the production incident.</p>
<p>Engineering leadership now places more weight on problem selection and review. Teams need to understand why a change exists, which behavior matters, how the system can fail, and who will make the call when the evidence is mixed.</p>
<p>Code volume is a weak measure of progress. A team that deletes an unnecessary service or replaces a model with a rule may have made the stronger engineering decision.</p>
<h2 class="anchor anchorTargetHideOnScrollNavbar_vjPI" id="put-company-goals-into-the-work">Put company goals into the work<a href="https://dheerajinampudi.com/blog/leadership-principles#put-company-goals-into-the-work" class="hash-link" aria-label="Direct link to Put company goals into the work" title="Direct link to Put company goals into the work" translate="no">​</a></h2>
<p>Company goals become useful when teams can connect them to product behavior and customer outcomes. A slogan at an all-hands does not create alignment.</p>
<p>I want a team to know which customer problem a project addresses, what evidence will change our view, and which tradeoff we accepted. That context helps people make local decisions without waiting for approval.</p>
<p>Personal growth should happen through meaningful responsibility. The company gets better work, and the person gains judgment that survives the current project.</p>
<h2 class="anchor anchorTargetHideOnScrollNavbar_vjPI" id="reward-care-and-ownership">Reward care and ownership<a href="https://dheerajinampudi.com/blog/leadership-principles#reward-care-and-ownership" class="hash-link" aria-label="Direct link to Reward care and ownership" title="Direct link to Reward care and ownership" translate="no">​</a></h2>
<p>Technical skill can grow through practice. Care is harder to create through process.</p>
<p>I look for people who notice when a result is incomplete, ask about the effect on customers, and stay with a problem through the unglamorous last mile. Leaders should protect that behavior from environments that reward visible activity over durable outcomes.</p>
<p>Ownership also needs boundaries. A person cannot own an outcome without authority, context, and time to act. Assigning responsibility without those conditions is delegation in name only.</p>
<h2 class="anchor anchorTargetHideOnScrollNavbar_vjPI" id="do-the-homework-before-asking-for-trust">Do the homework before asking for trust<a href="https://dheerajinampudi.com/blog/leadership-principles#do-the-homework-before-asking-for-trust" class="hash-link" aria-label="Direct link to Do the homework before asking for trust" title="Direct link to Do the homework before asking for trust" translate="no">​</a></h2>
<p>Teams read a leader's clarity as evidence of preparation. A vague answer may be honest, but repeated vagueness tells people that the decision has no owner.</p>
<p>When I do not have an answer, I say what I need to learn and when I will return with a position. That is more useful than filling the space with confidence.</p>
<p>The quality of a team's decisions cannot rise far above the quality of the context its leaders provide. Clear goals, named tradeoffs, and honest uncertainty give people something solid to work with.</p>]]></content:encoded>
            <category>Leadership</category>
            <category>Founder Notes</category>
        </item>
        <item>
            <title><![CDATA[LLM architecture mental models]]></title>
            <link>https://dheerajinampudi.com/blog/llm-architecture-mental-models</link>
            <guid>https://dheerajinampudi.com/blog/llm-architecture-mental-models</guid>
            <pubDate>Mon, 26 Jan 2026 00:00:00 GMT</pubDate>
            <description><![CDATA[A field guide to model selection through context, attention, activation cost, and failure behavior.]]></description>
            <content:encoded><![CDATA[<p>Model selection begins with the workload. Benchmarks and parameter counts help only after the team defines the input, required behavior, latency budget, deployment constraints, and failures it can tolerate.</p>
<p>These mental models help application engineers read a model card and turn architecture details into production questions.</p>
<h2 class="anchor anchorTargetHideOnScrollNavbar_vjPI" id="dense-and-mixture-of-experts-models">Dense and mixture-of-experts models<a href="https://dheerajinampudi.com/blog/llm-architecture-mental-models#dense-and-mixture-of-experts-models" class="hash-link" aria-label="Direct link to Dense and mixture-of-experts models" title="Direct link to Dense and mixture-of-experts models" translate="no">​</a></h2>
<p>A dense model uses the same parameter set for each token. A mixture-of-experts model routes tokens through a subset of specialized feed-forward blocks.</p>
<p>The distinction changes how to read size. Total parameters describe stored capacity. Activated parameters give a better signal for compute per token. A large MoE model can activate far fewer parameters than its headline number suggests, though it may still require substantial memory and more complex serving.</p>
<p>Ask:</p>
<ul>
<li class="">How many parameters are active for each token?</li>
<li class="">Can the serving stack place and route the experts efficiently?</li>
<li class="">Does routing behavior remain stable on the target workload?</li>
<li class="">Is the latency distribution acceptable, not only the average?</li>
</ul>
<p>Dense models often offer simpler deployment behavior. MoE models can offer a useful quality-to-compute tradeoff when the serving system supports them well.</p>
<h2 class="anchor anchorTargetHideOnScrollNavbar_vjPI" id="context-is-capacity-not-memory">Context is capacity, not memory<a href="https://dheerajinampudi.com/blog/llm-architecture-mental-models#context-is-capacity-not-memory" class="hash-link" aria-label="Direct link to Context is capacity, not memory" title="Direct link to Context is capacity, not memory" translate="no">​</a></h2>
<p>A context window states how many tokens a model can accept. It does not promise equal attention to every part of that input, reliable retrieval, or durable memory between calls.</p>
<p>Long context affects cost and latency through attention computation and the key-value cache. It also changes evaluation. A model can accept a long document and still miss a fact in the middle, combine unrelated passages, or follow an instruction from the wrong source.</p>
<p>Ask:</p>
<ul>
<li class="">How much context does the real task need?</li>
<li class="">Which information must remain exact?</li>
<li class="">Can retrieval reduce the input before generation?</li>
<li class="">Does the model find and use evidence at the positions your application creates?</li>
</ul>
<p>Treat persistent memory as a separate system. It needs rules for what to store, how to retrieve it, when to expire it, and how a user can correct it.</p>
<h2 class="anchor anchorTargetHideOnScrollNavbar_vjPI" id="attention-design-shapes-long-context-cost">Attention design shapes long-context cost<a href="https://dheerajinampudi.com/blog/llm-architecture-mental-models#attention-design-shapes-long-context-cost" class="hash-link" aria-label="Direct link to Attention design shapes long-context cost" title="Direct link to Attention design shapes long-context cost" translate="no">​</a></h2>
<p>Architectures use techniques such as grouped-query attention, multi-query attention, sliding windows, and optimized attention kernels to reduce the cost of long inputs and decoding.</p>
<p>The model specification alone does not determine application performance. Hardware, serving framework, batch behavior, prompt length, output length, and cache reuse all affect the result.</p>
<p>Measure the full request path with representative traffic. A theoretical context limit has little value if the target latency or concurrency collapses long before that limit.</p>
<h2 class="anchor anchorTargetHideOnScrollNavbar_vjPI" id="tokenization-is-part-of-the-bill">Tokenization is part of the bill<a href="https://dheerajinampudi.com/blog/llm-architecture-mental-models#tokenization-is-part-of-the-bill" class="hash-link" aria-label="Direct link to Tokenization is part of the bill" title="Direct link to Tokenization is part of the bill" translate="no">​</a></h2>
<p>Models do not read characters or words directly. Their tokenizer can represent the same source text with different token counts.</p>
<p>This matters for code, identifiers, multilingual content, structured records, and specialized terminology. More tokens increase input cost and consume context capacity. Token boundaries can also affect extraction and constrained output.</p>
<p>Run the tokenizer against real inputs before estimating cost. Averages from general English text will not describe every product.</p>
<h2 class="anchor anchorTargetHideOnScrollNavbar_vjPI" id="quantization-trades-precision-for-operating-cost">Quantization trades precision for operating cost<a href="https://dheerajinampudi.com/blog/llm-architecture-mental-models#quantization-trades-precision-for-operating-cost" class="hash-link" aria-label="Direct link to Quantization trades precision for operating cost" title="Direct link to Quantization trades precision for operating cost" translate="no">​</a></h2>
<p>Quantization stores or computes model values with fewer bits. It can reduce memory use and increase throughput, but the effect on quality depends on the model, method, hardware, and task.</p>
<p>Small regressions can matter in tool arguments, structured output, numerical work, or rare edge cases even when general text still reads well.</p>
<p>Evaluate the quantized build against the same acceptance set as the original model. Compare failure categories and latency rather than relying on a single aggregate score.</p>
<h2 class="anchor anchorTargetHideOnScrollNavbar_vjPI" id="post-training-defines-behavior">Post-training defines behavior<a href="https://dheerajinampudi.com/blog/llm-architecture-mental-models#post-training-defines-behavior" class="hash-link" aria-label="Direct link to Post-training defines behavior" title="Direct link to Post-training defines behavior" translate="no">​</a></h2>
<p>Two models with similar base architecture can behave differently after instruction tuning, preference optimization, safety training, and tool-use training.</p>
<p>Application engineers experience this as behavior: whether the model follows a schema, calls the right tool, asks for missing information, cites supplied evidence, and refuses outside the intended boundary.</p>
<p>Prompt work cannot repair every post-training mismatch. A smaller model trained for the required interaction may outperform a larger general model in a bounded workflow.</p>
<h2 class="anchor anchorTargetHideOnScrollNavbar_vjPI" id="failure-behavior-beats-the-leaderboard">Failure behavior beats the leaderboard<a href="https://dheerajinampudi.com/blog/llm-architecture-mental-models#failure-behavior-beats-the-leaderboard" class="hash-link" aria-label="Direct link to Failure behavior beats the leaderboard" title="Direct link to Failure behavior beats the leaderboard" translate="no">​</a></h2>
<p>Average benchmark performance hides the cases that determine production trust.</p>
<p>Build an evaluation set around the system's decisions. Include ambiguous requests, missing data, conflicting context, long inputs, invalid tool results, and requests that should reach a person. Record how the model fails and whether the surrounding system can detect the failure.</p>
<p>The best model for an application is often the one whose errors the team can recognize and contain.</p>
<h2 class="anchor anchorTargetHideOnScrollNavbar_vjPI" id="keep-a-model-decision-record">Keep a model decision record<a href="https://dheerajinampudi.com/blog/llm-architecture-mental-models#keep-a-model-decision-record" class="hash-link" aria-label="Direct link to Keep a model decision record" title="Direct link to Keep a model decision record" translate="no">​</a></h2>
<p>For each candidate, record:</p>
<ol>
<li class="">The workload and representative inputs</li>
<li class="">Required output behavior</li>
<li class="">Context and tokenizer measurements</li>
<li class="">Latency, throughput, and cost under expected traffic</li>
<li class="">Failure categories and escalation policy</li>
<li class="">Security, privacy, and deployment constraints</li>
</ol>
<p>That record turns model selection into an engineering decision. It also makes the next evaluation faster when models, prices, and product requirements change.</p>]]></content:encoded>
            <category>AI Systems</category>
            <category>Production AI</category>
        </item>
    </channel>
</rss>