
working dev | learning AI/ML | here to build in public
Joined January 2026
- Tweets88
- Following347
- Followers17
- Likes10
sagaa retweeted
You use a normal SQL database.
The end.
Recently I interviewed a Senior Engineer.
Strong candidate.
Kafka? โ
Redis? โ
Microservices? โ
Distributed systems? โ
Then I asked:
"You're building the inventory service for a flash sale.
Only 1 item left in stock."
Two users hit โBuy Nowโ at the exact same millisecond.
Both requests pass the โis available?โ check.
Both create an order.
Both deduct stock.
Now youโve sold 2 items when only 1 existed.
How do you guarantee you never oversell โ even with concurrent requests, client retries, and partial failures?
"Just use a database transaction."
Doesnโt fully solve it if both requests read `stock = 1` before either writes, or if the response is lost and the client retries.
"Check stock before deducting."
What happens when both checks happen at the same time?
"Use Redis DECR and reject if it goes negative."
What happens if Redis is down, or the decrement succeeds but the order is never persisted?
Your turn:
How would you design this inventory reservation API so concurrent buyers and retries never oversell the last item?
Thereโs a specific distributed-systems concept behind this.
And youโll encounter it everywhere inventory, tickets, seats, coupons, and limited resources are involved.
sagaa retweeted
As an AI Engineer, you must build these projects.
1.) Dynamic Context Assembler
Build: Middleware that strictly budgets tokens across working memory, tool schemas and retrieved docs per request.
Why: Prompt engineering is dead. Context overflow is the #1 silent killer of production agents.
2.) Durable State Machine Workflow
Build: Temporal or LangGraph DAG with checkpoints, exponential retries and human-in-the-loop Slack approvals.
Why: Endless chat loops break in production. Real business workflows take days and must survive server crashes.
3.) Raw MCP Server & Client
Build: JSON-RPC server exposing your database and internal APIs with scoped credentials without using a wrapper SDK.
Why: Agents need standardized, secure hands to do real work. Bespoke API wrappers do not scale.
4.) System-One Triage Router
Build: Proxy routing 95% of traffic to a fast, typed-decision model and escalating only 5% to a heavy reasoning model.
Why: Sending every query to a frontier API burns your runway. Unit economics dictate survival.
5.) Self-Correcting Agentic RAG
Build: Retrieval agent that critiques its own search results, rewrites ambiguous queries and confidently abstains if grounding is weak.
Why: Naive chunk-and-retrieve RAG is a liability. Agents must know when to search again.
6.) 3-Tier Memory Engine
Build: Working scratchpad, episodic session summaries, and semantic vector DB with automated importance scoring and eviction.
Why: Agents without memory fail by turn five. Agents with infinite memory hallucinate from context bloat.
7.) Trajectory CI Gate
Build: GitHub Action grading the agent's tool-call sequence against a golden DAG, blocking PRs if it deviates.
Why: Final-answer evals hide the exact step where the agent went rogue. The trajectory is the unit of accountability.
8.) Inter-Agent Sanitization Proxy
Build: Middleware preventing cross-agent prompt injection and enforcing least-privilege tool scoping per agent.
Why: Multi-agent swarms create internal attack surfaces that standard unit tests completely miss.
9.) Real-Time Voice Interruption Loop
Build: Streaming SSE/WebSocket agent with Voice Activity Detection (VAD) and sub-1s interruption handling.
Why: The interface is moving off the screen. Perceived latency and interruption handling are the new UX standards.
10.) DPO Feedback Flywheel
Build: Pipeline capturing user thumbs-downs, formatting them into preference pairs and triggering nightly LoRA fine-tunes.
Why: Your production edge cases and failures are the highest-leverage training data you own.
11.) Cost Kill-Switch & Degradation Chain
Build: Middleware halting agent loops instantly if projected spend exceeds $0.50, falling back Frontier โ Mid โ Local โ Cache.
Why: A runaway agent loop is an outage with an invoice.
12.) Shadow Routing Comparator
Build: Silent 5% traffic mirror to a new model or prompt, diffing trajectories and costs without affecting live users.
Why: You cannot A/B test non-determinism safely without shadow mode.
13.) Computer-Use Fallback Agent
Build: Agent that tries the REST API first, then seamlessly spawns a headless browser if the endpoint 404s.
Why: The real world runs on legacy portals with no documentation.
14.) PII Unmasking Proxy
Build: Gateway swapping sensitive data for UUIDs before the context window and restoring it post-generation with audit logs.
Why: Enterprises will not touch agents that leak customer data to frontier models.
15.) Public Architecture Teardown
Build: 3 published deep-dives with system diagrams, cost/latency benchmarks and architecture decision records (ADRs).
Why: Senior AI engineers are hired for their system design judgment not their wrapper skills.
Systems that prove you can orchestrate, secure & scale when agents touch your stack.
Bookmark & Repost.
If I had 6 months to become an AI Engineer in the Agentic Era.
Iโd do this.
Stage 1: Context Engineering & Token Economics
- Learn: Token math, context window limits, dynamic assembly, context compression, budget allocation.
- Practice: Build a dynamic context assembler that strictly budgets tokens across working memory, tool schemas and retrieved docs per request.
- Why: Prompt engineering is dead. Context overflow is the #1 silent killer of production agents.
Stage 2: Durable Agent Orchestration
- Learn: State machines, Temporal, LangGraph, checkpointing, human-in-the-loop (HITL) gates.
- Practice: Build a 4-hour agent workflow that survives server crashes, API timeouts and waits 3 days for human approval before resuming.
- Why: Endless `while True` chat loops break in production. Real business workflows require durable execution.
Stage 3: Tool Use and MCP (Model Context Protocol)
- Learn: JSON-RPC, strict Pydantic schemas, tool discovery, scoped credentials, MCP servers/clients.
- Practice: Write a raw MCP server from scratch exposing your database and internal APIs without using a wrapper SDK.
- Why: Agents need standardized, secure hands to do real work. Bespoke API wrappers don't scale.
Stage 4: System-One vs. System-Two Routing
- Learn: Typed decision models (Jev-style), confidence scoring, latency vs. cost tradeoffs, model cascades.
- Practice: Build a triage router that sends 95% of traffic to a fast System-One model and escalates only the 5% edge cases to a heavy reasoning model.
- Why: Sending every query to a frontier reasoning model burns your runway in a week. Unit economics dictate survival.
Stage 5: Advanced Agentic RAG
- Learn: Contextual retrieval, GraphRAG, query rewriting, self-correction, hybrid search, abstention logic.
- Practice: Build a RAG agent that critiques its own search results, rewrites ambiguous queries and confidently refuses to answer if grounded context is weak.
- Why: Naive chunk-and-retrieve RAG is a liability. Agents must know when to search again.
Stage 6: 3-Tier Memory Architectures
- Learn: Working memory (scratchpad), Episodic (compressed session logs), Semantic (vector DB), eviction policies.
- Practice: Build a memory engine that automatically compresses, scores and evicts old context to keep the agent sharp over long sessions.
- Why: Agents without memory fail by turn five. Agents with infinite memory hallucinate from context bloat.
Stage 7: Trajectory Evals & CI Gates
- Learn: Step-level grading, LLM-as-a-judge calibration, golden datasets, regression testing, shadow routing.
- Practice: Build a CI pipeline that grades the agent's tool-call sequence and blocks PRs if it deviates from the golden path.
- Why: Final-answer evals hide the exact step where the agent went rogue. The trajectory is the unit of accountability.
Stage 8: Inter-Agent Security & Guardrails
- Learn: Prompt injection defense, PII masking, least-privilege tool scoping, sanitization proxies.
- Practice: Build a middleware that swaps PII for UUIDs before the LLM sees it and prevents Agent A's output from injecting Agent B.
- Why: Multi-agent swarms create internal attack surfaces that standard unit tests completely miss.
Stage 9: Real-Time Multimodal & Voice UX
- Learn: Server-Sent Events (SSE), WebSockets, Voice Activity Detection (VAD), interruption handling, optimistic UI.
- Practice: Build a voice agent with sub-1s interruption handling that streams tool calls and text simultaneously.
- Why: The interface is moving off the screen. Perceived latency and interruption handling are the new UX standards.
Stage 10: The DPO Data Flywheel
- Learn: Preference pairs, LoRA fine-tuning, automated feedback loops, synthetic edge-case generation.
- Practice: Automate a pipeline that captures user thumbs-downs, formats them into preference pairs, and triggers a nightly model fine-tune.
- Why: Your production edge cases and failures are the highest-leverage training data you own.
Stage 11: FinOps & Graceful Degradation
- Learn: Semantic caching, cost kill-switches, fallback chains (Frontier โ Mid โ Local โ Cache).
- Practice: Build a middleware that halts an agent loop instantly if projected spend exceeds $0.50 and degrades to a cached response.
- Why: A runaway agent loop is an outage with an invoice.
Stage 12: Public Teardowns & System Portfolios
- Learn: Architecture decision records (ADRs), benchmarking, system diagramming, public writing.
- Practice: Publish 3 deep-dives on how you reduced agent latency, cut inference costs or improved tool-call accuracy by 80%.
- Why: Senior AI engineers are hired for their system design judgment not their API wrapper skills.
Wrappers are a commodity. Systems engineering is the moat.
The modern AI Engineer builds the deterministic harness around the stochastic brain.
Bookmark and Repost!
sagaa retweeted
TamilLM has finished pre-training. ๐
30 billion tokens. 57,221 steps. 1.5B parameters. ~48 hours of H100 time across two clusters (one of which our own safety guard assassinated 90 seconds after the first finish โ the resumed re-run reproduced the lost model to four decimal places).
Final report card, measured across ten registers of Tamil:
๐ Classical Sangam: 6.08 โ 3.50
๐๏ธ Bhakti devotional: 6.66 โ 3.67
๐ Literary prose: 4.69 โ 2.87
๐๏ธ Modern formal: 4.52 โ 2.69
Overall held-out loss: 4.61 โ 2.84
The hard old registers โ the reason this model exists โ improved the most, all the way to the final step.
Every checkpoint integrity-verified. Three copies on three storage domains before the GPUs go quiet. ~$2.2K all-in, failures and forensics included.
It already completes the first Thirukkural from three words. Next: post-training, so it doesn't just continue Tamil โ it converses in it. เฎตเฎณเฎฐเฏเฎ เฎคเฎฎเฎฟเฎดเฏ๐ฑ
P.S. Now looking for name suggestions for the model - as TamilLM is already taken on HF. Drop a comment with a model name - and the name with the most likes wins! ๐
sagaa retweeted
if you are a curious engineer, it is so difficult not to have fomo.
every other domain seems interesting
every other book seems worth reading
every other problem seems worth solving
every other project looks like the next big thing
every other framework feels like something you should learn.
literally every single thing is a distraction. imo, there is no way to even deal with that.
sagaa retweeted
i grew up very close to my grandmother. as a kid, i never really saw her as someone old or vulnerable, even though nana & nani used to live alone without any full time help.
they ate good food, they were physically active, they did not have any major health issues. they lived easily and independently, they enjoyed their lives.
over time, this began to change.
nani was no longer able to walk without getting tired, her knees hurt when she would climb stairs, she started falling often. with every fall, she grew weaker and less independent. she also became scared of doing things on her own because she was afraid she would fall again.
she never lost her spirit, but her body stopped allowing her to be the person she used to be.
there was no chronic illness, no life-changing accident, no unpredictable heart attack that took away her quality of life.
it was just the gradual decline of her muscles.
this is why I will always be grateful for the women in our generation being encouraged towards strength training, and the fact that i got into it.
i cannot prevent a sudden accident, but i can protect my body from losing its vitality over time.
some people have called my obsession with the gym a bit extra. i do not care. i have seen what happens when women donโt strengthen their muscles, and i have no interest in experiencing it.
i often think of nani when i'm at the gym.
if all goes well, i will be able climb stairs, walk long distances, and function independently at age 80.
it will not be because i am better or more disciplined than her in any way. it will only be because i was made aware of things she had no idea about.
it will be because i was born in a generation where it was possible for me to buy a gym membership with my own money and prioritise my health over raising a family at age 25.
i won the birth lottery, and i will never take that for granted.
i will lift heavy and eat well and prioritise my strength over everything else, and i will do it for the women in my family who never got to do any of it.
@LoopHealthHQ
We're giving away a free @UltrahumanHQ AIR.๐
Quote tweet this and tell us the story of what got you to start taking your health seriously: the habit you built, the thing you gave up or the day something clicked.
The most honest, moving story wins the ring.
To enter: Follow @LoopHealthHQ and quote tweet with your story.
๐จ Winner announcement on 13 July 2026.
Your story might be the reason someone else decides to start their healthcare journey today. Share it!๐
sagaa retweeted
AI anxiety.
The people who actively have to work with new ai advancement really do have an edge.
To work in your tech job where AI adoption is nascent and then study to keep up is an anxiety and exhaustion people aren't talking about.
sagaa retweeted
Found the Best Resource to learn Harness Engineering. ๐ญ
walkinglabs.github.io/learn-โฆ
sagaa retweeted
Introducing Willow. The world's most accurate voice dictation tool.
Willow learns from every correction you make. Automatically.
Auto-learning plus context-awareness unlocks 99% word accuracy. No other dictation app comes close.
RT + comment "Willow" to get a month free.
sagaa retweeted
I collected 100+ GitHub repos with real AI engineering take-home assignments (plus hiring challenges and candidate submissions).
Then I analyzed them to see what companies were asking for in Q4 2025 and Q1 2026.
The result is one repo that makes the patterns easy to study in one place.
It includes:
- Company-issued assignments
- Candidate submissions
- Hiring challenges and competitions
- Interview prep repos and templates
Link: github.com/alexeygrigorev/aiโฆ
sagaa retweeted
realizing there's an entire world outside of X and they don't even think about AI and vibe coding
sagaa retweeted
A single ๐๐๐๐จ๐๐.๐บ๐ฑ file just hit 15K GitHub stars.
(derived from Karpathy's coding rules)
Andrej Karpathy observed that LLMs make the same predictable mistakes when writing code: over-engineering, ignoring existing patterns, and adding dependencies you never asked for.
If you've used AI coding assistants, you've hit all of these.
But here's the thing:
If the mistakes are predictable, you can prevent them with the right instructions.
That's exactly what this ๐๐๐๐จ๐๐.๐บ๐ฑ does. You drop one markdown file into your repo, and it gives Claude Code a structured set of behavioral guidelines for your entire project.
This is a big deal.
- Built entirely around prompt engineering for AI coding assistants
- No framework, no complex tooling, just one .md file that shapes behavior
Developers are moving past "use AI to write code" and into "engineer the AI's behavior so the code is actually good."
The Claude Code ecosystem is growing fast, and the best tools in it aren't always software. Sometimes they're just well-crafted instructions.
100% open-source.
I've shared a link to the GitHub repo in the next tweet!

























