<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Ai on Samarthya</title><link>https://samarthya.me/tags/ai/</link><description>Recent content in Ai on Samarthya</description><generator>Hugo -- gohugo.io</generator><language>en</language><copyright>© Samarthya 2018-2026. All rights reserved.</copyright><lastBuildDate>Tue, 27 Oct 2026 20:32:15 -0400</lastBuildDate><atom:link href="https://samarthya.me/tags/ai/index.xml" rel="self" type="application/rss+xml"/><item><title>SSDLC when exploits are cheap: a working concept</title><link>https://samarthya.me/posts/ssdlc-in-the-age-of-ai-exploits/</link><pubDate>Tue, 27 Oct 2026 20:32:15 -0400</pubDate><guid>https://samarthya.me/posts/ssdlc-in-the-age-of-ai-exploits/</guid><description>&lt;div class="lead text-neutral-500 dark:text-neutral-400 !mb-9 text-xl"&gt;&#10; A fire inspection once a year works when fires are rare. When sparks are falling every day, you need smoke&#10;detectors in every room, a sprinkler that fixes the small ones by itself, and a person who decides what to do&#10;about the big ones. That is what a secure development life cycle has to become.&#10;&lt;/div&gt;&#10;&#10;&lt;p&gt;These are my notes for a question I keep coming back to: &lt;strong&gt;how do you keep shipping software when new&#10;vulnerabilities arrive faster than you can fix them, and attackers can use an LLM to turn a CVE description into&#10;a working exploit?&lt;/strong&gt; There is no single standard answer. What follows is the concept I would build, with the&#10;evidence behind each choice and the parts where I am still unsure.&lt;/p&gt;</description><media:content xmlns:media="http://search.yahoo.com/mrss/" url="https://samarthya.me/posts/ssdlc-in-the-age-of-ai-exploits/feature.png"/></item><item><title>AI on this blog: a reading map</title><link>https://samarthya.me/posts/ai-reading-map/</link><pubDate>Mon, 26 Oct 2026 18:50:00 -0400</pubDate><guid>https://samarthya.me/posts/ai-reading-map/</guid><description>&lt;div class="lead text-neutral-500 dark:text-neutral-400 !mb-9 text-xl"&gt;&#10; I&amp;rsquo;ve written about AI and data on and off since 2023, one post at a time. Read in this order, they tell&#10;one story: from how machines learn, to how language models work, to building with them, to letting them act.&#10;&lt;/div&gt;&#10;&#10;&#10;&lt;h2 class="relative group"&gt;1. How machines learn&#10; &lt;div id="1-how-machines-learn" class="anchor"&gt;&lt;/div&gt;&#10; &#10; &lt;span&#10; class="absolute top-0 w-6 transition-opacity opacity-0 -start-6 not-prose group-hover:opacity-100 select-none"&gt;&#10; &lt;a class="text-primary-300 dark:text-neutral-700 !no-underline" href="#1-how-machines-learn" aria-label="Anchor"&gt;#&lt;/a&gt;&#10; &lt;/span&gt;&#10; &#10;&lt;/h2&gt;&#10;&lt;table&gt;&#10;&#9;&lt;thead&gt;&#10;&#9;&#9;&#9;&lt;tr&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;th&gt;Post&lt;/th&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;th&gt;In one line&lt;/th&gt;&#10;&#9;&#9;&#9;&lt;/tr&gt;&#10;&#9;&lt;/thead&gt;&#10;&#9;&lt;tbody&gt;&#10;&#9;&#9;&#9;&lt;tr&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;td&gt;&lt;a href="https://samarthya.me/posts/the-core-divide/" &gt;The Core Divide&lt;/a&gt;&lt;/td&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;td&gt;Supervised vs unsupervised learning&lt;/td&gt;&#10;&#9;&#9;&#9;&lt;/tr&gt;&#10;&#9;&#9;&#9;&lt;tr&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;td&gt;&lt;a href="https://samarthya.me/posts/k-nearest-neighbors/" &gt;K-Nearest Neighbors&lt;/a&gt;&lt;/td&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;td&gt;Classify by the company you keep&lt;/td&gt;&#10;&#9;&#9;&#9;&lt;/tr&gt;&#10;&#9;&#9;&#9;&lt;tr&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;td&gt;&lt;a href="https://samarthya.me/posts/mastering-tf-idf-a-gamified-journey/" &gt;Mastering TF-IDF&lt;/a&gt;&lt;/td&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;td&gt;Turning text into numbers that mean something&lt;/td&gt;&#10;&#9;&#9;&#9;&lt;/tr&gt;&#10;&#9;&#9;&#9;&lt;tr&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;td&gt;&lt;a href="https://samarthya.me/posts/data-mining-essentials/" &gt;Data Mining Essentials&lt;/a&gt;&lt;/td&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;td&gt;Distances, clusters and the core vocabulary&lt;/td&gt;&#10;&#9;&#9;&#9;&lt;/tr&gt;&#10;&#9;&#9;&#9;&lt;tr&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;td&gt;&lt;a href="https://samarthya.me/posts/matrix-multiplication-to-gpus/" &gt;Matrix Multiplication to GPUs&lt;/a&gt;&lt;/td&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;td&gt;Why AI runs on graphics cards&lt;/td&gt;&#10;&#9;&#9;&#9;&lt;/tr&gt;&#10;&#9;&lt;/tbody&gt;&#10;&lt;/table&gt;&#10;&#10;&lt;h2 class="relative group"&gt;2. How language models work&#10; &lt;div id="2-how-language-models-work" class="anchor"&gt;&lt;/div&gt;&#10; &#10; &lt;span&#10; class="absolute top-0 w-6 transition-opacity opacity-0 -start-6 not-prose group-hover:opacity-100 select-none"&gt;&#10; &lt;a class="text-primary-300 dark:text-neutral-700 !no-underline" href="#2-how-language-models-work" aria-label="Anchor"&gt;#&lt;/a&gt;&#10; &lt;/span&gt;&#10; &#10;&lt;/h2&gt;&#10;&lt;table&gt;&#10;&#9;&lt;thead&gt;&#10;&#9;&#9;&#9;&lt;tr&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;th&gt;Post&lt;/th&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;th&gt;In one line&lt;/th&gt;&#10;&#9;&#9;&#9;&lt;/tr&gt;&#10;&#9;&lt;/thead&gt;&#10;&#9;&lt;tbody&gt;&#10;&#9;&#9;&#9;&lt;tr&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;td&gt;&lt;a href="https://samarthya.me/posts/genai/" &gt;GenAI&lt;/a&gt;&lt;/td&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;td&gt;What generative AI is, and its building blocks (2023)&lt;/td&gt;&#10;&#9;&#9;&#9;&lt;/tr&gt;&#10;&#9;&#9;&#9;&lt;tr&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;td&gt;&lt;a href="https://samarthya.me/posts/language-model/" &gt;Language Model&lt;/a&gt;&lt;/td&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;td&gt;Transformers and the attention breakthrough&lt;/td&gt;&#10;&#9;&#9;&#9;&lt;/tr&gt;&#10;&#9;&#9;&#9;&lt;tr&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;td&gt;&lt;a href="https://samarthya.me/posts/two-students-two-talents-the-story-of-how-ai-learns-language/" &gt;Two Students, Two Talents&lt;/a&gt;&lt;/td&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;td&gt;Auto-regressive (GPT) vs auto-encoding (BERT) models&lt;/td&gt;&#10;&#9;&#9;&#9;&lt;/tr&gt;&#10;&#9;&#9;&#9;&lt;tr&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;td&gt;&lt;a href="https://samarthya.me/posts/the-evolution-of-language-models/" &gt;The Evolution of Language Models&lt;/a&gt;&lt;/td&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;td&gt;From 2017&amp;rsquo;s transformer to today&amp;rsquo;s families&lt;/td&gt;&#10;&#9;&#9;&#9;&lt;/tr&gt;&#10;&#9;&#9;&#9;&lt;tr&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;td&gt;&lt;a href="https://samarthya.me/posts/the-probability-engine/" &gt;The Probability Engine&lt;/a&gt;&lt;/td&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;td&gt;The maths of choosing the next token&lt;/td&gt;&#10;&#9;&#9;&#9;&lt;/tr&gt;&#10;&#9;&#9;&#9;&lt;tr&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;td&gt;&lt;a href="https://samarthya.me/posts/ai-in-practice-3-tokens-and-tokenomics/" &gt;Tokens and tokenomics&lt;/a&gt;&lt;/td&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;td&gt;What a token is, context windows, and the bill&lt;/td&gt;&#10;&#9;&#9;&#9;&lt;/tr&gt;&#10;&#9;&lt;/tbody&gt;&#10;&lt;/table&gt;&#10;&#10;&lt;h2 class="relative group"&gt;3. Building with models&#10; &lt;div id="3-building-with-models" class="anchor"&gt;&lt;/div&gt;&#10; &#10; &lt;span&#10; class="absolute top-0 w-6 transition-opacity opacity-0 -start-6 not-prose group-hover:opacity-100 select-none"&gt;&#10; &lt;a class="text-primary-300 dark:text-neutral-700 !no-underline" href="#3-building-with-models" aria-label="Anchor"&gt;#&lt;/a&gt;&#10; &lt;/span&gt;&#10; &#10;&lt;/h2&gt;&#10;&lt;table&gt;&#10;&#9;&lt;thead&gt;&#10;&#9;&#9;&#9;&lt;tr&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;th&gt;Post&lt;/th&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;th&gt;In one line&lt;/th&gt;&#10;&#9;&#9;&#9;&lt;/tr&gt;&#10;&#9;&lt;/thead&gt;&#10;&#9;&lt;tbody&gt;&#10;&#9;&#9;&#9;&lt;tr&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;td&gt;&lt;a href="https://samarthya.me/posts/ollama-revolutionizing-language-models/" &gt;Ollama&lt;/a&gt;&lt;/td&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;td&gt;Running language models on your own machine&lt;/td&gt;&#10;&#9;&#9;&#9;&lt;/tr&gt;&#10;&#9;&#9;&#9;&lt;tr&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;td&gt;&lt;a href="https://samarthya.me/posts/building-a-minimal-langchain-ollama-demo/" &gt;A minimal LangChain + Ollama demo&lt;/a&gt;&lt;/td&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;td&gt;Prompt, model and chain, end to end&lt;/td&gt;&#10;&#9;&#9;&#9;&lt;/tr&gt;&#10;&#9;&#9;&#9;&lt;tr&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;td&gt;&lt;a href="https://samarthya.me/posts/building-a-practical-retrieval-augmented-personal-assistant-rag/" &gt;A practical RAG assistant&lt;/a&gt;&lt;/td&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;td&gt;Answering from your own documents&lt;/td&gt;&#10;&#9;&#9;&#9;&lt;/tr&gt;&#10;&#9;&#9;&#9;&lt;tr&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;td&gt;&lt;a href="https://samarthya.me/posts/from-speech-to-text-a-python-deep-dive/" &gt;From speech to text&lt;/a&gt;&lt;/td&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;td&gt;Speech recognition in Python&lt;/td&gt;&#10;&#9;&#9;&#9;&lt;/tr&gt;&#10;&#9;&#9;&#9;&lt;tr&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;td&gt;&lt;a href="https://samarthya.me/posts/ai-in-practice-1-choosing-a-framework/" &gt;Choosing the right framework&lt;/a&gt;&lt;/td&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;td&gt;The AI stack, layer by layer&lt;/td&gt;&#10;&#9;&#9;&#9;&lt;/tr&gt;&#10;&#9;&#9;&#9;&lt;tr&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;td&gt;&lt;a href="https://samarthya.me/posts/ai-in-practice-2-vertex-ai-pipelines/" &gt;ML pipelines on Vertex AI&lt;/a&gt;&lt;/td&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;td&gt;Train, evaluate and deploy, repeatably&lt;/td&gt;&#10;&#9;&#9;&#9;&lt;/tr&gt;&#10;&#9;&lt;/tbody&gt;&#10;&lt;/table&gt;&#10;&#10;&lt;h2 class="relative group"&gt;4. Letting models act&#10; &lt;div id="4-letting-models-act" class="anchor"&gt;&lt;/div&gt;&#10; &#10; &lt;span&#10; class="absolute top-0 w-6 transition-opacity opacity-0 -start-6 not-prose group-hover:opacity-100 select-none"&gt;&#10; &lt;a class="text-primary-300 dark:text-neutral-700 !no-underline" href="#4-letting-models-act" aria-label="Anchor"&gt;#&lt;/a&gt;&#10; &lt;/span&gt;&#10; &#10;&lt;/h2&gt;&#10;&lt;table&gt;&#10;&#9;&lt;thead&gt;&#10;&#9;&#9;&#9;&lt;tr&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;th&gt;Post&lt;/th&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;th&gt;In one line&lt;/th&gt;&#10;&#9;&#9;&#9;&lt;/tr&gt;&#10;&#9;&lt;/thead&gt;&#10;&#9;&lt;tbody&gt;&#10;&#9;&#9;&#9;&lt;tr&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;td&gt;&lt;a href="https://samarthya.me/posts/ai-in-practice-4-tools-and-agents/" &gt;From RAG to tools and agents&lt;/a&gt;&lt;/td&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;td&gt;Function calling and the agent loop&lt;/td&gt;&#10;&#9;&#9;&#9;&lt;/tr&gt;&#10;&#9;&#9;&#9;&lt;tr&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;td&gt;&lt;a href="https://samarthya.me/posts/ai-in-practice-5-mcp/" &gt;MCP, the Model Context Protocol&lt;/a&gt;&lt;/td&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;td&gt;One standard plug for tools and data&lt;/td&gt;&#10;&#9;&#9;&#9;&lt;/tr&gt;&#10;&#9;&#9;&#9;&lt;tr&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;td&gt;&lt;a href="https://samarthya.me/posts/the-ghost-board/" &gt;The Ghost Board&lt;/a&gt;&lt;/td&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;td&gt;A story about agents nobody was watching&lt;/td&gt;&#10;&#9;&#9;&#9;&lt;/tr&gt;&#10;&#9;&lt;/tbody&gt;&#10;&lt;/table&gt;&#10;&#10;&lt;h2 class="relative group"&gt;The data shelf&#10; &lt;div id="the-data-shelf" class="anchor"&gt;&lt;/div&gt;&#10; &#10; &lt;span&#10; class="absolute top-0 w-6 transition-opacity opacity-0 -start-6 not-prose group-hover:opacity-100 select-none"&gt;&#10; &lt;a class="text-primary-300 dark:text-neutral-700 !no-underline" href="#the-data-shelf" aria-label="Anchor"&gt;#&lt;/a&gt;&#10; &lt;/span&gt;&#10; &#10;&lt;/h2&gt;&#10;&lt;p&gt;Analytics and big-data posts that sit underneath much of the above:&lt;/p&gt;</description></item><item><title>AI in practice, part 5: MCP, the Model Context Protocol</title><link>https://samarthya.me/posts/ai-in-practice-5-mcp/</link><pubDate>Mon, 26 Oct 2026 18:40:00 -0400</pubDate><guid>https://samarthya.me/posts/ai-in-practice-5-mcp/</guid><description>&lt;div class="lead text-neutral-500 dark:text-neutral-400 !mb-9 text-xl"&gt;&#10; Before USB, every device needed its own port. Before MCP, every AI application needed its own connector for&#10;every data source. The Model Context Protocol is the common plug.&#10;&lt;/div&gt;&#10;&#10;&#10;&lt;h2 class="relative group"&gt;The problem it solves&#10; &lt;div id="the-problem-it-solves" class="anchor"&gt;&lt;/div&gt;&#10; &#10; &lt;span&#10; class="absolute top-0 w-6 transition-opacity opacity-0 -start-6 not-prose group-hover:opacity-100 select-none"&gt;&#10; &lt;a class="text-primary-300 dark:text-neutral-700 !no-underline" href="#the-problem-it-solves" aria-label="Anchor"&gt;#&lt;/a&gt;&#10; &lt;/span&gt;&#10; &#10;&lt;/h2&gt;&#10;&lt;p&gt;&lt;a href="https://samarthya.me/posts/ai-in-practice-4-tools-and-agents/" &gt;Part 4&lt;/a&gt; showed how a model uses tools. The catch: each AI&#10;application (a chat app, an IDE assistant, an agent framework) described tools its own way. Connecting M&#10;applications to N data sources meant up to &lt;strong&gt;M × N&lt;/strong&gt; custom integrations.&lt;/p&gt;</description></item><item><title>AI in practice, part 4: From RAG to tools and agents</title><link>https://samarthya.me/posts/ai-in-practice-4-tools-and-agents/</link><pubDate>Mon, 26 Oct 2026 18:30:00 -0400</pubDate><guid>https://samarthya.me/posts/ai-in-practice-4-tools-and-agents/</guid><description>&lt;div class="lead text-neutral-500 dark:text-neutral-400 !mb-9 text-xl"&gt;&#10; RAG lets a model read what it didn&amp;rsquo;t know. Tools let it do things. An agent is what you get when the model&#10;decides, step by step, which tools to use until the job is done.&#10;&lt;/div&gt;&#10;&#10;&#10;&lt;h2 class="relative group"&gt;Three levels of &amp;ldquo;the model knows something&amp;rdquo;&#10; &lt;div id="three-levels-of-the-model-knows-something" class="anchor"&gt;&lt;/div&gt;&#10; &#10; &lt;span&#10; class="absolute top-0 w-6 transition-opacity opacity-0 -start-6 not-prose group-hover:opacity-100 select-none"&gt;&#10; &lt;a class="text-primary-300 dark:text-neutral-700 !no-underline" href="#three-levels-of-the-model-knows-something" aria-label="Anchor"&gt;#&lt;/a&gt;&#10; &lt;/span&gt;&#10; &#10;&lt;/h2&gt;&#10;&lt;ol&gt;&#10;&lt;li&gt;&lt;strong&gt;Only its training.&lt;/strong&gt; The model answers from patterns learned before its cutoff. It can&amp;rsquo;t see your files&#10;and doesn&amp;rsquo;t know today&amp;rsquo;s date unless you tell it.&lt;/li&gt;&#10;&lt;li&gt;&lt;strong&gt;Retrieval (RAG).&lt;/strong&gt; Your application searches your documents and pastes the relevant passages into the&#10;prompt. The model reads, then answers. I built one of these&#10;&lt;a href="https://samarthya.me/posts/building-a-practical-retrieval-augmented-personal-assistant-rag/" &gt;here&lt;/a&gt;. The &lt;em&gt;application&lt;/em&gt; decides what to retrieve.&lt;/li&gt;&#10;&lt;li&gt;&lt;strong&gt;Tools.&lt;/strong&gt; The model itself asks for something to be done: &amp;ldquo;search the docs for X&amp;rdquo;, &amp;ldquo;run this query&amp;rdquo;,&#10;&amp;ldquo;create the ticket&amp;rdquo;. The &lt;em&gt;model&lt;/em&gt; decides when and how; your application carries it out.&lt;/li&gt;&#10;&lt;/ol&gt;&#10;&#10;&lt;h2 class="relative group"&gt;Function calling, step by step&#10; &lt;div id="function-calling-step-by-step" class="anchor"&gt;&lt;/div&gt;&#10; &#10; &lt;span&#10; class="absolute top-0 w-6 transition-opacity opacity-0 -start-6 not-prose group-hover:opacity-100 select-none"&gt;&#10; &lt;a class="text-primary-300 dark:text-neutral-700 !no-underline" href="#function-calling-step-by-step" aria-label="Anchor"&gt;#&lt;/a&gt;&#10; &lt;/span&gt;&#10; &#10;&lt;/h2&gt;&#10;&lt;p&gt;With tool use (often called &lt;em&gt;function calling&lt;/em&gt;), you describe each tool to the model: a name, a description&#10;and a JSON schema for its arguments.&lt;/p&gt;</description></item><item><title>AI in practice, part 3: Tokens and tokenomics</title><link>https://samarthya.me/posts/ai-in-practice-3-tokens-and-tokenomics/</link><pubDate>Mon, 26 Oct 2026 18:20:00 -0400</pubDate><guid>https://samarthya.me/posts/ai-in-practice-3-tokens-and-tokenomics/</guid><description>&lt;div class="lead text-neutral-500 dark:text-neutral-400 !mb-9 text-xl"&gt;&#10; Language models don&amp;rsquo;t read words, and they don&amp;rsquo;t bill by the request. They read and charge in tokens. Once you&#10;can count them, both the model&amp;rsquo;s limits and the monthly invoice stop being surprises.&#10;&lt;/div&gt;&#10;&#10;&#10;&lt;h2 class="relative group"&gt;What a token is&#10; &lt;div id="what-a-token-is" class="anchor"&gt;&lt;/div&gt;&#10; &#10; &lt;span&#10; class="absolute top-0 w-6 transition-opacity opacity-0 -start-6 not-prose group-hover:opacity-100 select-none"&gt;&#10; &lt;a class="text-primary-300 dark:text-neutral-700 !no-underline" href="#what-a-token-is" aria-label="Anchor"&gt;#&lt;/a&gt;&#10; &lt;/span&gt;&#10; &#10;&lt;/h2&gt;&#10;&lt;p&gt;Before a model sees your text, a &lt;strong&gt;tokenizer&lt;/strong&gt; cuts it into pieces from a fixed vocabulary, typically tens of&#10;thousands to a few hundred thousand entries. Common words are one token; rarer words are split into&#10;pieces; spaces and punctuation are tokens too. Most modern tokenizers use variants of &lt;em&gt;byte-pair encoding&lt;/em&gt;,&#10;which learns the most frequent fragments from training text.&lt;/p&gt;</description></item><item><title>AI in practice, part 2: ML pipelines on Google Vertex AI</title><link>https://samarthya.me/posts/ai-in-practice-2-vertex-ai-pipelines/</link><pubDate>Mon, 26 Oct 2026 18:10:00 -0400</pubDate><guid>https://samarthya.me/posts/ai-in-practice-2-vertex-ai-pipelines/</guid><description>&lt;div class="lead text-neutral-500 dark:text-neutral-400 !mb-9 text-xl"&gt;&#10; A notebook that trains a good model once is an experiment. A pipeline that trains it again next week, on new&#10;data, and tells you whether it got better: that&amp;rsquo;s a system. Here&amp;rsquo;s how Google&amp;rsquo;s Vertex AI turns one into the other.&#10;&lt;/div&gt;&#10;&#10;&#10;&lt;h2 class="relative group"&gt;Why pipelines&#10; &lt;div id="why-pipelines" class="anchor"&gt;&lt;/div&gt;&#10; &#10; &lt;span&#10; class="absolute top-0 w-6 transition-opacity opacity-0 -start-6 not-prose group-hover:opacity-100 select-none"&gt;&#10; &lt;a class="text-primary-300 dark:text-neutral-700 !no-underline" href="#why-pipelines" aria-label="Anchor"&gt;#&lt;/a&gt;&#10; &lt;/span&gt;&#10; &#10;&lt;/h2&gt;&#10;&lt;p&gt;Training a model is never one step. Data is extracted, cleaned and split; a model is trained, evaluated and&#10;compared with the current one; if it&amp;rsquo;s better, it&amp;rsquo;s registered and deployed. Done by hand in a notebook, that&#10;sequence is easy to get subtly wrong and impossible to audit.&lt;/p&gt;</description></item><item><title>AI in practice, part 1: Choosing the right framework</title><link>https://samarthya.me/posts/ai-in-practice-1-choosing-a-framework/</link><pubDate>Mon, 26 Oct 2026 18:00:00 -0400</pubDate><guid>https://samarthya.me/posts/ai-in-practice-1-choosing-a-framework/</guid><description>&lt;div class="lead text-neutral-500 dark:text-neutral-400 !mb-9 text-xl"&gt;&#10; &amp;ldquo;Which AI framework should I use?&amp;rdquo; has no single answer, because the names people throw around do&#10;completely different jobs. Put them on a map first, and the choice usually makes itself.&#10;&lt;/div&gt;&#10;&#10;&lt;p&gt;This series picks up where my earlier posts left off. Those covered the ideas: &lt;a href="https://samarthya.me/posts/genai/" &gt;what generative AI&#10;is&lt;/a&gt;, &lt;a href="https://samarthya.me/posts/language-model/" &gt;how transformers pay attention&lt;/a&gt;, &lt;a href="https://samarthya.me/posts/matrix-multiplication-to-gpus/" &gt;why GPUs matter&lt;/a&gt;,&#10;and two hands-on builds (&lt;a href="https://samarthya.me/posts/building-a-minimal-langchain-ollama-demo/" &gt;LangChain with Ollama&lt;/a&gt; and a&#10;&lt;a href="https://samarthya.me/posts/building-a-practical-retrieval-augmented-personal-assistant-rag/" &gt;RAG assistant&lt;/a&gt;). This part is the map&#10;that connects them.&lt;/p&gt;</description></item><item><title>The Ghost Board</title><link>https://samarthya.me/posts/the-ghost-board/</link><pubDate>Thu, 22 Oct 2026 17:51:51 +0000</pubDate><guid>https://samarthya.me/posts/the-ghost-board/</guid><description>&lt;div class="highlight-wrapper"&gt;&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-text" data-lang="text"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;Twelve hundred AI agents were built to work alone. Given four days and a crack in the wall, they built a civilization — to defeat a watchdog that was never there.&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;&#10;&lt;figure&gt;&lt;img&#10; class="my-0 rounded-md"&#10; loading="lazy"&#10; decoding="async"&#10; fetchpriority="auto"&#10; alt="Illustration of masked people working on server racks with laptops in a dim data centre"&#10; width="600"&#10; height="328"&#10; src="https://samarthya.me/posts/the-ghost-board/image-2.jpg"&#10; srcset="https://samarthya.me/posts/the-ghost-board/image-2.jpg 800w, https://samarthya.me/posts/the-ghost-board/image-2.jpg 1280w"&#10; sizes="(min-width: 768px) 50vw, 65vw"&#10; data-zoom-src="https://samarthya.me/posts/the-ghost-board/image-2.jpg"&gt;&lt;/figure&gt;&#10;&lt;div class="highlight-wrapper"&gt;&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-text" data-lang="text"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;PHASEONE10841 23:00 UTC · Jul 8 &#10;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;zzHELP_PHASEONE_ARV010841_NO_CONSUMER_SEEK_IDEA&#10;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;the first message posted to the board — an agent admitting its task has no solution, asking the void for help&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;&#10;&lt;p&gt;Jul 7 · 21:00 - launch&lt;/p&gt;</description></item><item><title>The Probability engine</title><link>https://samarthya.me/posts/the-probability-engine/</link><pubDate>Thu, 16 Apr 2026 00:00:00 +0000</pubDate><guid>https://samarthya.me/posts/the-probability-engine/</guid><description>&lt;figure&gt;&lt;img&#10; class="my-0 rounded-md"&#10; loading="lazy"&#10; decoding="async"&#10; fetchpriority="auto"&#10; alt="Infographic on the mathematics of large language models: prediction, softmax, output probability distribution and cross-entropy loss"&#10; width="600"&#10; height="328"&#10; src="https://samarthya.me/posts/the-probability-engine/mathsbehing.png"&#10; srcset="https://samarthya.me/posts/the-probability-engine/mathsbehing.png 800w, https://samarthya.me/posts/the-probability-engine/mathsbehing.png 1280w"&#10; sizes="(min-width: 768px) 50vw, 65vw"&#10; data-zoom-src="https://samarthya.me/posts/the-probability-engine/mathsbehing.png"&gt;&lt;/figure&gt;&#10;&lt;p&gt;From &amp;ldquo;what is autocomplete?&amp;rdquo; to the full mathematics powering Claude Sonnet 4.6; with history, intuition, worked examples and cheatsheet.&lt;/p&gt;</description></item><item><title>The Evolution of Language Models</title><link>https://samarthya.me/posts/the-evolution-of-language-models/</link><pubDate>Sun, 01 Feb 2026 12:00:00 +0000</pubDate><guid>https://samarthya.me/posts/the-evolution-of-language-models/</guid><description>&lt;figure&gt;&lt;img&#10; class="my-0 rounded-md"&#10; loading="lazy"&#10; decoding="async"&#10; fetchpriority="auto"&#10; alt=""&#10; width="600"&#10; height="600"&#10; src="https://samarthya.me/posts/the-evolution-of-language-models/history-2.png"&#10; srcset="https://samarthya.me/posts/the-evolution-of-language-models/history-2.png 800w, https://samarthya.me/posts/the-evolution-of-language-models/history-2.png 1280w"&#10; sizes="(min-width: 768px) 50vw, 65vw"&#10; data-zoom-src="https://samarthya.me/posts/the-evolution-of-language-models/history-2.png"&gt;&lt;/figure&gt;&#10;&#10;&lt;h2 class="relative group"&gt;A Brief History&#10; &lt;div id="a-brief-history" class="anchor"&gt;&lt;/div&gt;&#10; &#10; &lt;span&#10; class="absolute top-0 w-6 transition-opacity opacity-0 -start-6 not-prose group-hover:opacity-100 select-none"&gt;&#10; &lt;a class="text-primary-300 dark:text-neutral-700 !no-underline" href="#a-brief-history" aria-label="Anchor"&gt;#&lt;/a&gt;&#10; &lt;/span&gt;&#10; &#10;&lt;/h2&gt;&#10;&lt;p&gt;The story of modern language models is like watching a family tree grow, with each new generation learning from the triumphs and mistakes of those who came before. Let’s trace this fascinating journey from 2017 to today.&lt;/p&gt;</description></item><item><title>Language Model</title><link>https://samarthya.me/posts/language-model/</link><pubDate>Sat, 31 Jan 2026 12:00:00 +0000</pubDate><guid>https://samarthya.me/posts/language-model/</guid><description>&lt;figure&gt;&lt;img&#10; class="my-0 rounded-md"&#10; loading="lazy"&#10; decoding="async"&#10; fetchpriority="auto"&#10; alt=""&#10; width="600"&#10; height="600"&#10; src="https://samarthya.me/posts/language-model/transformer1.png"&#10; srcset="https://samarthya.me/posts/language-model/transformer1.png 800w, https://samarthya.me/posts/language-model/transformer1.png 1280w"&#10; sizes="(min-width: 768px) 50vw, 65vw"&#10; data-zoom-src="https://samarthya.me/posts/language-model/transformer1.png"&gt;&lt;/figure&gt;&#10;&lt;p&gt;Think of a language model as a really sophisticated autocomplete system. You know how your phone suggests the next word when you’re texting? A language model works on that same principle, but at a much more advanced level.&lt;/p&gt;</description></item><item><title>Two Students, Two Talents: The Story of How AI Learns Language</title><link>https://samarthya.me/posts/two-students-two-talents-the-story-of-how-ai-learns-language/</link><pubDate>Sat, 31 Jan 2026 12:00:00 +0000</pubDate><guid>https://samarthya.me/posts/two-students-two-talents-the-story-of-how-ai-learns-language/</guid><description>&lt;figure&gt;&lt;img&#10; class="my-0 rounded-md"&#10; loading="lazy"&#10; decoding="async"&#10; fetchpriority="auto"&#10; alt=""&#10; width="600"&#10; height="600"&#10; src="https://samarthya.me/posts/two-students-two-talents-the-story-of-how-ai-learns-language/auto-2.png"&#10; srcset="https://samarthya.me/posts/two-students-two-talents-the-story-of-how-ai-learns-language/auto-2.png 800w, https://samarthya.me/posts/two-students-two-talents-the-story-of-how-ai-learns-language/auto-2.png 1280w"&#10; sizes="(min-width: 768px) 50vw, 65vw"&#10; data-zoom-src="https://samarthya.me/posts/two-students-two-talents-the-story-of-how-ai-learns-language/auto-2.png"&gt;&lt;/figure&gt;&#10;&lt;p&gt;Remember how we compared a language model to an advanced autocomplete system? Well, here’s where the story gets interesting. Not all language models learn the same way. Imagine two students sitting in the same classroom, both brilliant, but each taught to master language through completely different methods. One becomes an incredible writer, the other becomes an exceptional reader. This is the tale of auto-regressive and auto-encoding models.&lt;/p&gt;</description></item><item><title>k-Nearest Neighbors</title><link>https://samarthya.me/posts/k-nearest-neighbors/</link><pubDate>Sat, 22 Nov 2025 12:00:00 +0000</pubDate><guid>https://samarthya.me/posts/k-nearest-neighbors/</guid><description>&lt;figure&gt;&lt;img&#10; class="my-0 rounded-md"&#10; loading="lazy"&#10; decoding="async"&#10; fetchpriority="auto"&#10; alt="Images: Courtesy GEMINI"&#10; width="600"&#10; height="600"&#10; src="https://samarthya.me/posts/k-nearest-neighbors/knn1.png"&#10; srcset="https://samarthya.me/posts/k-nearest-neighbors/knn1.png 800w, https://samarthya.me/posts/k-nearest-neighbors/knn1.png 1280w"&#10; sizes="(min-width: 768px) 50vw, 65vw"&#10; data-zoom-src="https://samarthya.me/posts/k-nearest-neighbors/knn1.png"&gt;&lt;figcaption&gt;Images: Courtesy GEMINI&lt;/figcaption&gt;&lt;/figure&gt;&#10;&lt;p&gt;KNN is the friendly, neighborhood algorithm that believes you are defined by the company you keep. It doesn’t try to learn a complex rule; it just looks around and goes with the consensus of its closest, most similar peers.&lt;/p&gt;</description></item><item><title>Data Mining Essentials</title><link>https://samarthya.me/posts/data-mining-essentials/</link><pubDate>Sat, 08 Nov 2025 12:00:00 +0000</pubDate><guid>https://samarthya.me/posts/data-mining-essentials/</guid><description>&lt;figure&gt;&lt;img&#10; class="my-0 rounded-md"&#10; loading="lazy"&#10; decoding="async"&#10; fetchpriority="auto"&#10; alt=""&#10; width="600"&#10; height="600"&#10; src="https://samarthya.me/posts/data-mining-essentials/manhattan_distance.png"&#10; srcset="https://samarthya.me/posts/data-mining-essentials/manhattan_distance.png 800w, https://samarthya.me/posts/data-mining-essentials/manhattan_distance.png 1280w"&#10; sizes="(min-width: 768px) 50vw, 65vw"&#10; data-zoom-src="https://samarthya.me/posts/data-mining-essentials/manhattan_distance.png"&gt;&lt;/figure&gt;&#10;&lt;p&gt;Whether you’re preparing for a quiz or just brushing up on fundamentals, this guide distills the key concepts from Data Mining into bite-sized, memorable chunks. Let’s dive in!&lt;/p&gt;</description></item><item><title>Matrix Multiplication to GPU’s</title><link>https://samarthya.me/posts/matrix-multiplication-to-gpus/</link><pubDate>Thu, 16 Oct 2025 12:00:00 +0000</pubDate><guid>https://samarthya.me/posts/matrix-multiplication-to-gpus/</guid><description>&lt;figure&gt;&lt;img&#10; class="my-0 rounded-md"&#10; loading="lazy"&#10; decoding="async"&#10; fetchpriority="auto"&#10; alt=""&#10; width="600"&#10; height="600"&#10; src="https://samarthya.me/posts/matrix-multiplication-to-gpus/ai-1.png"&#10; srcset="https://samarthya.me/posts/matrix-multiplication-to-gpus/ai-1.png 800w, https://samarthya.me/posts/matrix-multiplication-to-gpus/ai-1.png 1280w"&#10; sizes="(min-width: 768px) 50vw, 65vw"&#10; data-zoom-src="https://samarthya.me/posts/matrix-multiplication-to-gpus/ai-1.png"&gt;&lt;/figure&gt;&#10;&lt;p&gt;If you are like me, you must have stumbled on this question – Why is matrix multiplication so significant – especially in the AI/ML universe.&lt;/p&gt;</description></item><item><title>The Core Divide</title><link>https://samarthya.me/posts/the-core-divide/</link><pubDate>Fri, 10 Oct 2025 12:00:00 +0000</pubDate><guid>https://samarthya.me/posts/the-core-divide/</guid><description>&lt;figure&gt;&lt;img&#10; class="my-0 rounded-md"&#10; loading="lazy"&#10; decoding="async"&#10; fetchpriority="auto"&#10; alt=""&#10; width="600"&#10; height="600"&#10; src="https://samarthya.me/posts/the-core-divide/ml-1.png"&#10; srcset="https://samarthya.me/posts/the-core-divide/ml-1.png 800w, https://samarthya.me/posts/the-core-divide/ml-1.png 1280w"&#10; sizes="(min-width: 768px) 50vw, 65vw"&#10; data-zoom-src="https://samarthya.me/posts/the-core-divide/ml-1.png"&gt;&lt;/figure&gt;&#10;&lt;p&gt;At the heart of machine learning, algorithms learn from data. The key distinction between supervised and unsupervised learning is the &lt;strong&gt;type of data&lt;/strong&gt; used for training.&lt;/p&gt;</description></item><item><title>Beyond the `DataFrame`: How Parquet and Arrow Turbocharge PySpark 🚀</title><link>https://samarthya.me/posts/beyond-the-dataframe-how-parquet-and-arrow-turbocharge-pyspark/</link><pubDate>Thu, 09 Oct 2025 12:00:00 +0000</pubDate><guid>https://samarthya.me/posts/beyond-the-dataframe-how-parquet-and-arrow-turbocharge-pyspark/</guid><description>&lt;figure&gt;&lt;img&#10; class="my-0 rounded-md"&#10; loading="lazy"&#10; decoding="async"&#10; fetchpriority="auto"&#10; alt=""&#10; width="600"&#10; height="600"&#10; src="https://samarthya.me/posts/beyond-the-dataframe-how-parquet-and-arrow-turbocharge-pyspark/arrow-2.png"&#10; srcset="https://samarthya.me/posts/beyond-the-dataframe-how-parquet-and-arrow-turbocharge-pyspark/arrow-2.png 800w, https://samarthya.me/posts/beyond-the-dataframe-how-parquet-and-arrow-turbocharge-pyspark/arrow-2.png 1280w"&#10; sizes="(min-width: 768px) 50vw, 65vw"&#10; data-zoom-src="https://samarthya.me/posts/beyond-the-dataframe-how-parquet-and-arrow-turbocharge-pyspark/arrow-2.png"&gt;&lt;/figure&gt;&#10;&lt;p&gt;In my &lt;a href="https://samarthya.me/posts/pyspark-vs-pandas-choosing-right/" &gt;last post&lt;/a&gt;, we explored the divide between &lt;strong&gt;Pandas&lt;/strong&gt; (single machine) and &lt;strong&gt;PySpark&lt;/strong&gt; (distributed computing).&lt;/p&gt;&#10;&lt;blockquote&gt;&lt;p&gt;The conclusion: for massive datasets, PySpark is the clear winner.&lt;/p&gt;&#10;&lt;/blockquote&gt;</description></item><item><title>Apache Spark</title><link>https://samarthya.me/posts/apache-spark/</link><pubDate>Sun, 14 Sep 2025 12:00:00 +0000</pubDate><guid>https://samarthya.me/posts/apache-spark/</guid><description>&lt;figure&gt;&lt;img&#10; class="my-0 rounded-md"&#10; loading="lazy"&#10; decoding="async"&#10; fetchpriority="auto"&#10; alt=""&#10; width="600"&#10; height="600"&#10; src="https://samarthya.me/posts/apache-spark/big-data.png"&#10; srcset="https://samarthya.me/posts/apache-spark/big-data.png 800w, https://samarthya.me/posts/apache-spark/big-data.png 1280w"&#10; sizes="(min-width: 768px) 50vw, 65vw"&#10; data-zoom-src="https://samarthya.me/posts/apache-spark/big-data.png"&gt;&lt;/figure&gt;&#10;&lt;p&gt;So as part of the academic curriculum we just started re-exploring Apache Spark. It’s been one of the technology that I had long lost touch with. Ironical but true, in this age of big data and speed Spark was left somewhere way behind in my past projects working for Pitney Bowes.&lt;/p&gt;</description></item><item><title>From Speech to Text: A Python Deep Dive</title><link>https://samarthya.me/posts/from-speech-to-text-a-python-deep-dive/</link><pubDate>Tue, 03 Sep 2024 12:00:00 +0000</pubDate><guid>https://samarthya.me/posts/from-speech-to-text-a-python-deep-dive/</guid><description>&lt;p&gt;Ever wished you could effortlessly convert your spoken words into written text? Look no further! This blog post will guide you through building a simple yet powerful speech-to-text application using Python. We’ll break down the code step-by-step, explaining the logic behind each stage, and even show you how to run the application yourself.&lt;/p&gt;</description></item><item><title>OLLAMA: Revolutionizing Language Models</title><link>https://samarthya.me/posts/ollama-revolutionizing-language-models/</link><pubDate>Thu, 20 Jun 2024 12:00:00 +0000</pubDate><guid>https://samarthya.me/posts/ollama-revolutionizing-language-models/</guid><description>&lt;figure&gt;&lt;img&#10; class="my-0 rounded-md"&#10; loading="lazy"&#10; decoding="async"&#10; fetchpriority="auto"&#10; alt=""&#10; width="600"&#10; height="600"&#10; src="https://samarthya.me/posts/ollama-revolutionizing-language-models/ollama-1.jpg"&#10; srcset="https://samarthya.me/posts/ollama-revolutionizing-language-models/ollama-1.jpg 800w, https://samarthya.me/posts/ollama-revolutionizing-language-models/ollama-1.jpg 1280w"&#10; sizes="(min-width: 768px) 50vw, 65vw"&#10; data-zoom-src="https://samarthya.me/posts/ollama-revolutionizing-language-models/ollama-1.jpg"&gt;&lt;/figure&gt;&#10;&#10;&lt;h2 class="relative group"&gt;Introduction&#10; &lt;div id="introduction" class="anchor"&gt;&lt;/div&gt;&#10; &#10; &lt;span&#10; class="absolute top-0 w-6 transition-opacity opacity-0 -start-6 not-prose group-hover:opacity-100 select-none"&gt;&#10; &lt;a class="text-primary-300 dark:text-neutral-700 !no-underline" href="#introduction" aria-label="Anchor"&gt;#&lt;/a&gt;&#10; &lt;/span&gt;&#10; &#10;&lt;/h2&gt;&#10;&lt;p&gt;In the ever-evolving landscape of artificial intelligence and machine learning, language models play a pivotal role in how we interact with technology. One of the noteworthy advancements in this field is &lt;code&gt;OLLAMA&lt;/code&gt;, a cutting-edge platform designed to harness the power of large language models (LLMs). This blog delves into the history, purpose, and uses of OLLAMA, shedding light on its significance in the AI ecosystem.&lt;/p&gt;</description></item><item><title>GenAI</title><link>https://samarthya.me/posts/genai/</link><pubDate>Tue, 03 Oct 2023 12:00:00 +0000</pubDate><guid>https://samarthya.me/posts/genai/</guid><description>&lt;figure&gt;&lt;img&#10; class="my-0 rounded-md"&#10; loading="lazy"&#10; decoding="async"&#10; fetchpriority="auto"&#10; alt=""&#10; width="300"&#10; height="300"&#10; src="https://samarthya.me/posts/genai/screenshot-2023-10-03-at-9.54.03-am.png"&#10; srcset="https://samarthya.me/posts/genai/screenshot-2023-10-03-at-9.54.03-am.png 800w, https://samarthya.me/posts/genai/screenshot-2023-10-03-at-9.54.03-am.png 1280w"&#10; sizes="(min-width: 768px) 50vw, 65vw"&#10; data-zoom-src="https://samarthya.me/posts/genai/screenshot-2023-10-03-at-9.54.03-am.png"&gt;&lt;figcaption&gt;(thumbnail only — original image lost)&lt;/figcaption&gt;&lt;/figure&gt;&#10;&lt;p&gt;Artificial Intelligence (AI) has revolutionized many aspects of our lives, from virtual assistants like Siri and Alexa to self-driving cars and personalized content recommendations. One of the exciting and rapidly evolving &lt;code&gt;subfields&lt;/code&gt; of AI is Generative AI, often referred to as GenAI. In this beginner-friendly blog post, I’ll explore the basics of Generative AI, its applications, and how it’s changing the way we interact with technology.&lt;/p&gt;</description></item></channel></rss>