<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
  <channel>
    <title>Posts on Manthan</title>
    <link>https://manthanguptaa.in/posts/</link>
    <description>Recent content in Posts on Manthan</description>
    <generator>Hugo</generator>
    <language>en-us</language>
    <lastBuildDate>Thu, 17 Sep 2026 00:00:00 +0000</lastBuildDate>
    <atom:link href="https://manthanguptaa.in/posts/index.xml" rel="self" type="application/rss+xml" />
    <item>
      <title>What Happens When You Ask ChatGPT a Question</title>
      <link>https://manthanguptaa.in/posts/inference_overview/</link>
      <pubDate>Thu, 17 Sep 2026 00:00:00 +0000</pubDate>
      <guid>https://manthanguptaa.in/posts/inference_overview/</guid>
      <description>&lt;p&gt;You type a question into ChatGPT and hit send.&lt;/p&gt;&#xA;&lt;p&gt;A JSON body leaves your laptop as an ordinary HTTPS POST. The same POST, more or less, whether the box you typed into was ChatGPT, Claude, Cursor, or a curl against OpenAI&amp;rsquo;s API. A few hundred milliseconds later, a token shows up, then another, then another. Most of us treat that gap as a black box: text went in, tokens came out. Fine, until you care why the first token paused, why a short answer cost a long bill, or why the same prompt is cheap on the second call and expensive on the first.&lt;/p&gt;</description>
    </item>
    <item>
      <title>How to Evaluate Voice Agents</title>
      <link>https://manthanguptaa.in/posts/evaluating_voice_agents/</link>
      <pubDate>Sat, 15 Aug 2026 00:00:00 +0000</pubDate>
      <guid>https://manthanguptaa.in/posts/evaluating_voice_agents/</guid>
      <description>&lt;p&gt;A voice agent can pass every eval you wrote for it and still be broken in production. The transcript reads correctly, the tool call fires with the right arguments, the backend state lands where it should, and the scorecard marks the call a success. Then you listen to the actual recording and hear the agent talking over the caller, mangling their name, and leaving three seconds of dead air before it confirms anything.&lt;/p&gt;</description>
    </item>
    <item>
      <title>How Does Cursor Index Your Codebase?</title>
      <link>https://manthanguptaa.in/posts/how_cursor_index_your_codebase/</link>
      <pubDate>Tue, 16 Jun 2026 00:00:00 +0000</pubDate>
      <guid>https://manthanguptaa.in/posts/how_cursor_index_your_codebase/</guid>
      <description>&lt;p&gt;Every time you ask Cursor &amp;ldquo;where do we handle authentication?&amp;rdquo; and it points you to the right file in a 50,000 file monorepo in under a second, something interesting has happened under the hood. It&amp;rsquo;s not magic but an elegant combination of Merkle trees, trigram indexes, AST-based chunking, a custom trained embedding model, and a vector database (turbopuffer) storing over a trillion vectors across 80 million namespaces. This blog post is special because I am a big fan of Cursor and Turbopuffer. So I thought it would be interesting to understand how it works under the hood. Let&amp;rsquo;s get into it.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Memory in Voice Agents Is a Harder Problem Than You Think</title>
      <link>https://manthanguptaa.in/posts/voice_agent_memory/</link>
      <pubDate>Tue, 12 May 2026 00:00:00 +0000</pubDate>
      <guid>https://manthanguptaa.in/posts/voice_agent_memory/</guid>
      <description>&lt;p&gt;If you wanted the voice agent pipeline — STT, LLM, TTS, the latency budget — that is the &lt;a href=&#34;https://manthanguptaa.in/posts/voice_agents_primer&#34;&gt;architecture post&lt;/a&gt;. This one is the sequel that actually breaks the budget: memory.&lt;/p&gt;&#xA;&lt;p&gt;The first time I tried to plug a memory layer into a voice agent, the thing slowed down by hundreds of milliseconds on the first turn and never recovered. The conversation went from natural to &amp;ldquo;is the line still there?&amp;rdquo; in a single round-trip, because I had ported a text-agent memory architecture wholesale: a synchronous vector lookup against a hosted store, a small re-ranking pass, then the LLM. On a chat surface, nobody would have noticed. On voice, every turn felt like the agent was buffering before it spoke.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Voice Agent Architecture: Cascade, Latency, and the Pipeline</title>
      <link>https://manthanguptaa.in/posts/voice_agents_primer/</link>
      <pubDate>Tue, 05 May 2026 00:00:00 +0000</pubDate>
      <guid>https://manthanguptaa.in/posts/voice_agents_primer/</guid>
      <description>&lt;p&gt;The first time I built a voice agent and got on a call with it, the thing felt like talking to someone over a satellite phone in 2003. Long pauses, unnatural cadence, occasional cuts where it would just keep talking over me. The text version of the same product was usable. The voice version was not. That was the moment I learned that text engineering and voice engineering are not the same craft.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Reverse Engineering ChatGPT, Claude, OpenClaw, and Hermes Convinced Me Most AI Products Shouldn&#39;t Ship Memory</title>
      <link>https://manthanguptaa.in/posts/memory_is_a_mistake/</link>
      <pubDate>Wed, 22 Apr 2026 00:00:00 +0000</pubDate>
      <guid>https://manthanguptaa.in/posts/memory_is_a_mistake/</guid>
      <description>&lt;p&gt;The first time I asked ChatGPT what it remembered about me, it listed 33 facts. Name, career goals, fitness routine, names of side projects I had mentioned weeks earlier, a throwaway line about my sabbatical from a completely unrelated chat. I was impressed. I spent the next few weeks &lt;a href=&#34;https://manthanguptaa.in/posts/chatgpt_memory&#34;&gt;reverse-engineering how it actually works&lt;/a&gt;, then did the same for &lt;a href=&#34;https://manthanguptaa.in/posts/claude_memory&#34;&gt;Claude&lt;/a&gt;, &lt;a href=&#34;https://manthanguptaa.in/posts/clawdbot_memory&#34;&gt;OpenClaw&lt;/a&gt;, and &lt;a href=&#34;https://manthanguptaa.in/posts/hermes_memory&#34;&gt;Hermes&lt;/a&gt;. Somewhere around the third system, I stopped noticing how clever the designs were and started noticing how often memory was degrading my own outputs.&lt;/p&gt;</description>
    </item>
    <item>
      <title>What Happened When I Applied Karpathy&#39;s Autoresearch Idea to LLM Inference</title>
      <link>https://manthanguptaa.in/posts/auto_inference_optimiser/</link>
      <pubDate>Sun, 22 Mar 2026 00:00:00 +0000</pubDate>
      <guid>https://manthanguptaa.in/posts/auto_inference_optimiser/</guid>
      <description>&lt;p&gt;Most &amp;ldquo;AI optimization&amp;rdquo; demos are fun to watch for the same reason benchmark tweets are fun to watch: they show you the win, not the search.&lt;/p&gt;&#xA;&lt;p&gt;You see the final graph. You see the &lt;code&gt;+12%&lt;/code&gt; or the &amp;ldquo;runs 2x faster now&amp;rdquo; claim. What you usually do not see is the graveyard of bad ideas behind it. The settings that looked promising but were just noise. The optimizations that made throughput better by quietly making the model worse. The fake wins that only happened because the benchmark got easier.&lt;/p&gt;</description>
    </item>
    <item>
      <title>I Read Hermes Agent&#39;s Memory System, and It Fixes What OpenClaw Got Wrong</title>
      <link>https://manthanguptaa.in/posts/hermes_memory/</link>
      <pubDate>Mon, 16 Mar 2026 00:00:00 +0000</pubDate>
      <guid>https://manthanguptaa.in/posts/hermes_memory/</guid>
      <description>&lt;p&gt;If you&amp;rsquo;ve read my previous posts on &lt;a href=&#34;https://manthanguptaa.in/posts/chatgpt_memory&#34;&gt;ChatGPT memory&lt;/a&gt;, &lt;a href=&#34;https://manthanguptaa.in/posts/claude_memory&#34;&gt;Claude memory&lt;/a&gt;, and &lt;a href=&#34;https://manthanguptaa.in/posts/clawdbot_memory&#34;&gt;Clawdbot memory&lt;/a&gt;, you already know I keep coming back to the same question: how do these agents actually remember?&lt;/p&gt;&#xA;&lt;p&gt;Hermes Agent was particularly interesting to me because this time I did not have to reverse engineer everything from behavior alone. Hermes is open source, and both the &lt;a href=&#34;https://github.com/NousResearch/hermes-agent&#34;&gt;repo&lt;/a&gt; and the &lt;a href=&#34;https://hermes-agent.nousresearch.com/docs/getting-started/quickstart&#34;&gt;docs&lt;/a&gt; are public. So instead of poking a black box with prompts, I went straight to the code paths that build prompt state, persist sessions, flush memories, and query past conversations.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Karpathy Autoresearch: How the Experiment Harness Works</title>
      <link>https://manthanguptaa.in/posts/autoresearcher/</link>
      <pubDate>Fri, 13 Mar 2026 00:00:00 +0000</pubDate>
      <guid>https://manthanguptaa.in/posts/autoresearcher/</guid>
      <description>&lt;p&gt;Most &amp;ldquo;autonomous AI research&amp;rdquo; demos look impressive for the same reason magic tricks do: you only see the interesting part. An agent edits some code, runs an experiment, and shows a better result. What you usually do not see is the part that actually determines whether the system is useful: &lt;strong&gt;what is the harness optimizing for, how stable is the evaluation, and what happens when the agent fails?&lt;/strong&gt;&lt;/p&gt;&#xA;&lt;p&gt;That is why &lt;a href=&#34;https://github.com/karpathy/autoresearch&#34;&gt;Karpathy&amp;rsquo;s Autoresearch&lt;/a&gt; is worth paying attention to.&lt;/p&gt;</description>
    </item>
    <item>
      <title>How OpenClaw Remembers Everything</title>
      <link>https://manthanguptaa.in/posts/clawdbot_memory/</link>
      <pubDate>Mon, 26 Jan 2026 00:00:00 +0000</pubDate>
      <guid>https://manthanguptaa.in/posts/clawdbot_memory/</guid>
      <description>&lt;p&gt;OpenClaw is an open-source personal AI assistant (MIT licensed) created by &lt;a href=&#34;https://x.com/steipete&#34;&gt;Peter Steinberger&lt;/a&gt; that has quickly gained traction with over 32,600 stars on &lt;a href=&#34;https://github.com/OpenClaw/OpenClaw&#34;&gt;GitHub&lt;/a&gt; at the time of writing this blog. Unlike ChatGPT or Claude which run in the cloud, OpenClaw runs locally on your machine and integrates with chat platforms you already use like Discord, WhatsApp, Telegram, and more.&lt;/p&gt;&#xA;&lt;p&gt;What sets OpenClaw apart is its ability to handle real-world tasks autonomously: managing emails, scheduling calendar events, handling flight check-ins, and running background jobs on a schedule. But what caught my attention was its &lt;strong&gt;persistent memory system&lt;/strong&gt; which maintains 24/7 context retention, remembering conversations and building upon previous interactions indefinitely.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Agentic System Patterns That Increased Accuracy by 50% (And What They Cost)</title>
      <link>https://manthanguptaa.in/posts/agentic_systems_pattern/</link>
      <pubDate>Tue, 20 Jan 2026 00:00:00 +0000</pubDate>
      <guid>https://manthanguptaa.in/posts/agentic_systems_pattern/</guid>
      <description>&lt;p&gt;Agentic systems are already being deployed for complex tasks: building software, conducting research, analyzing data, and automating workflows. But as they move from prototypes to production, teams face a fundamental question: &lt;strong&gt;how do you build an agentic system that reliably handles any task?&lt;/strong&gt;&lt;/p&gt;&#xA;&lt;p&gt;The answer isn&amp;rsquo;t just about better prompts or more sophisticated models. It&amp;rsquo;s about understanding the trade-offs between three critical dimensions:&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;strong&gt;Cost&lt;/strong&gt; - API calls, compute resources, infrastructure&lt;/li&gt;&#xA;&lt;li&gt;&lt;strong&gt;Latency&lt;/strong&gt; - Time to complete a task, user experience&lt;/li&gt;&#xA;&lt;li&gt;&lt;strong&gt;Accuracy&lt;/strong&gt; - Correctness, reliability, handling edge cases&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;p&gt;The truth is that most techniques that improve accuracy also increase cost and latency. Multi-step reasoning, parallel verification, self-correction loops. They all make your system better, but at a price. The key is knowing &lt;em&gt;when&lt;/em&gt; to pay that price and &lt;em&gt;how&lt;/em&gt; to optimize within your constraints.&lt;/p&gt;</description>
    </item>
    <item>
      <title>How LLM Tokenization Works, and How to Train Your Own Tokenizer</title>
      <link>https://manthanguptaa.in/posts/train_llm_tokenization/</link>
      <pubDate>Wed, 14 Jan 2026 00:00:00 +0000</pubDate>
      <guid>https://manthanguptaa.in/posts/train_llm_tokenization/</guid>
      <description>&lt;p&gt;&lt;strong&gt;TL;DR&lt;/strong&gt;: Modern LLMs use subword tokenization (BPE, WordPiece, or Unigram) to balance vocabulary size with sequence length. Tokenization directly affects API costs, training compute, and model capabilities. It&amp;rsquo;s why LLMs struggle with arithmetic and spelling. For custom domains, train your own tokenizer using HuggingFace&amp;rsquo;s &lt;code&gt;tokenizers&lt;/code&gt; library. Use Tiktoken for speed, SentencePiece for multilingual.&lt;/p&gt;&#xA;&lt;h2 id=&#34;table-of-contents&#34;&gt;Table of Contents&lt;/h2&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;a href=&#34;#what-is-tokenization&#34;&gt;What is tokenization?&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&#34;#the-numbers-explained-token-ids-and-embeddings&#34;&gt;Token IDs and Embeddings&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&#34;#building-intuition-how-tokenizers-work&#34;&gt;Building Intuition: How Tokenizers Work&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&#34;#deep-dive-the-three-major-subword-tokenizers&#34;&gt;Deep Dive: BPE, WordPiece, Unigram&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&#34;#real-world-comparisons-bpe-vs-wordpiece-vs-unigram&#34;&gt;Real World Comparisons&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&#34;#real-world-tokenization-challenges&#34;&gt;Real-World Tokenization Challenges&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&#34;#building-your-own-tokenizer&#34;&gt;Building Your Own Tokenizer&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&#34;#tokenization-tools-comparison&#34;&gt;Tokenization Tools Comparison&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&#34;#conclusion&#34;&gt;Conclusion&lt;/a&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;hr&gt;&#xA;&lt;p&gt;The wrong tokenization strategy could be costing you $500K+ annually.&lt;/p&gt;</description>
    </item>
    <item>
      <title>How to Use LLM as a Judge (Without Getting Burned)</title>
      <link>https://manthanguptaa.in/posts/llm_as_a_judge/</link>
      <pubDate>Wed, 31 Dec 2025 00:00:00 +0000</pubDate>
      <guid>https://manthanguptaa.in/posts/llm_as_a_judge/</guid>
      <description>&lt;p&gt;&lt;strong&gt;TL;DR&lt;/strong&gt;: LLM as a judge works well when you (1) use reference based evaluation over pointwise scoring, (2) debias pairwise comparisons by swapping positions, (3) ensemble across multiple models, (4) require reasoning before scores, and (5) calibrate against human judgments. Skip it when ground truth exists or for safety critical decisions.&lt;/p&gt;&#xA;&lt;h2 id=&#34;table-of-contents&#34;&gt;Table of Contents&lt;/h2&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;a href=&#34;#why-traditional-evaluation-methods-fail&#34;&gt;Why Traditional Evaluation Methods Fail&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&#34;#evaluation-modes&#34;&gt;Evaluation Modes&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&#34;#crafting-effective-judge-prompts&#34;&gt;Crafting Effective Judge Prompts&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&#34;#limitations-and-biases&#34;&gt;Limitations and Biases&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&#34;#when-not-to-use-llm-as-a-judge&#34;&gt;When NOT to Use LLM as a judge&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&#34;#optimizations&#34;&gt;Optimizations&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&#34;#conclusion&#34;&gt;Conclusion&lt;/a&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;hr&gt;&#xA;&lt;p&gt;Last month, I ran thousands of evals on an agentic system I was building. The responses were open-ended, context dependent, and impossible to validate with simple string matching. I tried exact match comparisons, they failed miserably. I tried BLEU scores, they penalized semantically correct but differently worded responses. I was stuck! Traditional metrics could not handle the nuance I needed, and manual evaluation was too slow and expensive.&lt;/p&gt;</description>
    </item>
    <item>
      <title>I Reverse Engineered Claude&#39;s Memory System, and Here&#39;s What I Found!</title>
      <link>https://manthanguptaa.in/posts/claude_memory/</link>
      <pubDate>Sun, 14 Dec 2025 00:00:00 +0000</pubDate>
      <guid>https://manthanguptaa.in/posts/claude_memory/</guid>
      <description>&lt;p&gt;When I reverse-engineered ChatGPT&amp;rsquo;s memory system, I found it uses pre-computed summaries injected into every prompt. But Claude&amp;rsquo;s approach is different. Through extensive experimentation, I discovered Claude uses on-demand tools and selective retrieval, a fundamentally different architecture. But how does this actually work? And how does it compare to ChatGPT&amp;rsquo;s approach?&lt;/p&gt;&#xA;&lt;p&gt;This is the second post in a series where I reverse-engineer the memory systems of popular AI assistants. The first post focused on &lt;a href=&#34;https://manthanguptaa.in/posts/chatgpt_memory&#34;&gt;ChatGPT&amp;rsquo;s memory system&lt;/a&gt;. In this post, we&amp;rsquo;ll do the same exercise for Claude—and the differences are fascinating.&lt;/p&gt;</description>
    </item>
    <item>
      <title>I Reverse Engineered ChatGPT&#39;s Memory System, and Here&#39;s What I Found!</title>
      <link>https://manthanguptaa.in/posts/chatgpt_memory/</link>
      <pubDate>Tue, 09 Dec 2025 00:00:00 +0000</pubDate>
      <guid>https://manthanguptaa.in/posts/chatgpt_memory/</guid>
      <description>&lt;p&gt;When I asked ChatGPT what it remembered about me, it listed 33 facts from my name and career goals to my current fitness routine. But how does it actually store and retrieve this information? And why does it feel so seamless?&lt;/p&gt;&#xA;&lt;p&gt;After extensive experimentation, I discovered that ChatGPT&amp;rsquo;s memory system is far simpler than I expected. No vector databases. No RAG over conversation history. Instead, it uses four distinct layers: session metadata that adapts to your environment, explicit facts stored long-term, lightweight summaries of recent chats, and a sliding window of your current conversation.&lt;/p&gt;</description>
    </item>
    <item>
      <title>How I Got Every Job Without an Interview</title>
      <link>https://manthanguptaa.in/posts/proof_of_work/</link>
      <pubDate>Sun, 23 Nov 2025 00:00:00 +0000</pubDate>
      <guid>https://manthanguptaa.in/posts/proof_of_work/</guid>
      <description>&lt;p&gt;I have never relied on traditional interview processes to get a job. No DSA rounds, no system design grilling, no multi-step loops. Almost every role I have landed came through a single conversation focused entirely on the projects I had built.&lt;/p&gt;&#xA;&lt;p&gt;The reason is simple:&#xA;&lt;strong&gt;proof of work makes interviews optional&lt;/strong&gt;.&lt;/p&gt;&#xA;&lt;p&gt;I didn&amp;rsquo;t come from a big-name college. There was no built-in reputation attached to where I studied, and no advantage from well known tags like IIT, GSOC, or Big Tech internships. Those signals help - they make it easier for someone to assume you are capable.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Towards Human-Like Memory for AI Agents</title>
      <link>https://manthanguptaa.in/posts/towards_human_like_memory_for_ai_agents/</link>
      <pubDate>Sat, 01 Nov 2025 00:00:00 +0000</pubDate>
      <guid>https://manthanguptaa.in/posts/towards_human_like_memory_for_ai_agents/</guid>
      <description>&lt;p&gt;Memory has become one of the most talked about topics in the AI community. Every few weeks, we see new papers, frameworks, and posts, each claiming to “solve” memory for LLMs. Yet most of them are glorified caches that store tokens, not thoughts. Today&amp;rsquo;s memory systems rely on brute force retrieval: dumping everything into a vector database or rank fusing it with BM25. These approaches scale clutter, not cognition.&lt;/p&gt;&#xA;&lt;p&gt;If we want agents that truly understand and evolve with users, we need something deeper: &lt;strong&gt;metacognition&lt;/strong&gt;. In this blog post, I will share how I believe the memory layer of agents will evolve to become more human-like.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Prompt Engineering: Steering What the Model Predicts Next</title>
      <link>https://manthanguptaa.in/posts/the_art_of_prompt_engineering/</link>
      <pubDate>Mon, 11 Aug 2025 00:00:00 +0000</pubDate>
      <guid>https://manthanguptaa.in/posts/the_art_of_prompt_engineering/</guid>
      <description>&lt;p&gt;LLMs are prediction engines. The model takes text as input and then predicts the probability distribution of the next token based on the data it has been trained on. The LLM repeats this process multiple times, adding the previously predicted token to the input and predicting the next token. When we prompt the model, we are steering the model to predict the right sequence of tokens. Prompt engineering is the art of crafting the right prompt to get the model to predict the accurate output.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Water: An Agent Harness, Not Another Agent Framework</title>
      <link>https://manthanguptaa.in/posts/water/</link>
      <pubDate>Sat, 07 Jun 2025 00:00:00 +0000</pubDate>
      <guid>https://manthanguptaa.in/posts/water/</guid>
      <description>&lt;p&gt;Building multi-agent systems with existing frameworks is painful. While OpenAI Swarm, Google ADK, LangChain, CrewAI, AutoGen, Agno, etc have orchestration capabilities, they are complex, verbose, and unintuitive. Simple workflows require dozens of lines of boilerplate code, and adding branching logic, retries, or conditional execution becomes a debugging nightmare.&lt;/p&gt;&#xA;&lt;p&gt;&lt;a href=&#34;https://github.com/manthanguptaa/water&#34;&gt;Water&lt;/a&gt; is an agent harness framework — it provides the infrastructure &lt;em&gt;around&lt;/em&gt; your AI agents, not the agents themselves. Orchestration, resilience, observability, approval gates, sandboxing, and deployment tooling so you can focus on what your agents actually do.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Taking Sabbatical at the Age of 24</title>
      <link>https://manthanguptaa.in/posts/sabbatical/</link>
      <pubDate>Wed, 01 Jan 2025 00:00:00 +0000</pubDate>
      <guid>https://manthanguptaa.in/posts/sabbatical/</guid>
      <description>&lt;p&gt;This is a non-technical post that I feel fit to share as the year 2024 has come to an end. It&amp;rsquo;s been a little more than a year since I took a sabbatical and joined the workforce in 2024. I will cover everything from why I took a sabbatical to what I did during the sabbatical and how I spent my time.&lt;/p&gt;&#xA;&lt;h2 id=&#34;why-i-took-a-sabbatical&#34;&gt;Why I Took a Sabbatical?&lt;/h2&gt;&#xA;&lt;p&gt;Taking a sabbatical at the age of 24 isn&amp;rsquo;t a typical decision, but in September 2023, I chose to step away from work for some much-needed time off. This decision wasn’t easy, but it was necessary for several reasons:&lt;/p&gt;</description>
    </item>
    <item>
      <title>Write Skew, Dirty Reads, and Weak Isolation in Distributed Transactions</title>
      <link>https://manthanguptaa.in/posts/distributed_transaction_part_2/</link>
      <pubDate>Sun, 01 Dec 2024 00:00:00 +0000</pubDate>
      <guid>https://manthanguptaa.in/posts/distributed_transaction_part_2/</guid>
      <description>&lt;p&gt;Distributed databases usually will not give you serializability. They give you weak isolation, which is a polite way of saying some concurrency bugs are still allowed through: dirty reads, dirty writes, lost updates, write skew, and phantoms.&lt;/p&gt;&#xA;&lt;p&gt;This post is how those anomalies actually show up, and which isolation level stops which one. &lt;a href=&#34;https://manthanguptaa.in/posts/distributed_transaction_part_1/&#34;&gt;What ACID means, and when a single-object write is not a transaction&lt;/a&gt; is the setup. Let&amp;rsquo;s get into the isolation levels.&lt;/p&gt;</description>
    </item>
    <item>
      <title>What ACID Means in Distributed Transactions</title>
      <link>https://manthanguptaa.in/posts/distributed_transaction_part_1/</link>
      <pubDate>Fri, 01 Nov 2024 00:00:00 +0000</pubDate>
      <guid>https://manthanguptaa.in/posts/distributed_transaction_part_1/</guid>
      <description>&lt;p&gt;A transaction is a way to group several reads and writes so they succeed or fail together. That sentence is easy. Making it true across nodes is the rest of this series.&lt;/p&gt;&#xA;&lt;p&gt;This part is the vocabulary: what ACID actually means, and why a compare-and-set on one row is not the same thing as a multi-object transaction. Next is &lt;a href=&#34;https://manthanguptaa.in/posts/distributed_transaction_part_2/&#34;&gt;write skew, dirty reads, and weak isolation&lt;/a&gt;.&lt;/p&gt;&#xA;&lt;p&gt;&lt;img src=&#34;https://manthanguptaa.in/ah-shit-here-we-go-again-ah-shit.gif&#34; alt=&#34;gif&#34;&gt;&lt;/p&gt;&#xA;&lt;h2 id=&#34;what-are-transactions&#34;&gt;What are transactions?&lt;/h2&gt;&#xA;&lt;p&gt;A transaction is a logical unit that groups several reads and writes. All the reads and writes in a transaction are executed as one operation. Either the entire transaction succeeds or fails. If it fails, it is safe to retry, as all the changes have been reverted inside the transaction.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Partitioning in Distributed Systems: Hot Spots and Rebalancing</title>
      <link>https://manthanguptaa.in/posts/partitioning_in_distributed_systems/</link>
      <pubDate>Tue, 01 Oct 2024 00:00:00 +0000</pubDate>
      <guid>https://manthanguptaa.in/posts/partitioning_in_distributed_systems/</guid>
      <description>&lt;p&gt;Partitioning splits a database across nodes so one machine is not holding all the data or all the load. The hard parts are skew, hot spots, and moving rows when the mapping changes.&lt;/p&gt;&#xA;&lt;p&gt;This post is those problems: how you partition, how you relieve hot spots, and how you rebalance. Replication is the other half, starting with &lt;a href=&#34;https://manthanguptaa.in/posts/replication_in_distributed_systems_part_1/&#34;&gt;why databases replicate&lt;/a&gt;.&lt;/p&gt;&#xA;&lt;h2 id=&#34;partition--replication&#34;&gt;Partition &amp;amp; Replication&lt;/h2&gt;&#xA;&lt;p&gt;&lt;img src=&#34;https://manthanguptaa.in/partition_replication.svg&#34; alt=&#34;partition_replication&#34;&gt;&lt;/p&gt;&#xA;&lt;p&gt;We have already discussed replication in depth in my 3 part series. If you have missed it, you can find the 1st part &lt;a href=&#34;https://manthanguptaa.in/posts/replication_in_distributed_systems_part_1/&#34;&gt;here&lt;/a&gt;.&lt;/p&gt;</description>
    </item>
    <item>
      <title>CricLang: A Programming Language for Cricket Fans</title>
      <link>https://manthanguptaa.in/posts/criclang/</link>
      <pubDate>Fri, 01 Mar 2024 00:00:00 +0000</pubDate>
      <guid>https://manthanguptaa.in/posts/criclang/</guid>
      <description>&lt;p&gt;&lt;a href=&#34;https://github.com/manthanguptaa/CricLang&#34;&gt;CricLang&lt;/a&gt; is a small programming language for cricket fans, built in Go. The first commit on the repo is June 9, 2023, but the idea had been sitting around since college. I actually started building it on Feb 17, 2024, and it is now in public beta.&lt;/p&gt;&#xA;&lt;p&gt;&lt;img src=&#34;https://manthanguptaa.in/criclang_logo.png&#34; alt=&#34;logo&#34;&gt;&lt;/p&gt;&#xA;&lt;h2 id=&#34;why-the-name-criclang&#34;&gt;Why the name CricLang?&lt;/h2&gt;&#xA;&lt;p&gt;CricLang is an amalgamation of &amp;lsquo;Cricket&amp;rsquo; and &amp;lsquo;GoLang&amp;rsquo; as it is built on top of Go. It represents my love for cricket, software engineering, and the idea that code should be as simple and readable as the game. It is an evolving programming language and isn&amp;rsquo;t perfect by any means.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Leaderless Replication: Quorums, LWW, and Version Vectors</title>
      <link>https://manthanguptaa.in/posts/replication_in_distributed_systems_part_3/</link>
      <pubDate>Sun, 11 Feb 2024 00:00:00 +0000</pubDate>
      <guid>https://manthanguptaa.in/posts/replication_in_distributed_systems_part_3/</guid>
      <description>&lt;p&gt;Leaderless replication has no failover because there is no leader. The client writes to several replicas, waits for a quorum, and lives with the mess when nodes disagree: read repair, anti-entropy, last-write-wins, and version vectors.&lt;/p&gt;&#xA;&lt;p&gt;If you want the leader-based half of this series first: &lt;a href=&#34;https://manthanguptaa.in/posts/replication_in_distributed_systems_part_1/&#34;&gt;why databases replicate&lt;/a&gt; and &lt;a href=&#34;https://manthanguptaa.in/posts/replication_in_distributed_systems_part_2/&#34;&gt;read-your-writes, monotonic reads, and multi-leader replication&lt;/a&gt;.&lt;/p&gt;&#xA;&lt;p&gt;&lt;img src=&#34;https://manthanguptaa.in/spider-man_3.gif&#34; alt=&#34;spider-man&#34;&gt;&lt;/p&gt;&#xA;&lt;h2 id=&#34;leaderless-replication&#34;&gt;Leaderless Replication&lt;/h2&gt;&#xA;&lt;p&gt;In a leaderless implementation, the client directly sends the writes to several replicas and waits for the majority of them to acknowledge, compared to a setup with one or more leaders where a leader exists to coordinate the writes.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Read-Your-Writes, Monotonic Reads, and Multi-Leader Replication</title>
      <link>https://manthanguptaa.in/posts/replication_in_distributed_systems_part_2/</link>
      <pubDate>Thu, 01 Feb 2024 00:00:00 +0000</pubDate>
      <guid>https://manthanguptaa.in/posts/replication_in_distributed_systems_part_2/</guid>
      <description>&lt;p&gt;Asynchronous replication makes a database fast and also slightly dishonest. You can write a comment and immediately fail to see it. You can refresh and watch time go backwards. You can read a reply before the message it is answering.&lt;/p&gt;&#xA;&lt;p&gt;Those are consistency guarantees weaker than &amp;ldquo;the database is correct,&amp;rdquo; and they have names: read-your-writes, monotonic reads, and consistent prefix reads. This post is those guarantees, then multi-leader replication and how write conflicts get resolved. The setup is &lt;a href=&#34;https://manthanguptaa.in/posts/replication_in_distributed_systems_part_1/&#34;&gt;leaders, followers, and failover&lt;/a&gt;.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Why Databases Replicate: Leaders, Followers, and Failover</title>
      <link>https://manthanguptaa.in/posts/replication_in_distributed_systems_part_1/</link>
      <pubDate>Fri, 26 Jan 2024 00:00:00 +0000</pubDate>
      <guid>https://manthanguptaa.in/posts/replication_in_distributed_systems_part_1/</guid>
      <description>&lt;p&gt;You replicate a database so one machine is not the entire story: more read capacity, a spare if a node dies, and a copy closer to the user. The usual shape is a leader that takes writes and followers that replay them. This post is that shape, plus what happens when the leader fails.&lt;/p&gt;&#xA;&lt;p&gt;It is part 1 of 3 on replication in distributed systems. Next is &lt;a href=&#34;https://manthanguptaa.in/posts/replication_in_distributed_systems_part_2/&#34;&gt;read-your-writes, monotonic reads, and multi-leader replication&lt;/a&gt;, then &lt;a href=&#34;https://manthanguptaa.in/posts/replication_in_distributed_systems_part_3/&#34;&gt;leaderless replication, quorums, and version vectors&lt;/a&gt;.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Data Structures That Power Your Databases</title>
      <link>https://manthanguptaa.in/posts/data_structures_that_power_your_databases/</link>
      <pubDate>Sat, 20 Jan 2024 00:00:00 +0000</pubDate>
      <guid>https://manthanguptaa.in/posts/data_structures_that_power_your_databases/</guid>
      <description>&lt;p&gt;Have you ever thought about why databases are so complex internally and why we can&amp;rsquo;t use a text file to store the data? This blog post aims to go from the most basic database that writes data to text files to a more complex setting where we use LSM-tree and B-tree. We will understand why we need these data structures and more.&lt;/p&gt;&#xA;&lt;h2 id=&#34;worlds-simplest-key-value-store&#34;&gt;World&amp;rsquo;s Simplest Key-Value Store&lt;/h2&gt;&#xA;&lt;p&gt;What does the world&amp;rsquo;s simplest key-value store look like? 2 bash function that writes data to a text file and gets data from the text file.&lt;/p&gt;</description>
    </item>
  </channel>
</rss>
