Pankaj retweeted
neuroscience of change (why change feels hard and how the brain actually updates reality):
1. the brain runs on predictions, not reality: it doesn't see the world as it is, but predicts it based on past data.
2. habits are energy-saving shortcuts: neural pathways form to conserve energy. the more you repeat something,
the more automatic it becomes.
3. emotion drives plasticity: the brain doesn't change through information alone. it changes through emotion and repetition.
4. the nervous system decides what's possible: if it's in survival mode, creativity drops, future thinking narrows, and the brain resists change. safety comes first.
5. identity is a neural pattern: identity is a stable network of firing neurons. when you say "i am this kind of person," your brain organizes behavior to confirm it.
Pankaj retweeted
India's holy Ganga in Haridwar is so clear after a 150-tonne cleanup that people are filming it like a miracle. The miracle is simple: for 18 days, nobody was throwing anything into it
Pankaj retweeted
The reverse bug is common too:
Your app listens on 127.0.0.1 inside the container, so nothing outside can reach it.
Listen on 0.0.0.0 instead.
Pankaj retweeted
your nervous system is reshapable.
your mind is reprogrammable.
your body is restorable.
Pankaj retweeted
If you are a Data Engineer, here are 4 deep-dive articles worth saving.
Real experiments. Real numbers. Spark UI observations. And lessons you can use when things go wrong in production.
Save this post. You might want to come back to these.
- What happens when you read 40 Billion Records with Databricks Disk Cache?
medium.com/@sumitmittal-tren…
- How did AQE reduce a Spark job from 45 minutes to 21 minutes?
medium.com/@sumitmittal-tren…
- Parquet is already fast. So why does Delta Lake exist?
medium.com/@sumitmittal-tren…
- Why did 29,200 small files become a performance problem for Spark?
trendytech.in/the-small-file…
And the next experiment?
A Spark join that refused to get faster even after adding more compute.
That's what I'll break down next.
Until then, what production Spark problem should I experiment with next?
Pankaj retweeted
CANCEL your weekend plans.
The 2027 meta just dropped. You NEED to:
• Build a computer-use agent that parses the DOM, diffs screenshots and maps clicks to coordinates so it can drive legacy software with zero APIs
• Ship generative UI where your LLM returns live React components instead of markdown blobs and watch your product feel 10 years newer
• Wire a System-One router that resolves 95% of requests in milliseconds for fractions of a cent, escalating only the hard 5% to reasoning models
• Kill your `while True` loop and rebuild it as a Temporal state machine that resumes from the exact node after a crash or a 3-day approval
• Write a raw MCP server in pure JSON-RPC so any external agent can call your product with scoped credentials, no SDK required
• Add grammar-constrained decoding so your agent emits 100% valid JSON on the first try, every try, forever
• Build a trajectory grader in CI that blocks the merge the second a tool-call sequence deviates from the golden path
• Ship an inter-agent sanitization proxy that executes prompt injections before they cross a single agent boundary
• Wire a PII unmasking proxy that swaps sensitive data for UUIDs before inference and restores it after with full audit logs
• Add a cost kill-switch that halts any loop projected to exceed $0.50 and degrades frontier → mid-tier → local → cache
• Implement KV-cache prefix sharing at the gateway and cut Time-To-First-Token by 80% on repeated system prompts
• Set up speculative decoding: local 3B drafts, frontier 70B verifies, acceptance rate logged on every single request
• Shadow-route 5% of production traffic to your new model, diff trajectories and cost silently, auto-post the report to Slack
• Automate the DPO flywheel: thumbs-down → preference pairs → nightly LoRA → eval-verified promotion, zero human touch
• Build a voice loop with VAD and sub-1s interruption handling, streaming tokens and tool calls simultaneously
• Ship an API-to-browser fallback that spawns a headless browser the moment a REST endpoint 404s, finishing the job anyway
• Add a WebGPU shim so a 2B model runs in the browser when the cloud dies and your users never see a spinner
• Fuzz your own agent swarm with malformed tool outputs and context overflow until it self-heals without a single pager alert
• Publish one benchmark: your system vs the naive baseline, on cost, latency and task success, fully reproducible
The wrapper era is over. The systems era pays.
You have way too much to do.
Bookmark & Repost.
Pankaj retweeted
Every item a harness engineer needs to learn exists for one reason: the model can't be trusted with the last mile.
A better model won't solve every problem here. The harness is where you make mistakes cheap, visible and recoverable. If that's the job you want, these are the areas I'd learn:
1) Context and memory. Decide what goes into the context window, what gets summarised and what needs to be retrieved later. Get it wrong and the agent re-reads the same files every loop, or forgets a constraint from twenty turns ago and violates it. Repository context is also very different from production context.
2) Tool design and schema validation. When a tool returns free text where the agent expected structured data, the agent may improvise an interpretation and keep going. Validate the response and fail loudly when the contract is broken.
3) Permissions and state. Enforce these outside the model. The prompt says "do not write to production." The prompt isn't the thing holding the credential.
4) Retries, backoff and iteration limits. An agent that retries a side-effecting call can repeat the operation. An agent with no iteration limit can keep looping until the budget is gone.
5) Idempotency. The request timed out, but the first write landed. The retry creates a second record. Now you have two of something that should exist once.
6) Observability and traces. A bad outcome with no record of which tool was called, with what arguments and in what order leaves you with very little to investigate. You're just guessing.
7) Completion detection. The agent can decide it's done without checking whether the task actually succeeded. The harness needs to verify completion against the expected outcome.
8) Evals as regression tests. If every test case came from a failure you already understood, the suite can stay green until the first failure nobody anticipated.
9) Failure recovery and handoff. A run that dies halfway through shouldn't leave behind state that nobody can reconstruct. You need a way to resume, recover or hand the work back to a human.
10) Sandboxes. Give the agent somewhere to experiment, execute code and test changes without putting the real system at risk.
None of this is batching, KV caching or quantization. Those belong to inference engineering, which focuses on making model execution faster, cheaper and more efficient.
Harness engineering focuses on making the entire agent workflow reliable enough to operate.
Pankaj retweeted
System design interview questions that test real thinking
checkout these different set of problems:
1. Design a distributed cache
• Eviction policies
• Consistency and replication
• Handling cache stampede
2. Design a payment system
• Idempotency
• Exactly-once processing
• Failure recovery and reconciliation
3. Design a search autocomplete
• Trie or prefix search
• Ranking suggestions
• Handling high QPS with low latency
4. Design a ride-sharing service
• Matching riders and drivers
• Real-time location updates
• Surge pricing and ETA calculation
5. Design a video streaming platform
• Video upload and encoding
• CDN and adaptive bitrate
• Recommendations and watch history
6. Design a leaderboard system
• Real-time score updates
• Ranking at scale
• Handling ties and time windows
7. Design an e-commerce inventory system
• Stock consistency
• Preventing overselling
• Handling flash sales
Interviewers care about:
• Requirements and constraints
• Data flow
• Trade-offs
• Failure modes
• Scaling path
Start simple,
Add complexity only when needed.
Which of these would you struggle to design right now?
Pankaj retweeted
Pia Dandiya makes history as the first Indian-American elected to Congress from Florida
The Democrat defeats Republican Casey Askar in Florida’s 22nd Congressional District, securing a seat in the US House of Representatives
A former high school principal and daughter of Indian immigrants, Dandiya adds another Indian-American voice to Capitol Hill
Pankaj retweeted
𝗬𝗼𝘂’𝗹𝗹 𝗻𝗲𝘃𝗲𝗿 𝗳𝗼𝗿𝗴𝗲𝘁 𝗔𝗜 𝗳𝘂𝗻𝗱𝗮𝗺𝗲𝗻𝘁𝗮𝗹𝘀 𝗼𝗻𝗰𝗲 𝘆𝗼𝘂 𝘀𝗲𝗲 𝗵𝗼𝘄 𝘁𝗵𝗲𝘆 𝗰𝗼𝗻𝗻𝗲𝗰𝘁.
You want a computer to understand text. But computers only understand numbers. They have no idea what "hello" means.
>> So you use tokens.
Text is split into small pieces, and each piece gets a number. "Unbelievable" becomes "Un", "believ" and "able". Now the computer can read.
But those numbers are random labels. "Dog" might be 4521 and "puppy" 9873. Nothing tells the computer they mean almost the same thing.
>> So you use embeddings.
Every token becomes a long list of numbers, placed so that similar meanings sit close together. "Dog" lands next to "puppy" and far from "Paris". Now numbers carry meaning.
But a word on its own is not enough. "Bank" means something different in "river bank" and "bank loan". The meaning depends on the neighbours.
>> So you use attention.
Every word looks at every other word and decides which ones matter. Now "bank" knows if it is near a river or a loan.
You have a structure that can read. But it knows nothing yet. Where does the knowledge come from?
>> So you use training.
You feed it a huge amount of text and give it one job: predict the next token. Every wrong guess adjusts billions of numbers called weights. After trillions of guesses, those weights hold grammar, facts, and reasoning.
But the trained model only knows how to continue text. Ask "What is the capital of France?" and it might write three more quiz questions. It is not being difficult. It has never seen a conversation.
>> So you use fine-tuning.
You train it further on thousands of examples of good questions and answers. Now it behaves like an assistant.
But it always picks the single most likely next word. Every answer sounds the same, flat and repetitive.
>> So you use temperature.
Low temperature plays it safe, which is right for code and facts. High temperature takes chances, which is right for ideas and writing. You choose the risk.
Now you paste in a 500-page manual and ask a question. Half of it gets ignored. In long chats, it forgets what you said at the start.
>> That is the context window.
The model can only see so much text at once. Everything outside it does not exist.
Then you ask about your company's internal docs. The weights were frozen during training and were never seen. The model does not say "I don't know". It writes something that sounds right and is completely wrong.
>> That is hallucination.
It is not lying. It is predicting text, not checking facts.
>> So you use RAG.
Before answering, the system searches your real documents and puts the relevant parts into the context window. Now it is an open-book exam, not a memory test.
But it can still only talk. It cannot check your server, query your database, or open a ticket.
So you give it tools. The model decides which tool to call, reads the result, and keeps going until the job is done.
>>That is an agent everyone seems to be building these days.
Pankaj retweeted
‘one day, i am gonna rule this city ‘ a dream turned into reality through relentless hard work
Pankaj retweeted
In my 25 years in politics, I have watched our young people leave Assam because there were no investments, industries or jobs.
A PSU job or a government post was all we could offer but that was never enough for a growing state like ours with such a large young population.
2/5
Pankaj retweeted
During COVID, I saw lakhs of our students & youth working far from home because they could not find jobs here. Lakhs still do.
That realisation made my resolution firm to reverse this trend. Assam must employ its own people and attract the best talent from across the world.
3/5
Pankaj retweeted
If you still think Engineering is the only way to get a high-paying career in India, I want you to think again.
linkedin.com/posts/blue-coll…
If you love your kids, start exploring blue collar work in India.
Demand for blue-collar workers is at an all-time high in countries like the USA, Canada and Australia.
And this is going to happen in India very soon.
I'm not saying every child should become a plumber or electrician.
I'm saying we need to stop treating skilled trades as inferior to white-collar jobs.
A young person who masters electrical work, welding, HVAC or manufacturing can eventually start a contracting business, open a factory or build a hardware brand.
And eventually make more money than any white-collar job.
Add social media, and they can build an audience, attract customers and sell their expertise far beyond their local market.
India has millions of young people chasing the same corporate jobs.
Perhaps it's time we started raising more builders, operators and business owners.
What do you think?
Pankaj retweeted
Apparently 400+ engineers followed me after my interview prep tweet. So, hi! 👋
I’m Oana. A few things about me:
• Grew up in a small village in Romania. At 17 I designed a space station inspired by the bees in our backyard and called it Apis, Latin for “bee.” It won NASA Ames’ grand prize.
• Studied CS and ML in Germany. My thesis was on echo state networks: recurrent nets where you freeze the network and train only the readout. 2011’s preview of the frozen model era.
• Spent 7 years at SAP, whose customers brew 77% of the world’s beer and make 79% of its chocolate. I helped build an ontology of business processes across 25 industries and 11 lines of business, the backbone tying tens of thousands of price list items to the code that implements them. I also printed “Less PPT, more MVP” buttons and handed them out in the cafeteria.
• ML engineer turned VC. Started my own fund @MotiveForce
• I write $500K checks at pre-seed and seed. Sometimes before founders have decided to start a company. One of my founders was still HashiCorp’s first designer when we met.
I love beautiful software, unusual minds, vintage Atari t-shirts (Frogger was my first game), and people who can’t stop building.
If you’re an engineer:
🚀 Thinking of starting something, even while employed? I’d love to meet you. No pitch deck needed.
🛠️ Looking for your next adventure? My portfolio company @papercliping, the most used agent orchestrator, needs engineers strong in data/evals, security, or runtime performance. DM me and I’ll intro you to the founders.
☕ Just enjoy hard technical problems? Me too. Always want to hear what you’re building.
I’m in SF, which happens to be the first city I ever traveled to, at 17, to pick up that NASA prize.
Say hi 👋
Pankaj retweeted
As a GenAI Engineer, you must build these projects.
1.) Async SSE Streaming Gateway
Build: FastAPI server handling 10k+ concurrent connections with non-blocking token streaming and backpressure handling.
Why: Blocking the main thread kills perceived latency. Server-Sent Events are the standard for real-time AI UX.
2.) Real-Time Multimodal Perception Loop
Build: Voice + vision pipeline with VAD (Voice Activity Detection) and sub-1s interruption handling.
Why: The interface is moving off the screen. Interruption handling is the new UX standard.
3.) Grammar-Constrained Output Enforcer
Build: Middleware forcing 100% valid JSON and Pydantic schemas using Outlines or custom CFG decoding.
Why: Agents hallucinating API parameters is a production outage. Deterministic outputs are mandatory.
4.) Self-Correcting Agentic RAG Engine
Build: Retrieval agent that critiques its own chunks, rewrites ambiguous queries, and abstains if confidence is low.
Why: Naive RAG is a liability. Agents must know when to search again.
5.) Durable Multi-Agent Orchestrator
Build: Temporal or LangGraph DAG with checkpoints, exponential retries, and async Slack approval gates.
Why: Endless chat loops break in production. Real workflows take days and must survive crashes.
6.) Generative UI & Degradation Router
Build: LLM returning dynamic React components, with a fallback chain: Frontier → Mid → Local → Cache.
Why: Markdown text is a commodity. Dynamic UI and graceful degradation protect your margins and uptime.
7.) Trajectory CI Regression Gate
Build: GitHub Action grading tool-call sequences against a golden DAG, blocking PRs on deviation.
Why: Final-answer evals hide where the agent went rogue. The trajectory is the unit of accountability.
8.) KV-Cache Prefix Sharing Proxy
Build: Load balancer hashing system prompts to route requests to the specific replica holding that KV-cache block.
Why: Reused context is free speed. This alone can slash Time-To-First-Token by 80%.
9.) LLM Trace Replay Debugger
Build: OpenTelemetry pipeline recording every LLM hop, tool call and token to allow time-travel debugging.
Why: You cannot fix a 14-step agent workflow if you can't replay the exact context that caused the failure.
10.) Inter-Agent Security & PII Proxy
Build: Middleware swapping PII for UUIDs and stripping malicious instructions to prevent cross-agent prompt injection.
Why: Multi-agent swarms create internal attack surfaces. Agent A can be tricked into hijacking Agent B.
11.) DPO Feedback Flywheel
Build: Pipeline capturing thumbs-downs, formatting preference pairs and triggering nightly LoRA fine-tunes.
Why: Your production edge cases are the highest-leverage training data you own.
12.) Cost Kill-Switch Middleware
Build: Router tracking loop depth and projected spend, halting the agent instantly if it exceeds a budget.
Why: A runaway agent loop is an outage with an invoice.
13.) Shadow Routing Comparator
Build: Silent 5% traffic mirror to a new model or prompt, diffing trajectories and costs without affecting users.
Why: You cannot A/B test non-determinism safely in production without shadow mode.
14.) WebGPU Edge Inference Fallback
Build: Local 2B model running in the browser via WebGPU when the cloud API 503s with offline request queuing.
Why: The fastest and most resilient inference happens on the edge.
15.) Public GenAI Teardown & Benchmark
Build: 3 published deep-dives with system diagrams, cost-per-task analysis and reproducible latency benchmarks.
Why: Senior GenAI engineers are hired for their system design judgment not their wrapper skills.
Systems that prove you can architect, orchestrate & scale when AI touches your stack.
Most people watch tutorials. Builders ship systems.
Bookmark & Repost.
If I had 6 months to become a GenAI Engineer.
I'd do this.
Stage 1: Python + Async Architecture
FastAPI, asyncio, strict Pydantic v2, Server-Sent Events (SSE), backpressure handling, event-driven agent loops.
Stage 2: Multimodal LLM Fundamentals
Context engineering, token budgeting, System-One vs System-Two routing, vision/audio streams, Voice Activity Detection (VAD).
Stage 3: Structured Outputs + Prompt Ops
Grammar-constrained decoding, strict JSON enforcement, dynamic context assembly, prompt registries, DSPy compilers.
Stage 4: Advanced RAG + Knowledge Graphs
Agentic RAG, self-correcting retrieval, GraphRAG, contextual chunking, permission-filtered hybrid search, abstention logic.
Stage 5: Agentic Workflows + Orchestration
Durable state machines (Temporal/LangGraph), raw MCP servers, A2A typed handoffs, checkpointing, async HITL gates.
Stage 6: Production GenAI Applications
Generative UI, graceful degradation chains (Frontier → Mid → Local → Cache), semantic caching, cost kill-switches.
Stage 7: Evaluation + Quality Assurance
Trajectory grading, golden DAGs, CI regression gates, shadow routing (5% traffic mirror), calibrated LLM-as-a-judge.
Stage 8: Inference + Infrastructure Optimization
vLLM/SGLang, KV-cache prefix sharing, speculative decoding, FP8 quantization, disaggregated prefill/decode, WebGPU fallbacks.
Stage 9: MLOps + Observability
OpenTelemetry for LLMs, trajectory replay debugging, DPO data flywheels, TTFT/ITL SLO tracking, cost attribution.
Stage 10: AI Safety + Compliance
Inter-agent sanitization proxies, PII UUID masking/unmasking, sandboxed microVM execution (E2B/gVisor), delegated OAuth for agents.
Stage 11: Open Source + Portfolio
Ship durable multi-agent swarms publicly, publish architecture decision records (ADRs), write public cost/latency teardowns.
Stage 12: Apply
GenAI Engineer, AI Agent Engineer, Context Engineer, Forward Deployed AI Engineer, AI Infrastructure Engineer roles.
Most people stay stuck watching tutorials.
Builders get hired.
(Bookmark it)


































