Sitemap

A list of all the posts and pages found on the site. For you robots out there is an XML version available for digesting as well.

Pages

Engineering notes on voice AI, AI agents and how to secure them, from 15 years of building speech and AI systems.

Posts

Winning a game

1 minute read

What does it mean to win a game? Many people try to win every game. But at what cost, what was the point of winning?

Intelligence

less than 1 minute read

Are we intelligent? Will any intelligent person think of themselves as intelligent?

Entitlement

less than 1 minute read

Are we entitled to have something for sure? Are we even entitled to think about our entitlement?

Non-resistance

1 minute read

The dictionary meaning “the principles or practice of passive submission to constituted authority even when unjust or oppressive” does not capture the easter...

Leverage

1 minute read

Leverage is something you can use to get maximum advantage of something. It is a tool. For you to use a tool, first you have to understand the fundamental pr...

Person and perspective

1 minute read

Is someone separate from their perspective? How can we disentangle these two?

Evaluated Experience

less than 1 minute read

It is a standard consensus that experience is the best teacher. How does just the experience alone teach anything?

Catch up with status quo

1 minute read

What if you could get rid of the idea that you always need to catch up with your peers status-wise? What changes will you make in your life? What stops you f...

Conformist

1 minute read

If everything you believe is something that you are supposed to believe, what are the odds that it is really a coincidence?

Learning vs Education

1 minute read

Education is the industrial process of making people compliant. Command and control is the backbone of it. While learning is unleashing of a curious mind aga...

Pleasure vs happiness

less than 1 minute read

The former is about taking, whereas the latter is all about giving. One is short-lived and the other is long-lived.

First post

less than 1 minute read

Hello world, and everyone.

advisory

ai_agents

What are AI Agents?

21 minute read

“From Passive Tools to Active Assistants: The Cognitive Revolution in Software.”

Tool Calling Fundamentals

20 minute read

“Giving the Brain Hands to Act: The Interface Between Intelligence and Infrastructure.”

Agent Workflow Patterns

8 minute read

“I think AI agent workflows will drive massive AI progress this year.” Andrew Ng, The Batch, March 2024

Multi-Step Reasoning

11 minute read

“Thinking Fast and Slow: How to make LLMs stop guessing and start solving.”

Computer Use Agents

20 minute read

“Moving from ‘Chatting’ with an AI to ‘Co-working’ with an OS.”

Role-Based Agent Design

20 minute read

“Generalists are okay, but Specialists win: Why Role-Based Design is the secret to production AI.”

Structured Output Patterns

23 minute read

”Make agents predictable: enforce schemas, validate outputs, and recover automatically when the model slips.”

Web Browsing Agents

19 minute read

”Turn the open web into a reliable tool: browse, extract, verify, and cite, without getting prompt-injected.”

Code Execution Agents

19 minute read

“Let agents run code safely: sandbox execution, cap damage, and verify outputs like a production system.”

Autonomous Agent Architectures

18 minute read

”Architecture beats prompting: build autonomous agents with clear state, strict tool boundaries, and measurable stop conditions.”

Self-Reflection and Critique

17 minute read

”Make agents less overconfident: separate drafting from critique, force evidence, and turn failures into actionable feedback.”

Hierarchical Planning

16 minute read

“Make agents reliable at large tasks: plan at multiple levels, execute in small verified steps, and stop when budgets say so.”

World Models for Agents

16 minute read

”Agents become reliable when they carry an internal model of reality: state, uncertainty, and predictions, not just chat history.”

Agent Evaluation Frameworks

15 minute read

”If you can’t measure an agent, you can’t improve it: build evals for success, safety, cost, and regressions.”

Testing AI Agents

13 minute read

”Test agents like systems: validate tool calls, pin behaviors with replayable traces, and catch regressions before users do.”

Prompt Injection Defense

9 minute read

“Treat prompts like an attack surface: isolate untrusted content, validate every tool call, and fail closed under uncertainty.”

Data Leakage Prevention

7 minute read

”Prevent leaks by design: minimize data access, redact outputs and logs, and enforce least privilege for tools and memory.”

Streaming Real-Time Agents

8 minute read

“Waiting 10 seconds for a thoughtful answer is okay. Waiting 10 seconds for a blank screen is broken.”

Knowledge Graphs for Agents

22 minute read

“RAG gives you documents. A knowledge graph gives you facts with structure, and agents need structure to act reliably.”

Long-Context Agent Strategies

21 minute read

“Long context isn’t ‘more tokens’, it’s a strategy for keeping the right boundaries of information.”

Agent Deployment Patterns

20 minute read

“The hardest part of agents isn’t reasoning, it’s deploying them safely when the world is messy.”

Scaling Multi-Agent Systems

19 minute read

“A single agent is a demo. Scaling agents is distributed systems with language models in the loop.”

Agent Orchestration

16 minute read

“Single agents are limited by their context window and specialized knowledge. Orchestration is the art of composing a symphony of agents to solve problems no...

Fine-Tuning for Agent Tasks

10 minute read

“Fine-tuning is the bridge between a general-purpose reasoner and a specialized autonomous agent, it’s about teaching the model not just what to know, but ho...

Agent Reliability Engineering (ARE)

7 minute read

“Reliability is not a state you reach; it is a discipline you practice. In the era of autonomous agents, SRE (Site Reliability Engineering) is evolving into ...

Ethical AI Agents and Safety Guardrails

7 minute read

“An autonomous agent without safety guardrails is not an assistant; it is a liability. Ethics in AI is not a ‘layer’ you add at the end, it is the operating ...

Agent Benchmarking: A Deep Dive

6 minute read

“If you cannot measure an agent, you cannot improve it. Benchmarking is the process of defining what it means for a machine to ‘think’ through a task.”

The Future of AI Agents: 2025 and Beyond

20 minute read

“The agents of today are assistants; the agents of tomorrow will be colleagues. We are moving from a world where we tell AI what to do, to a world where AI t...

ai_security

dsa

LRU Cache

32 minute read

Master LRU cache design: O(1) get/put with hash map + doubly linked list. Critical for interviews and production caching systems.

Merge Intervals

26 minute read

Master interval processing to handle overlapping ranges, the foundation of event streams and temporal reasoning in production systems.

Decode Ways

21 minute read

A deceptive counting problem that teaches the fundamentals of state transitions, the same structure behind sequence decoding in speech recognition.

Word Break

20 minute read

The fundamental string segmentation problem that powers spell checkers, search engines, and tokenizers.

Word Search II

9 minute read

“Don’t look for one needle in a haystack. Magnetize the hay to find all needles at once.”

LFU Cache (Least Frequently Used)

22 minute read

“Designing an LFU Cache is the ultimate exercise in composite data structures, it forces you to synchronize multiple hash maps and linked lists to achieve O(...

ml_system_design

Knowledge Graph Systems

25 minute read

“Structuring the world’s information into connected entities and relationships.”

Feature Stores

17 minute read

“The centralized truth for machine learning features.”

Vector Databases

17 minute read

“The infrastructure for semantic search and AI-native applications.”

RAG Systems

17 minute read

“Grounding LLMs in facts, not hallucinations.”

Transfer Learning Systems

17 minute read

“Standing on the shoulders of giants isn’t just a metaphor, it’s an engineering requirement.”

Federated Learning

24 minute read

“If data can’t move, move the model, and design the system so the server never sees what matters.”

Anomaly Detection

23 minute read

“Find the boundaries of ‘normal’, then measure what spills over.”

Data Validation

24 minute read

“Most ML failures aren’t model bugs, they’re invalid data quietly passing through.”

AutoML Systems

20 minute read

“The best algorithm is the one you didn’t have to tune by hand. AutoML is about moving the engineer from ‘writing code’ to ‘writing the objective function’.”

Real-time Personalization

20 minute read

“Generalization is the goal of ML, but Personalization is the goal of Products. Real-time personalization is about capturing the intent of the ‘now’.”

Advanced NLP Pipelines at Scale

7 minute read

“An NLP pipeline is a factory for meaning. It takes raw, messy human dialogue and transforms it into a structured, machine-compatible stream of intent and en...

publications

speech_tech

Streaming ASR Architecture

26 minute read

Why batch ASR won’t work for voice assistants, and how streaming models transcribe speech as you speak in under 200ms.

Speech Command Classification

32 minute read

How voice assistants recognize “turn on the lights” from raw audio in under 100ms without full ASR transcription.

Voice Activity Detection (VAD)

26 minute read

How voice assistants and video conferencing apps detect when you’re speaking vs silence, the critical first step in every speech pipeline.

Speaker Recognition & Verification

24 minute read

How voice systems recognize who is speaking, from voice profiles that personalize an assistant’s answers to voice biometrics for authentication.

Streaming Speech Processing Pipeline

26 minute read

Build real-time speech processing pipelines that handle audio streams with minimal latency for live transcription and voice interfaces.

Real-time Keyword Spotting

31 minute read

Build lightweight models that detect specific keywords in audio streams with minimal latency and power consumption for voice interfaces.

Voice Enhancement & Noise Reduction

31 minute read

Build systems that enhance voice quality by removing noise, improving intelligibility, and optimizing audio for speech applications.

Speech Separation

26 minute read

Separate overlapping speakers with deep learning: how models attack the cocktail party problem for meeting transcription and voice assistants.

Multi-Speaker ASR

28 minute read

Build production multi-speaker ASR systems: Combine speech recognition, speaker diarization, and overlap handling for real-world conversations.

Multi-model Speech Ensemble

24 minute read

Build speech systems that combine multiple ASR models, using backtracking to pick the model subset and fusion to merge their outputs.

Speaker Clustering (Diarization)

24 minute read

Build speaker diarization systems that cluster audio segments by speaker using embedding similarity, and know when end-to-end models do better.

Real-time Audio Segmentation

21 minute read

Build audio segmentation systems that detect speech boundaries in real time and merge VAD detections into clean segments.

Distributed Speech Training

13 minute read

Design distributed training pipelines for large-scale speech models that efficiently handle hundreds of thousands of hours of sequential audio data.

Audio Augmentation Techniques

12 minute read

Use audio augmentation techniques to make speech models robust to noise, accents, channels, and real-world conditions.

Speech Experiment Management

18 minute read

Design experiment management systems tailored for speech research, tracking audio data, models, metrics, and multi-dimensional experiments at scale.

Adaptive Speech Models

23 minute read

Design adaptive speech models that adjust in real time to speakers, accents, noise, and domains without forgetting what the baseline already does well.

Speech Architecture Search

20 minute read

Design neural architecture search systems for speech models that automatically discover ASR and TTS architectures balancing accuracy, latency and model size.

Cost-efficient Speech Systems

16 minute read

Strategies for building profitable speech recognition systems by optimizing the entire pipeline from signal processing to hardware.

ASR Beam Search Implementation

16 minute read

Implementing the core decoding logic of modern Speech Recognition systems, handling alignment, blanks, and language models.

Speech Tokenization

18 minute read

The breakthrough that allows us to treat audio like text, enabling GPT-style models for speech.

End-to-End Speech Model Design

26 minute read

Goodbye HMMs. Goodbye Phonemes. Goodbye Lexicons. We are teaching the machine to Listen, Attend, and Spell.

Voice Search Ranking

25 minute read

“Play Call Me Maybe”. Did you mean the song, the video, or the contact named ‘Maybe’?

Phonetic Search in Speech

15 minute read

“Finding ‘Jon’ when the user types ‘John’, or ‘Symphony’ when they say ‘Simfoni’.”

Cross-Lingual Speech Transfer

10 minute read

“If you know how to pronounce ‘P’ in English, you’re 90% of the way to pronouncing ‘P’ in Portuguese.”

Speech Model Export

8 minute read

“A model that runs in a Jupyter notebook is an experiment. A model that runs on an iPhone is a product.”

Custom Language Modeling

7 minute read

“The model knows ‘Apple’ the fruit. It needs to learn ‘Apple’ the stock ticker.”

Privacy-preserving Speech

24 minute read

“Speech is biometric. Treat every waveform like a password, design systems that learn without listening.”

Speech Anomaly Detection

21 minute read

“If ASR is the brain, anomaly detection is the nervous system, it tells you when the audio reality changed.”

Audio Quality Validation

20 minute read

“If you don’t validate audio, you’ll debug ‘model regressions’ that are really microphone bugs.”

Architecting Conversational AI Systems

12 minute read

“A voice assistant is more than a speech recognizer attached to a search engine. It is a stateful entity that must navigate the social nuances of human turn-...

Multi-tier Speech Caching Architecture

21 minute read

“Speech models are expensive per request. Multi-tier caching is one of the most effective ways to scale voice assistants to millions of users without bankrup...