[{"content":"","date":"18 November 2026","externalUrl":null,"permalink":"/","section":"","summary":"","title":"","type":"page"},{"content":"","date":"18 November 2026","externalUrl":null,"permalink":"/posts/","section":"Blog","summary":"","title":"Blog","type":"posts"},{"content":"","date":"18 November 2026","externalUrl":null,"permalink":"/tags/interactive/","section":"Tags","summary":"","title":"interactive","type":"tags"},{"content":"","date":"18 November 2026","externalUrl":null,"permalink":"/tags/probability/","section":"Tags","summary":"","title":"probability","type":"tags"},{"content":"","date":"18 November 2026","externalUrl":null,"permalink":"/tags/","section":"Tags","summary":"","title":"Tags","type":"tags"},{"content":" I have always loved puzzles in probability. Many of them are counter-intutive like this one : The Birthday Paradox.\nHow many people need to be in a room so that it is highly likely that at least two of them share a birthday? Most people guess somewhere around 180, about half of 365. The real answer is just 23 people for a 50% chance. With 70 people a shared birthday is close to certain: 99.9%.\nThat\u0026rsquo;s the birthday paradox. It isn\u0026rsquo;t a real paradox, because the maths is simple. It just goes against intuition. Drag the slider and watch how quickly the odds climb.\nTry it # People in the room 23 50.7% chance that any two people share a birthday 5.9% chance that someone shares your birthday 253 pairs of people who could match Hover over or tap the chart to read the values. Click or drag on it to change the number of people.\nShow the numbers as a table People Any two share Someone shares yours 10 11.7% 2.4% 20 41.1% 5.1% 23 50.7% 5.9% 30 70.6% 7.6% 40 89.1% 10.1% 50 97.0% 12.6% 57 99.0% 14.2% 70 99.9% 17.2% 100 \u0026gt;99.99% 23.8% This calculator needs JavaScript. The table above has the key values.\nWhy the number is so small # The trick is to stop thinking about people and start thinking about pairs. In a room of 23 there are\n$$ \\binom{23}{2} = \\frac{23 \\times 22}{2} = 253 $$ different pairs of people, and each pair is another chance for a match. 253 chances, each about 1 in 365, add up quickly.\nTo get the exact answer, work out the chance that nobody matches. Pick people one at a time:\nThe first person can have any birthday: \\(\\tfrac{365}{365}\\). The second must avoid the first person\u0026rsquo;s day: \\(\\tfrac{364}{365}\\). The third must avoid both of those days: \\(\\tfrac{363}{365}\\), and so on. Multiply those together, and a match is everything that\u0026rsquo;s left:\n$$ P(\\text{shared birthday}) = 1 - \\frac{365}{365} \\times \\frac{364}{365} \\times \\cdots \\times \\frac{365 - n + 1}{365} $$ For \\(n = 23\\) that comes to 0.507: slightly better than a coin flip.\nThere\u0026rsquo;s also a neat shortcut. Each of the \\(\\binom{n}{2}\\) pairs avoids a match with probability \\(\\tfrac{364}{365}\\), so roughly\n$$ P(\\text{shared birthday}) \\approx 1 - e^{-n(n-1)/730} $$ which for 23 people gives 0.500.\nWhy it feels wrong # When we picture the problem, we picture ourselves: \u0026ldquo;what are the odds someone here has my birthday?\u0026rdquo; That\u0026rsquo;s a much harder target. You\u0026rsquo;re one person, so you only get to be in 22 of the 253 pairs. The orange line in the chart above shows that version, and it barely moves. You\u0026rsquo;d need 253 other people in the room before the odds of someone sharing your birthday reach 50%.\nThe paradox is the gap between those two lines: the question we hear and the question we answer.\nDon\u0026rsquo;t trust me: fill a room # Probability arguments are easy to doubt, so here\u0026rsquo;s an experiment. Each click puts a group of people with random birthdays into a room and marks them on a calendar. Then run a thousand rooms at once and compare the share that had a match with the exact answer.\nPeople in the room 23 Fill one room Run 1,000 rooms Reset Click Fill one room to begin.\none person shared birthday Rooms with a match 0% The more rooms you run, the closer the simulated share gets to the exact figure. That\u0026rsquo;s the law of large numbers at work.\nThe fine print # The maths above makes a few simplifying assumptions:\n365 equally likely birthdays. It ignores 29 February and treats every day as equally common. No twins or other reasons for birthdays to cluster. In reality, births aren\u0026rsquo;t spread evenly across the year: there are seasonal peaks, and fewer births on holidays and weekends, when fewer births are scheduled. Uneven spreads only make matches more likely, so 23 is, if anything, slightly too many.\nThe same maths shows up well outside parties. In cryptography, the birthday attack uses it to find two inputs with the same hash far faster than you might expect. For a hash with \\(N\\) possible outputs, you get a decent chance of a collision after only about \\(\\sqrt{N}\\) attempts.\n","date":"18 November 2026","externalUrl":null,"permalink":"/posts/birthday-paradox/","section":"Blog","summary":"","title":"The Birthday Paradox","type":"posts"},{"content":"","date":"16 November 2026","externalUrl":null,"permalink":"/tags/meta/","section":"Tags","summary":"","title":"meta","type":"tags"},{"content":" Hi, I\u0026rsquo;m Mathusuthan. This blog is my working notebook on taking AI, ML, and data systems from neat prototypes to production. Beyond the demo # Most writing about AI stops at the demo: a few lines of glue code, a friendly prompt, and an example that works on the first try. The real engineering starts right after that, when a system meets messy inputs, latency budgets, edge cases, and a monthly cloud bill.\nI started this site to work through that gap in public—partly to sharpen my own judgment as I build, and partly to write the kind of practical, numbers-first notes I look for when weighing architectural choices.\nWhat you\u0026rsquo;ll find here # Most posts fall into five threads:\nFirst principles and interactive notes. Probability, ML fundamentals, and software design ideas stripped back to their core intuition, often paired with interactive models you can test directly in the page.\nRetrieval, agents, and evaluation. Adaptive RAG pipelines, hybrid search, multi-agent orchestration, and automated evaluation focused on measurable recall and grounding rather than guesswork.\nProduction AI and unit economics. System archetypes, routing and batching patterns, tokenomics, and the FinOps trade-offs that decide whether an AI feature survives past a proof of concept.\nSecurity and governance. Hardening LLM applications and tool-using agents, setting guardrails and policy controls, and building the observability needed to trace and audit systems in production.\nNotes from courses, research papers and books. What I learn working through open courses from top universities and research papers, alongside reviews and takeaways from the best books I read.\nHow I try to write # A few habits guide how posts are put together here:\nTrade-offs over tutorials. Documentation already tells you which API to call. What matters in practice is why one architecture beats another, where each approach breaks down, and what the benchmarks show. Show, don\u0026rsquo;t just assert. Whenever an idea can be simulated, charted, or priced out, I try to put the numbers or an interactive widget right in the post so you can poke at the assumptions yourself. Plain language. Every technical field collects jargon. When a specialist term earns its place, I keep a short definition in the glossary rather than letting buzzwords carry the argument. Thanks for reading, and welcome aboard.\n","date":"16 November 2026","externalUrl":null,"permalink":"/posts/hello-world/","section":"Blog","summary":"","title":"Welcome","type":"posts"},{"content":" I\u0026rsquo;m Mathusuthan Kannan, an engineering leader focused on converting business ideas to design, development and the productionizing of AI, ML, and data systems. My work sits at the boundary between business, models and software engineering: talking to people, taking ideas that look promising, convert them to a prototype and turning them into reliable, observable, cost-aware systems. In practice, that means caring as much about software, quality, evaluation, guardrails, security, governance and unit economics as about business goals, budgets, ROI and most importantly people.\nAbout this site # This blog is my public notebook: a place to think on paper, test assumptions with real numbers, and share architectural trade-offs without tutorial fluff. For a fuller overview of the topics covered here, see the Welcome post, or browse the glossary for short definitions of recurring terms.\nThe site is built with Hugo on a customised Blowfish theme, using plain HTML, CSS, and dependency-free JavaScript for interactive diagrams.\nElsewhere # LinkedIn: linkedin.com/in/mathusuthank\nGitHub: github.com/mathusuthan\n","externalUrl":null,"permalink":"/about/","section":"","summary":"","title":"About","type":"page"},{"content":"A system in which a language model chooses what to do next, using tool results to work toward a goal.\nAsked “Can I return these headphones?”, a support agent looks up the order. When it sees that the headphones were bought on sale, it searches the return policy for sale items before answering.\nFurther reading: Building effective agents.\n","externalUrl":null,"permalink":"/glossary/agent/","section":"Glossary","summary":"A system in which a language model chooses what to do next, using tool results to work toward a goal.\n","title":"Agent","type":"glossary"},{"content":"","externalUrl":null,"permalink":"/authors/","section":"authors","summary":"","title":"authors","type":"authors"},{"content":"With 23 independent birthdays spread uniformly across 365 days, the chance of a shared birthday exceeds 50%. The same reasoning helps estimate the chance that two passages in a retrieval index receive the same short hash ID.\nThe key is whose birthdays you compare. Only 22 other people can match your birthday, but there are 253 different pairs in the room that could match each other.\nTry changing the group size in The Birthday Paradox.\n","externalUrl":null,"permalink":"/glossary/birthday-paradox/","section":"Glossary","summary":"With 23 independent birthdays spread uniformly across 365 days, the chance of a shared birthday exceeds 50%. The same reasoning helps estimate the chance that two passages in a retrieval index receive the same short hash ID.\n","title":"Birthday paradox","type":"glossary"},{"content":"","externalUrl":null,"permalink":"/categories/","section":"categories","summary":"","title":"categories","type":"categories"},{"content":"In probability, the complement of an event includes every outcome in which that event does not happen. In a retrieval test, the complement of finding at least one relevant passage is finding none.\nSuppose a retriever finds a relevant passage for 84 of 100 questions. It misses on the other 16, so its observed miss rate is 16%.\nFor example, the complement of “at least two people share a birthday” is “everyone has a different birthday.” In The Birthday Paradox, it is easier to calculate the chance that every birthday is different. Subtracting that probability from 1 gives the chance of a match.\n","externalUrl":null,"permalink":"/glossary/complement/","section":"Glossary","summary":"In probability, the complement of an event includes every outcome in which that event does not happen. In a retrieval test, the complement of finding at least one relevant passage is finding none.\n","title":"Complement","type":"glossary"},{"content":"A list of numbers that represents something, such as a question or a passage of text. A retrieval system can compare embeddings to find passages with similar meanings.\nA customer asks, “Can I get my money back?” An embedding search can surface a passage titled Refund eligibility even though none of the words in the title appear in the question.\n","externalUrl":null,"permalink":"/glossary/embedding/","section":"Glossary","summary":"A list of numbers that represents something, such as a question or a passage of text. A retrieval system can compare embeddings to find passages with similar meanings.\n","title":"Embedding","type":"glossary"},{"content":"Choose a letter to jump to its definitions, or select a term for an example.\n","externalUrl":null,"permalink":"/glossary/","section":"Glossary","summary":"","title":"Glossary","type":"glossary"},{"content":"Basing a model’s answer on identifiable evidence, such as a retrieved policy or an order record.\nSuppose the policy says “within 30 days of delivery.” An answer that says “30 days from purchase” changes the rule. Linking to the policy helps a reader spot the mistake, but the answer is grounded only if its claims match the evidence.\n","externalUrl":null,"permalink":"/glossary/grounding/","section":"Glossary","summary":"Basing a model’s answer on identifiable evidence, such as a retrieved policy or an order record.\n","title":"Grounding","type":"glossary"},{"content":"A retrieval method that combines keyword search with a search based on meaning, often by merging their ranked results.\nFor “Can I return an HX-40 headset?”, keyword search can match the exact model number. Embedding search can also find a policy that talks about refunds for audio equipment. Combining the results gives the assistant both kinds of evidence.\n","externalUrl":null,"permalink":"/glossary/hybrid-search/","section":"Glossary","summary":"A retrieval method that combines keyword search with a search based on meaning, often by merging their ranked results.\n","title":"Hybrid search","type":"glossary"},{"content":"A technique that retrieves material relevant to a question and supplies it to a language model as context for generating an answer.\nWhen a shop extends its holiday return window, its assistant can retrieve the revised policy and use the new dates in its answer. Updating the indexed document makes the change available without retraining the model.\nFurther reading: Original RAG paper.\n","externalUrl":null,"permalink":"/glossary/retrieval-augmented-generation/","section":"Glossary","summary":"A technique that retrieves material relevant to a question and supplies it to a language model as context for generating an answer.\n","title":"Retrieval-augmented generation (RAG)","type":"glossary"},{"content":"","externalUrl":null,"permalink":"/series/","section":"series","summary":"","title":"series","type":"series"},{"content":"A structured request from a model for an application to run a named function with specific arguments.\nTo answer “Has order 1042 shipped?”, the model requests get_order_status with order ID 1042. The application runs the lookup and returns the status. The model can then use that result in its reply.\n","externalUrl":null,"permalink":"/glossary/tool-call/","section":"Glossary","summary":"A structured request from a model for an application to run a named function with specific arguments.\n","title":"Tool call","type":"glossary"},{"content":"Asking a language model to perform a task using instructions without supplying worked examples of that task in the prompt.\nA support team prompts its model: “Label this message as billing, delivery, or returns: ‘My parcel hasn’t arrived.’” The prompt gives the available labels and leaves the model to choose one.\n","externalUrl":null,"permalink":"/glossary/zero-shot-prompting/","section":"Glossary","summary":"Asking a language model to perform a task using instructions without supplying worked examples of that task in the prompt.\n","title":"Zero-shot prompting","type":"glossary"}]