RSSAmplifier

Blog

Manthan

Recent content on Manthan

manthanguptaa.inRSS feed ↗29 posts

Latest posts

How to Evaluate Voice Agents

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…

How Does Cursor Index Your Codebase?

Every time you ask Cursor “where do we handle authentication?” 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’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…

Memory in Voice Agents Is a Harder Problem Than You Think

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 “is the line still there?” 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,…

Voice Agents 101: The Architecture Behind AI That Talks Back

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.

Reverse Engineering ChatGPT, Claude, OpenClaw, and Hermes Convinced Me Most AI Products Shouldn't Ship Memory

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 reverse-engineering how it actually works , then did the same for Claude , OpenClaw , and Hermes . Somewhere…

What Happened When I Applied Karpathy's Autoresearch Idea to LLM Inference

Most “AI optimization” demos are fun to watch for the same reason benchmark tweets are fun to watch: they show you the win, not the search. 
 You see the final graph. You see the +12% or the “runs 2x faster now” 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…

I Read Hermes Agent's Memory System, and It Fixes What OpenClaw Got Wrong

If you’ve read my previous posts on ChatGPT memory , Claude memory , and Clawdbot memory , you already know I keep coming back to the same question: how do these agents actually remember? 
 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 repo and the docs are public.…

How Karpathy's Autoresearch Works And What You Can Learn From It

Most “autonomous AI research” 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: what is the harness optimizing for, how stable is the evaluation, and what happens when the…

How OpenClaw Remembers Everything

OpenClaw is an open-source personal AI assistant (MIT licensed) created by Peter Steinberger that has quickly gained traction with over 32,600 stars on GitHub 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. 
 What sets OpenClaw…

Agentic System Patterns That Increased Accuracy by 50% (And What They Cost)

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: how do you build an agentic system that reliably handles any task? 
 The answer isn’t just about better prompts or more sophisticated models. It’s about…

How To Train Your Own Language Model - Part 1: Tokenization

TL;DR : 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’s why LLMs struggle with arithmetic and spelling. For custom domains, train your own tokenizer using HuggingFace’s tokenizers library. Use Tiktoken for speed, SentencePiece for…

How to Use LLM as a Judge (Without Getting Burned)

TL;DR : 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. 
 Table of Contents 
 
 Why Traditional…

I Reverse Engineered Claude's Memory System, and Here's What I Found!

When I reverse-engineered ChatGPT’s memory system, I found it uses pre-computed summaries injected into every prompt. But Claude’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’s approach? 
…

I Reverse Engineered ChatGPT's Memory System, and Here's What I Found!

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? 
 After extensive experimentation, I discovered that ChatGPT’s memory system is far simpler than I expected. No vector databases. No RAG over conversation history.…

How I Got Every Job Without an Interview

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. 
 The reason is simple:
 proof of work makes interviews optional . 
 I didn’t come from a big-name college. There was no built-in…

Towards Human like Memory for AI Agents

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’s memory systems rely on brute force retrieval: dumping everything into a vector database or rank fusing it with BM25. These approaches scale…

The Art of Prompt Engineering

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…

Water: The Agent Harness Framework

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. 
 Water is an agent harness…

Taking Sabbatical at the Age of 24

This is a non-technical post that I feel fit to share as the year 2024 has come to an end. It’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. 
 Why I Took a Sabbatical? 
 Taking a sabbatical at the age of 24 isn’t a…

Distributed Transactions - Part 2


 Hello World! 
 Welcome to the second part of the distributed transaction series. In the first part , we discussed the basics of transactions, the meaning of ACID, and Single-Object and Multi-Object operations. In this part, we will discuss about weak isolation levels and how they work in a distributed setting. We touch upon the concepts of dirty reads, dirty writes, lost updates, write…

Distributed Transactions - Part 1


 Ah shit, another blog series from yours truly. It is probably going to be a 3-part blog series where we talk about transactions in a distributed setting. In this part, we will discuss transactions, the meaning of ACID, and Single-Object and Multi-Object operations. 
 What are transactions? 
 A transaction is a logical unit that groups several reads and writes. All the reads and…

Partitioning In Distributed Systems

Yeah, I have been away for half a year now. A lot has happened, and that’s for some other time or blog. But here we are to discuss partitioning in distributed systems. We will discuss different ways to partition data, how to relieve hot spots, strategies to rebalance partitions, etc. 
 Partition & Replication 
 
 We have already discussed replication in depth in my 3 part series.…

Introducing CricLang 🏏


 CricLang is a fun programming language created for cricket enthusiasts. If you look at the initial commit on the repository, it will show it as June 9, 2023, but the idea of building my programming language has been lingering at the back of my head since my college days. Finally, after procrastinating on building CricLang, I started working on it on Feb 17, 2024, and it is now ready for…

Replication in Distributed Systems - Part 3


 Welcome to the third and final part of my series on replication in distributed systems. If you have missed the first two parts of the series, I would advise you to read them first, as this comes off as a storyline. Click here and here for the previous blogs. In this blog, we will discuss… well, let’s dive right in without formalities! 
 Leaderless Replication 
 In a…

Replication in Distributed Systems - Part 2


 In the first part of the series, we laid the foundation of replication in distributed systems. We will take this forward in the 2nd part, where we introduce the different consistency guarantees, multi-leader configuration and its comparison with single-leader configuration, conflict resolution, and more. 
 Reading your own writes 
 
 Many applications allow the user to submit…

Replication in Distributed Systems - Part 1


 Welcome, fellow nerds, to the 1st part of a blog series on replication. We will be discussing why we even need to distribute a database across multiple machines, what are leaders and followers, how to handle the failure of leaders and followers, etc. It will set it up nicely for our future blog in this series. 
 Why distribute a database across multiple machines? 
 
 Scalability…

Data Structures That Power Your Databases

Have you ever thought about why databases are so complex internally and why we can’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. 
 World’s Simplest Key-Value Store 
 What does the…

About

Hi! I am Manthan Gupta , an AI Research Engineer based in Bangalore, India. I spend my days diving deep into the systems that power modern AI, from how models run on GPUs to how agents orchestrate complex workflows. 
 What I’m Working On 
 Right now, I am knee deep in inference engineering, writing GPU kernels, and exploring distributed training. My focus in 2026 is on AI agents ,…

Shelf

Welcome to my shelf! This is a simple way for me to keep track of the books and papers I’ve read or am currently reading in the field of computer science. Below, you’ll find a list of my reading materials categorized into specific fields within computer science 
 Books 
 
 
 Title : The Phoenix Project 
 
 Author : Gene Kim, Kevin Behr, George Spafford 
…