<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Shweta Mishra</title>
    <description>The latest articles on DEV Community by Shweta Mishra (@shweta_mishra_b3c97874de9).</description>
    <link>https://dev.to/shweta_mishra_b3c97874de9</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F3970178%2Fcdf6db19-2f74-4265-9256-5311d0528c82.png</url>
      <title>DEV Community: Shweta Mishra</title>
      <link>https://dev.to/shweta_mishra_b3c97874de9</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/shweta_mishra_b3c97874de9"/>
    <language>en</language>
    <item>
      <title>What Auditing My AI Content Engine Taught Me About Building Production AI Systems</title>
      <dc:creator>Shweta Mishra</dc:creator>
      <pubDate>Fri, 07 Aug 2026 20:56:48 +0000</pubDate>
      <link>https://dev.to/shweta_mishra_b3c97874de9/what-auditing-my-ai-content-engine-taught-me-about-building-production-ai-systems-5eld</link>
      <guid>https://dev.to/shweta_mishra_b3c97874de9/what-auditing-my-ai-content-engine-taught-me-about-building-production-ai-systems-5eld</guid>
      <description>&lt;p&gt;Everyone loves building AI applications. Connect an LLM, write a prompt, add a clean UI, and within a few hours you have something impressive to share on LinkedIn. I've built several AI projects myself, and like many developers, I was initially focused on adding features quickly.&lt;/p&gt;

&lt;p&gt;Recently, I decided to do something different.&lt;/p&gt;

&lt;p&gt;Instead of building another feature, I audited one of my own projects—&lt;strong&gt;Healthy Gut AI&lt;/strong&gt;, an AI-powered medical content generation platform. The goal wasn't to find bugs for the sake of fixing them. I wanted to answer a simple question:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;If someone used this application in production today, would I trust it?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;That question completely changed how I looked at my own code.&lt;/p&gt;




&lt;h2&gt;
  
  
  The Project
&lt;/h2&gt;

&lt;p&gt;Healthy Gut AI isn't just an article generator. It's designed as a complete AI content pipeline.&lt;/p&gt;

&lt;p&gt;The application includes:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;FastAPI backend&lt;/li&gt;
&lt;li&gt;Multi-LLM provider support&lt;/li&gt;
&lt;li&gt;Retrieval-Augmented Generation (RAG)&lt;/li&gt;
&lt;li&gt;SEO-focused article generation&lt;/li&gt;
&lt;li&gt;Batch content generation&lt;/li&gt;
&lt;li&gt;Human review workflow&lt;/li&gt;
&lt;li&gt;Quality scoring&lt;/li&gt;
&lt;li&gt;Analytics dashboard&lt;/li&gt;
&lt;li&gt;DOCX export&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;On paper, everything looked good. The application generated articles successfully, the dashboard displayed useful metrics, and the review workflow functioned exactly as expected.&lt;/p&gt;

&lt;p&gt;From a feature perspective, I could have considered the project "finished."&lt;/p&gt;

&lt;p&gt;But production software isn't judged by feature count.&lt;/p&gt;

&lt;p&gt;It's judged by reliability.&lt;/p&gt;




&lt;h2&gt;
  
  
  The Difference Between Working and Production Ready
&lt;/h2&gt;

&lt;p&gt;One lesson became obvious almost immediately.&lt;/p&gt;

&lt;p&gt;A project can work perfectly during development and still not be ready for production.&lt;/p&gt;

&lt;p&gt;For example, every article generated successfully.&lt;/p&gt;

&lt;p&gt;No exceptions.&lt;/p&gt;

&lt;p&gt;No crashes.&lt;/p&gt;

&lt;p&gt;No failed requests.&lt;/p&gt;

&lt;p&gt;Yet during testing, one multilingual article unexpectedly contained a Chinese character inside a Hindi sentence.&lt;/p&gt;

&lt;p&gt;Technically, nothing had failed.&lt;/p&gt;

&lt;p&gt;The API returned a successful response.&lt;/p&gt;

&lt;p&gt;The database stored the article.&lt;/p&gt;

&lt;p&gt;The dashboard showed another successful generation.&lt;/p&gt;

&lt;p&gt;But no real user would want to publish that content.&lt;/p&gt;

&lt;p&gt;That was my first reminder that &lt;strong&gt;successful execution is not the same as successful output.&lt;/strong&gt;&lt;/p&gt;




&lt;h2&gt;
  
  
  Architecture Matters
&lt;/h2&gt;

&lt;p&gt;One thing I was genuinely happy with during the audit was the project structure.&lt;/p&gt;

&lt;p&gt;Instead of putting every feature into one large application file, the project was organized into small modules responsible for specific tasks.&lt;/p&gt;

&lt;p&gt;The backend separated routing, configuration, database access, caching, quality evaluation, metrics, and LLM providers.&lt;/p&gt;

&lt;p&gt;That decision made the code much easier to understand and maintain.&lt;/p&gt;

&lt;p&gt;Adding new features required changing only one or two modules instead of touching the entire application.&lt;/p&gt;

&lt;p&gt;Clean architecture doesn't make screenshots more impressive, but it makes future development significantly easier.&lt;/p&gt;




&lt;h2&gt;
  
  
  Multi-LLM Support Was Worth It
&lt;/h2&gt;

&lt;p&gt;One design decision I don't regret is supporting multiple AI providers.&lt;/p&gt;

&lt;p&gt;Instead of relying on a single API, the application can switch between providers whenever one becomes unavailable.&lt;/p&gt;

&lt;p&gt;Anyone building AI applications eventually experiences:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;rate limits&lt;/li&gt;
&lt;li&gt;temporary outages&lt;/li&gt;
&lt;li&gt;provider instability&lt;/li&gt;
&lt;li&gt;API changes&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Building redundancy into the system makes it much more reliable.&lt;/p&gt;

&lt;p&gt;Production systems should never depend entirely on a single external service.&lt;/p&gt;




&lt;h2&gt;
  
  
  Quality Is Harder Than Generation
&lt;/h2&gt;

&lt;p&gt;Initially, I thought article generation would be the difficult part.&lt;/p&gt;

&lt;p&gt;It wasn't.&lt;/p&gt;

&lt;p&gt;Modern LLMs are already very good at producing readable text.&lt;/p&gt;

&lt;p&gt;The real challenge is determining whether that text is actually good enough.&lt;/p&gt;

&lt;p&gt;The application assigned quality scores to generated articles.&lt;/p&gt;

&lt;p&gt;At first glance, that seemed useful.&lt;/p&gt;

&lt;p&gt;But during the audit I realized a problem.&lt;/p&gt;

&lt;p&gt;If an article receives a score of &lt;strong&gt;72&lt;/strong&gt;, what does that actually mean?&lt;/p&gt;

&lt;p&gt;Does it have poor SEO?&lt;/p&gt;

&lt;p&gt;Weak citations?&lt;/p&gt;

&lt;p&gt;Grammar issues?&lt;/p&gt;

&lt;p&gt;Medical inaccuracies?&lt;/p&gt;

&lt;p&gt;Without explanation, the score becomes little more than a number.&lt;/p&gt;

&lt;p&gt;That experience taught me that AI systems should explain their decisions whenever possible.&lt;/p&gt;

&lt;p&gt;Transparency builds trust.&lt;/p&gt;




&lt;h2&gt;
  
  
  Validation Is More Important Than Prompts
&lt;/h2&gt;

&lt;p&gt;Like many developers, I spent a lot of time improving prompts.&lt;/p&gt;

&lt;p&gt;Prompt engineering certainly matters.&lt;/p&gt;

&lt;p&gt;But the audit showed that validation matters even more.&lt;/p&gt;

&lt;p&gt;Instead of asking:&lt;/p&gt;

&lt;p&gt;&lt;em&gt;"How can I generate better content?"&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;I started asking:&lt;/p&gt;

&lt;p&gt;&lt;em&gt;"How can I detect bad content before users see it?"&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;Those are two completely different engineering problems.&lt;/p&gt;

&lt;p&gt;Validation includes checking:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;encoding issues&lt;/li&gt;
&lt;li&gt;incomplete sections&lt;/li&gt;
&lt;li&gt;hallucinated references&lt;/li&gt;
&lt;li&gt;formatting problems&lt;/li&gt;
&lt;li&gt;language consistency&lt;/li&gt;
&lt;li&gt;citation quality&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Good AI applications don't simply generate.&lt;/p&gt;

&lt;p&gt;They verify.&lt;/p&gt;




&lt;h2&gt;
  
  
  Human Review Still Matters
&lt;/h2&gt;

&lt;p&gt;One reason I included a review workflow from the beginning is that medical content deserves an additional layer of verification.&lt;/p&gt;

&lt;p&gt;The application supports:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Pending&lt;/li&gt;
&lt;li&gt;Approved&lt;/li&gt;
&lt;li&gt;Rejected&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;This simple workflow ensures AI-generated content isn't automatically published without oversight.&lt;/p&gt;

&lt;p&gt;As AI improves, human review may become lighter.&lt;/p&gt;

&lt;p&gt;I don't think it disappears completely—especially for domains involving health, finance, or legal information.&lt;/p&gt;




&lt;h2&gt;
  
  
  Small Improvements Make a Big Difference
&lt;/h2&gt;

&lt;p&gt;Interestingly, many improvements identified during the audit weren't exciting new features.&lt;/p&gt;

&lt;p&gt;They were engineering improvements.&lt;/p&gt;

&lt;p&gt;Things like:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;stronger input validation&lt;/li&gt;
&lt;li&gt;better logging&lt;/li&gt;
&lt;li&gt;clearer quality reports&lt;/li&gt;
&lt;li&gt;safer API configuration&lt;/li&gt;
&lt;li&gt;improved Unicode handling&lt;/li&gt;
&lt;li&gt;production-ready CORS settings&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;None of these changes produce flashy screenshots.&lt;/p&gt;

&lt;p&gt;All of them improve reliability.&lt;/p&gt;




&lt;h2&gt;
  
  
  My Biggest Takeaway
&lt;/h2&gt;

&lt;p&gt;The biggest lesson wasn't about FastAPI.&lt;/p&gt;

&lt;p&gt;Or LLMs.&lt;/p&gt;

&lt;p&gt;Or RAG.&lt;/p&gt;

&lt;p&gt;It was about mindset.&lt;/p&gt;

&lt;p&gt;When I first built the project, I kept asking:&lt;/p&gt;

&lt;p&gt;&lt;em&gt;"Does this feature work?"&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;After the audit, I started asking:&lt;/p&gt;

&lt;p&gt;&lt;em&gt;"What happens when this feature fails?"&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;That single question changes how you design software.&lt;/p&gt;

&lt;p&gt;It encourages better validation.&lt;/p&gt;

&lt;p&gt;Better logging.&lt;/p&gt;

&lt;p&gt;Better testing.&lt;/p&gt;

&lt;p&gt;Better security.&lt;/p&gt;

&lt;p&gt;And ultimately, better user experience.&lt;/p&gt;




&lt;h2&gt;
  
  
  Final Thoughts
&lt;/h2&gt;

&lt;p&gt;Auditing my own project reminded me that building AI applications isn't just about connecting models to prompts.&lt;/p&gt;

&lt;p&gt;Real engineering starts after the demo.&lt;/p&gt;

&lt;p&gt;It's about making systems reliable, maintainable, and trustworthy when people actually depend on them.&lt;/p&gt;

&lt;p&gt;Healthy Gut AI still has room to grow, but the audit gave me confidence that improving production quality is often less about adding more features and more about strengthening the foundations that users rarely see.&lt;/p&gt;

&lt;p&gt;If you're building AI applications, I'd encourage you to audit your own project before someone else does.&lt;/p&gt;

&lt;p&gt;You might discover that your biggest opportunities aren't where you expected them to be.&lt;/p&gt;

</description>
      <category>ai</category>
      <category>python</category>
      <category>opensource</category>
      <category>fastapi</category>
    </item>
    <item>
      <title>TokenMizer: Giving LLMs a Memory That Doesn't Forget Between Sessions</title>
      <dc:creator>Shweta Mishra</dc:creator>
      <pubDate>Tue, 04 Aug 2026 17:01:05 +0000</pubDate>
      <link>https://dev.to/shweta_mishra_b3c97874de9/tokenmizer-giving-llms-a-memory-that-doesnt-forget-between-sessions-6he</link>
      <guid>https://dev.to/shweta_mishra_b3c97874de9/tokenmizer-giving-llms-a-memory-that-doesnt-forget-between-sessions-6he</guid>
      <description>&lt;p&gt;&lt;em&gt;How a graph-memory proxy sits between your app and the OpenAI API, quietly remembering everything your LLM would otherwise lose.&lt;/em&gt;&lt;/p&gt;




&lt;p&gt;Every conversation with a large language model starts from zero. Close the tab, start a new session, and the model has no idea who you are, what you discussed yesterday, or what you decided last week. Most tools work around this by stuffing more and more chat history into the context window — which is expensive, slow, and eventually hits a hard limit.&lt;/p&gt;

&lt;p&gt;I built &lt;strong&gt;TokenMizer&lt;/strong&gt; to solve this differently: instead of remembering by re-reading everything, it remembers by building a &lt;em&gt;graph&lt;/em&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  The Core Idea: A Proxy, Not a Plugin
&lt;/h2&gt;

&lt;p&gt;TokenMizer sits as a proxy in front of any OpenAI-compatible API. Your application doesn't change how it calls the model — it just points its API base URL at TokenMizer instead of directly at OpenAI. Every request and response passes through, gets analyzed, and gets stored before continuing on to the real model.&lt;/p&gt;

&lt;p&gt;This design choice matters more than it looks. It means TokenMizer works with any framework or app that already speaks the OpenAI API format, with no SDK changes and no rewritten integration code. You add memory to an existing app by changing one URL.&lt;/p&gt;

&lt;h2&gt;
  
  
  How Memory Actually Gets Built
&lt;/h2&gt;

&lt;p&gt;Two systems do the heavy lifting.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;File Intelligence&lt;/strong&gt; watches what code, documents, or files are referenced during a conversation and builds context around them — so if you're debugging the same file across three sessions, TokenMizer already knows its history in the conversation, not just its current contents.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Graph Memory&lt;/strong&gt; is the more interesting part. Instead of storing conversation history as a flat log, TokenMizer extracts entities and relationships — people, projects, decisions, dependencies — and stores them as nodes and edges in a graph, backed by SQLite. When a new message comes in, TokenMizer doesn't search through old transcripts; it queries the graph for relevant nodes and pulls in only what's connected to the current topic.&lt;/p&gt;

&lt;p&gt;The practical difference: a flat-log memory system gets slower and more expensive as history grows, because it has to search more text. A graph memory system stays fast, because it's traversing relationships, not scanning transcripts.&lt;/p&gt;

&lt;h2&gt;
  
  
  Seeing the Graph: The D3.js Explorer
&lt;/h2&gt;

&lt;p&gt;Memory systems that live entirely inside a database are hard to trust, because you can't see what they're doing. TokenMizer ships with a &lt;strong&gt;Graph Explorer&lt;/strong&gt; built on D3.js — a visual, interactive map of every entity and connection the system has learned. You can watch new nodes appear as a conversation progresses, or trace why the model suddenly "remembered" something from three sessions ago by following the edge back to its source.&lt;/p&gt;

&lt;p&gt;This turned out to be more useful for debugging than for demos. When memory retrieval pulls in the wrong context, the graph view shows exactly why — which node matched, and through which relationship.&lt;/p&gt;

&lt;h2&gt;
  
  
  Two Ways In: CLI and MCP
&lt;/h2&gt;

&lt;p&gt;TokenMizer is distributed as a pip-installable library, so it drops into an existing Python environment directly. For day-to-day use there's a CLI to inspect, query, and manage the memory graph without writing code.&lt;/p&gt;

&lt;p&gt;The second integration path is &lt;strong&gt;MCP (Model Context Protocol)&lt;/strong&gt; server support, which lets TokenMizer's memory be used as a tool by MCP-compatible clients — including editors like Cursor. This was a deliberate design decision: memory shouldn't be locked to one app. Whether you're calling the API directly, scripting through the CLI, or working inside an AI-assisted editor, the same graph is behind all of it.&lt;/p&gt;

&lt;h2&gt;
  
  
  What Broke, and What I Learned Fixing It
&lt;/h2&gt;

&lt;p&gt;Building a proxy that intercepts every API call raises the stakes on reliability — if TokenMizer fails, your app's LLM calls fail with it. An internal audit surfaced real problems worth naming honestly:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Async race conditions&lt;/strong&gt; in request handling, where concurrent calls could read or write memory state out of order.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Silent crash patterns repeated across 12 files&lt;/strong&gt; — errors that failed quietly instead of surfacing, similar in spirit to the fail-closed lesson from my other project, GitHub Autopilot.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;A regex regression&lt;/strong&gt; that broke entity extraction for a subset of inputs after a refactor.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;A data-destruction bug in the MCP installer&lt;/strong&gt; — an edge case where installation could overwrite existing memory data instead of merging with it.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;All nine verified issues were fixed and tested. The installer bug in particular changed how I think about setup scripts generally: anything that touches a user's existing data on install needs to default to the safest possible behavior, even if that means asking one more confirmation question.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why Build This Instead of Using Mem0 or Zep
&lt;/h2&gt;

&lt;p&gt;Existing memory layers for LLMs mostly work — but they usually mean adopting their SDK and their storage model. TokenMizer's proxy-first design means it can sit under tools you already use without asking you to restructure how you call the model. The graph-based retrieval is also a deliberate bet: as conversations and codebases grow, relationship-based lookup scales in a way flat retrieval doesn't.&lt;/p&gt;

&lt;p&gt;It's early — this is a project built in the open, not a finished product — but the architecture is stable enough now to be worth explaining properly, and worth other developers trying against their own workflows.&lt;/p&gt;




&lt;p&gt;&lt;em&gt;TokenMizer is open source and pip-installable. Code, CLI docs, and the Graph Explorer are on GitHub: &lt;a href="https://github.com/Shweta-Mishra-ai/tokenmizer" rel="noopener noreferrer"&gt;Shweta-Mishra-ai/tokenmizer&lt;/a&gt;.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;I write about building developer tools and AI infrastructure at TechNova World. If you need someone who can build a system like this and explain it clearly to your team or your users, let's talk.&lt;/em&gt;&lt;/p&gt;

</description>
      <category>ai</category>
      <category>mcp</category>
      <category>opensource</category>
      <category>python</category>
    </item>
    <item>
      <title>What Auditing My Own AI Projects Taught Me About Shipping Production Code</title>
      <dc:creator>Shweta Mishra</dc:creator>
      <pubDate>Sun, 02 Aug 2026 19:01:22 +0000</pubDate>
      <link>https://dev.to/shweta_mishra_b3c97874de9/what-auditing-my-own-ai-projects-taught-me-about-shipping-production-code-175f</link>
      <guid>https://dev.to/shweta_mishra_b3c97874de9/what-auditing-my-own-ai-projects-taught-me-about-shipping-production-code-175f</guid>
      <description>&lt;p&gt;Two projects, thirteen serious bugs, and one pattern that kept showing up everywhere.&lt;/p&gt;

&lt;p&gt;Most engineers find out their code has problems when a user reports one. I found out earlier — by going back through two of my own projects and auditing them properly, on purpose, before anyone else had to.&lt;/p&gt;

&lt;p&gt;The projects were different in almost every way. GitHub Autopilot is a Flask app that automates code review and PR management through GitHub webhooks. TokenMizer is a proxy that intercepts LLM API calls to give them persistent memory. One handles webhook traffic; the other handles model requests. Different languages of failure, you'd think.&lt;/p&gt;

&lt;p&gt;They weren't. The same failure pattern showed up in both, wearing different clothes each time. Here's what I found, and what it taught me about the difference between code that works and code that's actually safe to ship.&lt;/p&gt;

&lt;p&gt;The Pattern: Failure That Doesn't Announce Itself&lt;/p&gt;

&lt;p&gt;In GitHub Autopilot, I found 27 places where the code caught an exception and did nothing with it — no log, no alert, just silent continuation. In TokenMizer, the same shape of bug appeared across 12 files as silent crash patterns, plus an async race condition where concurrent requests could read or write memory state out of order without anyone noticing until the data was already wrong.&lt;/p&gt;

&lt;p&gt;Neither of these is a bug you catch by staring at the code. They're bugs you catch by asking a different question than "does this work?" The right question is: when this fails — and eventually it will — does the failure tell anyone?&lt;/p&gt;

&lt;p&gt;Code that fails loudly is annoying but honest. Code that fails silently is comfortable to write and dangerous to run, because it lets small problems compound into large ones with no trail to follow back. Every fix I made across both projects, at its core, was about converting a silent failure into a visible one.&lt;/p&gt;

&lt;p&gt;Three Specific Failures, One Underlying Habit&lt;/p&gt;

&lt;p&gt;GitHub Autopilot's auth bypass: the MCP authentication check caught its own exceptions and let the request through — failing open instead of closed. A slow auth service became an accidental backdoor.&lt;/p&gt;

&lt;p&gt;GitHub Autopilot's rate limiter: it tracked request counts per IP but never cleaned up stale entries, so the defense meant to stop abuse became a memory leak that could crash the app under sustained traffic.&lt;/p&gt;

&lt;p&gt;TokenMizer's installer bug: an edge case in the MCP installer could overwrite a user's existing memory graph on install, instead of merging with it — a data-destruction bug hiding inside what looked like routine setup code.&lt;/p&gt;

&lt;p&gt;Three different subsystems, three different consequences — a security hole, an outage vector, a data-loss bug. But look at the shared habit underneath: in all three cases, the code assumed the happy path would hold, and didn't plan for what happens when it doesn't. The auth check assumed the auth service stays up. The rate limiter assumed traffic stays bounded. The installer assumed there's nothing to lose.&lt;/p&gt;

&lt;p&gt;Good defensive code doesn't assume the happy path. It asks "what's the safe default when I don't know what's going on?" — and for anything touching security or user data, the safe default is almost always: deny, don't proceed, don't overwrite.&lt;/p&gt;

&lt;p&gt;Testing Isn't the Finish Line — It's How You Prove the Fix&lt;/p&gt;

&lt;p&gt;Finding bugs is one skill. Proving they're actually fixed is a different one, and it's the part that's easy to skip under deadline pressure. For GitHub Autopilot, that meant writing targeted tests that reproduce each original failure — a forged request header, an auth-service timeout, sustained traffic from many IPs — and raising overall coverage from 62% to 76% along the way, with all 654 tests passing across an 834-test suite. For TokenMizer, it meant verifying all nine issues individually rather than assuming a broad refactor had swept them up.&lt;/p&gt;

&lt;p&gt;The number that matters isn't the coverage percentage. It's whether each specific failure mode you found has a test that would catch it coming back. Coverage without targeted regression tests is a vanity metric; targeted tests without coverage tracking mean you don't know what you haven't checked. You need both.&lt;/p&gt;

&lt;p&gt;Why I Wrote This Down&lt;/p&gt;

&lt;p&gt;I could have fixed these bugs quietly and moved on — nobody was demanding an audit, no user had filed a report. I did it because the fixing wasn't actually the valuable part. The valuable part was noticing the pattern across two unrelated codebases, and writing it down so it's a reusable lesson instead of a one-off cleanup.&lt;/p&gt;

&lt;p&gt;That's the habit I'd recommend to any engineer, and it's also, honestly, the reason I enjoy technical writing as much as building: a bug fix helps one project. A clearly explained pattern helps every project you touch after it. If there's one thing worth taking from two audits and thirteen bugs, it's this — the question that finds real problems isn't "does it work in the demo?" It's "what happens when the thing I'm depending on doesn't behave?" Ask that question early, and you fix bugs before they have users attached to them.&lt;/p&gt;

&lt;p&gt;GitHub Autopilot and TokenMizer are both open source: github-autopilot · tokenmizer.&lt;/p&gt;

&lt;p&gt;I build developer tools and write about what breaks while building them, at TechNova World. If you want documentation that comes from someone who's actually shipped and audited production code, let's talk.&lt;/p&gt;

</description>
      <category>ai</category>
      <category>opensource</category>
      <category>python</category>
      <category>programming</category>
    </item>
    <item>
      <title>Building a GitHub App That Reviews Its Own Code: Lessons in Security Hardening</title>
      <dc:creator>Shweta Mishra</dc:creator>
      <pubDate>Sun, 26 Jul 2026 08:44:16 +0000</pubDate>
      <link>https://dev.to/shweta_mishra_b3c97874de9/building-a-github-app-that-reviews-its-own-code-lessons-in-security-hardening-4ha7</link>
      <guid>https://dev.to/shweta_mishra_b3c97874de9/building-a-github-app-that-reviews-its-own-code-lessons-in-security-hardening-4ha7</guid>
      <description>&lt;p&gt;How I turned 27 silent failures into logged ones, closed three real attack surfaces, and pushed test coverage from 62% to 76% while building an automated code-review bot.&lt;/p&gt;

&lt;p&gt;A few months ago I set out to build something simple on paper: a GitHub App that reviews pull requests, scans for leaked secrets, applies safe autofixes, and responds to slash commands like a teammate would. I called it GitHub Autopilot. It runs on Flask, uses Redis for job queuing, and talks to GitHub through webhooks.&lt;br&gt;
The first working version took a couple of weeks. Making it safe enough to trust with someone else's repository took much longer - and taught me more about security engineering than any tutorial could.&lt;br&gt;
This article walks through three real vulnerabilities I found and fixed during an internal audit, why each one mattered, and what the process looked like end to end.&lt;br&gt;
Why a Code-Review Bot Is a Security&amp;nbsp;Target&lt;br&gt;
A GitHub App that can read code, comment on PRs, and push autofixes sits in a privileged position. It has write access, it processes untrusted input (every PR, every webhook payload), and it often talks to other services - in my case, an MCP (Model Context Protocol) server for AI-assisted review.&lt;br&gt;
That combination means three things need to be airtight: authentication, request validation, and resource limits. I had working code for all three. What I didn't have, until I audited it properly, was proof that each one failed safely under attack.&lt;br&gt;
Problem 1: Authentication That Failed&amp;nbsp;Open&lt;br&gt;
The MCP integration handled requests from an external service. My original authentication check worked like this: if a token was present, validate it; if validation itself threw an error - say, the auth service was slow or unreachable - the code caught the exception and let the request through.&lt;br&gt;
This is called failing open, and it's one of the more common mistakes in systems that bolt security onto an existing code path. The intention was reasonable: don't let a flaky dependency take down the whole app. The result was dangerous: an attacker who could trigger an auth-service timeout could skip authentication entirely.&lt;br&gt;
The fix was to flip the default. Any exception during authentication now results in an automatic denial, not a pass-through. If the auth service is unreachable, the request is rejected, logged, and retried - never silently trusted. This is the standard fail-closed pattern, and it should be the default for any security check, full stop.&lt;br&gt;
Problem 2: A Content-Length Bypass&lt;br&gt;
Webhook payloads come in with a Content-Length header, and the app used it to enforce a size limit before processing - a reasonable defense against oversized or malicious payloads. The gap: the check trusted the header value itself rather than the actual bytes received.&lt;br&gt;
A request could declare a small Content-Length while streaming a much larger body, slipping past the size check entirely. This is a known class of bug in HTTP handling, and it's easy to miss because the code "looks" correct - it reads a header and compares a number.&lt;br&gt;
The fix was to validate against the actual size of the data read from the stream, not the client-supplied header. It's a small code change, but it closes a real gap between what a client claims and what a server receives - a distinction that matters anywhere you're parsing untrusted input.&lt;br&gt;
Problem 3: A Rate Limiter That Leaked&amp;nbsp;Memory&lt;br&gt;
The app rate-limits requests per IP address to prevent abuse. The original implementation stored a counter per IP in memory, incrementing on each request. What it didn't do was clean up entries for IPs that stopped sending requests.&lt;br&gt;
Under normal traffic this is invisible. Under sustained traffic from many different IPs - which is trivial to generate - the counter dictionary grows without bound. Eventually the process runs out of memory and crashes. This turns a defensive feature into an attack vector: the very thing meant to stop abuse becomes the tool for causing an outage.&lt;br&gt;
The fix added a time-based eviction policy, clearing stale IP entries on a rolling window instead of letting them accumulate forever. Rate limiters need to bound their own memory usage, not just the request rate - a detail that's easy to skip when the feature works correctly in every manual test.&lt;br&gt;
The Quieter Problem: 27 Silent&amp;nbsp;Failures&lt;br&gt;
None of the three bugs above would have been easy to catch through code review alone, and that pointed to a deeper issue: 27 places in the codebase caught exceptions and did nothing with them. A try/except: pass pattern, repeated across error-handling paths, meant that when something went wrong, the app kept running - silently, with no log entry, no alert, no trace.&lt;br&gt;
This is a comfortable pattern to write and a dangerous one to ship. It hides exactly the kind of failure that matters most: the one that happens in production, once, under conditions you didn't test for.&lt;br&gt;
Every one of those 27 handlers was rewritten to log the failure with enough context to debug it later - what operation failed, what input triggered it, and the original exception. None of them changed what the app does when something breaks. All of them changed whether you'd ever find out.&lt;br&gt;
Proving It: Testing and&amp;nbsp;Coverage&lt;br&gt;
Fixes without tests are opinions. Each of the security changes above shipped with tests that reproduce the original failure mode - a forged Content-Length, an auth-service timeout, a rate-limit counter under sustained load - and assert the new, safe behavior.&lt;br&gt;
Across the full audit cycle, the project went from 62% to 76% test coverage, with 654 out of 654 tests passing and 834 total tests in the suite. Coverage numbers alone don't prove correctness, but combined with targeted tests for each vulnerability, they gave me confidence to say the fixes actually work - not just that the code compiles.&lt;br&gt;
What This Project Taught Me About Documentation&lt;br&gt;
Fixing the bugs was half the work. The other half was writing it down in a way a future contributor - or an auditor, or a client - could actually use: an architecture diagram showing how webhooks flow through auth, queueing, and processing; a threat-model table mapping each attack surface to its mitigation; and a changelog that explains why each fix happened, not just what changed.&lt;br&gt;
That last part turned out to matter most. Code shows what a system does. Documentation is the only place that shows what it's defending against, and why the defense looks the way it does. For any system that handles untrusted input - which is most systems - that record is worth as much as the fix itself.&lt;br&gt;
GitHub Autopilot is open source. The full architecture docs, threat-model table, and audit history are available on GitHub: Shweta-Mishra-ai/github-autopilot.&lt;br&gt;
I write about building and securing developer tools at TechNova World. If you're looking for someone who can both build the system and document it clearly for your team, let's talk.&lt;/p&gt;

</description>
      <category>ai</category>
      <category>webdev</category>
      <category>opensource</category>
      <category>devops</category>
    </item>
    <item>
      <title>Built a proxy, so my AI coding sessions stop forgetting everything after 20 turns</title>
      <dc:creator>Shweta Mishra</dc:creator>
      <pubDate>Thu, 09 Jul 2026 20:04:26 +0000</pubDate>
      <link>https://dev.to/shweta_mishra_b3c97874de9/built-a-proxy-so-my-ai-coding-sessions-stop-forgetting-everything-after-20-turns-38g8</link>
      <guid>https://dev.to/shweta_mishra_b3c97874de9/built-a-proxy-so-my-ai-coding-sessions-stop-forgetting-everything-after-20-turns-38g8</guid>
      <description>&lt;p&gt;If you've used Claude or GPT for a long coding session, you know the drill. Context fills up, it summarizes, and a few turns later it's suggesting a library you already rejected, or forgetting why you picked postgres over MySQL in the first place.&lt;/p&gt;

&lt;p&gt;I built TokenMizer to fix that. It's a local proxy that sits between your app and whatever LLM you're using. Instead of dumping raw conversation history back at the model, it builds a small graph of what actually happened in the session, tasks, decisions with the reasoning behind them, files touched, errors hit.&lt;/p&gt;

&lt;p&gt;Using it is a one line change:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="kn"&gt;from&lt;/span&gt; &lt;span class="n"&gt;openai&lt;/span&gt; &lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="n"&gt;OpenAI&lt;/span&gt;

&lt;span class="n"&gt;client&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nc"&gt;OpenAI&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;api_key&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;your-key&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;base_url&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;http://localhost:8000/v1&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;

&lt;span class="n"&gt;response&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;client&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;chat&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;completions&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;create&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
    &lt;span class="n"&gt;model&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;claude-sonnet-4-6&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="n"&gt;messages&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="p"&gt;[{&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;role&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;user&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;content&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;Let&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt;s build an auth service&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;}],&lt;/span&gt;
    &lt;span class="n"&gt;extra_body&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;session_id&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;my-project&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;},&lt;/span&gt;
&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;When context hits around 85%, it auto-checkpoints. I ran a 40-turn session that resumed the next day in 233 tokens instead of re-explaining the whole project from scratch. Decisions carry state too, active, superseded, invalidated, archived, so "why did we switch from React to Next.js" is still answerable weeks later instead of buried in a chat log nobody's scrolling back through.&lt;/p&gt;

&lt;p&gt;There's also a file intelligence layer. Drop in a CSV, PDF, or Excel file, and it gives the model a schema and sample instead of burning your entire token budget on raw rows, 99%+ savings on large files.&lt;/p&gt;

&lt;p&gt;Works with Claude, GPT, Gemini, Grok, DeepSeek, and Ollama out of the box. There's a Claude Code plugin and an MCP server if you want it wired straight into your editor.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;pip &lt;span class="nb"&gt;install&lt;/span&gt; &lt;span class="s2"&gt;"tokenmizer[anthropic,cache]"&lt;/span&gt;
tokenmizer serve
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Repo's here: &lt;a href="https://github.com/Shweta-Mishra-ai/tokenmizer" rel="noopener noreferrer"&gt;https://github.com/Shweta-Mishra-ai/tokenmizer&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Still actively building this, would love to know if this is a problem you've hit too, and how you're dealing with it right now.&lt;/p&gt;

</description>
      <category>ai</category>
      <category>llm</category>
      <category>python</category>
      <category>opensource</category>
    </item>
    <item>
      <title>Forget the $5,000 Bootcamp: The Definitive, Open-Source AI &amp; Data Engineering Syllabus for 2026</title>
      <dc:creator>Shweta Mishra</dc:creator>
      <pubDate>Thu, 09 Jul 2026 19:38:22 +0000</pubDate>
      <link>https://dev.to/shweta_mishra_b3c97874de9/forget-the-5000-bootcamp-the-definitive-open-source-ai-data-engineering-syllabus-for-2026-c98</link>
      <guid>https://dev.to/shweta_mishra_b3c97874de9/forget-the-5000-bootcamp-the-definitive-open-source-ai-data-engineering-syllabus-for-2026-c98</guid>
      <description>&lt;p&gt;The tech landscape is moving too fast for traditional academia. By 2026, the traditional divide between "technical execution" and "non-technical strategy" has completely collapsed. AI models have commoditized basic code syntax, simple data entry, and cookie-cutter UI generation.&lt;br&gt;
If your core career value relies entirely on doing predictable engineering work, you are competing against automated agents that operate near-zero marginal cost.&lt;br&gt;
The premium roles belong exclusively to the Orchestrators - the systems architects who manage fleets of micro-agents, secure data pipelines, and design resilient infrastructure.&lt;br&gt;
You do not need to drop thousands of dollars on a predatory bootcamp to learn these skills. The entire, production-grade curriculum is being open-sourced daily by world-class engineers. If you have the discipline to sit down and build, here is your definitive, zero-dollar syllabus to mastering the modern AI and Data ecosystem.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;Data Architecture &amp;amp; Analytics: Building the Single Source of&amp;nbsp;Truth&lt;br&gt;
Before you can orchestrate intelligent systems, you must master the core pipelines that feed them. Without pristine data handling, your advanced LLM applications are nothing more than automated hallucination engines.&lt;br&gt;
W3Schools: The absolute baseline repository for core syntax. Before handling complex distributed databases, you must master the fundamental rules of execution. Use their structured, interactive frameworks as your daily baseline documentation for Python, SQL, and web fundamentals.&lt;br&gt;
Data with Baraa: Led by 17+ years of elite enterprise experience (including ex-Mercedes Benz engineering), this channel delivers unparalleled breakdowns of enterprise data platform design. His SQL and Python playlists are structured better than top-tier university lectures.&lt;br&gt;
Zach Wilson: The industry authority on dimensional data modeling. If you want to understand how to design scalable, production-grade data lakes and survive the brutal realities of handling massive distributed datasets, start here.&lt;br&gt;
Luke Barousse: Technical skills mean nothing without proof. This channel provides concrete, project-based tutorials that teach you exactly how to build a data architecture portfolio that converts cold applications into technical interviews.&lt;br&gt;
Alex The Analyst: The premier resource for a complete, end-to-end analytics bootcamp. He systematically guides you from foundational Excel data-cleaning mechanics to advanced Business Intelligence (BI) implementations.&lt;br&gt;
sqlbelle: The absolute gold standard for database extraction logic. If you need to clear the hurdle of advanced SQL query patterns, relational algebra, and window functions, her crystal-clear pedagogy is essential.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;AI Engineering &amp;amp; LLM Architecture: Beyond the API&amp;nbsp;Wrapper&lt;br&gt;
An AI Engineer isn't someone who writes long prompts inside a web UI. True AI Engineering requires understanding how context windows scale, how data maps into vector spaces, and how to control non-deterministic systems.&lt;br&gt;
Andrej Karpathy: The absolute gold standard of AI education on the internet. His "Neural Networks: Zero to Hero" series bypasses superficial libraries and forces you to build backpropagation and transformers from the mathematical ground up. This is how you stop being a wrapper developer.&lt;br&gt;
Matthew Berman: The ultimate resource for tracking and deploying open-source foundational models locally. If you need to figure out which small language model (SLM) fits your strict data privacy requirements and how to serve it efficiently, watch his daily breakdowns.&lt;br&gt;
AI Jason: Production AI relies heavily on agentic workflows and complex RAG (Retrieval-Augmented Generation) pipelines. His channel provides tactical, step-by-step blueprints for building self-correcting agent systems that communicate over structured APIs.&lt;br&gt;
Krish Naik: A powerhouse repository of comprehensive technical playlists. He covers the entire spectrum from core mathematical Statistics and Machine Learning algorithms to deep learning framework deployments.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;MLOps &amp;amp; System Infrastructure: Engineering for 99.9%&amp;nbsp;Uptime&lt;br&gt;
An AI model running locally inside a Jupyter Notebook is a toy. To build an enterprise-grade asset, you must understand containerization, automated testing, continuous integration, and secure orchestration.&lt;br&gt;
TechWorld with Nana: If your application isn't containerized, it isn't production-ready. Her DevOps and platform engineering crash courses are mandatory reading for understanding how Docker, Kubernetes, and CI/CD pipelines keep applications alive under heavy load.&lt;br&gt;
ByteByteGo (Alex Xu): The absolute highest-quality visual breakdowns of large-scale distributed systems on the internet. If you want to understand load balancing, message queues, and caching strategies for global scale, look no further.&lt;br&gt;
DataTalksClub: Famous for their completely free, deeply rigorous Data Engineering and MLOps "Zoomcamps." These intensive, project-driven community curriculums match or exceed the technical depth of specialized enterprise training programs.&lt;br&gt;
MLOps Community: A specialized hub for senior engineering discussions. It focuses deeply on the realistic infrastructure, compliance barriers, logging mechanisms, and telemetry required to maintain machine-learning models in enterprise ecosystems.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;AI Product &amp;amp; Full-Stack Integration: Designing the Interface&lt;br&gt;
An intelligent system needs an interface to deliver business value. You must know how to decouple your complex AI backends from highly performant, secure front-end applications.&lt;br&gt;
JavaScript Mastery (Adrian Hajdin): The undisputed benchmark for full-stack integration. His comprehensive masterclasses teach you exactly how to tie raw Python/AI backend endpoints into stunning, secure, and lightning-fast web applications using Next.js.&lt;br&gt;
Fireship: High-density, zero-fluff overviews of emerging frameworks, tech stacks, and tools. This is your radar for keeping your architectural knowledge bleeding-edge in an ecosystem that shifts every 24 hours.&lt;br&gt;
freeCodeCamp.org: The ultimate open-source warehouse for long-form coding bootcamps. Whether you need a 10-hour deep dive into data structures or a comprehensive introduction to relational databases, their library is unmatched.&lt;br&gt;
Web Dev Simplified: Specializes in dismantling convoluted web development patterns, API integrations, and async programming paradigms into clean, highly readable, and easily digestible engineering logic.&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;The Orchestrator's Ultimatum&lt;br&gt;
The economic reality of the current tech ecosystem is simple: The barrier to entry has completely evaporated, but the bar for production reliability has never been higher.&lt;br&gt;
You no longer have an excuse. The tools are open source, the documentation is free, and the best minds in software engineering are publishing their playbooks weekly on YouTube. The only variable remaining is your personal discipline to sit down, write the configurations, break your deployments, and build real systems.&lt;br&gt;
Stop watching tutorials passively. Pick an ecosystem role, clone a repository, and start orchestrating.&lt;br&gt;
What is the single open-source resource or creator that completely transformed your technical trajectory? Let's map out the best community recommendations in the responses below.&lt;/p&gt;

</description>
      <category>ai</category>
      <category>programming</category>
      <category>webdev</category>
      <category>opensource</category>
    </item>
    <item>
      <title>I Was Burning Money on AI Tokens Without Knowing It — Here's What Fixed It</title>
      <dc:creator>Shweta Mishra</dc:creator>
      <pubDate>Thu, 02 Jul 2026 13:47:35 +0000</pubDate>
      <link>https://dev.to/shweta_mishra_b3c97874de9/i-was-burning-money-on-ai-tokens-without-knowing-it-heres-what-fixed-it-iip</link>
      <guid>https://dev.to/shweta_mishra_b3c97874de9/i-was-burning-money-on-ai-tokens-without-knowing-it-heres-what-fixed-it-iip</guid>
      <description>&lt;p&gt;A few months ago, I was running long AI coding sessions that would just... stop working well after a couple of hours. Not crash. Just get worse. Slower, more expensive, and weirdly forgetful — like the model had too much on its mind.&lt;br&gt;
Turns out, it did.&lt;br&gt;
I dug into what was actually happening under the hood, and the answer surprised me: it wasn't the AI model that was the problem. It was everything I was feeding it.&lt;br&gt;
The junk drawer problem&lt;br&gt;
Think about how most AI tools handle memory. Every message, every file you opened, every decision you made gets shoved into context. Nothing gets cleaned up. Nothing gets organized. It's like a junk drawer that keeps growing — except every time the AI needs to find something in that drawer, you're paying for it. In tokens. In money. In slower responses.&lt;br&gt;
And here's the part that really got me: this mess doesn't just cost more. It actually makes the AI's answers worse. Buried under redundant, outdated information, the model starts missing what actually matters.&lt;br&gt;
What I found when I actually measured it&lt;br&gt;
I decided to stop guessing and start measuring. I built a system to track exactly what was useful in a long AI session versus what was just noise — repeated file reads, decisions that got reversed three messages later, errors that were already fixed but kept getting mentioned again.&lt;br&gt;
The results were honestly kind of embarrassing. A huge chunk of what gets fed to AI models in long sessions is just... repetition. Same information, described five different ways, sitting in context, costing money every single time the model has to process it.&lt;br&gt;
So I built something to fix it. Three ideas made the biggest difference:&lt;br&gt;
Organize, don't accumulate. Instead of one long messy transcript, I split everything into categories — goals, decisions, files touched, errors hit. Suddenly the system could pull exactly what it needed instead of re-reading everything.&lt;br&gt;
Track the current decision, not every decision ever made. If someone says "let's switch to Postgres" after saying "let's use SQLite," most systems keep both floating around in context. Mine tracks the chain and keeps only what's actually true right now.&lt;br&gt;
Save a snapshot, don't replay the whole story. For long sessions, instead of reconstructing everything from scratch, the system checkpoints where things stand and picks up from there.&lt;br&gt;
The numbers that mattered to me&lt;br&gt;
After building this out, the system was holding onto 76% of important tasks and 85% of key decisions correctly — while using a fraction of the tokens a "keep everything" approach would need. Every one of the 67 tests I wrote to check accuracy kept passing through each round of changes, which mattered to me more than any single benchmark number. A cheaper system that gives wrong answers isn't actually cheaper. It's just wrong and cheap.&lt;br&gt;
Why this matters beyond my one project&lt;br&gt;
Here's the thing I keep coming back to: efficiency and accuracy aren't actually enemies. Most of what gets cut when you clean up context is genuinely useless information. You're not sacrificing quality to save money — you're removing noise that was quietly making things worse anyway.&lt;br&gt;
If you're building anything with AI models — a chatbot, a coding assistant, an agent that runs for a while — the biggest cost lever probably isn't the model you're using. It's how much irrelevant history you're dragging along with every single request.&lt;/p&gt;

&lt;h2&gt;
  
  
  Most systems have 30-50% of token usage sitting around as pure waste. No model upgrade required to fix that. Just better housekeeping.
&lt;/h2&gt;

&lt;p&gt;I write about building practical AI systems — memory, context, and the unglamorous engineering that makes AI tools actually work in production. If this was useful, I'd love to hear what context problems you're running into in your own projects.&lt;/p&gt;

</description>
      <category>ai</category>
      <category>llm</category>
      <category>machinelearning</category>
      <category>programming</category>
    </item>
  </channel>
</rss>
