Saurabh Kumar (@_theskumar) header
Saurabh Kumar (@_theskumar) profile picture

Principal Engineer @Fueled, leading engineering on Rosey. I study how AI agents do real work: memory, retrieval, evals. Made python-dotenv. he/him

New Delhi, India
Joined March 2010
Photo by Saurabh Kumar (@_theskumar)Photo by Saurabh Kumar (@_theskumar)Photo by Saurabh Kumar (@_theskumar)Photo by Saurabh Kumar (@_theskumar)Photo by Saurabh Kumar (@_theskumar)Photo by Saurabh Kumar (@_theskumar)Photo by Saurabh Kumar (@_theskumar)Photo by Saurabh Kumar (@_theskumar)Photo by Saurabh Kumar (@_theskumar)
TBH this.
Evals are the most underrated skill in AI engineering. 1. Start with error analysis, not metrics Sample 100+ production traces. Annotate each failure in free text (open coding), then cluster them into failure categories (axial coding). Count frequency per category. Your top 3 categories are your first metrics. 2. Build a versioned golden dataset Store inputs, expected outputs or rubrics, and metadata (intent, difficulty, user segment) in a versioned dataset. Stratify it so rare but critical cases aren't drowned out by easy ones. Version it alongside your prompts so every score is reproducible. 3. Generate synthetic data along explicit dimensions Don't just ask an LLM for "test questions." Define dimensions (persona × intent × complexity × edge case), generate combinations as tuples, then turn each tuple into a natural input. You get coverage instead of 200 near-identical examples. 4. Deterministic assertions first JSON schema validation, regex checks, required fields, length limits, code execution, SQL that actually runs against a test DB. These are cheap, fast, and have zero variance. Reserve model-based grading for what code genuinely can't check. 5. Evaluate retrieval separately from generation For RAG, measure retrieval with recall@k, MRR, or nDCG against labeled relevant chunks. Measure generation with faithfulness (is every claim supported by retrieved context?). If you only score the final answer, you can't tell which half is broken. 6. Trajectory evals for agents Log every step: tool name, arguments, result, tokens. Score tool-call precision and recall against a reference path, argument correctness, step count, and error recovery. An agent that reaches the right answer in 14 calls when 3 would do is a cost and latency bug. 7. pass@k vs pass^k pass@k = succeeded at least once in k runs. pass^k = succeeded in all k runs. At 80% per-run success, pass^5 drops to roughly 33%. Production reliability lives in pass^k, so run each case multiple times at your real temperature. 8. Simulated users for multi-turn Give an LLM a persona, a hidden goal, and constraints, then let it converse with your system until the goal is met or a turn limit hits. Grade goal completion, turns-to-resolution, and policy violations. Single-turn evals miss most state and memory bugs. 9. Align your LLM judge like a classifier Hand-label 100+ examples as pass/fail. Split into train/dev/test. Iterate on the judge prompt using dev, then report TPR and TNR on test. Use binary outputs with a written rubric, require a short critique before the verdict, and pin the judge model version. 10. Control judge bias in pairwise comparisons LLM judges have position bias and often prefer longer answers. Run every A/B comparison twice with swapped order and only count consistent verdicts. Normalize or cap length if verbosity is skewing results. 11. Respect statistics With 100 examples at 80% accuracy, your 95% confidence interval is about ±8 points. A jump from 80% to 83% is probably noise. Use bootstrapped confidence intervals, or a paired test on the same examples, before declaring a win. 12. Gate deploys in CI Run the eval suite on every PR that touches prompts, models, tools, or retrieval config. Set per-category thresholds instead of one global score, so a big win in one area can't hide a regression in another. Fail the build on a regression. 13. Online evals in production Sample a percentage of live traffic, run your judges asynchronously, and alert on drift per failure category. Use shadow deployments to run a new prompt or model on real traffic without showing users the output. 14. Make cost and latency first-class metrics Track tokens per request, cost per successful task (not per call), and p50/p95 latency next to quality. A change that keeps quality flat while cutting cost 40% is a real win and deserves to ship. 15. Close the loop Every production failure becomes a new labeled test case. Every new model release gets run against the full suite before anyone debates switching. Over time your eval set becomes the most valuable asset in the codebase. Prompts are disposable. Models get replaced every few months. Your eval infrastructure is what compounds.
2
87
27,801
I put three of my agent skills through skill-diet. The notion skill now uses 55% fewer tokens per run with no drop in passes, and the drift check found 16 places where my skills or scripts were wrong. saurabh-kumar.com/til/179318…
2
1
158
interesting: django-bolt decides whether a sync Django handler might block by reading its source for ORM calls. trap: Move the query into a service function and it can't see it, so one slow query stalls the whole process. saurabh-kumar.com/til/179308…
64
Saurabh Kumar retweeted
"AI now writes the code, what's left for engineers?" Everything. It was never about manually writing code.
1
3
110
Almost feels like a poem. Read it.
Some mistakes you might be making: Your effort level is too high Your skills are too long You're not aligning before you start work You're aligning too often, and too hard Your automated checks are too lax Your custom tooling is too token-inefficient You aren't doing enough automated review You aren't reviewing previous coding sessions (with an agent) You're doing too much human review You aren't vibe coding enough prototypes Your agent can't verify its own work You're babysitting the agent too much You've overloaded your global steering files Your codebase is hard to navigate You aren't building a shared language Your codebase architecture allows bad tests to be written You aren't thinking strategically enough You aren't thinking enough
1
73
Saurabh Kumar retweeted
Welcome to our Monday Meditations! 🌞 @badlogicgames and @mitsuhiko are chatting about self modifying software and harnesses.
12
26
3
394
38,603
+1. This has my experience so far.
Honest reflections from coding with AI so far as a non-engineer: It can get you 70% of the way there, but that last 30% is frustrating. It keeps taking one step forward and two steps backward with new bugs, issues, etc. If I knew how the code worked I could probably fix it myself. But since I don't, I question if I'm actually learning that much.
283
Congrats to @djangoproject for getting 80K @github stars! 🥳🍰 It's the most starred backend framework... not only in Python, but in all programming languages! 😎🎉
Django just hit 80,000 stars on GitHub! 🚀 With each new star, Django’s journey grows brighter. From personal projects to massive applications, Django has become the backbone of countless innovations worldwide, thanks to YOU—the amazing community! 💫✨ #Django80K #django
11
19
2
343
23,707
Saurabh Kumar retweeted
If coding is hard, we're probably trying to move to fast. Signs we're trying to move too fast: 🚫 Rework 🚫 Inconsistency 🚫 Unclear tickets 🚫 Bad requirements 🚫 Weak code reviews 🚫 Rampant copy/paste 🚫 Poor communication 🚫 Few/no automated quality checks
7
35
2
299
44,103
It took ~8yrs to go from v0 to v1 of python-dotenv, now used/recommended by flask, ray, pyenv, and uvicorn. The decision to have it do just one thing and do it well is a big part of its success. Also, please don’t break the APIs; people hate it. saurabh-kumar.com/python-dot…
6
273
People with an income of 9L paying 2L in rent and getting 1.5L deduction under 80c and 50k under standard deduction were not paying any taxes in old regime. Now they will pay 45000 tax in new regime. Few understand this.
10
21
4
84
8,674
Saurabh Kumar retweeted
The TypeScript 5 beta removed an unused 26.3 MB of JS making it smaller than TypeScript 3 🤯 Pro tip: you can track bloat over time using Package Phobia 💚 packagephobia.com/result?p=t…
12
56
6
777
136,563
Following the ChatGPT, a new generation of coding-support tool will emerge. Once they get popular, writing code will be easier and faster. Then aligning on *what* exactly we want to build and *why* we build it will become more important than the actual building phase.
2
1
5
809
Saurabh Kumar retweeted
We @Fueled are looking for Platform Engineers and Solutions Architects to join us. We use the best in tech, and we are proud to be a globally diverse team that speaks 20 languages and is spread across 49 cities, 17 countries, and 5 continents. #remote #remotejobs Links in 🧵
1
2
6
Having a culture of curiosity in your team will break the monotony of grunt work. Feeds into the creative side. Builds psychological safety. Exploring and trying new things comes with the assumption of failures and having an open mind.
1
5
Encourage questioning, do a short project/exercises that require exploring new things, and do sharing sessions. 🙏🏼🧠
1
As I moved to more senior roles, I had to explain many complex concepts to technical and non-technical people. I found better your diagramming and visualization skills are; there is a better chance of engagement and participation from others. Do more diagrams!
1
1
9
It was such a pleasure meeting with you @addyosmani today at #leadingEng. Thanks for your amazing talk and also sharing some valuable insights.
3