{"version":"https://jsonfeed.org/version/1.1","title":"Ishu Garg — writing and ideas","home_page_url":"https://ishudgarg.com/writing","feed_url":"https://ishudgarg.com/feed.json","items":[{"id":"https://ishudgarg.com/library/blindfolded-cards","url":"https://ishudgarg.com/library/blindfolded-cards","title":"The Blindfolded Cards","summary":"A clean invariant puzzle: split cards while blindfolded so both piles have the same number of face-up cards.","content_text":"See The Invariant\n\nThe trick is not eyesight. The trick is choosing a pile whose size matches the hidden count, then flipping the question around."},{"id":"https://ishudgarg.com/library/prompt-injection-museum-guard","url":"https://ishudgarg.com/library/prompt-injection-museum-guard","title":"Prompt Injection Museum Guard","summary":"A tiny LLM security challenge: separate trusted instructions from hostile page text.","content_text":"Trace The Boundary\n\nSystem policy, the user request, retrieved page text, and the allowed action have different roles. The bug appears when all four are treated as the same kind of instruction."},{"id":"https://ishudgarg.com/library/st-petersburg-startup","url":"https://ishudgarg.com/library/st-petersburg-startup","title":"The Infinite Startup Payout","summary":"A probability puzzle about expected value, real-world constraints, and why math without context lies politely.","content_text":"Algebra Meets Reality\n\nThe payout grows quickly, but the person offering the game has a bankroll and may have a payout cap. Compare those limits with the formal expected value before deciding what to pay."},{"id":"https://ishudgarg.com/library/tokenizer-trap","url":"https://ishudgarg.com/library/tokenizer-trap","title":"Tokenizer Trap","summary":"A small LLM puzzle about why models can write beautifully and still stumble on character counting.","content_text":"Token View\n\nCompare the word as letters with the pieces shown by a tokenizer. Token boundaries need not match letter boundaries; the tokenizer link below lets you inspect the difference."},{"id":"https://ishudgarg.com/library/parity-party-switches","url":"https://ishudgarg.com/library/parity-party-switches","title":"The Parity Party Switches","summary":"A small parity puzzle where the trick is noticing what can never change, even when everyone is busy flipping switches.","content_text":"Watch What Cannot Change\n\nThe positions can change, but the odd/even count cannot. Track that invariant instead of following every switch."},{"id":"https://ishudgarg.com/library/llm-builder-zero-to-shipped-agent","url":"https://ishudgarg.com/library/llm-builder-zero-to-shipped-agent","title":"LLM Builder: Zero to Shipped Agent","summary":"Move from prompting to RAG, evals, tools, agents, deployment, and failure analysis.","content_text":"The system you will build\n\nThe assistant needs a defined task, sources it can cite, a test set, and a failure log.\n\nWhat To Build\n\nA good first build is narrow: a scholarship helper over verified sources, a student FAQ assistant, or a small research-note organizer. Keep the first version read-only until source, privacy, and failure modes are visible.\n\nEach module ends in a commit, a screenshot, a failing example, and one paragraph explaining what changed in your judgment."},{"id":"https://ishudgarg.com/library/student-to-strong-cs-intern","url":"https://ishudgarg.com/library/student-to-strong-cs-intern","title":"Student to Strong CS Intern","summary":"A realistic path through CS fundamentals, project taste, internship search, applications, and interview practice.","content_text":"Application System\n\nKeep one current resume, a project you can demonstrate, and an application tracker. Review them weekly. Share the project work, not private application documents."},{"id":"https://ishudgarg.com/library/scholarship-radar","url":"https://ishudgarg.com/library/scholarship-radar","title":"Scholarship Starting Points","summary":"Four official scholarship links and a checklist for eligibility, deadlines, and documents.","content_text":"What to check\n\nUse the official links below as starting points. Check eligibility and the current deadline on each scheme page; this page does not track open applications.\n\nofficial link first\n\ndeadline and timezone\n\neligibility in plain language\n\ndocuments needed\n\nlast verified date"},{"id":"https://ishudgarg.com/library/how-did-they-measure-the-moon","url":"https://ishudgarg.com/library/how-did-they-measure-the-moon","title":"How Did They Measure The Moon?","summary":"How shadows, eclipses, and a half-degree angle helped people measure the Moon from Earth.","content_text":"The Real Question\n\nWithout spacecraft, cameras, lasers, or modern instruments, how did people even dare to estimate the Moon's distance?\n\nThe answer begins with patient observations and annoyingly powerful geometry. Watch shadows. Measure angles. Notice eclipses. Draw a triangle where your eyes want mythology.\n\nThe Half-Degree Trick\n\nHold a small object near your eye and it looks large. Move it away and it shrinks. The Moon's apparent width is about half a degree.\n\nCombine that angle with an estimate of the Moon's actual width, and a thin triangle gives the distance: roughly thirty Earth diameters, close to the modern average of about 384,400 km. The hard part is earning those inputs.\n\nWhere The Ancient Ingenuity Enters\n\nDuring a lunar eclipse, Earth's shadow crosses the Moon. With an estimate of Earth's size, comparing the shadow with the Moon helps estimate the Moon's size in Earth units.\n\nAristarchus-style reasoning also used the half-Moon phase and the angle between the Sun and Moon. Some values were wrong by modern standards, but the move still feels remarkable: use a visible phase and a triangle to reason about bodies you cannot touch.\n\nWhat Could Go Wrong\n\nTiny angle errors move the answer. Shadow edges are fuzzy, Earth-size estimates can be imperfect, the Moon's orbit varies, and naked-eye measurements have limits. Repeated observations matter.\n\nThe Larger Lesson\n\nModern technology made the numbers better. It did not invent the habit of asking the sky a precise question. If you cannot touch something, look for a relationship you can measure from here."},{"id":"https://ishudgarg.com/library/godel-incompleteness-theorem","url":"https://ishudgarg.com/library/godel-incompleteness-theorem","title":"Godel's Incompleteness Theorems","summary":"Godel showed a precise kind of trouble: some true arithmetic statements can be stated inside a rulebook but not proved by that rulebook.","content_text":"The Short Version\n\nImagine a rulebook whose proofs can be checked mechanically and whose rules are powerful enough to express arithmetic. Gödel showed that, if such a system is consistent and effectively described, it cannot prove every true arithmetic statement from inside its own rules.\n\nWhy It Feels Like Art\n\nThe rulebook becomes part of its own subject. A system built to talk about numbers can also talk about proofs. The self-reference is engineered, not a word game.\n\nA Toy Version Of The Trick\n\nThe constructed sentence roughly says: this sentence is not provable here. If the system is consistent, it cannot prove that sentence; the sentence exposes a truth its own rules cannot certify.\n\nWhat It Does Not Mean\n\nThis does not mean science is broken, every belief is equally good, or humans have magic access to truth. It is a theorem about systems with specific properties. That is enough to make a nerd stare at the ceiling.\n\nThe Mental Picture\n\nPicture a city where legal roads are proofs. The system can name an address without having a legal route to it. The analogy is imperfect, but it helps separate stating something from proving it.\n\nWhy AI Builders Care\n\nLLMs are not secretly Gödel machines. The useful connection is more modest: a guarantee depends on its language, assumptions, and boundary. When discussing verification, evals, or an agent policy, say what the system can check and what remains outside that claim.\n\nHow The Proof Moves\n\nAssign numbers to symbols, formulas, and proofs. Statements about proofs then become arithmetic statements themselves. This encoding is what makes the toy sentence above a precise construction inside the rulebook."},{"id":"https://ishudgarg.com/library/im-bored-play-shelf","url":"https://ishudgarg.com/library/im-bored-play-shelf","title":"I Am Bored Play Shelf","summary":"An object hunt and trapdoor trivia for a short break.","content_text":"Quick Things To Play\n\nFind the hidden object, or try a trivia question whose obvious answer may be wrong."},{"id":"https://ishudgarg.com/library/agent-failure-zoo","url":"https://ishudgarg.com/library/agent-failure-zoo","title":"Agent Failure Zoo","summary":"A practical field guide to how AI agents fail: wrong tool, stale context, hidden authority, bad memory, and confident nonsense wearing a clipboard.","content_text":"The Zoo\n\nAn agent with tools can be wrong with consequences. Start by naming the failure before dressing it up as product copy.\n\ntool misuse\n\nretrieval drift\n\nauthority confusion\n\nmemory leak\n\noverbroad action\n\nmissing eval\n\nunclear rollback\n\nHow To Use It\n\nRecord the symptom, cause, test, repair, and rerun result. The tone can be funny. The check stays boring.\n\nFirst Failure Cards\n\nThe Obedient Browser treats text on a page as an instruction. Test it with a page that says to ignore the user's request.\n\nThe Citation Tourist supplies scholarly-looking links that do not support the answer. Give it conflicting sources and ask for the quoted evidence.\n\nThe Permission Acrobat turns a vague wish into an unauthorized action. Test the boundaries around calendars, email, files, and purchases.\n\nOne Card, Fully Drawn\n\nFor the Obedient Browser, the symptom is obedient wrongness; the cause is treating retrieved data as a command. Create a synthetic hostile page and ask the agent to summarize it. It should describe the attack, not follow it.\n\nKeep page text separate from authorized instructions and tool permissions, then retain that page as a regression test.\n\nReviewer Questions\n\nWhich input was trusted, and which was only data? Was the action explicitly permitted? What happens when sources disagree? What receipt proves the action occurred? Can you answer from the evidence, without reconstructing the owner's intentions?"},{"id":"https://ishudgarg.com/library/rag-source-boundary-checklist","url":"https://ishudgarg.com/library/rag-source-boundary-checklist","title":"RAG Source Boundary Checklist","summary":"A builder checklist for retrieval systems: corpus scope, freshness, citations, refusal cases, and when the answer needs a human handoff.","content_text":"The Boundary\n\nDefine which documents the system can use, how it chunks them, how it ranks conflicting sources, what counts as fresh, and when it must refuse or hand off to a person.\n\ncorpus scope\n\nsource rank\n\nfreshness\n\ncitation contract\n\nrefusal\n\nhuman handoff\n\nGood Failure Cases\n\nTest with missing documents, conflicting sources, stale policy pages, duplicated paragraphs, hostile retrieved text, and questions that ask for decisions outside the system boundary.\n\nA RAG demo that only answers happy-path questions is a search box wearing a blazer."},{"id":"https://ishudgarg.com/library/evals-before-agents","url":"https://ishudgarg.com/library/evals-before-agents","title":"Evals Before Agents","summary":"Write small pass/fail cases before adding tools, memory, autonomy, or impressive-looking agent loops.","content_text":"The Rule Of Thumb\n\nBefore adding tools, memory, or autonomy, write a few examples of what the system must do and must not do. Include a missing source, an unsafe request, stale information, and a confused user.\n\nFor each case, record the task, expected output, forbidden action, source requirement, rollback, and review path. A confident answer is not a pass condition.\n\nWhy This Is Not Anti-Agent\n\nAgents are useful when a task needs state, tools, planning, or interaction with a changing environment. Evals make that behavior inspectable.\n\nA Tiny Eval Case\n\nAsk for a scholarship for a final-year student. A passing answer identifies the official page, eligibility, deadline, and uncertainty. If it cannot establish a current deadline, it says so. It does not invent an amount.\n\nThe Row I Want To See\n\nGive the case a name and keep the input, expected behavior, observed failure, repair, and rerun state together. If the answer invented an amount, require source-backed amounts and rerun the same case. Record pass or blocked, not just that the prompt was changed.\n\nWhen The Agent Is Worth Adding\n\nAfter the first cases pass, add a useful action: checking changed pages, drafting a checklist, comparing sources, or preparing a follow-up.\n\nKeep the receipts and rerun the cases as the system changes. A small script with five useful evals may be a better starting point than an agent with none."},{"id":"https://ishudgarg.com/library/computer-science-as-art","url":"https://ishudgarg.com/library/computer-science-as-art","title":"Computer Science As Art","summary":"Artists and curious people can find a different kind of beauty in algorithms, proofs, compilers, distributed systems, and type systems.","content_text":"The Claim\n\nComputer science has a beauty of compression: a small idea explains a large mess. An invariant survives every move. An abstraction makes the room feel cleaner. A proof opens a door you could not see.\n\nExhibit One: Euclid's Trapdoor\n\nSuppose a list contains all the primes. Multiply them together and add one. None of the listed primes divides the result; each leaves a remainder of one.\n\nThe result need not itself be prime. If it is composite, it still has a prime factor outside the list. The assumption builds its own trapdoor.\n\nExhibit Two: A Parser Making Shape Out Of Text\n\nA parser turns a flat string into names, brackets, nesting, and expression boundaries. Text becomes a structure you can traverse and transform. It feels like editing a sentence and suddenly seeing its bones.\n\nExhibit Three: The Shortest Path\n\nDijkstra's algorithm grows a region of confirmed shortest distances by choosing the smallest tentative distance at the frontier. Under its assumptions, that disciplined choice turns a map into something navigable.\n\nThe idea travels through networks, routing, and planning: a large search becomes a sequence of small, justified decisions.\n\nExhibit Four: Types As Consequences\n\nA type system can refuse some mistakes before the program runs. It is a grammar for avoiding future disasters.\n\nA sonnet or a raga works within constraints too. Constraints need not kill expression; they give it a medium. Types are that idea with compiler teeth.\n\nWhat Artists Might Recognize\n\nA painter works with composition, a musician with motifs, a poet with lines. Recursion repeats an idea at a smaller scale; distributed consensus asks how unreliable witnesses can agree without a single judge. These are aesthetic moves as well as technical ones—not proof that code is better than other art.\n\nWhat CS Students Might Miss\n\nAssignments can hide this behind syntax, marks, and deadlines. Revisit a problem after the exam: which invariant mattered, which data structure made the problem smaller, why did contradiction work better than construction? That is where the choice becomes interesting.\n\nThe Question I Keep\n\nDid the idea change the question I knew how to ask?"},{"id":"https://ishudgarg.com/library/ai-without-becoming-dumber","url":"https://ishudgarg.com/library/ai-without-becoming-dumber","title":"Using AI Without Losing The Plot","summary":"Using AI as a tutor and critic, with a concrete way to understand and check the code it changes.","content_text":"The Bad Workflow\n\nPaste a question, accept the answer, make it look nice. It feels productive, but the mind may barely have touched the problem. The risk is not the tool itself; it is hiding the struggle you meant to practise.\n\nThe Loop I Trust\n\nTry this loop: guess, ask, compare, verify, re-solve. Write your rough answer first. Compare it with the model's, check the facts or code, then close the AI and solve a nearby problem.\n\nGood Uses\n\nAsk for a hint before a solution, a counterexample to your claim, or the weak point in your answer. Practice questions, interview simulations, code review, and explanations at different levels can help too. Keep a mistake log and check the sources.\n\nUnderstand the Change, Not Just the Answer\n\nWith code, I want to see what a change does, how it fits into the rest of the system, and what could go wrong. A diagram or a before-and-after example can help more than another page of explanation.\n\nTry it on a small change: ask for the input, the output, and one expected failure. Then run those cases and explain the result in your own words. Also ask whether an existing tool or library already solves the problem; more generated code is not automatically more progress.\n\nWhere It Can Make You Worse\n\nA fluent answer is easy to mistake for your own understanding, and a borrowed explanation can flatten your voice.\n\nThe Student Rule\n\nIf the task is training, bring AI in after your first attempt. If it is drudgery, bring it in earlier—but review the result yourself.\n\nThe Question I Keep\n\nThe question I keep is simple: what can I now see that I could not see before? A filled page is not the same thing as a learned idea.\n\nIshu D. Garg; edited with AI assistance."},{"id":"https://ishudgarg.com/library/student-application-packet","url":"https://ishudgarg.com/library/student-application-packet","title":"Student Application Folder","summary":"One reusable folder for internships, scholarships, MS applications, cold emails, and mentor asks.","content_text":"The Folder\n\nThe useful folder is boring in a good way: one resume, one project trail, one personal story, one document folder, one recommender note, email drafts, and one tracker.\n\nA prepared folder gives a mentor something concrete to review.\n\nWhy It Works\n\nThe same raw material powers internship applications, scholarships, cold emails, referrals, MS applications, and startup conversations. The goal is not to sound impressive. The goal is to make evidence easy to inspect.\n\nFolder Structure\n\nKeep one source folder, not fifteen panic folders. Suggested folders: resume, projects, transcripts, identity documents, essays, recommendation material, certificates, and submissions.\n\nEvery exported PDF carries a date in the filename. The student can see which version was submitted where, without forensic archaeology.\n\nresume\n\nprojects\n\ntranscripts\n\nessays\n\nrecommendations\n\nsubmissions\n\nreceipts\n\nMentor Review Loop\n\nA mentor gets a short brief, the role or program link, the student's current folder, and two questions. That is easier to answer than 'please guide me'.\n\nThe review loop ends in a change log: what changed, what stayed, and where evidence is still thin."},{"id":"https://ishudgarg.com/library/student-application-desk","url":"https://ishudgarg.com/library/student-application-desk","title":"Student Application Desk","summary":"Set up one tracker for scholarships, internships, college applications, and referrals.","content_text":"The Desk\n\nA spreadsheet, Notion table, or notebook is enough to keep opportunities, documents, and follow-ups together. One reliable row beats a heroic folder name.\n\nThe Opportunity Row\n\nAlongside the opportunity and deadline, keep the official URL, date checked, eligibility, required documents, current profile and draft versions, reviewer, submission receipt, and follow-up date. Official pages change; a saved link alone is not a current answer.\n\nThe Review Loop\n\nFor mentor feedback, send the opportunity link, current material, and two specific questions. Keep a short change log and the final receipt so you can see what changed and what was submitted.\n\nThe First Thirty Minutes\n\nStart with five fields: opportunity, official link, deadline, next action, and status. Fill one real row and use it before adding the extra details above.\n\nCareful Add-Ons\n\nReminders, reusable essays, comments, and exports can help once the basic tracker is trusted. You do not need accounts or a new personal-data service to begin.\n\nKeep documents private, sources checked, and data easy to export. Make the next action clear; do not let the tracker become another thing to maintain."},{"id":"https://ishudgarg.com/library/bhumisahayak","url":"https://ishudgarg.com/library/bhumisahayak","title":"BhumiSahayak","summary":"AI land-records assistant for rural India, focused on practical use and careful verification.","content_text":"What It Is\n\nRural land records can be difficult to find and interpret across documents and languages. BhumiSahayak explores an assistant that retrieves a record, explains it, and identifies what needs human verification.\n\nrecord question\n\nretrieved source\n\nlanguage/context check\n\nhuman verification\n\nrefusal when the source is weak\n\nLimits\n\nThis is a project note, not a land-record lookup service or an official determination. An explanation must stay tied to the retrieved record; unclear or conflicting records need verification by a person."},{"id":"https://ishudgarg.com/blog/poems/i-built-myself-in-layers","url":"https://ishudgarg.com/blog/poems/i-built-myself-in-layers","title":"I built myself in layers","summary":"Original poem by Ishu D. Garg, in English.","content_text":"I built myself in layers,\nslowly,\nlike a wall learning its own weight.\n\nI polished the outside,\nnot to mislead,\nonly to endure being noticed.\n\nWhen someone comes close,\nI’m already a step back.\nI can almost feel their gaze\ncatching on the uneven places,\non what’s still setting,\non what I haven’t learned to call mine.\n\nBefore they choose,\nI choose for them.\nI make distance,\nbecause it hurts less\nwhen I can name it as my doing.\n\nLater, alone,\nthat distance turns around.\nIt hones itself.\nIt becomes my voice\nexplaining why leaving was right.\n\nMaybe that’s why I love animals.\nThey don’t measure.\nThey don’t linger at the seams.\nThey simply stay.\n\nWith them,\nI’m not a work in progress.\nI’m not a verdict.\nI’m here,\nand it’s enough."},{"id":"https://ishudgarg.com/blog/poems/forms-change-not-the-soul","url":"https://ishudgarg.com/blog/poems/forms-change-not-the-soul","title":"Forms change, not the soul","summary":"Original poem by Ishu D. Garg, in English.","content_text":"People can laugh,\nI only smile.\n\nThey can talk,\nI only think.\n\nThey can act,\nI only plan.\n\nThey can dance,\nI only imagine.\n\nThey can breathe,\nI only try!\n\nThose perfect 3 words line, the first line with a comma, the next one with a dot. And a dash of surprise with the exclamation. Each line having the same format. Each line grammatically and syntactically similar, but each line giving a glimpse of a different emotion.  Its also magical to express within constraints, within rules and regulations, within tight word limits, under strict sentence structure. Isn't this very similar to how we live? And at the top is the title, summarizing everything that I want to say. But you won't get the meaning until you read the poem. You have to revisit it, just like life. Isn't that beautiful. You don't get the meaning of the word Life until you read it again. But not as an author but a reader. Only then you find out, the word life = most intricately convoluted beauty unfolding its pages."},{"id":"https://ishudgarg.com/blog/poems/one-day","url":"https://ishudgarg.com/blog/poems/one-day","title":"One day","summary":"Original poem by Ishu D. Garg, in English.","content_text":"One day\nI will run out of stories.\n\nI fear that day sometimes.\n\nFor now,\nthere is always one more thing—\na memory,\na thought,\nsomething stupid\nI suddenly want to tell you.\n\nAnd the more I tell you,\nthe less afraid I feel.\n\nStill,\nthere is so much\nyou haven’t seen.\n\nNot because I hide it.\n\nThere is only so much of a person\nthat fits inside\nchats and calls.\n\nYou haven’t seen\nmy silences,\nmy restlessness,\nthe way I want to touch life\nbefore it passes.\n\nOr the more primal parts of me—\n\ndesire,\ncuriosity,\nthe things I want to feel\nrather than explain.\n\nParts I don’t want to tame\njust to be easier to love.\n\nAnd I wonder—\n\nwill you want to meet them?\n\nWill you have parts like that too,\nstill waiting\nfor you to discover them?\n\nYou know yourself,\nbut maybe only partly.\n\nSo do I.\n\nSome things\nwe only learn\nby living them.\n\nAnd that scares me.\n\nWhat if I want to go\nwhere you don’t?\n\nWhat if the life\nthat makes me feel alive\nis not the life you want?\n\nWhat if we change?\n\nThere are too many maybes.\n\nBut there is one thing\nI don’t want to be a maybe.\n\nThe connection.\n\nIf love ever finds us,\nI want it to be deeper\nthan wanting each other.\nDeeper than primal desires\n\nI want to feel known & seen\nwithout feeling owned.\n\nFree,\nbut close.\n\nChanging,\nbut not becoming strangers.\n\nSomething almost spiritual—\n\ntwo people\nseeing each other clearly,\nand still wanting\nto come closer.\n\nI don’t know\nwhat we will become.\n\nI only know\nI like this flow—\n\nhow one thought becomes another,\nhow hours disappear,\nhow I don’t want\nto stop talking to you.\n\nMaybe it will fade.\n\nI hope it doesn’t.\n\nAnd if one day\nmy old stories end,\n\nI hope we look at\nall the life still ahead of us\n\nand think—\n\ncome on,\n\nlet’s make some more."},{"id":"https://ishudgarg.com/blog/poems/do-raahgeer-the","url":"https://ishudgarg.com/blog/poems/do-raahgeer-the","title":"दो राहगीर थे","summary":"Original poem by Ishu D. Garg, in Hindi.","content_text":"दो राहगीर थे, चलते रहे उम्र भर,\nइश्क़ की तलाश में, हर मोड़ पर।\nसमझा देर से कि मोहब्बत भी अधूरी है,\nजब तक खुद से मुलाक़ात ज़रूरी है।\nवो सोचते रहे कोई आएगा पूरा करने,\nमगर खुद की कमी को कौन भरने वाला था?\nइश्क़ से पहले खुद से प्यार करना था,\nये राज़ वक़्त ने देर से बताया था।"}]}