Embeddings in DuckDB

This article on Using DuckDB for Embeddings and Vector Search by Sören Brunk shows a number of DuckDB features I wasn’t aware of. DuckDB can read directly from Huggingface datasets DuckDB can read just the parts of a .parquet file it needs, even over HTTP DuckDB lets you write custom functions in Python DuckDB now has a vector similarity search extension I’ve recently become a DuckDB fan and continue to be impressed.

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

From Laptops to Chatbots: Coding at 30,000 ft

Until recently, I could code on flights. This year, I lost that ability. Again. It’s happened before. In each case, technology has solved the problem for me. Here’s the history. I need a laptop. Since 2001, I’ve never been without one on a flight. I need power. Since 2005, I use dark mode and every low power feature available. (I also became good at finding hidden power outlets.) ...

From Calvin & Hobbes to Photo Tagging: Excel's Unexpected Image Capability

In Excel, using Visual Basic, you can change an image as you scroll. This makes it easy to look at each image and annotate it. This is how I transcribed every Calvin & Hobbes. I used this technique first when typing out the strips during my train rides from Bandra to Churchgate. I had an opportunity to re-apply it recently when we needed to tag hundreds of photographs based on a set of criteria. ...

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

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