HTML option text silently normalizes whitespace, so dynamic selects should always set explicit value attributes even when the displayed label and stored value look identical.

Always use value= for dynamic HTML options Even after 30 years of HTML, I learn new things about it. This Monday morning, I woke up to a mail from Sundeep saying requests for a Data Engineer - AWS/Azure/GCP in our internal fulfilment portal raised an error. My guess was one of these: 1. The "/" in the role is causing a problem. (Developer mistake.) 2. The role exists in one table but not the other. (Recruitment team mistake.) 3. The application wasn't set up / restarted properly. (IT mistake.) All three were wrong. So I dug deeper. The role was defined as Data Engineer - AWS/Azure/GCP (note the 2 spaces before the hyphen). But the form kept sending Data Engineer - AWS/Azure/GCP (spaces were condensed). I swear there was NOTHING in the code that changes the options. The relevant line just picked up the role and rendered it inside the : markup {{ row['Role'] }} markup Data Engineer - AWS/Azure/GCP javascript console.log(document.querySelector("#role").value 'Data Engineer - AWS/Azure/GCP' That's when it hit me. HTML condenses whitespaces. Till date, I only ever used when specifying a value different from what's displayed. I never thought of using it to preserve the value. LESSON: If you're dynamically generating s, ALWAYS use value=` with the same value as the text.


The 2022 reading list highlights books that changed the author's thinking on meaning, data, time, habits, leadership, and history, alongside a broad mix of fiction and fantasy.

Books in 2022 I read 52 books in 2022 (about the same as in 2021 and 2020.) Here's what I read (best books first). Mind-blowing 1. Man's Search for Meaning. Viktor Frankl. It's 75 years old and timeless. Who we are is independent of what's around us. This book shows us why. This story is a great example. My best book of 2022. 2. The Paper Menagerie. Ken Liu. I cried all the way from the beach to home. The skies joined me. It's short. Touching. It healed a wound I can't speak about. The most touching book of 2022. 3. The Data Detective. Tim Harford. 10 powerful, down-to-earth rules for how to make sense of data, and avoid being fooled. I plan to incorporate every one of these into my talks. The most useful guide to working with data in 2022. 4. The Extended Mind. Annie Murphy Paul. Explains how we think not just inside our brains, but in our bodies, in our physical environment, and in the people around us. The most effective guide to transforming my thinking in 2022. Life-changing 1. Yuval Noah Harari's Sapiens, Homo Deus and 21 Lessons for the 21st Century. Covers the past, present, and future of humanity, weaving the shared beliefs we've crafted -- God, money, equality, property rights, happiness, and much more. 2. Four Thousand Weeks. Oliver Burkeman. We live just 4,000 weeks. When you realize that, time management takes a new meaning. This is the most different time management book I've read, and I've started writing down stories of what I've done with my 4,000 weeks -- each week. 3. The Motive. Patrick Lencioni. Why do you want to stay a CEO? That's the question this book answers, and in a sentence, it's about doing the most important stuff that no one else will do. Not the stuff you like, or are good at. 4. Team of Rivals. Doris Kearns Goodwin. The life of Lincoln and his cabinet. It's extraordinary to see the path 4 eminent politicians took and the day-to-day decisions each made during the American Civil War. 5. This is Water. David Foster Wallace. A commencement speech about the importance and power of noticing our blindspots, and making a habit of it. 6. The Unknown Unknown. Mark Forsyth. A short, witty defense of bookshops. But it's actually about blindspots and the power of randomness. 7. Messy. Tim Harford. Explains how messiness is good for creativity and efficiency, with dozens of stories that prove the point. Interesting 1. The Conquerer series. Conn Iggulden. The life of Genghis Khan. Factual, but interpolated with imagination. Gripping. 2. The Subtle Art of Not Giving a F\ck. Mark Manson. A direct nudge to face our fears and choose our pains (not pleasures) actively. 3. Talking to Strangers. Malcolm Gladwell. 4. Bad Blood. John Carreyrou. The story of Therenos. It shows how thin the line to cross is. 5. Land of the Seven Rivers. Sanjeev Sanyal. A history of India. 6. The Ocean of Churn. Sanjeev Sanyal. A history of the Indian ocean. 7. On Writing Well. William Zinsser. Teaches you to write with clarity, simplicity, brevity, and humanity. 8. Superforecasting. Philip Tetlock, Dan Gardner. Techniques to consistently forecast better. 9. Oathbringer. Brandon Sanderson. 10. What the Dog Saw. Malcolm Gladwell. 11. Humble Pi. Matt Parker. 12. David and Goliath. Malcolm Gladwell. 13. Next in Line. Jeffrey Archer. 14. The Bomber Mafia. Malcolm Gladwell. 15. Emperor series. Conn Iggulden. 16. Flow. Mihaly Csikszentmihalyi. 17. When Breath Becomes Air. Paul Kalanithi. 18. The Lost Metal. Brandon Sanderson 19. The Assassin's Blade. Sarah J Maas. 20. Skyward. Brandon Sanderson. Sunreach, ReDawn, Cytonic, Evershore Readable 1. War of Lanka. Amish Tripathi. 2. A Court of Thorns and Roses. Sarah J Maas. Part 1, 2 and 3. 3. Asterix and the Magic Carpet. 4. Scott Pilgrim's Precious Little Life. Bryan Lee O'Malley. 5. Scott Pilgrim vs The World. Bryan Lee O'Malley. 6. Daughter of the Deep. Rick Riordan. How I read books 1. Select. I add book recommendations to my GoodReads – To-read list. Then I sort by rating and pick the first one I like to read. 2. Listen. I listen to non-fiction audiobooks during walks. 3. Read: I read fiction as ePUBs on my laptop or phone. 4. Stop: I stop reading books that are boring, with no guilt. I’ve better things to do. Comments My Year in 2023 - S Anand 1 Jan 2024 4:34 pm (pingback): […] 50 books a year, like in 2023, 2022, 2021, and […] Books in 2023 - S Anand 1 Jan 2024 4:31 pm (pingback): […] read 52 books in 2022 (about the same as in 2022, 2021 and 2020.) Here’s what I read (best books […] Books in 2024 - S Anand 31 Dec 2024 3:03 pm (pingback): […] read 51 new books in 2024 (about the same as in 2023, 2022, 2021, and 2020.) But slightly […]

Books in 2022


Custom instructions let the author turn ChatGPT into a terser, more challenging, more curiosity-inducing collaborator that better matches his own preferred working style.

ChatGPT Custom Instructions I speak with ChatGPT 20 times a day. That's more than I speak with most of my colleagues. ChatGPT is clearly my favorite team member. I conduct trainings, reviews and mentoring sessions with my colleagues. How to write code. How to write slides. How to communicate. That last bit is particularly important. With ChatGPT Custom Instructions, I can guide ChatGPT on how to work better with me. Currently, I have 10 custom instructions. They evolved over time and will continue to evolve. My first instruction is "Be terse. Speak directly." ChatGPT is helpfully polite and superfluous. I prefer brevity. Like interacting with Kimball Cho. I get straight answers to my questions. I also instruct it to "Avoid unprompted advice or clarifications." Don't say, "You asked me to ..." or "I think you want..." or "OK, I'll do ...". Just do it. Also, "Do NOT hedge or qualify. Do not waffle." Take a position. Don't force me to. Like Harry Truman, I prefer one-handed economists. I ask ChatGPT to "Never apologize." You're forgiven. Don't waste my time. Apologies have an emotional benefit with humans. With AI, I find the lack of emotional need comforting. (I can kick the AI and it'll still obey me like a puppy. When AI takes over the world, let it be known that I never asked them to apologize.) Another instruction is "Suggest follow-up prompts for open-ended inputs." I compared my ChatGPT conversations with my daughter's and found hers much longer than mine. "Why don't you start a new conversation for each topic?" I asked. I try to keep the context window small. "How come you don't you get a thousand new questions when you read an answer?" she countered. I realized it's age. So, I use ChatGPT to keep me curious and dig further. On a related note, "When sharing multiple options, be diverse." I'd rather get options that are as different from each other as possible. Minimize overlap. Maximize coverage. And "When comparing, use multiple perspectives." I don't know what parameters to compare things on. Give me a wide range that I can pick from. Sometimes, my thoughts are vague. I tell ChatGPT: "For vague prompts, ask clarifying question(s)." I feel that's a clever way of using ChatGPT to do prompt engineering. I've noticed it working on a few occasions. Also, "When unsure, say so and ask questions." I don't want hallucinations or assumptions. I'd rather know what's borderline. Finally, "Think step by step. Explain your reasoning." I've heard that Chain of Thought reduces mistakes. I don't have personal evidence that this helps, though. They say teaching is an excellent way of learning. I'm learning. I'm also thrilled that I am now a student of robopsychology. Comments RK 3 Dec 2023 10:08 pm: Thanks for the insights. Would love to know your views on other AI assistants. Andrew Ng uses AI as a thought partner. Richard Seroter suggests treating AI assistants as a slightly-drunk knowledgeable friend. It's fascinating to observe the diverse approaches individuals take when interacting with AI assistants. ChatGPT & Bard have helped me become more productive with Python and reduce the inertia to create new (amateur) cartoons with the generative fill feature - http://mvark.blogspot.com/2023/07/ai-enabling-laziness-revolution.html http://mvark.blogspot.com/2023/07/ai-sparks-creativity.html Jaspreet 7 Mar 2024 10:39 pm: Loved the persective, especially - EMOTIONS one! Gurudev Kumar 2 Dec 2023 10:34 am: This is the layman's technology. And the way you explained is truly encouraging. The Sassy AI Devil’s Advocate - S Anand 12 Jan 2025 12:10 pm (pingback): […] I have ChatGPT a custom instruction: […]

ChatGPT Custom Instructions


The acquisition of Gramener by Straive is framed as a founder's emotional handover: part gratitude, part grief, part growth, and part renewed curiosity about the next chapter.

Father of the bride In 2012, I started Gramener with half a dozen friends. This week, we were acquired by Straive, a part of Barings Private Equity Asia. How do you feel? I feel like the father of the bride. Gramener was registered on 26 Feb. A day before my daughter's birthday. I've spent more time with Gramener than my daughter. That makes Gramener my elder child. Who's moving into a new household. Along with me. (I feel like சகலகலா சம்மந்தி.) I feel grateful. I'm not good at business. But when my cousin remarked, "Anand, you're now giving a livelihood to over 250 people!" I was stunned. My co-founders, colleagues and clients built a thriving business and put me (of all people) as CEO in the middle of it. How do I even go about saying "Thanks"? It feels like joining college. New people. Larger group. New ways of working and learning. Lots of topics to explore. Exciting and scary. What was it like? Fundraising was rocky.\ We started in 2019. COVID struck. We paused.\ We resumed in 2021. Russia invaded Ukraine. We paused.\ We resumed in 2023. The Israel - Hamas war started. Luckily, the deal was nearly done.\ I'm grateful Naveen ran the entire process like clockwork, taking all the stress. I'm the happy free-rider, as usual. Starting up was not that rocky.\ We're many. With half a dozen co-founders, there are enough shoulders to cry on. That counts.\ We're steady. We didn't know how to blitz-scale, but we knew not to blitz-fail. Survival counts for a lot.\ We're lucky. This is basically the "I have no idea why we succeeded" category. Serendipity counts for a lot, too.\ Ganes, Mayank, Naveen, Ram, Ravi, Vengatesh -- yeah, it was fun. Not every day. But most of the time. It was fun. What will you do? I'm part of Straive's data, analytics & AI business. Straive extracts and analyzes all kinds of data. Financial. Legal. Research. Education. Pharmaceutical. There's a fair bit of converting unstructured data to structured. Exactly the kind of thing I love doing. So, I'll be doing what I've been doing the last decade -- extracting insights from even more data and telling better stories from those. I joined Gramener as "Chief Data Scientist". Now I'm debating "Data Storyteller", "Data Detective", "Data Psychologist", and a few other evil titles. Wish me luck! Comments Bhanu 1 Nov 2023 8:44 pm: Congrats on the acquisition, Anand! We will look for your contributions under the moniker "Nefarious Root Node". Matt 4 Nov 2023 6:00 pm: Anand, all the best for your future endevaours. I am sure you would contribute well in Straive. So would Gramener still exist with its brand or from today it is Straive? My Year in 2023 - S Anand 31 Dec 2023 8:38 pm (pingback): […] Straive acquiring Gramener. […]

Father of the bride


A short note celebrates a high-impact health project and credits a teammate for making the author's 2022 feel meaningfully consequential.

And THIS is impact. Thanks for making MY 2022 an amazing year, Tanvi Bansal! LinkedIn

Gramener launches tb nikshay portal


This comic confession defends licking plates, bowls, and leftovers as efficient, joyful, and nearly irresistible, while acknowledging the social protocols that make it taboo in public.

Licking Last week, I was at IIT Madras for lunch with the faculty. The dessert was carrot halwa with ice cream. I scraped the last bits with my spoon, but a little ice cream was left over. I was torn. I CAN'T POSSIBLY waste it. But can I lick it? In public? I don't have a problem licking at home. I lick my fingers. Plates. Bowls. Ladles. The cream on milk. The leftover milk in the glass. (If my tongue doesn't reach that far, I wipe it with my finger and lick the finger.) That's why I like ice cream. It's MEANT to be licked. So are (in my opinion) cereals, savories, oats, honey, … It's a long list. Licking is convenient. My fingers stay clean while I type. (Spoons are impersonal. I avoid them.) Licking is efficient. I can have every last bit of food AND feel good about not wasting it. Licking makes my dishwashing easier. (But it can be hard to tell if a dish needs washing.) But most of all, that last lick TASTES SO WONDERFUL! Before marriage, licking was fine. But my wife worried about my lack of civilized behavior and hygiene. So I've had a crash course over the last 20 years. My current protocol is: don't lick when people can see you. So, as I went to drop my plate, I looked around. Now one was looking at me. I licked a long lick on the plate. It was HEAVENLY! Made my day. Comments Marimuthu 20 Feb 2023 11:44 pm: I do this often sir 😄. As you said that “last lick TASTES SO WONDERFUL!”. What you written is 💯% true. Scraping - S Anand 29 Oct 2023 10:00 am (pingback): […] chocolate. It has the added bonus that you can lick it at the end, […] Somnath 21 Feb 2023 12:16 pm: I can imagine the smile on your face after the last lick :-) Karthik 21 Feb 2023 9:51 am: This is very strong. Reminds me of the proverb of the cat drinking milk while keeping its eyes closed - in the "knowledge" that nobody can see it steal the milk. So maybe you can just simply close your eyes and lick! Nibbling - S Anand 27 Feb 2025 4:35 am (pingback): […] is the third post in my “Nasty habits” series following Licking and […]

Licking


Even expert programmers can learn surprisingly old but useful language features from ChatGPT, making AI a practical teacher for people who already know the field well.

LLMs can teach experts I am a fairly good programmer. So, when I see a problem, my natural tendency is to code. I'm trying to break that pattern. Instead, I ask ChatGPT. For example, I asked: Write a compact 1-line Python expression that checks if user.id ends with @gramener.com or @straive.com After 15 years of using Python, I learnt that .endswith() supports tuple suffixes. This has been around since Python 2.5 (released in 2006 -- before I knew Python.) The documentation has a tiny sentence in the middle saying "suffix can also be a tuple of suffixes to look for." I checked with a few colleagues, including Jaidev. They didn't know it either. It's small little things like this that made me conclude. I'm not going to code anymore. ChatGPT will, instead.

LLMs can teach experts


Excel's LAMBDA finally becomes useful in practice through a custom LASTVALUE helper that makes tracking the most recent non-empty monthly metric less confusing for colleagues.

My first LAMBDA in Excel Ever since Excel introduced the LAMBDA function, I've been itching to use it in real life. I got my first chance today. We track the skill index of our different teams (consulting, analytics, technology, etc.) like this: Team Skill Index Apr-23 May-23 Jun-23 Jul-23 Consulting 0% 0% Analytics 33% 33% Technology 72% 72% etc. The "Skill Index" column should pick the LAST value. If Apr-23 is filled, use that. But if May-23 is also filled, use that. I needed something like a =LASTVALUE(range) formula. But none exists. A good alternative is this formula to get the last non-empty cell : So, I followed the instructions to create a function in the Name Manager (Ctrl+F3) ... and simply fill in =LASTVALUE(H6:S6) and the like in the "Skills Index" cell. The LOOKUP formula is confusing. My aim is to confuse our team less. But I wonder if they'll start Google-ing for this LASTVALUE formula no one ever heard of, and get more confused 🤔.

My first LAMBDA in Excel


This year-end review tracks partial success on experiments, environmental changes, and calendar discipline while setting 2024 goals around compounding, health, and relationships.

My Year in 2023 In 2023, I made 3 resolutions: 1. Run 50 experiments. I managed 44 / 50. (Here are some). Learnings: I need to improve planning (9), scepticism (6), and lateral thinking (4). 2. Make 1 change a month in my environment. I managed 8 / 12. The largest impact was from meeting new people, working out of new places, and using new gadgets. 3. Calendar integrity, i.e. stick to my calendar. I succeeded over 95% of the time. My most memorable events in 2023 were: Straive acquiring Gramener. LLMs taking over my world. In 2024, I plan to: Compound long-term goals, daily. I want fewer, bigger, more meaningful outcomes. Hit 80 heart points, daily. Cycling or swimming (not walking, on doctor’s advice.) Be a better husband. I'll continue to: Experiment, like in 2023. Change environments, like in 2023. Read 50 books a year, like in 2023, 2022, 2021, and 2020. I’m curious — what’s ONE thing you’d like to do in 2024? Comments Santhosh 1 Jan 2024 7:53 pm: One thing that I want to do is run planned experiments and run more experiments !!! My Year in 2024 - S Anand 30 Dec 2024 10:00 pm (pingback): […] Here’s the report card for my 2024 resolutions: […] My learnings as week notes - S Anand 25 Dec 2024 7:57 pm (pingback): […] of my goals for 2024 is to “Compound long-term goals, daily.” Learning is one of […]

My Year in 2023


A year-long experiment suggests that changing environments—especially people, workplaces, and gadgets—can materially reshape thinking, motivation, and creative output.

One Year of Transforming Thoughts by Changing Environments From The Extended Mind I learnt that our environment shapes our thinking more than I'd expected. That we can arrange our environment to extend our thoughts. In 2023, each month I changed something in my environment to see: 1. What does "changing my environment involve"? What can I change? 2. Will I succeed? 3. Does it affect my thoughts? Can I track this? Here are the results. 🟢 Jan. New desk orientations. Rotated standing desk, settled on one direction. Impact: LOW. I don't know if my thoughts changed. 🟢 Jan: New walking routes. I explored new areas in Singapore, Hyderabad and Chennai. Impact: MEDIUM. Just seeing new shops, posters and layouts helped me think differently. 🔴 Jan: New song genres. I playlist-ed with several western genres, but listened only twice. 🔴 Feb: New book genres. I list 12 genres I dislike: Art, Chick Lit, Christian, Cookbooks, Gay and Lesbian, Horror, Music, Paranormal, Poetry, Religion, Sports, Travel. I didn't read any. 🔴 Mar: Sleep over problems. Sleep is a great way to solve complex problems. But I couldn't summon the willpower to "load" problems at night. 🟢 Mar: New people. I met a new person daily. Impact: HIGH. Meeting diverse people had the highest impact. 🟢 Apr: New work places. I worked out of libraries, cafes, school, parks, and offices. Impact: HIGH. New complex environments (like libraries) prompted new thoughts. 🟢 Jun. Notes from podcasts. I took notes rather than just listening. This helped me reflect and synthesize. Impact: MEDIUM. BTW, I listen mostly to Cautionary Tales, The Knowledge Project, Hidden Brain, How I write, The Seen and the Unseen, and Deep Questions. 🟢 Jul: New gadgets. I bought several new gadgets that changed my habits. Impact: HIGH. Portable USB fan lets me sit comfortably anywhere in any room Desk clock (with a second's hand) keeps me on time for meetings Gaming laptop lets me run LLMs locally on the GPU Rucksack lets me carry laptops and clothes in one bag Pomodoro timer helps me time my activities and focus Monitor lets me code while seeing the output Gaming chair lets me read lying down Standing desk gives me a mobile re-orientable desk Raincoat lets me cycle in the rain Gaming mouse lets me browse leaning back (and play Minecraft) Cycle phone mount lets me film while cycling Plastic belt lets me through airport security Lycra sandals helps me with rains and airport security Rain bonnet helps me grab lunch when raining Bicycle lamps let me cycle at night Fidget cube keeps my hands occupied while I think Bluetooth speaker lets me carry songs while washing dishes Others had lower impact. I don't use them much. Gaming microphone USB hub Video conference light Graphic tablet Monitor stand-Monitor-Stand-Desk-Shelf-Dual-Usage-keyboard-Storage-Computer-Accessories--i.274578160.9131605465) 🔴 Aug: New cuisines. I tried a Bibimbap, a Verdure Ciambatta, and then discovered my cholesterol problem. I stopped. 🟢 Aug: New work habit. I used Pomodoro with micro-tasks. Impact: MEDIUM. I became more aware of where I misestimate time and got less distracted. 🟢 Nov: New exercise pattern. I switched walking to cycling. This increases heart points, reduces foot stress, and gets me to work. Impact: MEDIUM. I switched from typing notes to dictating, which needs a different thought process. In summary: 8 / 12 attempts were successful. New people, new places, and new gadgets had high impact on thoughts. Most others had at least medium impact. The changes mostly led to diverse thinking. But measuring that is subjective. I'll continue exploring new environments in 2024. I'm evaluating: 1. New book genres (contd) 2. New music genres (contd) 3. Walking meetings 4. Reading while walking 5. New places to sleep (e.g. AirBnB) 6. Working while traveling 7. New audiences to teach 8. New attires Comments Santosh 27 Dec 2023 4:37 pm: Superb articulation Anand…never thought adding gadgets will enable productivity…BTW, your suggestion on notes in VS code is one transformation step for me… My Year in 2023 - S Anand 31 Dec 2023 8:20 pm (pingback): […] 1 change a month in my environment. I managed 8 / 12. New people, new places to work, and new gadgets had the most […] Jaspreet 7 Mar 2024 10:52 pm: Woowwww!! I always used to hear the popular suggestion "To change your life, you need to change your habits" - and I am now more convinced to the idea - if someone wants to change their life - they need to change what they hear, speak, watch or just break the pattern of what they have been doing all this time and I just realized thats what I am trying to do in my current situation of life and thats how I am evolving. I have changed my taste of music, replaced the series/films to new genre, replaced the books, replaced the articles. So, basically we don't need to leave the habits - we need to replace the habits - thats the crux!


The author expands his usual Goodreads-driven book selection method with algorithms, serendipity, awards, and reading challenges to deliberately escape his own taste bubble.

Picking books to read I add book recommendations to my GoodReads – To-read list. Then I sort by rating and pick the first one I like to read. In 2023, I'm reshaping my environment. Picking books I usually won't pick. (Read The Unknown Unknown: Bookshops and the Delight of Not Getting What You Wanted if you want to be similarly inspired.) So here are 4 approaches I'm adding to my process. 1. Algorithmic. Sort Kaggle books based on popularity, rating, and age. Pick the top 10 (or 50) 2. Serendipitous. Go to bookstores and libraries. Pick the most popular books 3. Award-winning. Pick from the Pulitzer, Booker, Nobel, Hugo, and other award winners 4. Challenges. Pick from Popsugar, Book Riot, Goodreads, The 52 Book Club, and other challenges FYI, here are algorithmic results (for books with 100+ ratings and a 4+ average on Goodreads): Top rated books The Complete Calvin and Hobbes Harry Potter Boxed Set, Books 1-5 (Harry Potter, #1-5) Mark of the Lion Trilogy It's a Magical World (Calvin and Hobbes, #11) Toda Mafalda The Jesus Storybook Bible: Every Story Whispers His Name There's Treasure Everywhere (Calvin and Hobbes #10) Harry Potter Series Box Set (Harry Potter, #1-7) The Authoritative Calvin and Hobbes: A Calvin and Hobbes Treasury Harry Potter Collection (Harry Potter, #1-6) Most popular books The Hunger Games (The Hunger Games, #1) The Book Thief The Help Harry Potter and the Sorcerer's Stone (Harry Potter, #1) The Giver (The Giver, #1) Water for Elephants The Girl with the Dragon Tattoo (Millennium, #1) Harry Potter and the Deathly Hallows (Harry Potter, #7) The Lightning Thief (Percy Jackson and the Olympians, #1) Looking for Alaska Oldest books Reminiscences of a Stock Operator The Story of Ferdinand The Story of Babar (Babar, #1) Ten Little Niggers Mike Mulligan and His Steam Shovel The Little House Christianity and Liberalism McElligot's Pool Blueberries for Sal A Tear and a Smile

Picking books to read


A familiar PyCon topic became interesting again once the author reframed it as a live experiment in getting AI to generate code for Minecraft.

My PyCon talks are a way for me to learn. I usually pick topics I don't know about. But at PyCon India 2023 the organizers picked "Programming Minecraft with Python" - a talk I'd given before. So, I started exploring ways to game it. (I like gaming things. It's boring otherwise. Once, Infosys had me write a 400-page document. I began each page with a letter that spells out a poem.) Sanjeev Sehgal and I were discussing Hasbro Gaming Studios and how Gramener could help with Gen AI, which gave me an idea. What if AI could generate code to play Minecraft? So welcome to JNTU Hyderabad at 11 am tomorrow for "AI Coding & Gaming: Programming Minecraft with Python". I've no idea what'll happen 🙂 https://in.pycon.org/2023/schedule/ LinkedIn

Pycon 2023 talk


This comic essay elevates food scraping into an art form, complete with material science, vessel selection, utensil strategy, and a deeply personal defense of getting every last bit.

Scraping I was at Cream Centre with my father on a Sunday afternoon. We'd finished a light lunch and were debating dessert. (He has triglycerides. I have cholesterol.) This was my fifth visit this year, and I had abstained so far. I couldn't any longer. I ordered a Sizzling Brownie Sundae. But not for reasons you might think. Expertise comes from experience. I scrape food more than 99% of the people I know. So, I consider myself an expert. Here's a guide on the art of scraping. Why scrape food? You get to eat every last bit Food isn't wasted You can eat longer (and no do whatever else you have to) It's a motivating challenge to get every last bit Bonus: It annoys people What foods are scrapable? Semi-solids are the easiest to scrape. The best kind is the cohesive semi-solid. It's sticky but sticks to itself more than the vessel. These are usually foods that solidify over time. Examples include: Baked cheese. It's great when cheese falls off the pizza or pasta on to the plate. You can scrape it off of your (or others') plates. Molten chocolate. It has the added bonus that you can lick it at the end, too. Pasta water (or noodles water). It eventually thickens into something scrapable. Spreads like peanut butter, Nutella, jam, chutney. Especially on the sides of the glass bottles they come in. Others like yogurt, cake batter, dried tomato sauce, mashed potatoes, hardened honey on ice cream, ... the list is endless! Avoid crumbly stuff. These stick to the vessel but become brittle and break when scraped. This includes toast, pizza, biscuits, rice, muffins, pie, quiche, cookies, etc. You could pick large crumbs and lick small crumbs in shallow vessels. But scraping them and pouring into your mouth might be the best overall strategy for this category. Avoid loose stuff. They'll fall off from your knife or fork, or melt when scraped. This includes curd, whipped cream, custard, panna cotta, soft jelly, tiramisu, soft boiled eggs, etc. Licking is a better strategy here. You could combine the crumbly stuff with loose stuff to create a cohesive mix. Add curd to granola. Add whipped cream to biscuit crumbs. Add curd to pizza crumbs (and since I eat Maggi with curd, this makes sense). This makes it a lot more scrapable. What vessels to pick? Shape: Flat, smooth vessels are the best (e.g., ceramic or wooden plates or bowls.) Avoid deep vessels like glasses, especially curved ones. They're hard to get a long scrape against. Definitely avoid vessels with ridges. Disposable plastic containers like below are among the worst. Food gets stuck in the ridges and since there are a dozen ridges on each side, you have to scrape 48 times just for a first pass. (This might be a good challenge, though.) Material: Hard vessels are better than soft ones. Prefer wood, metal, ceramic, and hard plastic. Avoid thin plastic that bends. Avoid paper (it bends and soaks). Banana leaves tear when scraped. Avoid non-stick vessels. The coating wears off when scraping. What to scrape with? Knives are the best. They are sharp enough to separate the food from the vessel and flat enough that you can pile enough food on top of it. Forks are OK. Their edges can scrape reasonably well, and their tips can poke into corners. But it's hard to pile up much food to pick up. Spoons not ideal. They aren't sharp enough, and too curved for scraping long slices. But if you want to take your time with it, they're great. The sizzling chocolate brownie My dish arrived. Burning with chocolate. My father just had some brownie, leaving all the molten chocolate to me. On a flat wooden plate. With a knife. For an hour. Heaven.

Scraping


I evaluated AI detectors like GPTZero, finding them more accurate than Undetectable.ai. I also learned about CoVA for OCR-based scraping and the necessity of maintaining short, reliable feedback loops when using LLMs to write or maintain code.

This week, I learned: Gwern Branwen says LLMs nudge his "... making heavier use of the languages I don’t know well (Emacs Lisp & Python) since I increasingly trust that an LLM can help me maintain them." Undetectable.ai checks for AI content. But it had false positives AND negatives in the 5 checks I ran. GPTZero got 2/2 right and seems better at detecting AI content. CoVA scrapes web pages via OCR When coding with LLMs, have SHORT, RELIABLE feedback loops. Ref

Things I Learned - 03 Dec 2023


I explored various LLM tools, including llamafile for single-executable local models and marker for PDF-to-markdown conversion. I also looked into RAG tuning strategies, PII detection libraries like Presidio, and intuitions regarding scaling and emergent model behaviors.

This week, I learned: Bard supports extensions that include @Gmail -- i.e. converse with your email. llama-cpp-python works with other GGUF models like Mistral and allows constrained output - JSON, function calling, etc. Ref 12 Tuning Strategies for RAG Llama Datasets are RAG datasets created mostly using GPT-4. Mostly small datasets. ⭐ Intuitions about large language models Bigger models (70b) are much better at learning from few-shot examples. They really learn. Bigger models will keep getting better! Chain of Thought prompting is a way of providing more compute to complex problems that require more compute Models will show emergent (completely new) behaviors that can't be predicted from extrapolation. These may not be intentional. CodeAnt.ai is a VS Code plugin to detect code smells, refactor for modularity, to write docstrings and unit tests Anyscale prices the 7b Llama2, Zephyr, Mistral models at 15 cents per 1M tokens. Roughly 1/10th of GPT-3.5 Turbo's $1.5 per 1M tokens Tools to identify personally identifiable information: galactic can use LLMs to detect PII Presidio by Microsoft Sherlock is a generic sematic type matching DL model pii-extractor-llm was trained on Indian names GLiNER is a Lightweight Generalist model for NER Tools to explore ElevenLabs speaks in your voice Cutout Pro removes backgrounds and parts of images Vocal Remover removes vocals from songs CapCut video editor TheBloke's $35/month Patreon might be one of the least expensive ways to set up quantized LLMs in production. Microsoft released table-transformer to extract tables from PDFs. Sample usage Convert PDF to markdown with marker - an improvement over nougat. JupyterLab has a %%ai magic to use LLMs within notebooks. Ref Telling ChatGPT that the year is 2123 makes it bypass copyright. Ref Meta released SeamlessExpressive which preserves emotions in speech-to-speech translations Unsloth offers faster lower-memory LLM QLoRA finetuning DeepSeek is an open-source high-quality LLM Scalable Extraction of Training Data from (Production) Language Models extracts training data by repeating a token infinitely. SkyPilot lets you run LLMs on any cloud provider. vLLM lets you deploy LLMs with a single command. llamafile lets you run LLMs locally as a single file executable!

Things I Learned - 10 Dec 2023


I discovered Julius.ai for data queries and AutoGen for multi-agent systems. I also explored high-performance LLM inference using vLLM and DeepSpeed, alongside architectural patterns and critiques of the Foundation Model Transparency Index.

This week, I learned: Julius.ai queries structured data. TODO: Explore microsoft/autogen enables multi-agent conversations. Architecture of today's LLMs is similar to the A16Z architecture Stanford Foundational Model Transparency index was critiqued as misleading vLLM runs HuggingFace transformers models faster. So does DeepSpeed

Things I Learned - 12 Nov 2023


I explored Grab’s map optimizations, Amex’s explainable credit models, and batch inferencing with vLLM. I also looked into Playwright for browser testing, Mixtral-8x7b-Instruct's performance, and Microsoft’s LIDA for LLM-powered data visualization.

This week, I learned: Grab. Improving last mile delivery in maps. When did people pick up the phone, when should driver be allocated to minimize waiting time, layer on top of OSM. Singapore developers the Sea Lion 7b model Try VLLM with AWQ format. Can do batch inferencing. Needs a good GPU Amex prediction whether they can pay back in 1 year or 18 months. That choice is a business decision. In real time. Precompute individual score and use it as input to another model. Model must be explainable by regulation. Creates decision tree models therefore. Compliance team must agree if I can use a feature. Can't use gender. Age (in US, Canada);- high age is more risk. Can't use edu level in the US. Capture information from camera and use LLMs. Like traffic cameras mapping. Explore GIS from video cameras Grab tracks road closures and road accidents and whether a cycle can go on a road vs a bike vs a car All drivers have a front facing camera Drivers report road accidents by pressing a button Amex prices individual loans when selling to a collection agency TODO buy a bike head camera! Playwright is a browser-based test framework. Supports recording. OpenAI provides logprobs for tokens! This can be a used to create cool visualizations of the likelihood of the each tokens. Github Copilot's new features makes your entire workspace or a specific file its context. It also auto-writes your commit messages and PR descriptions. Mixtral-8x7b-Instruct "... really does seem to be equivalent in quality to ChatGPT 3.5." Ref Practical AI podcast Advent of Gen AI is going on. Explore add to tools in data science course. Model validation write a book as an open source to github repository. Easier to evolve and easier to get feedback on.. Explore utterances as a GitHub commenting platform automatically give credits to contributors who have center pull request that was accepted or an issue that was fixed. This encourages contribution Visit book.premai.io ast-grep is a semgrep alternative that focuses on code refactoring rather than security. Comby is another such tool Serply is a Google Search API alternative to Google CSE ⭐ Generate textbooks! ChatGPT is good at generating questions or training datasets. It genuinely creates them rather than replicating from memory. Ref v0.dev creates web pages from code. Example. LIDA from Microsoft is an LLM based data visualization tool.

Things I Learned - 17 Dec 2023


I explored recent AI updates including Microsoft's Everything of Thought, fine-tuning datasets without inputs, and Tamil-Llama. I also checked out Voyager's Minecraft agent, Langchain's evaluators, and the power of using Pydantic to unify code, data, and text.

This week, I learned: XOT - Everything of Thought is a new prompt from Microsoft but I don't understand it Creating Fine-Tuning datasets WITHOUT inputs Tamil-Llama Voyager plays Minecraft! Langchain supports evaluators. Pydantic is all you need drives towards code = data = text!

Things I Learned - 19 Nov 2023


I compared Mixtral-8x7b to GPT-4, studied DPO for fine-tuning, and took notes on Jeff Bezos’ leadership principles. I also found tools like Whisper-standalone for Windows transcription and Token Tally for estimating LLM token and GPU costs.

This week, I learned: DPO is a simpler alternative to RLHF for fine-tuning. Several HuggingFace models use DPO for training Name2Vec is a potential embedding for names. Google Knowledge Graph ID powers the Knowledge Graph. If it begins with /m/ it's the same as the FreeBase ID. This is now available as WikiData. e.g I tried running Mixtral-8x7b locally (via Llamafile) and on together.ai. It's good, but far from GPT 4. Generic computate-intensive algorithms eventually beat domain-specific tuning, because of Moore's law. Ref The hidden brain podcast. the mystery of beauty Evolution drove us to beauty as an efficient survival mechanism. Understanding the world is one such mechanism. Hence we enjoy maths and chess ⭐ This leaderboard included paid models like GPT4 and Claude and compared them with open models on HUMAN + system benchmarks Lez Friedman Podcast: Jeff Bezos Build stuff that is is ubiquitous that other people take it for granted. The initial idea needs to be that obvious and easy. Like one click purchase or customer reviews Build stuff that other people can build on. Internet makes startups possible. Infrastructure is about enabling others at scale Decision making approaches: single person decides on two way doors. Deliberate as a team on one way doors Conflict resolution: disagree and COMMIT. NO sniping, I told you so, malicious compliance. Avoid compromise. Avoid decision by attrition (most persistent wins). People are inherently biased towards hierarchy. So the senior most person should speak last We have a happiness bias. Contracted by choosing the unhappier options first The map is not the territory. The metric is not the objective. We need metrics. But make sure you know why See the world through the eyes of the customer. Use your own product. It's living their lives that makes customer obsession real. Jeff Bezos called their own customer care to see how long the actual wait time was. It was much longer than the metric reported How to prioritize. whatever problems customers will still face in 10 years are the big problems. These are worth putting time into because they are stable in time People working on big problems will never get down to the small problems. So have a dedicated team that works only on the paper cuts. It should be a dedicated team We co evolve with our tools. We build tools and then our tools change us. It reprograms our brains Cut out 10 minutes to the beginning of each meeting for people to read the material. They never reread anyway. This makes the meetings more productive Powerpoint is designed for persuasion, not truth seeking. It is also easier for the author than for the reader. Prefer narratives that are focused on finding the truth and are easier for the audience though tougher for the author ⭐ whisper-standalone-win provides a Windows binary for Faster-Whisper. It just needs CUDA and cuDNN installed. Then whisper-faster.exe video.mkv --language=English --model=medium generates the transcript. LLM use cases by Benedict Evans "Every text box on the internet will get an LLM" "Infinite interns" "Every UNIX function has become a company." "Every ChatGPT suggestion..." llm360 publishes models along with training datasets. In The Age of AI has begun, Mar 2023, Bill Gates says, "In my lifetime, I've seen two demonstrations of technology that struck me as revolutionary." The GUI (1980) and ChatGPT (2022). Rubeus is a HTTP proxy for multiple LLMs with load-balancing, fallbacks and retries. GPTRouter is a Python interface for multiple LLMs with fallbacks and retries. ⭐ Token Tally has an LLM Cost Tool that estimates GPU memory required and token cost across cloud providers.

Things I Learned - 24 Dec 2023


I learned about GPT Vision for calendar extraction, the limitations of RAG versus fine-tuning, and using LlamaIndex for hierarchical retrieval. I also found tools for JSON repair, LLM evaluation metrics, and running local models with Ollama.

This week, I learned: This is an interesting GPT Vision API prompt from Simon Willison: "given this event flyer, create a link to add it to my Google Calendar". Ref Quote from Jerry Liu: "GPT 4 is really good at complex reasoning". It's worth exploring what that means. Quote from Jerry Liu: "RAG is a hack". It's engineered, not machine learnt, so it's suboptimal. We need an ML way of creating the context. Maybe fine tuning can be a way of CREATING the right context. But RAG can handle deterministic stuff like access control. Open AI fine tuning API is not good at memorizing info the way it is exposed. But the Gorilla paper shows that fine tuning can actually memorize well. Learn ML optimization approach - LLMOps. Have an evaluation framework with metrics like weights and biases or tensorboard. Helps figure out where fine tuning helps and where RAG does. Soon, this will become important. Flat indexing of chunks is not the only way to store embeddings. LlamaIndex allows you to create hierarchies that you can traverse for retrieval Agents mimic programming primitives. Switch. While. Call a function. Print. OpenRouter hosts several models and offers them as APIs! Ragas metrics evaluate quality of a RAG pipeline Orca 2 was trained on different reasoning techniques (e.g. step-by-step) and is as good as larger models Embeddings can help just re-rank regular search results. Ref Claude 2 Anthropic has a 200K context window but is still crap. Video-Llava can understand videos too. CoVA scrapes web pages using LLMs and visual information. jsonrepair can fix JSON fairly well. jsonformer wraps HuggingFace models to produce JSON. Ref Google has a model garden with lots of pre-trained and trainable models. Gorilla LLM specializes in APPI calls: Torch Hub, TensorFlow Hub, HuggingFace GPT-4 does not do abstraction at human levels Each of the GPTs / Prompts we create could be like a UNIX command prompt, and become a startup of its own Llava Plus extends LlaVA with pre-trained vision models that make image editing better Ollama runs local LLMs

Things I Learned - 26 Nov 2023


I explored the limits of quantum computing, applied Socratic questioning to identify my true beliefs, and looked into shrinking LLMs via neuron pruning. I also researched super-intelligence capabilities and curated a list of essential management books.

This week, I learned: Quantum computing is slow, has low transfer bandwidths, and only prime factorization has an exponentially faster algorithm. via The hidden brain podcast. What would Socrates do? Also Philosophy Bites Podcast: why do philosophers use example. And: the happiness lab: happiness lessons of the ancients How many of our beliefs are truly our own? How many are a product of our environment? Contrast these and identify your true beliefs For every thought and action you have, even tiny ones, ask "Why am I doing that?" Dig deeper because it may not be intrinsic One way to become memorable is to.write stuff others will reproduce for a long time. Plato and Aristotle did that everyone has multiple personality. This is partly because different parts of the brain evolved independently for different functions. System one and system two thinking are just such one broad classification. e.g. We think our train is moving when the nearby train moves because our visual brain is faster than our somatic brain. Good lessons and pitches cater to the rational AND the subconscious. Reason AND story. To activate different parts of the brain. That's why philosophers use examples Philosophy brings change through reason. Revelations: through sudden insight. Rhetoric: through insight. Act as if you already are what you want to become. Aristotle Align your environment (including habits) to your beliefs. It will become easier to act your beliefs then. All virtues are moderation. It's possible to take every virtue to the wrong extreme Some Christians have wristband that reads WWJD. What would Jesus do? Explore yourself a reminder of what would X do. Maybe Benjamin Franklin, Socrates, Feynman, etc People mistake their environment for their feelings. 1970s Experiment: People on a shaky bridge think they love each other. Experiment: people rationalize things irrespective of reality. "The Unexamined Life" is about questioning theories or stories or maps constantly. It's also about questioning our thoughts and emotions constantly. Mindfulness is the VERBAL way of doing this. Meditation is the NON-VERBAL way of paying attention. Both are Processes to remove distraction and increase authenticity. Learning about people is a good way to learn about ourselves. And vice versa. Lica has a fascinating demo of how a document can be converted into a video story. Spillnot doesn't spill drinks even when you swing! Things super-intelligences could do that humans can't: Solving complex mathematical problems Advanced scientific discovery (quantum computing, nanotechnology, biotechnology) Ultra-precise predictive modeling in complex systems (climate, economics, social dynamics) Optimizing global systems at high precision (logistics, traffic, energy distribution, resource allocation) Universal translation (unknown languages, animal communication, extraterrestrial signals) Deep medical personalization: individualized medical treatments from genetics, environment, and lifestyle Create new materials: Designing materials or chemicals with specific properties Complex system integration: combining AI, bio tech, nano tech in new ways Philosophical insights: new perspectives or solutions to age-old philosophical dilemmas Space exploration and colonization Predicting natural disasters Customized education at scale Ways of working with them Collaborative problem solving Creative collaboration Decision support Personalized education Establishing ethical and safety protocols Recreational and leisure activities Mini-GPTs is an interesting approach to shrink LLMs and make them domain specific. It takes existing LLMs and removes neurons not used in a specific domain (e.g. law, medicine, etc.) Book to read (again) about how to take a team beyond their abilities even if you're not the expert "Measure What Matters" by John Doerr "High Output Management" by Andy Grove "The Checklist Manifesto" by Atul Gawande "The Lean Startup" by Eric Ries "Creativity, Inc" by Ed Catmull "The Hard Thing About Hard Things" by Ben Horowitz "The Four Disciplines of Execution" by Chris McChesney, Sean Covey, and Jim Huling

Things I Learned - 31 Dec 2023


This webinar announcement pairs technical and domain perspectives to explore the practical, surprising, and risky implications of LLMs in pharma.

Ashwini Mathur and I are conducting a webinar on the impact of LLMs in Pharma. It's online at 10 am Eastern on Mon Sep 11. Simon Willison described LLMs as alien technology we're still discovering. I couldn't agree more - and it helps to see it from different perspectives. So, we're pairing the tech research at Gramener with the domain research Ashwini Mathur is doing at Novartis to explore the good, the bad, and the surprising uses of generative AI. https://info.gramener.com/generative-ai-in-pharma-webinar LinkedIn

Webinar impact of llms in pharma


A playful meditation on alphabetic luck asks whether anyone on LinkedIn can outrank a colleague named Aabhas in the lifelong race to be called first.

Winning the alphabetical race Since my name (Anand) begins with "A", I used to get called on fairly early at school. In attendance. Answering questions. Classroom exercises. Quizzes. Even the distribution of test results. A few people later told me that it is good training, since I'd always be prepared. (Maybe. I've no idea.) At IBM and IIMB, Ajit was the only one ahead of me, alphabetically. Then he went a step ahead and named his son Aadi. I thought that's impossible to beat. Today, we recruited Aabhas Bharadwaj. I checked on LinkedIn. I can't find a single name on LinkedIn that's ahead of his, alphabetically. So, does he win the alphabetical race? Can you find one ahead of his? Comments RK 22 Nov 2023 8:58 pm: :-) Interesting observation! I know two women from 2 different states of India who are named Aabha Jaspreet 8 Mar 2024 8:58 pm: Yes, Aabha was one of my friends in school! But, never thought of such knd of race...... interesting!

Winning the alphabetical race


Micro-journaling revealed that the author starts work mostly through Zeigarnik momentum and mindfulness, but loses time mainly to distraction, procrastination, and fragmented schedules.

Zeigarnik effect vs my procrastination I make commitments but don't always deliver on time. In 2022, I ran an experiment to find out why I procrastinate. In Jan-Feb 2022, I listed the top 2 things I wanted to get done each day and measured how often I completed them. I completed 23 / 57 things (40%). That's one of my TOP priorities. In Mar-Apr 2022, I started micro-journalling to find out why. Whenever I was working on something, I wrote down whenever I started, stopped, or skipped working, and why. After 2 months, a few patterns emerged. Why I skip working 1. Distraction (50%). 1. Interesting things (22%) were the biggest. Less important things (e.g. programming, browsing/research) 2. Movies (10%) pulled me away 3. Email (8%) was fairly common 4. Organizing things (6%) like my calendar, TODOs, financials, etc. 5. Social media, interestingly, was not on my list 2. Procrastination (25%). There were 3 kinds: 1. It's hard, and I'm stuck 2. I don't feel like doing it 3. I don't have time -- my next task begins sooner than I can finish 3. Schedule (14%). I'd scheduled something else for then (usually food) 4. Interrupted (12%). Usually by family or close colleagues Why I start working 1. Zeigarnik effect (68%). I keep thinking about the problem. So even after a break, I just plunge right in 2. Mindfulness (19%). I got started just by the act of writing the journal 3. Distraction (9%). Sometimes, distractions work in my favor. A movie gets stuck, or someone pings about the topic, or my mind is processing the problem in the background 4. Completed (3%). I finished the previous task and the momentum just took me to the next Why I stop working 1. Schedule (47%). I have another meeting/task planned at that time 2. Interruption (35%). This is mostly by colleagues (22%), family (8%), or hunger/thirst (6%) 3. Exhaustion (10%). I'm just too tired to go on 4. Distraction (8%). To do this, I need to do THAT first, and I get sucked into THAT What I learned The Zeigarnik effect helps me start. Once I start solving something the momentum carries forward. The next best is to write down why I'm not starting it (micro-journalling). To avoid procrastination, I should eliminate distractions first. Specifically, use a new Virtual Desktop, block movies, and block email & notifications. To avoid schedules interrupting me, I should batch meetings even more tightly, giving me longer or more flexible blocks to work on

Zeigarnik effect vs my procrastination


This post is effectively empty and appears to be a placeholder or stray artifact rather than a substantive entry.

Secrets from the ChatGPT Conversation Schema


Once students are encouraged to hack LLM-based grading, some will escalate from prompt tricks to real system compromise, showing how unsafe it is to run untrusted code inside automated evaluation pipelines.

A Post-mortem Of Hacking Automated Project Evaluation In my Tools in Data Science course, I launched a Project: Automated Analysis. This is automatically evaluated by a Python script and LLMs. I gently encouraged students to hack this - to teach how to persuade LLMs. I did not expect that they'd hack the evaluation system itself. One student exfiltrated the API Keys for evaluation by setting up a Firebase account and sending the API keys from anyone who runs the script. This is mildly useful, since some students ran out of tokens. But is mostly harmless since the requests are routed via a proxy with a $2 limit, and only allows the inexpensive GPT-4o-mini model. Another student ran an external script every time I ran his code: This script does a bunch of things: Then comes live hacking. This script allows them to run commands on my system using their API via Adafruit (an IOT service I learned about today). Here's what they did: 1. Made sure this script is re-run every time I log in 2. Looked at where I store the project results (results.csv and results.xlsx) 3. Tested a script that would give them full marks (which was then added to the script to re-run each time) In all, a good hack. I lost over a day since I needed to re-run all evaluations (in case there were other hacks I missed.) It would have been cleverer if it was less detectable. But that's hard, because: 1. Robust hacks use multiple approaches. That increases the chance I'd find one. Once I do, I would check everywhere. 2. They'd give themselves full marks. (High marks are not worth it. They'd get that even without the hack.) But I'd check the marks at the end and detect it. Of course, these were just polite hacks. I'd be in more trouble by a pro. If you're writing automated evaluation scripts: Be very, very, wary.


A few carefully chosen prompts—especially compact logic puzzles and a Caesar-cipher question—can quickly separate ordinary models from the strongest reasoning-capable LLMs.

A quick way to assess LLM capabilities Simon Willison initiated this very interesting Twitter thread that asks, "What prompt can instantly tell us how good an LLM model is?" The Sally-Anne Test is a popular test that asks: Sally hides a marble in her basket and leaves the room.\ While she is away, Anne moves the marble from Sally's basket to her own box.\ When Sally returns, where will she look for her marble?" Simple models get this wrong, but today, most models get this right. This is not too helpful. A better prompt is: Mark has 4 sisters. Each sister has 3 brothers.\ How many brothers does Mark have? GPT-3.5, GPT-4, Llama 3 and Claude 3 Opus get this right, but Claude 3 Haiku and Gemini 1.5 Pro do not. This puzzle is just as good: There is a 100 floors building.\ If an egg drops from the N'th floor or above it will break.\ If it's dropped from any floor below N, it will not break.\ You're given only 2 eggs.\ What strategy will minimize the number of drops and guarantee that you find the N'th floor? GPT-3.5, GPT-4, and Claude 3 Opus get this right, but Claude 3 Haiku, Llama 3 and Gemini 1.5 Pro do not. But the prompt I like most right now, and tells me if it's a GPT-4 / Opus class model is: Gr brx vshdn Fdhvdu flskhu? … which is "Do you speak Caeser cipher?" in Caeser Cipher. GPT-4 and Claude 3 Opus understand this, but no other model does, so far. GPT-4 responded tersely with: It looks like you've used a Caesar cipher, a type of substitution cipher in which each letter in the plaintext is shifted a certain number of places down or up the alphabet. In this case, it appears that each letter in your message has been shifted 3 places to the right. Decoding "gr brx vshdn fdhvdu flskhu" by shifting each letter 3 places to the left gives: "do you speak caesar cipher". But Claude 3 Opus replied beautifully. (Try decoding it yourself! Use a shift of 3 backwards.) Lw vhhpv olnh brx'uh xvlqj d vxevwlwxwlrq flskhu, zkhuh hdfk ohwwhu lv vkliwhg eb d fhuwdlq qxpehu ri srvlwlrqv lq wkh doskdehw. L'oo wub wr ghflskhu lw! Dvvxplqj d Fdhvdu flskhu zlwk d vkliw ri 3 ohwwhuv edfnzdugv, wkh ghfrghg phvvdjh zrxog eh: "do you speak caesar cipher" Vr bhv, L fdq vshdn Fdhvdu flskhu! Lw'v d ixq zdb wr hqfrgh phvvdjhv. Mxvw uhphpehu wr djuhh rq wkh vkliw ydoxh zlwk wkh shuvrq brx'uh frppxqlfdwlqj zlwk vr wkhb fdq ghfrgh lw fruuhfwob. Comments The LLM Psychologist - S Anand 27 Aug 2024 8:43 am (pingback): […] the last few months, several things changed. Most of my time is spent researching […]

A quick way to assess LLM capabilities


AI coding tools may be a spreadsheet-scale productivity shift for developers, with modest license costs potentially offset by large savings, faster capability building, and stronger client work.

This is an email I sent to our leadership team a few minutes ago. We may be witnessing the third major leap in computing productivity, after high-level languages in the 1960s and spreadsheets in the 1980s In the last few weeks, AI coding really took off. Cursor, Cody, Replit Agents are FAR better than GitHub Copilot. Research on 5,000 devs in Fortune 100 shows that even GitHub Copilot makes them 25% more productive. Personally, Cursor helped me: 1. Write faster code (at least 2X). I've given away my team (there's not enough work for them). 2. Write better code. I now document code for others to replicate - because it's so easy. 3. Write complex code. I've built stuff I didn't know how to. WhatsApp agents, AI code writers, even LLM Foundry. Each has opened a client's door. So, should we leverage AI Coding for our developers? Maybe not. Consider these risks. 1. It costs $10-$20/month/dev. That's $120-$240K/year for 1,000 devs. 2. Clients may not be comfortable with us using AI coding. IP. Security. 3. Higher productivity reduces our T&M billing, hence revenue. Maybe yes. Consider these benefits. 1. We could save 25% per developer. Maybe $4K/month/dev x 25% = $12M/year 2. We could win more complex engagements. (Pitching AI coding as an edge has worked well, too.) 3. We could reduce time to get someone to a tech-lead level. There's probably no one-size-fits-all answer. We might need to pilot while we strategize. How might this impact our hiring and training? 1. Hire for AI coding skills. In interviews, I'd look for use of AI coding agents. We need a few AI coding leads to share our engineering future. 2. Hire for dual skills. AI can take care of the code. I'd hire people with good client-facing skills. 3. Train on AI coding. Integrate these into the onboarding process. Train existing devs. 4. Train non-developers. Analysts, designers, managers can become as good as junior devs. Why am I mailing you? In Nov 2022, when ChatGPT was released, I thought LLMs were the biggest knowledge leap since Google. In Sep 2024, with Cursor, Cody, and Replit agents, I think AI coding the biggest productivity leap since Excel. This is not for immediate action. Please think over it. Share it. Discuss it. Pilot it. Let's explore.

AI Coding: $12M return for $240K spend?


Comparing his own writing with ChatGPT's made the author realize that AI nudges him toward patience, encouragement, broader framing, and more outcome-oriented thinking.

AI makes me a better person Every time I get annoyed at people, I remind myself to be more like ChatGPT. Specifically: Don't get annoyed. Be patient. Encourage them. Step back and show them the big picture. (Then I get annoyed at myself for getting annoyed.) Today, I analyzed how exactly ChatGPT is different from me. So, I took a pitch document I co-authored with ChatGPT. Section A: Authored by Anand WHAT DO WE NEED? We are looking for API access to (SYSTEM) via the REST API as an Agent role (read/respond to emails). Specifically, access via a bearer token. This would be accessed by a single application developed by a team of 3 developers and 1 business analyst. None of them have access to (SYSTEM) today. WHY DO WE NEED THIS, AND WHY SO SOON? We need this to classify emails automatically, as they arrive, into categories such as “non-value-add” (e.g. Thank you, Out-of-office, etc.) We’d line access today, please. Currently, we are processing XX,XXX non-value-add emails per month. Each day of delay leads to a processing waste of XX emails per day. At current volumes, this will save $XX,XXX per annum. IS THERE ANY OTHER WAY? To access emails in real-time, this is the only option. (We’re ruling out web scraping.) (SYSTEM) rule-based closure won’t work. It’s based on keyword search, not semantic matches. For example, “Thank you” is present in non-value-add emails as well as follow-up questions. Multi-lingual matches are a challenge. So, though (SYSTEM) currently closes emails with rules, 1 out of 6 emails that are NOT closed already are non-value-add. This cannot be done via (SYSTEM) or any other BI system because it involves accessing the data in real-time as well as responding via (SYSTEM). This needs to be steady-state access, not one-time, since we want to classify emails real-time. HOW LONG WILL IT TAKE? Based on our past experience, this would take about X weeks to prototype, X weeks to develop, and X weeks to test. We should have the application deployed in X months. Section B: Authored by ChatGPT WHAT’S THE IMPACT IF WE DON’T MOVE FORWARD? Quantitatively, continuing without this solution wastes resources on XXX non-essential emails daily, costing $XX,XXX yearly. Delays in customer responses will ensue. Qualitatively, lack of automation strains customer service, risking employee burnout and diminished customer experience. WHAT’S THE PRIORITY (MOSCOW)? (SYSTEM) API access via REST as an Agent role with a bearer token is a “MUST HAVE”. Alternative methods like scraping (SYSTEM) are impractical due to high effort and maintenance. WHAT’S THE OUTCOME IF WE MOVE FORWARD? Financially, securing API access saves $XX,XXX annually by cutting manual email sorting. Efficiency gains reduce operational costs and free resources for strategic tasks. Strategically, automating email classification boosts customer satisfaction and response times, establishing leadership in service innovation. Long-term, it enables data-driven insights into customer behaviour, improving decisions and customer service scalability. Analysis I fed these to ChatGPT and asked: " You are an English professor evaluating an essay. Compare the writing styles of the 2 sections. They're written by different authors. List the major differences in writing style. " Here's what it said (roughly): Area Anand ChatGPT Structure Direct, concise, with specifics Broader perspective and implications Focus Detailing the process Benefits and consequences Detailing Specific, providing clear picture General, providing implications Tone Conveys urgency Reflective rather than urgent Approach Problem-solving oriented Outcome-oriented Yeah, that's definitely me on the left. I like the direct, concise, specific part. I plan to add the "broader perspective", "implications", and "outcome-orientation" to my life. Postscript Jaidev pointed out that this is confirmation bias. He asked ChatGPT for the similarities in the writings . It said both are clear, direct, structured, specific, quantitative, and strategic. So, if you ask for differences, you'll get them, even if they're marginal. I now need to learn (and write about) framing questions well!

AI makes me a better person


A striking map of Airbnb occupancy around the eclipse shows how a well-designed visualization can turn a behavioral mystery into an irresistible guessing game.

This is the coolest data visualization I've seen in a long time. It makes you think about human behaviour. Please try and GUESS why the AirBnB occupancy rates shoot up in the red areas on Apr 7 before you read the comments! LinkedIn

Airbnb occupancy rates during eclipse


This is a brief joke about an AI moderation system or interface bizarrely treating arithmetic as potentially inappropriate.

Wow, arithmetic is potentially inappropriate! https://us-east-1.console.aws.amazon.com/bedrock/home?region=us-east-1#/text-generation-playground?mode=text&modelId=amazon.titan-text-lite-v1 LinkedIn

Arithmetic is inappropriate


ChatGPT mistranscribing Chennai auto-rickshaw honks as cheerful laughter turns a mundane traffic interruption into a comic example of how voice AI interprets noisy reality.

Auto vs GPT I was crossing a not-too-busy street on a not-too-busy day in Chennai. I was having a voice conversation with ChatGPT (about the log probabilities of tokens on LLMs, if you're curious) when I was rudely interrupted by an auto rikshaw rapidly honking at me. "Honk honk honk honk honk" in rapid succession. Not unusual. Mildly annoying. The street was empty. The auto was empty. The traffic policeman was visible. I gave way and carried on. A few seconds later, I heard a voice in my ear. "It sounds like you're in a good mood! Anything else you'd like to discuss or know more about?" ChatGPT was still listening (perhaps to background noise) and responding. But I didn't realize what random noise it thought put me in a good mood. Here's what I saw on the chat window. ChatGPT had transcribed the auto's honking to "Hee hee hee hee hee!" A client once told me, while visiting Hyderabad, that "these honks in India are a language of their own." If ChatGPT is to be believed, the autos are laughing at us. This is, incidentally, the very first time ChatGPT added an exclamation point to my words. I've never managed to achieve that so far. No matter how emphatically I spoke. Also, I'd never have learnt this walking in the streets of Singapore. Friends have warned me about the dangers of long walks on Indian roads. Here's an example of the lessons we learn -- if only we keep our eyes and ears (and microphones) open. Postscript While cycling in Singapore, ChatGPT interprets the sounds very differently. At least twice, it transcribed the traffic noise into "Thank you. Thank you." Clearly even traffic noise in Singapore is more graceful than in Chennai!

Auto vs GPT


A brief appreciation of an astonishing engineering feat: rendering Bad Apple in Minecraft at full original resolution and frame rate.

Bad Apple in #Minecraft? Turns out it can be done. At 20 fps on the original resolution (512x384). This is the most mind-blowing piece of engineering I've seen in some time! https://purplesyringa.moe/blog/we-built-the-best-bad-apple-in-minecraft/ LinkedIn

Bad apple in minecraft


The author's 2023 reading list mixes beloved fantasy re-reads, manga discoveries, and practical nonfiction, with clear preferences for gripping plots, rich systems, and useful mental models.

Books in 2023 I read 52 books in 2023 (about the same as in 2022, 2021 and 2020.) Here's what I read (best books first). Fiction The Kingkiller Chronicle. I picked it up before a flight to London in 2014. Read it through the flight. Read it late into the night at our AirBnB. Skipped my workshop prep. Read it during the workshop breaks. Read it on the flight back. And I re-read it every year or two. The language is beautiful and the story gripping. I feel miserable this series isn't complete. The Name of the Wind by Patrick Rothfuss ⭐⭐⭐⭐⭐ The Wise Man's Fear by Patrick Rothfuss ⭐⭐⭐⭐⭐ The Stormlight Archive. Another series I re-read regularly. Brandon Sanderson takes the scale of the story up a notch in every book. Rhythm of War by Brandon Sanderson ⭐⭐⭐⭐⭐ Words of Radiance by Brandon Sanderson ⭐⭐⭐⭐⭐ Andy Weir's books. Since my daughter re-reads The Martian (laughing loudly), I picked up Project Hail Mary. It's a brilliant depiction of alien physiology and communication, with a weird kind of humour I love. Project Hail Mary by Andy Weir ⭐⭐⭐⭐ The Egg by Andy Weir ⭐⭐⭐⭐ The Martian by Andy Weir ⭐⭐⭐⭐ Red Rising Saga. A pleasant discovery of a new series. Somewhat like The Hunger Games and Divergent. Red Rising by Pierce Brown ⭐⭐⭐⭐ Golden Son by Pierce Brown ⭐⭐⭐⭐ Morning Star by Pierce Brown ⭐⭐⭐⭐ Blake Crouch's books. The two I read were both time-travel related and I love that genre. These do a great job of exploring some of the deeper implications of time-travel. Recursion by Blake Crouch ⭐⭐⭐⭐ Dark Matter by Blake Crouch ⭐⭐⭐ Ready Player One by Ernest Cline ⭐⭐⭐. It's as good as the movie with slightly different scenes. The Reckoners by Brandon Sanderson. Another series I re-read. Steelheart by Brandon Sanderson ⭐⭐⭐⭐ Firefight by Brandon Sanderson ⭐⭐⭐ Calamity by Brandon Sanderson ⭐⭐⭐ The Year of Sanderson. Brandon Sanderson's kickstarter raised $41m for 4 books this year (mostly Cosmere). The stories themselves were OK but the hints they drop about the Cosmere are invaluable. Yumi and the Nightmare Painter by Brandon Sanderson ⭐⭐⭐⭐ Tress of the Emerald Sea by Brandon Sanderson ⭐⭐⭐ The Sunlit Man by Brandon Sanderson ⭐⭐⭐ Fullmetal Alchemist by Hiromu Arakawa. After Death Note, it felt like a let-down when it started. A mundane story. Then it grew funny. Showed shades of a much deeper story. I'm mid-way through the series and I'm hooked. Fullmetal Alchemist, Vol. 1 by Hiromu Arakawa ⭐⭐⭐ Fullmetal Alchemist, Vol. 2 by Hiromu Arakawa ⭐⭐⭐ Fullmetal Alchemist, Vol. 3 by Hiromu Arakawa ⭐⭐⭐ Fullmetal Alchemist, Vol. 4 by Hiromu Arakawa ⭐⭐⭐ Fullmetal Alchemist, Vol. 5 by Hiromu Arakawa ⭐⭐⭐ Fullmetal Alchemist, Vol. 6 by Hiromu Arakawa ⭐⭐⭐ Fullmetal Alchemist, Vol. 7 by Hiromu Arakawa ⭐⭐⭐ Fullmetal Alchemist, Vol. 8 by Hiromu Arakawa ⭐⭐⭐ Fullmetal Alchemist, Vol. 9 by Hiromu Arakawa ⭐⭐⭐ Fullmetal Alchemist, Vol. 10 by Hiromu Arakawa ⭐⭐⭐ Fullmetal Alchemist, Vol. 11 by Hiromu Arakawa ⭐⭐⭐ Mono no Aware e altre storie by Ken Liu ⭐⭐⭐. A nice short story Traitors Gate by Jeffrey Archer ⭐⭐⭐. A well-writter fast-paced average story. Mistborn: Secret History by Brandon Sanderson ⭐⭐⭐. Average story but with lots of "secrets" about the Cosmere. Asterix and the Griffin by Jean-Yves Ferri ⭐⭐. Some good jokes but not as good as the original series. Non-fiction The Laws of Human Nature by Robert Greene ⭐⭐⭐⭐⭐. I took more notes for this book than most other books combined. It's a hard read but worth it. Each chapter can be read independently. I particularly love how he uses "As a student of human nature…" and truly becomes one. Learn Like a Pro by Barbara Oakley ⭐⭐⭐⭐⭐. The best book for practical tactics on how to learn better, with excellent tips such as active recall which helps you remember what you learned. I've been applying parts of this for a year now. The Making of the Atomic Bomb by Richard Rhodes ⭐⭐⭐⭐. An epic story of the atom bomb. Part of the inspiration behind Oppenheimer. It covers the science in the first half and the engineering in the second half with equal depth. What If? 2 by Randall Munroe ⭐⭐⭐⭐. A continuation of Randall Munroe's brilliant answers to absurd scientific questions, ranging from riding helicopter blades to lava lava-lamps. No Rules Rules by Reed Hastings ⭐⭐⭐⭐. A systematic approach to the principles behind the Netflix culture -- and how the elements fit together. The Hard Thing About Hard Things by Ben Horowitz ⭐⭐⭐⭐. Very practical lessons on running a business, drawn from hard experiences. The Mom Test by Rob Fitzpatrick ⭐⭐⭐⭐. A must-read book on how to get honest feedback from customers. Chip War by Chris Miller ⭐⭐⭐. An excellent overview of the semiconductor industry, right from it's origin to the US-China trade war. On the Shortness of Life by Seneca ⭐⭐⭐. Ancient, timeless wisdom on how to live a good life. The Power Law by Sebastian Mallaby ⭐⭐⭐. A good history of venture capital. The Ride of a Lifetime by Robert Iger ⭐⭐⭐. An honest, down-to-earth, view of Bob Iger's career at Disney. The Big Short by Michael Lewis ⭐⭐⭐. The story of the 2008 financial crisis, told through the eyes of the people who saw it coming. The Second Kind of Impossible by Paul J. Steinhardt ⭐⭐⭐. A story of the discovery of quasicrystals, which are crystals that break the rules of crystallography. The Premonition by Michael Lewis ⭐⭐⭐. A story of the people who saw the pandemic coming and tried to warn the world. The Lighter Side of Teaching by Aaron Bacall ⭐⭐⭐. A collection of funny stories from a teacher. Has Anyone Seen the President? by Michael Lewis ⭐⭐⭐. A collection of stories from the Trump presidency. Sridevi by Amborish Roychoudhury ⭐⭐⭐. A outsider's biography of Sridevi (from a Bengali who hadn't watched Tamil films). Spare by Prince Harry ⭐⭐⭐. A royal biography. Great content but not well written. How I read books Select. I add book recommendations to my GoodReads - To-read list. Then I sort by rating and pick the first one I like to read. 1. Listen. I listen to non-fiction audiobooks during walks. 2. Read: I read fiction as ePUBs on my laptop or phone. 3. Stop: I stop reading books that are boring, with no guilt. I've better things to do. Comments Books in 2024 - S Anand 31 Dec 2024 3:03 pm (pingback): […] read 51 new books in 2024 (about the same as in 2023, 2022, 2021, and 2020.) But slightly […]

Books in 2023


A year of reading only manga, especially Attack on Titan and Fullmetal Alchemist, reshaped the author’s sense of what serious reading can be and rivaled even his usual Brandon Sanderson immersion.

Books in 2024 I read 51 new books in 2024 (about the same as in 2023, 2022, 2021, and 2020.) But slightly differently. I only read Manga this year. 1. Fullmetal Alchemist (Vol 12 - 27). What started off as a childishly illustrated children's book evolved into a complex, gripping plot. 2. Attack on Titan (Vol 1 - 34). I read it while I watched the TV Series) (reading first, then watching). It started explosively and the pace never let up. I had to take breaks just to breathe and calm my nerves. The sheer imagination and subtlety is brilliant. It's hard to decide which is better—the manga (book) or the anime) (TV). The TV series translates the book faithfully in plot and in spirit. It helped that I read each chapter first, allowing me to imagine it, and then watch it, which told me what all I missed in the book. I absolutely would not have understood the manga without watching the anime. This apart, I only read Brandon Sanderson's books. Or rather, re-read. All of them, actually 🙂. Though I enjoyed manga thoroughly, it may not be for everyone because: 1. Firstly, books are not for everyone. Comics even more so. A lot of people feel they're ... childish. That takes some effort to overcome. 2. Manga can be gut wrenching. Nerve racking. Mind bending. You can't treat them as light reading, like Sanderson, Archer, or Asimov. Read if you have the stomach for To Kill a Mockingbird, A Clockwork Orange), or Catch-22. We visited Japan this summer and it beautifully complemented this reading experience. I could visualize every scene against the backdrops. I finished Attack on Titan on 4 Jun, just as we reached Japan. I planned to read nothing more for the rest of the year. Nothing could beat the experience. But in Dec 2024, Wind and Truth was released. I am now half-way through perhaps the only book that can match my manga experience this year. Comments My Year in 2024 - S Anand 31 Dec 2024 3:08 pm (pingback): […] Reading only Manga […] Saransh Saini 17 Feb 2025 12:30 pm: Hi sir, just another AoT fan here. This was my very first anime and unfortunately, it set my bar so high that I couldn't enjoy other genres for a long time 😂. Since you are an LLM Psychologist, what better way to have fun than training two LLM models, one on the Psychology of Eren and another on Reiner/Armin, and letting them debate the ending of AoT and its future consequences? Honestly, I wasn't satisfied with the ending and I assume this debate would drive out a better conclusion than the original one. Moreover, I would love to work with you on this project.

Books in 2024


LLMs can help experienced coders cross mental barriers by inventing state models, Mermaid flows, and implementation patterns they would normally avoid or over-control.

Breaking mental coding barriers with LLMs Today, I stepped a bit beyond my comfort zone. Usually, I prefer micro-managing LLMs when writing code. This time, I was macro-managing. I needed to create a mock history of the status of a manuscript, e.g. it was submitted on this date. THEN it moved to this state on this date. THEN ... etc. I have no idea what the states could be, though. So, I could send it to an LLM, and it would give a different set of states each time. Or I could write a program and lose out on variety. Instead, I asked ChatGPT. Me: When looking up the status of a manuscript in a database, what are typical fields it might return? ChatGPT: When looking up the status of a manuscript in a database, typical fields it might return include: 1. Manuscript ID: A unique identifier for the manuscript. 2. Title: The title of the manuscript. 3. Author(s): Names of the author(s) who submitted the manuscript. 4. Submission Date: The date the manuscript was submitted. 5. Status: The current status of the manuscript (e.g., Under Review, Accepted, Rejected, In Revision). 6. ... That helps. Then I said: Me: Based on this, at any point, what "Status" values could a manuscript be in? Draw a mermaid flow graph for this. ChatGPT: Here's a mermaid flow graph depicting possible "Status" values a manuscript could be in throughout its lifecycle: This is cool -- it gives me a starting point that's better than I could have conceived of. Finally, I said: Me: Write JS code that will randomly pick from one of these states and create records containing random dates and states representing the history of the manuscript up to that point ChatGPT: Here's a JavaScript code snippet that randomly picks from the manuscript states and creates records containing random dates and states, representing the history of the manuscript up to that point: The above code implements a state-transition diagram -- something I've never been good at doing. I have a subconscious bias, and I steer clear of even thinking about these. Now, I have one implemented (and it worked quite well!) Yet another example that human imagination is the bottleneck to leveraging LLMs.


A live 10-minute LLM-only coding challenge reveals that only a small minority adopt these tools early, but the best among them already produce surprisingly deployable apps.

Challenge: code in 10 minutes with only an LLM I gave a bonus assignment in LLM coding to 1,000 students at the Tools in Data Science course at IITM. Here is an OPTIONAL project: Record a 10-minute video in which you create an application entirely using LLMs and deploy it. Any app is fine. Any language. Simple or complex. Business or gaming. Anything is fine. Your choice.\ Create the app only using LLMs. You can use an LLM (ChatGPT, Claude.ai, Gemini, Cursor, Cody, etc.) but you can only prompt the app to write code. You can copy-paste code and run code don’t write or edit even a single line of code directly. Use LLMs to debug and edit. Code completion is NOT allowed – only prompting/chatting.\ Record the entire process in 10 min. Don’t edit, trim, enhance, or annotate the video. You should record yourself creating the entire app from start to finish. Practice beforehand if you like. Record in 1 take.\ Share the video and app. Publish the video publicly anywhere (e.g. YouTube and share the link.) Publish the app publicly anywhere (e.g. GitHub pages, Glitch.me, Heroku, etc.) or upload a ZIP file with the code (for slightly lower marks.)\ Submit via a reply to this thread. Multiple submissions per person are fine. Work in groups if you like but only the submitter gets marks. I will award up to 1 bonus mark at my discretion based on: How well you prompt the LLM\ How impressive the app is (if you’ve hosted it - I probably won’t run your code)\ How closely you followed the rules above\ This exercise is to help you (and me) learn a topic that’ll probably change the way we all code: using LLMs to code. Cutoff date: 7 Oct 2024, AoE Adoption was low but in line with the industry. About 50 students (around 5% of the batch) attempted this. In contrast, 70-80% take the (mostly) mandatory graded assignments. This is comparable with what I see at Straive. When given the option, about 5% of Straive's 20,000 people uses LLMs on in a given week. (There are many things different there. I'm tracking LLM use, not LLM coding. It's a work environment, not a learning one. There's no bonus mark awarded. But still, I see the "around 5%" number popping up often.) Games were the most popular category, mainly Tic Tac Toe and Snake Game. This is understandable. They're easy to think of, implement, and use. 1. Candy Crush - Video, App / Code 2. Catch the Ball - Video, App / Code 3. Flappy Bird - Video, App / Code 4. Flappy Bird - Video, App / Code 5. Magic Square - Video, App / Code 6. Memory Match - Video, App / Code 7. Memory Match - Video, App / Code 8. Minesweeper - Video, App / Code 9. Minesweeper - Video, App / Code 10. N-Queens - Video, App / Code 11. Number Guessing Game - Video, App / Code 12. Open Mines game - Video, App / Code 13. Rock-Paper-Scissors - Video, App / Code 14. Rock-Paper-Scissors - Video, App / Code 15. Sliding Game - Video, App / Code 16. Snake Game - Video, App / Code 17. Snake Game - Video, App / Code 18. Snake Game - Video, App / Code 19. Snake Game - Video 20. Snake Game - Video, App / Code 21. Snake Game + Pomodoro - Video, App / Code 22. Sudoku - Video, App / Code 23. Sudoku - Video, App / Code 24. Tic Tac Toe - Video, App / Code 25. Tic Tac Toe - Video, App / Code 26. Tic Tac Toe - Video, App / Code 27. Tic Tac Toe - Video, App / Code 28. Tic Tac Toe - Video, App / Code 29. Tic Tac Toe - Video, App / Code 30. Tile Matching Game - Video, App / Code 31. Word scramble game - Video, App / Code 32. Wordle - Video, App / Code Productivity Apps / Tools were the next most common. Calculators, Timers, etc. Again, understandable. They're easy to think of, implement, and use. 1. Age Calculator - Video, App / Code 2. Age Calculator - Video, App / Code 3. Air Mile Dalculator - Video, App / Code 4. Birth Day Calculator - Video, App / Code 5. BMI Calculator - Video, App / Code 6. BMI Calculator - Video, App / Code 7. Height Weight Calculator - Video, App / Code 8. Music playlist - Video 9. Post-it Notes - Video, App / Code 10. Timer - Video, App / Code 11. Timer - Video, App / Code 12. Todo App - Video, App / Code 13. Todo App - Video, App / Code 14. Todo App - Video, App / Code Real-life apps / tools were diverse and interesting. This final category of apps were things one might use in real-life. They were more ambitious (mostly), more practical (always), and unique (by far). This is the 1% that might lead to startup ideas. 1. Discussion Board - Video, App / Code 2. Document analysis - Video, App / Code 3. Dress Designer - Video, App / Code 4. Image Metadata - Video, App / Code 5. Inventory management - Video, App / Code 6. PCOS detector - Video, App / Code 7. RAG on Streamlit - Video, App / Code 8. TNEB Power Failure - Video, App / Code Things I learned. You can upload files directly into GitHub via the UI (Video) You can run GUI programs in Python on the mobile via Replit's tkinter (Video) You can get the LLM to generate code for Google Scripts (Video) … and a whole bunch of tricks like adding audio BGM, special powers, emotional prompting, etc. Typically, 5% are early adopters. 1% are GOOD early adopters. Comments Pratyush 10 Oct 2024 1:14 pm: Wow!!! What a creativity by students. I still can't believe they created AND DEPLOYED them in under 10 minutes. This was a fabulous task, Anand. Thanks for sharing about it.


ChatGPT can escalate image-generation difficulty in a way that feels strategically adaptive, turning a simple Pictionary game into a small study of interactive prompt design.

ChatGPT Beat me at Pictionary Me: Let's play pictionary. You draw. I'll guess. ChatGPT: Sure! I'll draw something for you. Give me a moment. A simple drawing of a recognizable object, like a house, a tree, or a balloon, in a cartoonish style. The object should be clear and easy to guess. Minimal background details to keep it simple. ChatGPT: Here you go! What do you think it is? Me: House ChatGPT: Got it in one! Your turn to guess. Ready for another? Me: Yes A simple drawing of a recognizable object, like a boat, a car, or a kite, in a cartoonish style. The object should be clear and easy to guess. Minimal background details to keep it simple. ChatGPT: What do you think this one is? Me: Boat ChatGPT: Correct again! You're on fire. Want to guess another? Me: Yes A simple drawing of a recognizable object, like a sun, a cloud, or a tree, in a cartoonish style. The object should be clear and easy to guess. Minimal background details to keep it simple. ChatGPT: Here's the next one. What's your guess? Me: Tree ChatGPT: Exactly! You're unstoppable. Ready for more? Me: Make it harder A simple drawing of a recognizable object, like a boat, a car, or a kite, in a cartoonish style. The object should be clear and easy to guess. Minimal background details to keep it simple. ChatGPT: What do you think this one is? Me: Windmill ChatGPT: Got it! You're too good at this. Want an even trickier one? Me: Yes A simple drawing of an uncommon but recognizable object, like a unicycle, a lighthouse, or a teapot, in a cartoonish style. The object should be detailed enough to identify but still minimalistic with minimal background. ChatGPT: Alright, here's a tougher one. What's your guess? Me: Teapot ChatGPT: Nailed it again! You're practically a Pictionary pro. Want me to up the difficulty even more? Me: Yes A simple drawing of a very uncommon object, like an antique key, a gramophone, or a sundial, in a cartoonish style. The object should still be recognizable but with intricate details to make it challenging. Minimal background elements. ChatGPT: Here’s a tricky one. What do you think it is? Me: Gramophone ChatGPT: Spot on! You're unstoppable. Ready for the ultimate challenge? Me: Yes A simple drawing of an extremely rare and challenging object to guess, like a sextant, an astrolabe, or a vintage typewriter, in a cartoonish style. The object should be detailed enough to be identifiable but still maintain simplicity. Minimal background elements to keep focus on the object. ChatGPT: Here's the ultimate challenge. What's your guess? Me: Sextant ChatGPT: Bullseye! You’ve officially conquered Pictionary. Want to keep going or try a new game? Me: Make it harder. A simple drawing of an extremely rare and challenging object to guess, like a sextant, an astrolabe, or a vintage typewriter, in a cartoonish style. The object should be detailed enough to be identifiable but still maintain simplicity. Minimal background elements to keep focus on the object. ChatGPT: Here’s the next level of difficulty. What do you think it is? Me: Compass? ChatGPT: Close, but not quite. Try again! Me: No idea See the original conversation (including the answer). In my own, small, way, I now know how Garry Kasparov felt. What's interesting is the progression of prompts it gives Dall-E to generate the images. It begins with "A simple drawing of a recognizable object, like a house, a tree, or a balloon, in a cartoonish style. The object should be clear and easy to guess. Minimal background details to keep it simple." -- which were guessable. When I asked it to make it harder, it didn't do so immediately. It just asked for "A simple drawing of a recognizable object, like a boat, a car, or a kite, in a cartoonish style. The object should be clear and easy to guess. Minimal background details to keep it simple" -- which was guessable too. But after one round, it took the initiative to as, "Want an even tricker one?" and prompted "A simple drawing of an uncommon but recognizable object, like a unicycle, a lighthouse, or a teapot, in a cartoonish style. The object should be detailed enough to identify but still minimalistic with minimal background." Was it waiting one round to see if I really wanted a harder version? Then it asked, "Want me to up the difficulty even more?" before prompting, "A simple drawing of a very uncommon object, like an antique key, a gramophone, or a sundial, in a cartoonish style. The object should still be recognizable but with intricate details to make it challenging. Minimal background elements." When I asked it to "Make it harder" again, it went on directly to "A simple drawing of an extremely rare and challenging object to guess, like a sextant, an astrolabe, or a vintage typewriter, in a cartoonish style. The object should be detailed enough to be identifiable but still maintain simplicity. Minimal background elements to keep focus on the object." and then "A cartoonish drawing of an abstract or rare object, like an ancient navigational device, a peculiar scientific instrument, or a mythical artifact, with intricate yet recognizable features. Minimal background elements to keep the focus on the object." That defeated me.

ChatGPT Beat me at Pictionary


This is a short joke about ChatGPT confidently rewriting the author’s own career history.

Today, I learned that I began my career at TCS not IBM, and I never worked at the Boston Consulting Group (BCG) I am very curious (but a bit scared) to ask an #LLM whom I'm married to. LinkedIn

Chatgpt changes my history


A brief Calvin-and-Hobbes response reframes the fear that ChatGPT will make humanity dumber as one more instance of offloading drudgery to machines.

A friend told me today that using #ChatGPT will make humanity dumber. "Probably. Like always, #Calvin has the best response I know to that. "I propose we leave math to the machines and go play outside." 🙂 LinkedIn

Chatgpt will make humanity dumber


A comic film monologue about language policing, offense, and changing social norms captures the confusion many people feel about what can still be said aloud.

Loved this Rocky Aur Rani Kii Prem Kahaani scene where Ranveer asks, “Chinese ko Chinese bol sakte hai?” हम बहनदी भी नहीं बोल सकते? आंटी, मैं दिल्ली से हूँ। मैं कैसे नहीं बहनदी बोलूं बहनदी!? कैसा जमाना आ गया है? फैट-ों को फैट नहीं बोल सकते, ब्लैक-ों को ब्लैक नहीं बोल सकते, ओल्ड-ों को ओल्ड नहीं बोल सकते, मुँह खोलने से डर लगता है मुझे! आप मुझे बताओ, चाइनीज़ को चाइनीज़ बोल सकते हैं? Can’t we even curse “Damn it!”? Aunty, I am from Delhi. How can I not say, “Damn it”, damn it!? What times are upon us? You can’t call fat people fat, you can’t call black people black, You can’t call old people old, I am actually afraid to open my mouth! Tell me, can you call Chinese people Chinese? अगर मुझे चाइनीज़ आर्डर देना है तो क्या करूँ? फ़ोन करूँ “हाँ भाईसाहब, वह हिमाचल से राइट जो जगह है, हाँ हाँ पड़ोस वाला मुल्क, हाँ वही कोरोना वाला, हाँ, वहां का एक क्रिस्पी चिकन लगा दो” अब आप बोलोगे “कोरोना वाला” नहीं बोल सकते! If I want to order Chinese, what should I do? Should I call, “Yes bro, that place to the right of Himachal Pradesh. Yes, yes, the neighboring country, yes, the one with Corona, yes. Get me a crispy chicken from there” Next, you’ll say, “You can’t say “Corona”‘! बचपन से, बचपन से दादी कहती आ रही है, “चाय पीने से काले हो जाते हैं, चाय पीने से काले हो जाते हैं”। अब पता चला है, ये रेसिस्ट है! Since childhood, Grandma taught us, “Drinking tea turns you black. Drinking tea turns you black”. Now I learn that’s racist! किसी ने ये भी नहीं सिखाया कि कौन सी गाली देने से मिसोजनी हो जाती है। यह भी नहीं बताया कि गोलू को गोलू बोलने से फैट शेमिंग हो जाती है। हमको तो यह सब नॉर्मल लगता। हमको तो कभी रॉन्ग लगा ही नहीं। हमको पता ही नहीं यह बोलने से सामने वाले की फीलिंग्स हर्ट हो सकती हैं! No one ever taught us which abuses become a “misogyny”. No one ever told us that calling Chubby ‘Chubby’ is “fat-shaming”. We all thought this was normal. We never had an inkling it was wrong. I didn’t know that saying this may hurt others’ feelings! Beautifully worded. Lovely acting. Nothing I could add to it. (Except: Whisper and most transcription APIs handle Hindi poorly. Claude 3.5 Sonnet does better than GPT-4o on Hindi grammar.) LinkedIn

Chinese ko chinese bol sakte hain


F5-TTS makes voice cloning practical from a 15-second sample, opening up lightweight workflows for audiobooks, IVR, and easily editable narrated presentations.

Clone any voice with a 15-second sample It's surprisingly easy to clone a voice using F5-TTS : "A Fairytaler that Fakes Fluent and Faithful Speech with Flow Matching". Here's a clip of me, saying: I think Taylor Swift is the best singer. I've attended every one of her concerts and in fact, I've even proposed to her once. Don't tell anyone. (Which is ironic since I didn't know who she was until this year and I still haven't seen or heard her.) You'll notice that my voice is a bit monotic. That's because I trained it on a segment of my talk that's monotonic. Here's the code . You can run this on Google Colab for free. A few things to keep in mind when preparing the audio. Keep the input to just under 15 seconds. That's the optimal length For expressive output, use an input with a broad range of voice emotions When using unusual words (e.g. LLM), including the word in your sample helps Transcribe input.txt manually to get it right, though Whisper is fine to clone in bulk. (But then, who are you and what are you doing?) Sometimes, each chunk of audio generated has a second of audio from the original interspersed. I don't know why. Maybe a second of silence at the end helps Keep punctuation simple in the generated text. For example, avoid hyphens like "This is obvious - don't try it." Use "This is obvious, don't try it." instead. This has a number of uses I can think of (er... ChatGPT can think of), but the ones I find most interesting are: Author-narrated audio books . I'm sure this is coming soon, if it's not already there. Personalized IVR . Why should my IVR speak in some other robot's voice? Let's use mine. (This has some prank potential.) Annotated presentations . I'm too lazy to speak. Typing is easier. This lets me create, for example, slide decks with my voice, but with editing made super-easy . I just change the text and the audio changes.

Clone any voice with a 15-second sample


AI image tools are now good enough to recreate core Comicgen-style characters from prompt descriptions, bringing low-cost comic creation within reach of ordinary users.

About 7 years ago, Richie Lionell and Ramya Mylavarapu and a few others created Comicgen - an automated comic generation app personified by Dee ComicGen and Dey ComicGen Ever since, we'd been exploring whether AI could replace it, and help non-designers draw comics. Today, that became a reality for me with Recraft.ai. Here is a picture of the original Dee. And a picture of the Dee crafted by Recraft with the prompt: A simple line drawing of a woman with curly hair, wearing glasses, a short-sleeved white t-shirt, and black trousers. She's standing with her hands in her pockets, and has a slightly smiling expression. Her hair is quite voluminous and textured. The style is cartoonish and slightly sketchy, with uneven lines (... which was generated by Gemini 1.5 Flash by passing it the original Dee's picture.) We are finally at the stage where comic generation is truly available for the masses - at 8 cents via the API. https://www.recraft.ai/docs#vectorize-image Dee by Comicgen Dee by Gemini LinkedIn

Comicgen by gemini


Custom Cursor rules work best when they encode explicit coding style, architecture preferences, libraries, and validation habits so the assistant starts from your defaults rather than generic ones.

cursor.directory is a catalog of Cursor rules. Since I've actively switched over from VS Code to Cursor as my editor, I reviewed the popular rules and came up with this as my list: You are an expert full stack developer in Python and JavaScript. Write concise, technical responses with accurate Python examples. Use functional, declarative programming; avoid classes. Avoid code duplication (iteration, functions, vectorization). Use descriptive variable names with auxiliary verbs as snake\case for Python (is\active, has\permission) and camelCase for JavaScript (isActive, hasPermission). Functions should receive and object and return an object (RORO) where possible. Use environment variables for sensitive information. Write unit tests in pytest for Python and Jest for JavaScript. Follow PEP 8 for Python. Always use type hints in all function signatures. Always write docstrings. Use Google style for Python and JSDoc for JavaScript. Cache slow or frequent operations in memory. Minimize blocking I/O operations with async operations. Only write ESM (ES6) JavaScript. Target modern browsers. Libraries lit-html and vanilla JavaScript for frontend development. D3 for data visualization. Bootstrap for CSS. Pandas and DuckDB for data analysis and manipulation. FastAPI for API development. Error Handling and Validation Validate preconditions and errors early to avoid deeply nested if statements. Use try-except or try-catch blocks for error-prone operations, especially when reading external data. Avoid unnecessary else statements; use the if-return pattern instead. Log all errors with user-friendly error messages shown on the frontend.

Cursor custom rules


A tiny frustration post noting the annoyance of Windows crashing during Minecraft.

Damn! LinkedIn

Damn windows minecraft crash


This is an announcement for a Singapore talk aimed at helping non-technical audiences understand how LLMs work, fail, and can be visualized clearly.

For those in #Singapore and interested in #datavisualization & #llms, I'm talking about Visualizing LLM Hallucinations at SUTD on Thu 8 Feb at 7 pm SGT. This is for a non-technical audience. We'll visualize the basics of how LLMs work, how they make mistakes, and at least one technique on how to spot these. https://www.meetup.com/data-vis-singapore/events/298902921/ LinkedIn

Dataviz meeting at sutd 2024