<?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 Akshay on Medium]]></title>
        <description><![CDATA[Stories by Akshay on Medium]]></description>
        <link>https://medium.com/@Akshay.LearnsAI?source=rss-dda088f831fc------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*ZIr_JFuvDkxep7eQA_PGIQ.jpeg</url>
            <title>Stories by Akshay on Medium</title>
            <link>https://medium.com/@Akshay.LearnsAI?source=rss-dda088f831fc------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Fri, 04 Dec 2026 13:03:09 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@Akshay.LearnsAI/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[# Recapr is here — meeting transcripts that don’t punish you for using them]]></title>
            <link>https://medium.com/@Akshay.LearnsAI/recapr-is-here-meeting-transcripts-that-dont-punish-you-for-using-them-6cab37b4ace5?source=rss-dda088f831fc------2</link>
            <guid isPermaLink="false">https://medium.com/p/6cab37b4ace5</guid>
            <dc:creator><![CDATA[Akshay]]></dc:creator>
            <pubDate>Wed, 13 May 2026 05:35:59 GMT</pubDate>
            <atom:updated>2026-05-13T05:35:59.183Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/204/1*hOO1iKhzRHvMaMGhRvRDWg.png" /></figure><p><em>*Or: how I spent three weekends building a free meeting transcription tool, because the paid ones kept telling me I’d used my quota.*</em></p><p><strong>## The phrase I couldn’t find</strong></p><p>It was a Tuesday evening. I was prepping for a system-design round, and I needed to remember exactly how I had explained the trade-off between row-level security and application-layer tenant filtering in an earlier interview — three weeks back, in a 47-minute Zoom call I had recorded.</p><p>I had the recording. I had Otter.ai. What I didn’t have was access to my own transcripts, because I was on the free plan and had blown through the 300-minute monthly cap weeks ago. Upgrade to Pro: $16.99 / month. For a feature I was going to use, maybe, four times that month.</p><p>I thought about it. I had also wanted to transcribe two podcast episodes a friend had asked me to summarize. And a voice memo from a brainstorm. Each one of those alone wasn’t worth $17. Together they barely justified it. But the math kept landing in this weird in-between place where the tool was useful enough that I missed it when I didn’t have it, and expensive enough that I resented paying for it on the months I didn’t need it.</p><p>I’d been here before, with other tools. The free plan is just enough to make you want it. The paid plan assumes you’ll use it daily. There’s no middle.</p><p>That night I started building Recapr.</p><p><strong>## What the existing tools get wrong</strong></p><p>Before I talk about what I built, let me be honest about what I was reacting against:</p><p><strong>**The free tiers are designed to fail you.**</strong> A 300-minute monthly cap is fine for someone who never records anything; it’s brutal for anyone who actually has meetings. Storage caps that auto-delete recordings after 30 days punish exactly the use case — “let me find what I said about X” — that transcription is most valuable for.</p><p><strong>**The pricing assumes you’re a power user.**</strong> Otter’s $17/month, Fathom’s $19, Fireflies’ $18 — these are sensible numbers if you’re a salesperson who lives in calls. They’re absurd for the consultant who has four meetings a week or the student who records lectures.</p><p><strong>**The features assume you only want a transcript.**</strong> What I actually wanted, half the time, wasn’t a clean transcript. It was to ask the recording a question. “Did I sound nervous in the first ten minutes?” “Where did I lose the thread on the Kubernetes question?” “Pull every decision we made in this meeting.” None of the existing tools could do that. They handed me a wall of text and walked away.</p><p>So when I started designing Recapr, I had three rules pinned above the laptop:</p><p>1. The free tier is the product, not a teaser.</p><p>2. The user owns their data; we never use it for anything they didn’t ask for.</p><p>3. Don’t just transcribe — <em>*understand*</em>.</p><p><strong>## What Recapr does</strong></p><p>You drop in any audio or video file — or hit Record to capture your screen and mic in the browser. About 20 seconds later, you have:</p><p>- A speaker-labeled transcript, with timestamps, that you can search across every meeting you’ve ever recorded.</p><p>- An AI summary in plain English. Not bullet-soup; actual paragraphs.</p><p>- Action items pulled out automatically, with assignees and deadlines where the model can infer them.</p><p>- <strong>**A type-specific analysis.**</strong> This is the part I’m most proud of. Recapr first figures out what kind of conversation it just heard — interview? podcast? lecture? casual chat? — and then runs a different analysis depending on the type. For interviews you get clarity, confidence, and technical-depth scores out of 100, plus a list of your strengths and where you could improve. For podcasts: engagement, talk-time balance, memorable quotes. For lectures: pacing and topic coverage.</p><p>The free tier:</p><h4>- <strong>**5 hours**</strong> of transcription per month</h4><h4>- <strong>**10 GB**</strong> of encrypted storage</h4><h4>- <strong>**90 minutes**</strong> max per recording</h4><p>- All features. No paywall on search, summaries, action items, analysis, downloads, or anything else.</p><p>- Record from your laptop <em>*or*</em> your phone, any browser.</p><p>Pro is $8/month if you outgrow it. Most people won’t. That’s by design.</p><p><strong>## The tech, for the curious</strong></p><p>I’m a platform architect by background, so I had opinions going in. The constraint that drove everything: this had to be runnable by one person without a pager. No always-on VMs, no manual scaling, no infrastructure I’d be tempted to neglect.</p><p>Here’s the rough shape:</p><p><strong>**Frontend**</strong> — Next.js 16 on Vercel, with the App Router. Server components for the dashboard shell (so the first paint already has your meetings), client components for the upload zone, recorder, and the live progress UI. Tailwind v4 for styling, Clerk for auth. The recording UI uses `getDisplayMedia` for screen+system audio and merges it with a `getUserMedia` mic stream.</p><p><strong>**Backend**</strong> — A single FastAPI service on Google Cloud Run. Source-based deploys (`gcloud run deploy — source .`), no Docker file to maintain. asyncpg for non-blocking Postgres I/O. The whole API is one container that scales to zero when nobody is using it.</p><p><strong>**Pipeline**</strong> — Three stages glued together with Pub/Sub:</p><p>1. Upload finalizes in Cloud Storage → Eventarc fires a finalize event → `/jobs/uploaded` extracts the audio to FLAC with ffmpeg.</p><p>2. `/jobs/transcribe` sends a signed download URL to Deepgram Nova-3 for transcription with speaker diarization. The transcript segments are bulk-inserted into Postgres.</p><p>3. `/jobs/summarize` calls GPT-4o-mini with a JSON-schema-constrained prompt that produces the summary, action items, type classification, and analysis in a single call.</p><p>Each stage is idempotent: if Pub/Sub redelivers a message (which it will, occasionally — that’s the contract), the handler sees the meeting is already past that stage and returns a friendly skip. The ack deadline is set to 600 seconds so long files don’t get spuriously retried mid-transcription.</p><p><strong>**Storage**</strong> — Neon Postgres with row-level security policies. Every tenant-scoped table has a policy like:</p><p>```sql</p><p>USING (organization_id = current_setting(‘app.org_id’)::uuid)</p><p>```</p><p>The application’s database connection helper sets that session variable per request, populated from the Clerk JWT. The upshot is that even if I write a buggy query that forgets to filter by org, Postgres itself refuses to return cross-tenant rows. It’s a small thing to set up and it makes a whole class of bug impossible.</p><p><strong>**Direct browser uploads**</strong> — Probably the most opinionated design choice. When a user uploads a file, the API doesn’t proxy the bytes. It returns a V4 signed PUT URL for Google Cloud Storage, and the browser uploads directly to the bucket. Cloud Run never sees the audio. This saves bandwidth, simplifies the request lifecycle, and — importantly — means the audio doesn’t transit my application server even once.</p><p>The whole thing came together in about three weekends.</p><p><strong>— -</strong></p><p><strong>## The wall I almost gave up at</strong></p><p>Around the third weekend, I had something I thought was working. I uploaded a 25-minute audio file from an old interview. The pipeline ran. Status went to “complete.” I opened the meeting page and saw…</p><p>Nothing.</p><p>No transcript. No summary. Status said complete but the data wasn’t there.</p><p>I spent two hours debugging, increasingly convinced I had a fundamental design flaw. The pipeline was firing, the database showed status complete, but the segments table was empty.</p><p>It turned out to be embarrassingly mundane: my code was only parsing Deepgram’s `utterances` array, and Deepgram occasionally returns transcripts in the `words` array instead for shorter or unusual audio. The fix was three lines — fall back to building a synthetic utterance from words if utterances is empty.</p><p>Three lines that almost made me quit the project.</p><p>I tell this story because every indie launch post you read makes it look like the build went smoothly and the only “challenge” was deciding what to name it. The real challenges are mundane and stupid. They’re three-line fixes you don’t see for two hours.</p><p><strong>— -</strong></p><p><strong>## Why I’m giving away so much</strong></p><p>The 5 hours of transcription, the 10 GB of storage, the unlimited search — these aren’t going to drive paid conversion through obvious gating. That’s intentional.</p><p>I built this because I needed it. I have to imagine that other people in similar situations need it for similar reasons. If the free tier is genuinely useful, those people will use it. Some of them will eventually outgrow it. A few will pay $8/month for the higher limits.</p><p>But more importantly: if the free tier is good enough that people <em>*recommend*</em> it to others, the growth doesn’t have to come from squeezing each user. It comes from each user telling one other person.</p><p>The math on $8/month is fine. A user on the Pro tier with full utilization costs me about $6.40 in API fees (Deepgram + OpenAI + GCS), leaving a thin margin. But most users won’t hit full utilization, and the gross margin in practice settles around 60–80%. That’s enough.</p><p>What it isn’t enough for is a sales team or a marketing budget. So I’m asking, kind of straightforwardly: if you try Recapr and it works for you, tell someone.</p><p><strong>— -</strong></p><p><strong>## A few specific things that might be useful</strong></p><p>A short list of cases where I think Recapr is genuinely better than the alternative:</p><p>- <strong>**Interview prep.**</strong> Record your mock interviews, get the score and improvement areas. Compare across rounds.</p><p>- <strong>**Podcast editing.**</strong> Upload the raw audio, get speaker labels and the memorable quotes pulled out.</p><p>- <strong>**Lecture notes.**</strong> Hit record on the laptop, get a transcript plus topic coverage. Searchable forever.</p><p>- <strong>**Voice memo organization.**</strong> Drop in a folder of voice notes, search across them as if they were text.</p><p>- <strong>**Customer-call notes for solo founders.**</strong> No team plan needed — just you, the call, and the summary.</p><p>It’s not great for:</p><p>- Live transcription. You upload a recording; you don’t get a real-time stream of words appearing.</p><p>- Calls with more than ~6 speakers. Deepgram’s diarization gets less reliable beyond that.</p><p>- Languages outside the Nova-3 supported set (English, Hindi, Spanish, French, German, Portuguese, Japanese, Italian, Dutch, Russian). Tamil and Telugu support is on the roadmap.</p><p><strong>— -</strong></p><p><strong>## What’s next</strong></p><p>A few things I want to ship in the next few weeks:</p><p>- <strong>**Shareable read-only links.**</strong> “Here’s a transcript: link.” Without the recipient needing an account.</p><p>- <strong>**AI chat over a transcript.**</strong> “Ask your meeting anything” — RAG over a single meeting’s transcript.</p><p>- <strong>**Custom AI prompts.**</strong> “Summarize this for engineers” vs “for executives.”</p><p>- <strong>**Export to PDF / Notion / Google Docs.**</strong></p><p>I’m going to build these in public. If you want to follow along, the product itself is the best place — sign up, you’ll get the new features as I ship them.</p><p><strong>— -</strong></p><p><strong>## Try it</strong></p><p>[<strong>**recapr.co**</strong>](https://recapr.co) — sign up takes about 10 seconds, no credit card.</p><p>If you record one thing in the next 24 hours and find a bug, email me at <strong>**hello@recapr.co**</strong>. I’ll fix it the same day. That’s the upside of being a one-person company: the support line goes directly to the person who broke it.</p><p><em>*Recapr is built solo, hosted on Google Cloud Run, transcribed by Deepgram, summarized by GPT-4o-mini, and deployed every time I push to main. If you want the full system-design write-up, it’s available on request.*</em></p><p><em>Thanks for reading. See you in the dashboard.*</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=6cab37b4ace5" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[RAG, Explained Like You’re Running a Heist in Los Santos]]></title>
            <link>https://medium.com/@Akshay.LearnsAI/rag-explained-like-youre-running-a-heist-in-los-santos-5bd0d8d72f55?source=rss-dda088f831fc------2</link>
            <guid isPermaLink="false">https://medium.com/p/5bd0d8d72f55</guid>
            <category><![CDATA[machine-learning]]></category>
            <category><![CDATA[google-cloud-platform]]></category>
            <category><![CDATA[retrieval-augmented-gen]]></category>
            <category><![CDATA[aws]]></category>
            <dc:creator><![CDATA[Akshay]]></dc:creator>
            <pubDate>Mon, 13 Apr 2026 16:38:23 GMT</pubDate>
            <atom:updated>2026-04-13T16:38:23.763Z</atom:updated>
            <content:encoded><![CDATA[<p>If you’ve ever planned a heist in GTA V, you already understand RAG.</p><p>You don’t walk into the Pacific Standard Bank with just Michael’s intuition and hope for the best. You scout the location, gather blueprints, pick the right crew, brief everyone with maps and intel, <em>then</em> execute. The execution part is loud and flashy — but the win was decided during prep.</p><p>That’s RAG. The LLM is your crew on the ground. Retrieval-Augmented Generation is everything Lester does before the job starts.</p><p>This post walks through the concepts that actually matter when you’re building a production RAG system — embeddings, vector databases, chunking, grounding, the role of LangChain and Hugging Face, where SQL fits in, and the knobs you actually control as an engineer. I’ll skip the fluff and use GTA V as the mental model throughout.</p><h3>What RAG actually is (one line)</h3><p><strong>RAG = LLM + external knowledge retrieval, so the model answers from facts you provide instead of whatever it half-remembers from training.</strong></p><p>Think of the LLM as Michael De Santa. He’s experienced, he’s competent, he can improvise — but if you send him into a job with no intel, he’ll <em>make stuff up</em> on the fly. That’s hallucination. RAG is Lester handing him a folder before the job: blueprints, guard rotations, escape routes. Now Michael isn’t guessing — he’s executing against ground truth.</p><h3>The two phases of every RAG system</h3><p>Every RAG pipeline has an <strong>offline phase</strong> (prep work) and an <strong>online phase</strong> (the heist itself).</p><h3>Offline: Lester building the planning board</h3><pre>Raw documents → Parse → Chunk → Embed → Store in Vector DB</pre><p>This is Lester pinning maps, photos, and notes to his warehouse wall <em>before</em> anyone shows up for the job. You’re turning unstructured company knowledge into something searchable.</p><h3>Online: the heist in motion</h3><pre>User query → Embed → Vector search → Retrieve chunks → Build prompt → LLM → Answer</pre><p>This is the actual job. Query comes in, you grab the relevant intel from Lester’s board, brief the crew (the LLM), and execute.</p><p>The whole rest of this post is unpacking what each step actually means.</p><h3>Embeddings: turning text into GPS coordinates</h3><p>An <strong>embedding</strong> is a numerical vector — an array of numbers — that represents the <em>meaning</em> of a piece of text. Similar meanings get vectors that are close together in vector space.</p><p>Think of Los Santos. Every location has GPS coordinates. Vespucci Beach and Del Perro Pier are close on the map because they’re geographically near each other. Sandy Shores is far away because it’s in the desert.</p><p>Embeddings do the same thing for <em>meaning</em>:</p><ul><li>“blood sugar levels” and “glucose monitoring” → coordinates close together</li><li>“blood sugar levels” and “Trevor’s meth lab” → coordinates very far apart</li></ul><p>When a user asks a question, you convert the question into coordinates too, and then ask your vector database: <em>“what’s near this location?”</em></p><p><strong>The critical rule:</strong> you must use the <em>same</em> embedding model for your documents and your queries. If you embed documents with one model and queries with another, it’s like one crew using GPS coordinates and the other using street addresses written in a different language. Nothing lines up.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*R55egThMd0DR4w4OFnRXXQ.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*AF8FM54n9a6ia1Qkxnd8Kw.png" /><figcaption>AWS vs GCP</figcaption></figure><h3>Vector database: Lester’s planning board</h3><p>A <strong>vector database</strong> stores embeddings and performs fast similarity search. Examples: Pinecone, Weaviate, FAISS, Vertex AI Vector Search, pgvector.</p><p>This is Lester’s planning board. Every document chunk is a pin on the wall, tagged with its meaning-coordinates. When Michael radios in with a question, Lester doesn’t read every document on the wall — he uses the index he built to grab the 3–5 most relevant pins instantly.</p><p>Without a vector DB, you’re doing brute-force comparison across every embedding you have. With 100,000 chunks, that’s slow and unscalable. Vector databases use indexing algorithms (HNSW, ANN) to make this near-instant.</p><p><strong>Common confusion worth killing:</strong> Hugging Face does <em>not</em> replace your vector database. Hugging Face provides the <em>model</em> that creates embeddings. The vector DB is a separate system that <em>stores and searches</em> those embeddings. They’re different layers — like confusing the gunsmith with the armory.</p><h3>Chunking: how you cut up the intel</h3><p>Before you can embed documents, you have to split them into chunks — typically 300–500 tokens each. This is <strong>chunking</strong>, and it’s where most RAG systems quietly fail.</p><p>Imagine Lester gets a 50-page dossier on the bank. He has three options:</p><p><strong>Option 1 — pin the whole dossier as one sheet (chunks too large).</strong> Michael radios asking “where are the cameras in the vault?” Lester hands him the entire 50-page document. Michael now has to read everything to find one answer. Noisy, expensive, slow.</p><p><strong>Option 2 — cut it into individual sentences (chunks too small).</strong> Lester hands Michael a single sentence: “There are four cameras.” Four cameras <em>where</em>? In the lobby? The vault? The roof? Context destroyed.</p><p><strong>Option 3 — cut by logical sections (good chunking).</strong> Lester hands Michael the “Vault Security” page — complete thought, right scope, enough context. Michael acts on it.</p><p><strong>How you know your chunking is bad:</strong></p><ul><li>The system gives wrong answers even though the right info exists in your docs → retrieval is pulling garbage chunks</li><li>Retrieved chunks look irrelevant when you inspect them → chunks too large, signal-to-noise ratio is bad</li><li>Answers are incomplete or feel cut off → chunks too small, context got fragmented</li><li>Hallucination is high even with RAG enabled → grounding is failing because chunks don’t contain coherent meaning</li></ul><h3>Retrieval: Lester pulling the right pins</h3><p>At query time, the user’s question gets embedded into coordinates, and the vector DB returns the <strong>top-k</strong> most similar chunks. Top-k = how many pins Lester pulls off the board. Usually 3–10.</p><ul><li>Top-k = 3 → tightly focused, but might miss something</li><li>Top-k = 10 → more coverage, but more noise</li></ul><p>This is <strong>similarity search</strong>, typically using cosine similarity or dot product. The math just measures how close two vectors point in the same direction.</p><p><strong>Important:</strong> the user’s query embedding is <em>not</em> stored in your vector DB by default. It’s generated on the fly, used for the search, then thrown away. You only persist it if you have a reason — caching repeated queries, analytics on what users are asking, or building conversational memory.</p><h3>Grounding: the briefing before the job</h3><p><strong>Grounding</strong> is the part that stops your LLM from going rogue. After retrieval, you construct a prompt that looks roughly like:</p><pre>System: Answer ONLY from the provided context.<br>        If the answer isn&#39;t there, say &quot;I don&#39;t know.&quot;<br>Context: [the chunks you just retrieved]<br>Question: [the user&#39;s actual query]</pre><p>This is Lester’s pre-job briefing: <em>“Michael, here’s the intel. Stick to the plan. Don’t improvise.”</em></p><p>Now — and this is the part most people get wrong — <strong>nothing actually forces the LLM to obey.</strong> Gemini, Claude, GPT — they’re all trained on huge corpora. They <em>can</em> answer from their own memory. They just usually don’t, <em>if</em> you stack the controls right.</p><p>The controls, in order of impact:</p><ol><li><strong>Retrieval quality</strong> — if you give the model good context, it will usually use it. Good context beats good instructions.</li><li><strong>Prompt instructions</strong> — explicitly tell it to stay in context and refuse when unsure.</li><li><strong>Low temperature</strong> (more on this below) — reduces creative drift.</li><li><strong>Output validation</strong> — post-check the answer against the retrieved context. Reject and regenerate if it’s making things up.</li></ol><p>When the model <em>does</em> hallucinate despite all this, it’s almost always because retrieval failed first. The model defaults to its own brain when you didn’t give it anything useful to work with.</p><h3>The knobs you actually control</h3><p>You don’t modify Gemini or Claude. You control them at <strong>inference time</strong> through API parameters. These are set per-request, in your backend code or config:</p><p><strong>Temperature (0.0–1.0+)</strong> — how random the output is. Low = deterministic and factual. High = creative and risky.</p><ul><li>RAG / medical / legal: 0.0–0.3</li><li>Balanced chatbot: 0.4–0.7</li><li>Creative writing: 0.7–1.0</li></ul><p><strong>Top-p (nucleus sampling)</strong> — pick from the smallest set of tokens whose probabilities add up to p. 0.9 is a sane default.</p><p><strong>Top-k</strong> — limits candidate tokens to the top k options. Less commonly tuned in modern APIs.</p><p><strong>Max tokens</strong> — caps output length. Controls cost and prevents rambling.</p><p><strong>Stop sequences</strong> — tells the model where to halt.</p><p>In a Vertex AI Gemini call, this looks like:</p><p>python</p><pre>response = model.generate_content(<br>    prompt,<br>    generation_config={<br>        &quot;temperature&quot;: 0.2,<br>        &quot;top_p&quot;: 0.9,<br>        &quot;max_output_tokens&quot;: 512<br>    }<br>)</pre><p>You’re the driver. The model is the car. Temperature is how aggressively you take corners.</p><p><strong>Reality check:</strong> these knobs <em>bias</em> behavior, they don’t <em>guarantee</em> it. Setting temperature to 0 doesn’t fix bad retrieval. If Lester gives Michael the wrong dossier, Michael will execute the wrong plan very precisely.</p><h3>How you actually tune this in production</h3><p>You don’t tweak knobs randomly until something feels right. The grown-up approach:</p><ol><li>Build an <strong>evaluation dataset</strong> — 50–200 real queries with expected answers, including edge cases and out-of-scope questions.</li><li>Define <strong>metrics</strong> — accuracy, groundedness (is the answer actually based on retrieved context?), hallucination rate, latency, cost.</li><li>Run <strong>controlled experiments</strong> — vary one thing at a time (chunk size, embedding model, temperature, top-k).</li><li>Evaluate with <strong>human review</strong> initially, then layer in <strong>LLM-as-judge</strong> for scale.</li><li><strong>Lock the config</strong> and ship.</li></ol><p>Priority order when something is broken:</p><ol><li>Fix retrieval (chunking, embeddings, top-k)</li><li>Fix the prompt</li><li>Then tune knobs</li></ol><p>Most teams reach for temperature first. They’re solving the wrong problem.</p><h3>Where Hugging Face fits (and where it doesn’t)</h3><p>Hugging Face is a <strong>model provider</strong>. It’s a place to get pretrained models — embedding models, LLMs, domain-specific models — that you can run on your own infrastructure instead of calling a vendor API.</p><p>In a GTA analogy: Vertex AI is hiring a professional crew through a fixer — expensive per job, but they show up with their own gear and you don’t manage anything. Hugging Face is recruiting independent specialists you bring back to your own warehouse — cheaper over time, but you’re now responsible for their gear, training, and logistics.</p><p><strong>What Hugging Face actually saves you:</strong></p><ul><li>Embedding API costs (you self-host the embedding model)</li><li>LLM inference costs at scale (if you self-host the LLM too)</li><li>Data privacy compliance (sensitive data never leaves your VPC — important for healthcare, finance, legal)</li></ul><p><strong>What Hugging Face does <em>not</em> do:</strong></p><ul><li>It doesn’t replace your vector database</li><li>It doesn’t reduce vector storage costs directly (storage depends on embedding dimension and chunk count, not the model provider)</li><li>It doesn’t do retrieval or orchestration</li></ul><p>You can <em>indirectly</em> reduce storage by picking a Hugging Face model with smaller embedding dimensions (384 vs 1536), but a well-trained 384-dim model can outperform a poorly-trained 1536-dim model. Dimension is capacity; training is intelligence. Both matter.</p><h3>Where SQL databases fit (PostgreSQL, Snowflake)</h3><p>Vector DBs handle semantic search. Relational and warehouse databases handle <strong>structured facts and filtering</strong>. You want both.</p><ul><li><strong>PostgreSQL / RDS</strong> — metadata, user/session data, document permissions, chat history, structured records (patient data, transactions, ICD codes).</li><li><strong>Snowflake / BigQuery</strong> — analytics, query logs, evaluation datasets, large structured sources you want to query at runtime.</li></ul><p>The healthcare example: a user asks <em>“what was patient X’s last blood sugar reading and what does the guideline say about that level?”</em></p><ul><li><strong>Vector DB</strong> returns the medical guideline chunks (semantic).</li><li><strong>PostgreSQL</strong> returns the actual patient reading (structured fact).</li><li><strong>Backend</strong> combines both into one prompt and sends it to the LLM.</li></ul><p>The answer is now grounded in <em>both</em> policy and reality. Neither database alone could do this.</p><p><strong>Critical clarification:</strong> the LLM never connects to your database directly. Your <strong>backend</strong> does. Either through deterministic routing (you detect the intent and run the SQL), or through LLM tool/function calling (the model says “I need to run this function” and your backend executes it). The DB credentials never go anywhere near the model. Ever.</p><h3>Where LangChain and LangGraph fit</h3><p>These two get conflated constantly. They’re not the same thing.</p><p><strong>LangChain = the pipeline executor.</strong> It’s the glue code you’d otherwise write by hand to wire up embedding calls, vector DB queries, prompt templates, and LLM calls. In the heist analogy, LangChain is the <em>standard operating procedure</em> — the checklist that says “embed query, search vector DB, build prompt, call LLM” and runs it the same way every time.</p><p><strong>LangGraph = the decision engine.</strong> It’s a state machine for when your flow isn’t linear. You need branching, retries, multi-step reasoning, conditional tool use. LangGraph is Lester sitting at the planning board going <em>“if Michael radios in with an ICD code, skip the vector DB and go straight to SQL. If he asks for an explanation, do RAG. If the answer fails validation, retry with a different chunk.”</em></p><p>If your flow is query → retrieve → answer, LangChain is enough. If your flow has branches, decisions, retries, or agents, you want LangGraph on top.</p><h3>The full pipeline, one diagram</h3><pre>[OFFLINE — building the planning board]<br>Documents → Parse → Chunk → Embed → Vector DB<br>                       ↘<br>                        Metadata → PostgreSQL</pre><pre>[ONLINE — running the job]<br>User Query<br>    ↓<br>Backend (orchestrator — LangChain / LangGraph live here)<br>    ├─ Embed query<br>    ├─ Vector DB similarity search → top-k chunks<br>    ├─ (optional) PostgreSQL / Snowflake query for structured facts<br>    ├─ Build grounded prompt (system + context + question)<br>    └─ Call LLM with generation config (temperature, top-p, max_tokens)<br>    ↓<br>Answer<br>    ↓<br>Logging / monitoring / feedback loop</pre><p>The backend is the brain. The LLM is the mouth. Everything else is supporting cast.</p><h3>Where production RAG systems actually fail</h3><p>After all of this, here’s the honest list of what kills RAG in production:</p><ol><li><strong>Bad chunking</strong> — wrong chunk size or broken semantic boundaries. Garbage in, garbage out.</li><li><strong>Weak retrieval</strong> — top-k tuned wrong, no metadata filtering, no re-ranking.</li><li><strong>No grounding enforcement</strong> — model ignores context because the prompt is too soft.</li><li><strong>Latency</strong> — embedding + retrieval + LLM call adds up; users abandon slow systems.</li><li><strong>Cost explosion</strong> — no caching, no batching, every query hits the LLM fresh.</li><li><strong>Stale data</strong> — new documents not re-embedded, answers go out of date silently.</li><li><strong>No evaluation framework</strong> — you can’t fix what you don’t measure. The system degrades and nobody notices until users complain.</li></ol><p>Notice: tuning temperature isn’t on this list. It almost never is.</p><h3>The mental model to take with you</h3><p>Three layers, three jobs:</p><ul><li><strong>Retrieval</strong> controls <em>what knowledge</em> the model sees.</li><li><strong>Prompt</strong> controls <em>how the model behaves</em> with that knowledge.</li><li><strong>Knobs</strong> control <em>how strictly</em> the model sticks to the plan.</li></ul><p>Get retrieval right and most of your problems disappear. Get the prompt right and the rest fall away. Tune the knobs last.</p><p>Or, in Lester’s words: the heist is won at the planning board. By the time Michael’s in the vault, the outcome is already decided.</p><p><em>If this helped, the best thing you can do for a RAG system is build one and break it on purpose. Bad chunks, wrong top-k, missing grounding instructions — feel each failure mode in your hands. The concepts stick differently after that.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=5bd0d8d72f55" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[I Kept Forgetting Kubernetes Components. So I Made This. “The Two Kingdoms of Kubernetes”]]></title>
            <link>https://medium.com/@Akshay.LearnsAI/i-kept-forgetting-kubernetes-components-so-i-made-this-the-two-kingdoms-of-kubernetes-4ef6a0965781?source=rss-dda088f831fc------2</link>
            <guid isPermaLink="false">https://medium.com/p/4ef6a0965781</guid>
            <category><![CDATA[kubernetes-cluster]]></category>
            <dc:creator><![CDATA[Akshay]]></dc:creator>
            <pubDate>Sat, 04 Apr 2026 09:55:24 GMT</pubDate>
            <atom:updated>2026-04-04T09:55:24.290Z</atom:updated>
            <content:encoded><![CDATA[<h4>Control Plane vs Worker Node — every component, finally unforgettable.</h4><p>7 min read · Architecture · Platform Engineering</p><p>Kubernetes has one core trick: it splits the world into two kingdoms — one that <strong>thinks</strong>, and one that <strong>acts</strong>. The Control Plane is the brain. The Worker Node is the muscle. Everything else is just components doing their job inside one of those two kingdoms.</p><p>📌 STICK THIS ON YOUR WALL — The complete Kubernetes architecture at a glance</p><p>📎<strong>Wall-print tip:</strong> Screenshot or print the architecture diagram above and stick it near your desk. After a week of glancing at it while you work, it’ll be permanently etched into memory. No flashcards needed.</p><h3>🏛️ Kingdom I — The Control Plane</h3><p>The Control Plane is the <em>central nervous system</em> of Kubernetes. It doesn’t run your apps. It just obsessively thinks about what the cluster <em>should</em> look like, and barks orders until reality matches that vision. It’s the “desired state” enforcer.</p><h3>📖 Real-world analogy</h3><p>Think of the Control Plane as the <strong>military HQ</strong> — generals (scheduler), state archives (etcd), a command radio (API server), and officers enforcing orders (controller manager). None of them fight on the frontline. They just coordinate.</p><h3>📡 API Server</h3><p>kube-apiserver — The single front door</p><p>Every single operation in Kubernetes passes through here — kubectl, the scheduler, the controller manager, the kubelet — all talk to the API server over HTTPS. It validates requests, authenticates callers, and writes accepted state to etcd. It&#39;s stateless itself; etcd holds the truth.</p><p>🔑 Memory hook: “If it’s in Kubernetes, it went through the API Server first.”</p><h3>🗄️etcd</h3><p><strong>Distributed Key-Value Store — The cluster’s memory</strong></p><p>This is the only stateful component in the control plane. Every object — Pods, ConfigMaps, Secrets, Deployments — is stored here as key-value pairs. It uses the Raft consensus algorithm, so even if one node dies, the cluster remembers everything. If etcd dies without a backup, your cluster is gone.</p><p>🔑 Memory hook: “etcd = the cluster’s long-term memory. Lose it, forget everything.”</p><h3>📋Scheduler</h3><p><strong>kube-scheduler — The matchmaker</strong></p><p>When a new Pod has no home, the Scheduler finds it one. It watches for unbound Pods, scores every eligible worker node (CPU, memory, taints, affinity rules, topology), and writes its decision back to the API Server. That’s it. It <em>decides</em> where a Pod runs — it doesn’t start it.</p><p>🔑 Memory hook: “Scheduler = Tinder for Pods. Swipes right on the best node.”</p><h3>🔄Controller Manager</h3><p><strong>kube-controller-manager — The state enforcer</strong></p><p>A single binary running many independent control loops — Deployment Controller, ReplicaSet Controller, Node Controller, Job Controller, and more. Each controller watches etcd (via the API Server) for drift between desired and actual state, then acts to correct it. Deployment says “3 replicas” → Controller Manager makes sure it stays at 3.</p><p>🔑 Memory hook: “Controller Manager = a nagging supervisor. Always fixing what’s drifted.”</p><h3>⚔️ Kingdom II — The Worker Node</h3><p>Worker Nodes are where your actual workloads live. No thinking, just execution. The Control Plane sends orders — the Worker Node carries them out by starting containers, routing network traffic, and reporting back.</p><p>📖 Real-world analogy</p><p>Worker Nodes are the <strong>soldiers on the ground</strong>. They receive orders from HQ, execute them (run containers), and send status reports back. They don’t question — they act.</p><h3>🤖Kubelet</h3><p><strong>Node Agent — The soldier on the ground</strong></p><p>Runs on every worker node. It watches the API Server for Pods assigned to its node, tells the container runtime to start/stop containers, runs liveness &amp; readiness probes, and reports node &amp; Pod status back to the control plane. It is the direct link between the control plane’s decisions and reality on the node.</p><p>🔑 Memory hook: “Kubelet = the field agent. Gets orders from HQ, makes it happen.”</p><h3>📦Container Runtime</h3><h4>Containerd / CRI-O — The muscle</h4><p>The component that actually pulls images and starts containers. Kubelet tells the container runtime <em>what</em> to run (via CRI — Container Runtime Interface). containerd and CRI-O are the two dominant runtimes today. Docker was deprecated as a runtime in K8s 1.24+ — containerd is now the default everywhere.</p><p>🔑 Memory hook: “Container Runtime = the hands. Kubelet is the brain that directs them.”</p><h3>🌐Kube-Proxy</h3><p>Network &amp; Load Balancing — The traffic cop</p><p>Runs on every node and maintains network rules (using iptables or ipvs). When a Service is created, kube-proxy programs the node so traffic to that Service&#39;s ClusterIP gets routed to the correct Pods — even if they&#39;re on different nodes. It&#39;s what makes Service abstraction work at the network layer.</p><p>🔑 Memory hook: “Kube-Proxy = traffic cop. Knows every route, directs every packet.”</p><h3>🧠 The Wall Chart — Memorize This</h3><p>Two kingdoms, seven components. Print this. Internalize it.</p><h4>🏛️ Control Plane (Thinks)</h4><p>📡API Server — Front door</p><p>🗄️etcd — Memory / Source of truth</p><p>📋Scheduler — Pod placement</p><p>🔄Controller Manager — State enforcer</p><h4>⚔️ Worker Node (Acts)</h4><p>🤖Kubelet — Node agent</p><p>📦Container Runtime — Runs containers</p><p>🌐Kube-Proxy — Network routing</p><h3>📡 How They Talk — The Communication Channel</h3><p>The control plane and worker nodes don’t share memory — they communicate exclusively over the network. This is what makes Kubernetes so resilient and distributed-systems-friendly.</p><p>kubectl / ClientsHTTPS REST→ API ServerControl Plane ↔KubeletgRPC / HTTPS →PodsWorker Node</p><p>The Kubelet polls the API Server for work. The Controller Manager and Scheduler also watch the API Server via list/watch (long-poll). etcd is only ever directly accessed by the API Server — nothing else touches etcd directly.</p><h3>🔄 What Happens When You Run kubectl apply?</h3><p>This is the fastest way to cement how the components interact:</p><p>1.<strong>API Server receives the request</strong></p><p>Validates, authenticates (RBAC), and writes the desired Deployment object into etcd.</p><p>2.<strong>Deployment Controller (inside Controller Manager) notices</strong></p><p>It sees a new Deployment with no ReplicaSet → creates a ReplicaSet object via the API Server.</p><p>3.<strong>ReplicaSet Controller notices the ReplicaSet</strong></p><p>It creates N unscheduled Pod objects (no node assigned yet) via the API Server.</p><p>4.<strong>Scheduler notices unscheduled Pods</strong></p><p>Scores all nodes, picks the best one per Pod, writes spec.nodeName back to etcd via the API Server.</p><p>5.<strong>Kubelet on the assigned node notices its Pod</strong></p><p>Pulls the image via the container runtime, starts the containers, runs probes, reports status.</p><p>6.<strong>Kube-Proxy updates network rules</strong></p><p>If a Service targets the new Pods, kube-proxy programs iptables so traffic routes correctly.</p><h3>One Paragraph Summary</h3><p><strong>Control Plane = brain.</strong> API Server is the single entry point for everything. etcd stores all cluster state. Scheduler decides which node gets which Pod. Controller Manager enforces that desired state is always real state.</p><p><strong>Worker Node = muscle.</strong> Kubelet receives Pod specs from the API Server and instructs the container runtime to execute them. Kube-Proxy handles all the networking so Services actually work.</p><p>Every kubectl apply flows through all seven of these components in sequence. Understand that chain, and Kubernetes stops being intimidating.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*nWLgjQuEghkUznEOASVODw.png" /><figcaption>For Game Fans</figcaption></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=4ef6a0965781" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Tools Don’t Make Engineers.
Systems Thinking Does.]]></title>
            <link>https://medium.com/@Akshay.LearnsAI/tools-dont-make-engineers-systems-thinking-does-95ad9716988c?source=rss-dda088f831fc------2</link>
            <guid isPermaLink="false">https://medium.com/p/95ad9716988c</guid>
            <dc:creator><![CDATA[Akshay]]></dc:creator>
            <pubDate>Tue, 24 Mar 2026 23:38:24 GMT</pubDate>
            <atom:updated>2026-03-24T23:38:24.023Z</atom:updated>
            <content:encoded><![CDATA[<p>A conversation with an AI on why the real gap in ML isn’t about Kubernetes, Python, or even MLOps — it’s about the depth at which you understand the systems beneath your tools.</p><p>I had one of those rare conversations recently — the kind that starts with a technical question and ends somewhere unexpectedly philosophical. I was exploring how AI differs from previous technology shifts with an AI. The irony wasn’t lost on me.</p><p>What came out of it was a thread of ideas I haven’t been able to stop thinking about. It touches on MLOps, generational learning, Kubernetes, and ultimately, what actually separates the engineers who grow from the ones who plateau.</p><h3>AI Is Different. Not Just Harder — Fundamentally Different.</h3><p>We’ve seen tech shifts before. The cloud era, the containerization wave, microservices. Each time, there was noise about how “this changes everything.” And each time, experienced engineers adapted — because underneath the new tooling, the systems still behaved deterministically. You could reason about them. Trace a bug. Predict behavior.</p><p>AI breaks that contract.</p><blockquote><em>The hardest part of AI isn’t the tooling complexity. It’s the uncertainty. You’re engineering systems that are probabilistic by nature — and our entire mental model of debugging, testing, and trusting software has to be rebuilt.</em></blockquote><p>A model doesn’t fail the same way twice. A retrieval pipeline that works for 98% of queries might silently degrade on the 2% that matter most to your users. There’s no stack trace for “the model hallucinated.” This isn’t a harder version of what we knew — it’s a different epistemology of engineering.</p><p>· · ·</p><h3>MLOps Is Not Just DevOps With a Model Bolted On</h3><p>One of the things the conversation surfaced clearly: MLOps is genuinely more multidisciplinary than DevOps ever was. DevOps was, at its core, about closing the loop between development and operations — automation, CI/CD, infrastructure as code. Hard, but bounded.</p><p>MLOps asks you to hold four domains simultaneously:</p><p>DevOps Concerns</p><p>MLOps Adds On Top</p><ul><li>Infrastructure provisioning</li><li>CI/CD pipelines</li><li>Observability &amp; alerting</li><li>Security &amp; access control</li><li>Data versioning &amp; lineage</li><li>Model training &amp; experiment tracking</li><li>Drift detection &amp; retraining triggers</li><li>Model governance &amp; audit trails</li></ul><p>The surface area is massive. And the failure modes are subtle — a data distribution shift in production doesn’t throw an error; it silently degrades your model’s accuracy over weeks. No alert fires. Your users just start trusting your product a little less each day.</p><h3>Kubernetes Isn’t the Hard Part. It Never Was.</h3><p>Here’s something worth saying plainly: Kubernetes is not difficult. The YAML is verbose, the concepts are layered, and the ecosystem is sprawling — but none of that is what trips people up long-term.</p><p>What trips people up is not understanding <em>why</em> Kubernetes makes the choices it does. What problem does a controller loop solve? Why is etcd the source of truth, and what does that mean for consistency under a partition? Why does a pod eviction happen, and what should your application do about it?</p><p>The tool is the abstraction. The system is what matters.</p><blockquote><em>You can operate Kubernetes for years without understanding distributed consensus. Until the day you need to — and then the gap is brutal.</em></blockquote><p>The same is true in ML. You can call an embedding API without understanding vector spaces. You can deploy a model without understanding quantization tradeoffs. Right up until the moment your production system breaks in a way that only makes sense if you understand what’s underneath.</p><p>· · ·</p><h3>The Fresher vs. Senior Divide — And Why It’s Misread</h3><p>One of the most interesting parts of the conversation was about how new engineers experience the ML stack versus how experienced engineers do.</p><p>New engineers face cognitive overload — not because they’re less capable, but because everything arrives at once. Cloud, containers, Python, ML frameworks, experiment tracking, deployment, monitoring. There’s no scaffolding. They have to absorb the entire stack simultaneously while also trying to deliver value. That’s genuinely hard.</p><p>Experienced engineers have layered mental models. They’ve seen the pattern of “new abstraction hiding old complexity” enough times that they know where to look. They know that the abstraction will leak — it’s just a matter of when. So they invest in understanding the layer below the one they’re using.</p><p>The Core Gap</p><p>The ability to <em>use</em> a tool is not the same as the ability to <em>reason</em> about the system that tool represents. One gets you to productivity. The other gets you through the crisis at 2am when the abstraction breaks.</p><h3>Every Generation Thinks the Next One Is Broken</h3><p>There’s a comfortable narrative among senior engineers: “The new generation doesn’t understand fundamentals. They’ve never written a raw SQL query. They don’t know how memory works. They just prompt AI and ship.”</p><p>It’s tempting. And it’s mostly wrong.</p><p>Every generation says this about the next one. The engineers who grew up writing assembly said it about C programmers. The C programmers said it about Java developers. The Java developers said it about the cloud-native generation. The pattern repeats because the tools keep abstracting.</p><p>But here’s the honest truth: in every generation, only a minority actually goes deep. Most engineers in any era are surface-level practitioners. The ones who go deep are the anomaly — and they exist in every cohort.</p><p>The real question isn’t “does this generation understand fundamentals?” It’s “are <em>you</em> the kind of person who goes deeper than the abstraction in front of you?”</p><p>· · ·</p><h3>The Actual Differentiator: Curiosity With Follow-Through</h3><p>After unwinding all of this, what the conversation kept circling back to was simple: the differentiator isn’t the tools you know, the certifications you hold, or even the years of experience you have. It’s whether you’re genuinely curious about <em>why</em> things work — and whether you act on that curiosity.</p><p>Curiosity without follow-through produces trivia. Curiosity with follow-through produces engineers who can reason about systems they’ve never seen before, debug failures they’ve never encountered, and architect for constraints they haven’t hit yet.</p><p>That’s the thing that compounds. Surface-level knowledge grows linearly with experience. Systems thinking grows exponentially — because every system you understand deeply teaches you how to understand the next one faster.</p><h3>What This Means for Career Trajectory</h3><p>The career implication is straightforward, even if the path isn’t:</p><p>Engineers who stay at the surface plateau. They become competent operators of the current generation of tools — which is valuable right up until those tools change, which they always do. Engineers who understand systems deeply tend to move into technical leadership, architecture, and the kinds of roles where the tool landscape is constantly shifting but the underlying principles don’t.</p><p>In ML specifically, this plays out clearly. An engineer who knows how to fine-tune a model is useful. An engineer who understands why fine-tuning works, what it’s doing to the weight space, when it’s the wrong tool and what to use instead — that engineer builds the platform everyone else uses.</p><p>Technology evolves on a cadence that makes it nearly impossible to keep up if you’re tracking tools. But the underlying systems — distributed consensus, gradient descent, information retrieval, probabilistic inference — those move slowly. Invest there, and the tools take care of themselves.</p><p>The conversation I had with an AI about AI ended up being about something much older: the difference between people who use hammers and people who understand leverage.</p><p>Only one of those is a transferable skill.</p><p>#MLOpsSystems #ThinkingMachine #LearningEngineering #CareerKubernetes #AIEngineering</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=95ad9716988c" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[MLOPS the beginning]]></title>
            <link>https://medium.com/@Akshay.LearnsAI/mlops-the-beginning-124a2ef8e86b?source=rss-dda088f831fc------2</link>
            <guid isPermaLink="false">https://medium.com/p/124a2ef8e86b</guid>
            <category><![CDATA[devops]]></category>
            <category><![CDATA[basics]]></category>
            <category><![CDATA[mlops]]></category>
            <category><![CDATA[machine-learning]]></category>
            <category><![CDATA[artificial-intelligence]]></category>
            <dc:creator><![CDATA[Akshay]]></dc:creator>
            <pubDate>Sun, 22 Mar 2026 15:02:49 GMT</pubDate>
            <atom:updated>2026-03-22T15:02:49.987Z</atom:updated>
            <content:encoded><![CDATA[<p>If you’ve spent years doing DevOps or Platform Engineering, here’s the good news: <strong>MLOps is roughly 70% things you already know.</strong> CI/CD, versioning, monitoring, infrastructure-as-code — it’s all there. The remaining 30% is where ML gets weird, and that’s exactly what this post covers.</p><p>Let’s break it down across four pillars: <strong>CI/CD for ML</strong>, <strong>Model Versioning &amp; Registry</strong>, <strong>Feature Stores</strong>, and <strong>Monitoring &amp; Drift Detection</strong> — with a DevOps lens on each.</p><h3>1. CI/CD for ML — It’s Pipelines, But the Artifact Is a Model</h3><p>In traditional DevOps, your CI/CD pipeline builds code, runs tests, and ships a binary or container. In ML, the “artifact” you’re shipping is a <strong>trained model</strong> — and the inputs that produce it (data + code + hyperparameters) all matter.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*wMiktDRYBKEkf4nw8i1wXw.png" /></figure><p>DevOps CI/CDML CI/CD Code changes trigger pipeline Code <em>or</em> data changes trigger pipeline Tests check logic/behavior Tests check model accuracy, fairness, data schema Artifact: container/binary Artifact: serialized model + metadata Reproducibility via git SHARe producibility via git SHA + data snapshot + config</p><h3>The ML Pipeline Stages</h3><p>A typical ML CI pipeline looks like this:</p><pre>[Data Validation] → [Feature Engineering] → [Model Training]<br>       → [Evaluation Gate] → [Model Registry Push] → [Deployment]</pre><p><strong>Data Validation</strong> is your new linting step. Tools like <a href="https://greatexpectations.io/">Great Expectations</a> or TensorFlow Data Validation check that incoming data matches the expected schema, ranges, and distributions. If the data looks off, the pipeline fails — just like a failing unit test.</p><p><strong>Evaluation Gate</strong> is the most important step you don’t have in regular CI. Before promoting a model, you compare its metrics (accuracy, F1, AUC, latency) against a baseline — usually the currently deployed model. If the new model doesn’t beat the baseline, it doesn’t ship. Think of it as a <strong>performance regression test.</strong></p><h3>Tools to Know</h3><ul><li><a href="https://mlflow.org/"><strong>MLflow Pipelines</strong></a> / <a href="https://www.kubeflow.org/"><strong>Kubeflow Pipelines</strong></a> — DAG-based ML pipeline orchestration (like Argo Workflows, but ML-aware)</li><li><a href="https://dvc.org/"><strong>DVC (Data Version Control)</strong></a> — Git for data and pipelines; integrates with your existing git repo</li><li><a href="https://github.com/features/actions"><strong>GitHub Actions / GitLab CI</strong></a> — You can absolutely wire ML pipelines into standard CI tools</li></ul><h3>Practical Tip</h3><p>Treat your <strong>training pipeline as infrastructure.</strong> It should be version-controlled, idempotent, and triggered automatically — not run manually from a data scientist’s laptop.</p><h3>2. Model Versioning &amp; Registry — Like Artifact Registry, but for Brains</h3><p>In platform engineering, you push container images to a registry (GCR, ECR, Docker Hub). You tag them, promote them through environments, and roll them back when things go wrong. A <strong>Model Registry</strong> is exactly this — but for trained models.</p><h3>What Gets Versioned?</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*XIY3PAjGYwUn27Ut7Qcpsg.png" /></figure><p>A model version isn’t just the weights file. A complete model version includes:</p><ul><li><strong>Model artifact</strong> — the serialized weights (.pkl, SavedModel, ONNX, etc.)</li><li><strong>Training metadata</strong> — hyperparameters, framework version, training dataset reference</li><li><strong>Performance metrics</strong> — accuracy, latency, memory footprint</li><li><strong>Lineage</strong> — which pipeline run, git commit, and data version produced this model</li><li><strong>Stage/Environment tag</strong> — Staging, Production, Archived</li></ul><h3>The Promotion Flow</h3><pre>Experiment (dev) → Staging (validated) → Production (live) → Archived (retired)</pre><p>This maps cleanly to what you know: dev → staging → prod. The key difference is that promotion decisions are <strong>metric-driven</strong>, not just human-approved.</p><h3>MLflow Model Registry in Practice</h3><p><a href="https://mlflow.org/">MLflow</a> is the most widely adopted tool here. Here’s what the workflow looks like:</p><p>python</p><pre>import mlflow</pre><pre># During training: log everything<br>with mlflow.start_run():<br>    mlflow.log_param(&quot;learning_rate&quot;, 0.01)<br>    mlflow.log_metric(&quot;accuracy&quot;, 0.94)<br>    mlflow.sklearn.log_model(model, &quot;model&quot;, registered_model_name=&quot;fraud-detector&quot;)</pre><pre># Promote to production via API or UI<br>client = mlflow.MlflowClient()<br>client.transition_model_version_stage(<br>    name=&quot;fraud-detector&quot;,<br>    version=3,<br>    stage=&quot;Production&quot;<br>)</pre><h3>What Else to Know</h3><ul><li><a href="https://wandb.ai/"><strong>Weights &amp; Biases (W&amp;B)</strong></a> — Great for experiment tracking with a polished UI; popular in research-leaning teams</li><li><a href="https://cloud.google.com/vertex-ai/docs/model-registry/introduction"><strong>Vertex AI Model Registry</strong></a> — If you’re already on GCP, this is the managed path</li><li><a href="https://huggingface.co/models"><strong>Hugging Face Hub</strong></a> — The go-to for LLM model versioning and sharing</li></ul><h3>Practical Tip</h3><p>Enforce a rule: <strong>no model goes to production without a registry entry.</strong> Just like you wouldn’t kubectl apply a container without a tagged image, don&#39;t deploy a model that isn&#39;t tracked and validated.</p><h3>3. Feature Stores — The Data Infrastructure Layer You Didn’t Know Was Missing</h3><p>This is the most “new” concept for DevOps engineers, and once you understand it, you’ll wonder how ML teams survived without it.</p><h3>The Problem It Solves</h3><p>Imagine two teams independently building ML models. Team A builds a fraud detection model. Team B builds a credit scoring model. Both need “average transaction value for the last 30 days per user.” So both teams write their own pipeline to compute it — differently, with subtle bugs, duplicated infra, and diverging results.</p><p>A <strong>Feature Store</strong> is a centralized repository for computed ML features. You define a feature once, and every team and model consumes the same value.</p><h3>The Two Planes</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ANhFFwZ6wb1bKl9kD28ekg.png" /></figure><p>Feature Stores have two serving paths:</p><pre>Historical data (training)<br>        ↓<br>   Offline Store  ←→  Feature Computation  ←→  Online Store<br>        ↑                                             ↑<br>  Model training                              Real-time inference<br>  (batch, high volume)                        (low-latency lookups)</pre><p><strong>Offline Store</strong> — columnar storage (BigQuery, S3/Parquet) for training data retrieval. You pull millions of rows.</p><ul><li><strong>Online Store</strong> — low-latency key-value store (Redis, Bigtable, DynamoDB) for serving features at inference time. You look up a single user in milliseconds.</li></ul><p>The most critical property of a Feature Store is <strong>training-serving consistency</strong> — the feature value used during training must match the value served at inference. Without this, you get <strong>training-serving skew</strong>, one of the most insidious bugs in ML.</p><h3>What a Feature Definition Looks Like (Feast)</h3><p><a href="https://feast.dev/">Feast</a> is the most popular open-source feature store. Here’s a simple feature definition:</p><p>python</p><pre>from feast import Entity, FeatureView, Field<br>from feast.types import Float32, Int64</pre><pre>user = Entity(name=&quot;user_id&quot;, join_keys=[&quot;user_id&quot;])</pre><pre>transaction_features = FeatureView(<br>    name=&quot;user_transaction_stats&quot;,<br>    entities=[user],<br>    ttl=timedelta(days=1),<br>    schema=[<br>        Field(name=&quot;avg_txn_30d&quot;, dtype=Float32),<br>        Field(name=&quot;txn_count_7d&quot;, dtype=Int64),<br>    ],<br>    source=bigquery_source,  # Where features are computed from<br>)</pre><h3>Managed Options</h3><ul><li><a href="https://cloud.google.com/vertex-ai/docs/featurestore/overview"><strong>Vertex AI Feature Store</strong></a> — GCP-native, serverless, integrates with BigQuery</li><li><a href="https://www.tecton.ai/"><strong>Tecton</strong></a> — Enterprise-grade; handles streaming + batch features</li><li><a href="https://feast.dev/"><strong>Feast</strong></a> — Open-source, self-hosted, flexible backend</li></ul><h3>Practical Tip</h3><p>You don’t need a feature store on day one. Start by <strong>documenting and centralizing feature computation logic</strong> in a shared repo. Introduce a proper feature store when you see duplication, inconsistency, or scale problems. Don’t over-engineer early.</p><h3>4. Monitoring &amp; Drift Detection — Your Dashboards Aren’t Enough Anymore</h3><p>You know how to monitor services: latency, error rates, CPU, memory. You set SLOs, alert on anomalies, and page on-call. ML systems need all of that — <strong>plus a new category of health checks that have nothing to do with infrastructure.</strong></p><h3>The Three Layers of ML Monitoring</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*yb-0O8dZ1asZ1DTS7jYxAg.png" /></figure><pre>Layer 1: Infrastructure    → CPU, memory, latency, throughput (you already do this)<br>Layer 2: Data/Input        → Is the data coming in still valid and expected?<br>Layer 3: Model behavior    → Is the model still making good predictions?</pre><p>Layers 2 and 3 are what’s new.</p><h3>Data Drift</h3><p><strong>Data drift</strong> happens when the statistical properties of the input data change over time. Your model was trained on data from 6 months ago. The world changed. Now the model is getting inputs that look different from anything it was trained on — and it has no idea.</p><p>Example: A product recommendation model trained before a major sale event starts seeing unusually high purchase frequencies. It wasn’t trained on this distribution. Its recommendations degrade.</p><p>You detect this by comparing the <strong>distribution of incoming features</strong> against the training distribution using statistical tests:</p><ul><li><strong>KL Divergence / Jensen-Shannon Divergence</strong> — for comparing probability distributions</li><li><strong>Kolmogorov-Smirnov test</strong> — for continuous features</li><li><strong>Chi-squared test</strong> — for categorical features</li><li><strong>Population Stability Index (PSI)</strong> — common in finance/credit modeling</li></ul><h3>Concept Drift</h3><p><strong>Concept drift</strong> is subtler and more dangerous. The input data looks fine, but the <strong>relationship between inputs and the correct output has changed.</strong></p><p>Example: A spam detection model trained pre-pandemic. Spammers adapted their language. The features look similar, but the “right answer” has shifted. Your model is now confidently wrong.</p><p>Detecting concept drift requires ground truth labels — which is the hard part. Strategies include:</p><ul><li>Collecting delayed labels (e.g., users flagging spam)</li><li>Proxy metrics (engagement, click-through, downstream business KPIs)</li><li>Regular A/B testing against a freshly retrained challenger model</li></ul><h3>Model Performance Monitoring</h3><p>When you have ground truth available, track these over time:</p><pre>Classification: Accuracy, Precision, Recall, F1, AUC-ROC<br>Regression:     MAE, RMSE, R²<br>Ranking:        NDCG, MRR<br>LLMs:           BLEU, ROUGE, human eval scores, latency per token</pre><p>Set <strong>alert thresholds</strong> just like SLOs. If F1 drops more than 5% week-over-week, trigger a retraining pipeline or a human review.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*8gCQMN4ZcH4Dv8WEjwqDpA.png" /></figure><p>Set <strong>alert thresholds</strong> just like SLOs. If F1 drops more than 5% week-over-week, trigger a retraining pipeline or a human review.</p><ul><li><a href="https://www.evidentlyai.com/"><strong>Evidently AI</strong></a> — Open-source; generates drift reports and dashboards</li><li><a href="https://whylabs.ai/"><strong>Whylogs / WhyLabs</strong></a> — Lightweight data logging with a managed monitoring platform</li><li><a href="https://arize.com/"><strong>Arize AI</strong></a> — Production-focused; strong on LLM observability</li><li><a href="https://grafana.com/"><strong>Grafana + Prometheus</strong></a> — If you already run this stack, you can pipe ML metrics in; works well for infra + model metrics in one pane</li></ul><h3>Practical Tip</h3><p>Start with <strong>input distribution monitoring</strong> before worrying about output drift. It’s easier to implement (no labels needed), and data drift is often the leading indicator of model degradation. Add it to your existing observability stack.</p><h3>Putting It All Together</h3><p>Here’s how these four pillars connect in a production ML system:</p><pre>Raw Data<br>    ↓<br>Feature Store (compute + serve features consistently)<br>    ↓<br>CI/CD Pipeline (validate data → train → evaluate → gate)<br>    ↓<br>Model Registry (version, tag, promote)<br>    ↓<br>Model Serving (API / batch inference)<br>    ↓<br>Monitoring (infra + data drift + model performance)<br>    ↓<br>Trigger retraining if metrics degrade<br>    ↑___________________________|</pre><p>This is the <strong>ML flywheel</strong> — a self-improving system where monitoring feeds back into retraining and redeployment automatically.</p><h3>What’s Next?</h3><p>If you’re coming from DevOps, you already have 70% of the skills you need for MLOps. The mental shift is learning to treat <strong>data as a first-class citizen</strong> in your pipelines, and understanding that models <strong>degrade silently</strong> — unlike services, which usually fail loudly.</p><p>In the next post, I’ll dive into deploying models at scale: Kubernetes-native model serving with KServe, autoscaling inference workloads, and shadow deployments for risk-free rollouts.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=124a2ef8e86b" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>