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

Embeddings similarity threshold

text-embedding-ada-002 used to give high cosine similarity between texts. I used to consider 85% a reasonable threshold for similarity. I almost never got a similarity less than 50%. text-embedding-3-small and text-embedding-3-large give much lower cosine similarities between texts. For example, take these 5 words: “apple”, “orange”, “Facebook”, “Jamaica”, “Australia”. Here is the similarity between every pair of words across the 3 models: For our words, new text-embedding-3-* models have an average similarity of ~43% while the older text-embedding-ada-002 model had ~85%. ...

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. ...

What does Gramener ask ChatGPT?

I looked at how Gramener uses ChatGPT Plus by evaluating 600+ chats asked over 3 months from Oct 2023 to Jan 2024. The team asks 6 questions a day. We don't track who or how many actively use ChatGPT Plus. This also excludes personal ChatGPT accounts. Still, 6/day is low for an entire team put together. The questions fall into 8 categories. Category%Excel, data exploration & analysis25%Text extraction and summarization13%HTML, CSS, or JavaScript code13%Python code13%LLMs, AI and use cases9%OCR and image analysis9%Generate images, logos, and designs7%General knowledge, policy & environment5%Audio and translation5% Here are some questions from each category - to give you an idea of emergent ChatGPT Plus usage. ...

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 ...

My Year in 2023

In 2023, I made 3 resolutions: Run 50 experiments. I managed 44 / 50. (Here are some). Learnings: I need to improve planning (9), scepticism (6), and lateral thinking (4). 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. Calendar integrity, i.e. stick to my calendar. I succeeded over 95% of the time. My most memorable events in 2023 were: ...

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: What does “changing my environment involve”? What can I change? Will I succeed? Does it affect my thoughts? Can I track this? Here are the results. ...

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. ...

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. ...

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 user.id.endswith(("@gramener.com", "@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.” ...

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 சகலகலா சம்மந்தி.) ...

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. ...

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.) ...

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. ...

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: The “/” in the role is causing a problem. (Developer mistake.) The role exists in one table but not the other. (Recruitment team mistake.) The application wasn’t set up / restarted properly. (IT mistake.) All three were wrong. So I dug deeper. ...

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: TeamSkill IndexApr-23May-23Jun-23Jul-23Consulting0%0%Analytics33%33%Technology72%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. ...

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.) ...

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. 14 Jan. ❌ Summarise from three research reports 12 Jan. ❌ UIFactory experiment ✅ Decide if I am a (…) 11 Jan. ❌ UIFactory experiment ✅ Agree on publishing in (…) 10 Jan. ❌ Client video. ❌ UIFactory experiment 09 Jan. ❌ UIFactory experiment. ❌ Attrition email as a story 07 Jan. ❌ ZS visual 06 Jan. ❌ Release Gramex Guide. ✅ UWC application 05 Jan. ❌ Publish network cluster post. ❌ Release Gramex guide 04 Jan. ❌ Publish network cluster post. ✅ Release Gramex. 03 Jan. ✅ Publish election TDS video. ❌ Publish Network cluster post. 02 Jan. ❌ Publish election TDS video. ❌ Publish Network cluster post. 01 Jan. ❌ Publish Network cluster post. ✅ Finalize SG school. I completed 23 / 57 things (40%). That’s one of my TOP priorities. ...

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. Algorithmic. Sort Kaggle books based on popularity, rating, and age. Pick the top 10 (or 50) Serendipitous. Go to bookstores and libraries. Pick the most popular books Award-winning. Pick from the Pulitzer, Booker, Nobel, Hugo, and other award winners 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): ...

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 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. 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. 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. 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 ...